-- addDependentFile examples/golden/types/structs/anonymous.h
{-| __C declaration:__ @struct \@S1_c@

    __defined at:__ @types\/structs\/anonymous.h 3:3@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S1_c
    = S1_c {s1_c_a :: CInt
            {- ^ __C declaration:__ @a@

                 __defined at:__ @types\/structs\/anonymous.h 4:9@

                 __exported by:__ @types\/structs\/anonymous.h@
            -},
            s1_c_b :: CInt
            {- ^ __C declaration:__ @b@

                 __defined at:__ @types\/structs\/anonymous.h 5:9@

                 __exported by:__ @types\/structs\/anonymous.h@
            -}}
      {- ^ __C declaration:__ @struct \@S1_c@

           __defined at:__ @types\/structs\/anonymous.h 3:3@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S1_c
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S1_c
    where readRaw = \ptr_0 -> (pure S1_c <*> readRaw (Proxy @"s1_c_a") ptr_0) <*> readRaw (Proxy @"s1_c_b") ptr_0
instance WriteRaw S1_c
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S1_c s1_c_a_2
                                            s1_c_b_3 -> writeRaw (Proxy @"s1_c_a") ptr_0 s1_c_a_2 >> writeRaw (Proxy @"s1_c_b") ptr_0 s1_c_b_3
deriving via (EquivStorable S1_c) instance Storable S1_c
instance HasCField S1_c "s1_c_a"
    where type CFieldType S1_c "s1_c_a" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S1_c "s1_c_a") =>
         HasField "s1_c_a" (Ptr S1_c) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_c_a")
instance HasCField S1_c "s1_c_b"
    where type CFieldType S1_c "s1_c_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S1_c "s1_c_b") =>
         HasField "s1_c_b" (Ptr S1_c) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_c_b")
{-| __C declaration:__ @struct S1@

    __defined at:__ @types\/structs\/anonymous.h 2:8@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S1
    = S1 {s1_c :: S1_c
          {- ^ __C declaration:__ @c@

               __defined at:__ @types\/structs\/anonymous.h 6:5@

               __exported by:__ @types\/structs\/anonymous.h@
          -},
          s1_d :: CInt
          {- ^ __C declaration:__ @d@

               __defined at:__ @types\/structs\/anonymous.h 8:7@

               __exported by:__ @types\/structs\/anonymous.h@
          -}}
      {- ^ __C declaration:__ @struct S1@

           __defined at:__ @types\/structs\/anonymous.h 2:8@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S1
    where staticSizeOf = \_ -> 12 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S1
    where readRaw = \ptr_0 -> (pure S1 <*> readRaw (Proxy @"s1_c") ptr_0) <*> readRaw (Proxy @"s1_d") ptr_0
instance WriteRaw S1
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S1 s1_c_2
                                          s1_d_3 -> writeRaw (Proxy @"s1_c") ptr_0 s1_c_2 >> writeRaw (Proxy @"s1_d") ptr_0 s1_d_3
deriving via (EquivStorable S1) instance Storable S1
instance HasCField S1 "s1_c"
    where type CFieldType S1 "s1_c" = S1_c
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S1 "s1_c") =>
         HasField "s1_c" (Ptr S1) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_c")
instance HasCField S1 "s1_d"
    where type CFieldType S1 "s1_d" = CInt
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType S1 "s1_d") =>
         HasField "s1_d" (Ptr S1) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_d")
{-| __C declaration:__ @struct \@S2_inner_deep@

    __defined at:__ @types\/structs\/anonymous.h 15:5@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S2_inner_deep
    = S2_inner_deep {s2_inner_deep_b :: CInt
                     {- ^ __C declaration:__ @b@

                          __defined at:__ @types\/structs\/anonymous.h 16:11@

                          __exported by:__ @types\/structs\/anonymous.h@
                     -}}
      {- ^ __C declaration:__ @struct \@S2_inner_deep@

           __defined at:__ @types\/structs\/anonymous.h 15:5@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S2_inner_deep
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S2_inner_deep
    where readRaw = \ptr_0 -> pure S2_inner_deep <*> readRaw (Proxy @"s2_inner_deep_b") ptr_0
instance WriteRaw S2_inner_deep
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S2_inner_deep s2_inner_deep_b_2 -> writeRaw (Proxy @"s2_inner_deep_b") ptr_0 s2_inner_deep_b_2
deriving via (EquivStorable S2_inner_deep) instance Storable S2_inner_deep
instance HasCField S2_inner_deep "s2_inner_deep_b"
    where type CFieldType S2_inner_deep "s2_inner_deep_b" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S2_inner_deep "s2_inner_deep_b") =>
         HasField "s2_inner_deep_b" (Ptr S2_inner_deep) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_inner_deep_b")
{-| __C declaration:__ @struct \@S2_inner@

    __defined at:__ @types\/structs\/anonymous.h 13:3@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S2_inner
    = S2_inner {s2_inner_a :: CInt
                {- ^ __C declaration:__ @a@

                     __defined at:__ @types\/structs\/anonymous.h 14:9@

                     __exported by:__ @types\/structs\/anonymous.h@
                -},
                s2_inner_deep :: S2_inner_deep
                {- ^ __C declaration:__ @deep@

                     __defined at:__ @types\/structs\/anonymous.h 17:7@

                     __exported by:__ @types\/structs\/anonymous.h@
                -}}
      {- ^ __C declaration:__ @struct \@S2_inner@

           __defined at:__ @types\/structs\/anonymous.h 13:3@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S2_inner
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S2_inner
    where readRaw = \ptr_0 -> (pure S2_inner <*> readRaw (Proxy @"s2_inner_a") ptr_0) <*> readRaw (Proxy @"s2_inner_deep") ptr_0
instance WriteRaw S2_inner
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S2_inner s2_inner_a_2
                                                s2_inner_deep_3 -> writeRaw (Proxy @"s2_inner_a") ptr_0 s2_inner_a_2 >> writeRaw (Proxy @"s2_inner_deep") ptr_0 s2_inner_deep_3
deriving via (EquivStorable S2_inner) instance Storable S2_inner
instance HasCField S2_inner "s2_inner_a"
    where type CFieldType S2_inner "s2_inner_a" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S2_inner "s2_inner_a") =>
         HasField "s2_inner_a" (Ptr S2_inner) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_inner_a")
instance HasCField S2_inner "s2_inner_deep"
    where type CFieldType S2_inner "s2_inner_deep" = S2_inner_deep
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S2_inner "s2_inner_deep") =>
         HasField "s2_inner_deep" (Ptr S2_inner) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_inner_deep")
{-| __C declaration:__ @struct S2@

    __defined at:__ @types\/structs\/anonymous.h 12:8@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S2
    = S2 {s2_inner :: S2_inner
          {- ^ __C declaration:__ @inner@

               __defined at:__ @types\/structs\/anonymous.h 18:5@

               __exported by:__ @types\/structs\/anonymous.h@
          -},
          s2_d :: CInt
          {- ^ __C declaration:__ @d@

               __defined at:__ @types\/structs\/anonymous.h 20:7@

               __exported by:__ @types\/structs\/anonymous.h@
          -}}
      {- ^ __C declaration:__ @struct S2@

           __defined at:__ @types\/structs\/anonymous.h 12:8@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S2
    where staticSizeOf = \_ -> 12 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S2
    where readRaw = \ptr_0 -> (pure S2 <*> readRaw (Proxy @"s2_inner") ptr_0) <*> readRaw (Proxy @"s2_d") ptr_0
instance WriteRaw S2
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S2 s2_inner_2
                                          s2_d_3 -> writeRaw (Proxy @"s2_inner") ptr_0 s2_inner_2 >> writeRaw (Proxy @"s2_d") ptr_0 s2_d_3
deriving via (EquivStorable S2) instance Storable S2
instance HasCField S2 "s2_inner"
    where type CFieldType S2 "s2_inner" = S2_inner
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S2 "s2_inner") =>
         HasField "s2_inner" (Ptr S2) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_inner")
instance HasCField S2 "s2_d"
    where type CFieldType S2 "s2_d" = CInt
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType S2 "s2_d") =>
         HasField "s2_d" (Ptr S2) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_d")
{-| __C declaration:__ @struct S3@

    __defined at:__ @types\/structs\/anonymous.h 24:8@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S3
    = S3 {s3_c :: (Ptr (Ptr S3_c))
          {- ^ __C declaration:__ @c@

               __defined at:__ @types\/structs\/anonymous.h 28:7@

               __exported by:__ @types\/structs\/anonymous.h@
          -},
          s3_d :: CInt
          {- ^ __C declaration:__ @d@

               __defined at:__ @types\/structs\/anonymous.h 30:7@

               __exported by:__ @types\/structs\/anonymous.h@
          -}}
      {- ^ __C declaration:__ @struct S3@

           __defined at:__ @types\/structs\/anonymous.h 24:8@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S3
    where staticSizeOf = \_ -> 16 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw S3
    where readRaw = \ptr_0 -> (pure S3 <*> readRaw (Proxy @"s3_c") ptr_0) <*> readRaw (Proxy @"s3_d") ptr_0
instance WriteRaw S3
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S3 s3_c_2
                                          s3_d_3 -> writeRaw (Proxy @"s3_c") ptr_0 s3_c_2 >> writeRaw (Proxy @"s3_d") ptr_0 s3_d_3
deriving via (EquivStorable S3) instance Storable S3
instance HasCField S3 "s3_c"
    where type CFieldType S3 "s3_c" = Ptr (Ptr S3_c)
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S3 "s3_c") =>
         HasField "s3_c" (Ptr S3) (Ptr ty)
    where getField = fromPtr (Proxy @"s3_c")
instance HasCField S3 "s3_d"
    where type CFieldType S3 "s3_d" = CInt
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType S3 "s3_d") =>
         HasField "s3_d" (Ptr S3) (Ptr ty)
    where getField = fromPtr (Proxy @"s3_d")
{-| __C declaration:__ @struct \@S3_c@

    __defined at:__ @types\/structs\/anonymous.h 25:3@

    __exported by:__ @types\/structs\/anonymous.h@
-}
data S3_c
    = S3_c {s3_c_a :: CInt
            {- ^ __C declaration:__ @a@

                 __defined at:__ @types\/structs\/anonymous.h 26:9@

                 __exported by:__ @types\/structs\/anonymous.h@
            -},
            s3_c_b :: CInt
            {- ^ __C declaration:__ @b@

                 __defined at:__ @types\/structs\/anonymous.h 27:9@

                 __exported by:__ @types\/structs\/anonymous.h@
            -}}
      {- ^ __C declaration:__ @struct \@S3_c@

           __defined at:__ @types\/structs\/anonymous.h 25:3@

           __exported by:__ @types\/structs\/anonymous.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S3_c
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S3_c
    where readRaw = \ptr_0 -> (pure S3_c <*> readRaw (Proxy @"s3_c_a") ptr_0) <*> readRaw (Proxy @"s3_c_b") ptr_0
instance WriteRaw S3_c
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S3_c s3_c_a_2
                                            s3_c_b_3 -> writeRaw (Proxy @"s3_c_a") ptr_0 s3_c_a_2 >> writeRaw (Proxy @"s3_c_b") ptr_0 s3_c_b_3
deriving via (EquivStorable S3_c) instance Storable S3_c
instance HasCField S3_c "s3_c_a"
    where type CFieldType S3_c "s3_c_a" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S3_c "s3_c_a") =>
         HasField "s3_c_a" (Ptr S3_c) (Ptr ty)
    where getField = fromPtr (Proxy @"s3_c_a")
instance HasCField S3_c "s3_c_b"
    where type CFieldType S3_c "s3_c_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S3_c "s3_c_b") =>
         HasField "s3_c_b" (Ptr S3_c) (Ptr ty)
    where getField = fromPtr (Proxy @"s3_c_b")
