-- addDependentFile examples/golden/edge-cases/anon_multiple_fields.h
{-| __C declaration:__ @struct \@some_struct_field1@

    __defined at:__ @edge-cases\/anon_multiple_fields.h 5:3@

    __exported by:__ @edge-cases\/anon_multiple_fields.h@
-}
data Some_struct_field1
    = Some_struct_field1 {some_struct_field1_x :: CInt
                          {- ^ __C declaration:__ @x@

                               __defined at:__ @edge-cases\/anon_multiple_fields.h 5:16@

                               __exported by:__ @edge-cases\/anon_multiple_fields.h@
                          -},
                          some_struct_field1_y :: CInt
                          {- ^ __C declaration:__ @y@

                               __defined at:__ @edge-cases\/anon_multiple_fields.h 5:23@

                               __exported by:__ @edge-cases\/anon_multiple_fields.h@
                          -}}
      {- ^ __C declaration:__ @struct \@some_struct_field1@

           __defined at:__ @edge-cases\/anon_multiple_fields.h 5:3@

           __exported by:__ @edge-cases\/anon_multiple_fields.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Some_struct_field1
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Some_struct_field1
    where readRaw = \ptr_0 -> (pure Some_struct_field1 <*> readRaw (Proxy @"some_struct_field1_x") ptr_0) <*> readRaw (Proxy @"some_struct_field1_y") ptr_0
instance WriteRaw Some_struct_field1
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Some_struct_field1 some_struct_field1_x_2
                                                          some_struct_field1_y_3 -> writeRaw (Proxy @"some_struct_field1_x") ptr_0 some_struct_field1_x_2 >> writeRaw (Proxy @"some_struct_field1_y") ptr_0 some_struct_field1_y_3
deriving via (EquivStorable Some_struct_field1) instance Storable Some_struct_field1
instance HasCField Some_struct_field1 "some_struct_field1_x"
    where type CFieldType Some_struct_field1
                          "some_struct_field1_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty
              (CFieldType Some_struct_field1 "some_struct_field1_x") =>
         HasField "some_struct_field1_x" (Ptr Some_struct_field1) (Ptr ty)
    where getField = fromPtr (Proxy @"some_struct_field1_x")
instance HasCField Some_struct_field1 "some_struct_field1_y"
    where type CFieldType Some_struct_field1
                          "some_struct_field1_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty
              (CFieldType Some_struct_field1 "some_struct_field1_y") =>
         HasField "some_struct_field1_y" (Ptr Some_struct_field1) (Ptr ty)
    where getField = fromPtr (Proxy @"some_struct_field1_y")
{-| __C declaration:__ @struct some_struct@

    __defined at:__ @edge-cases\/anon_multiple_fields.h 4:8@

    __exported by:__ @edge-cases\/anon_multiple_fields.h@
-}
data Some_struct
    = Some_struct {some_struct_field1 :: Some_struct_field1
                   {- ^ __C declaration:__ @field1@

                        __defined at:__ @edge-cases\/anon_multiple_fields.h 5:28@

                        __exported by:__ @edge-cases\/anon_multiple_fields.h@
                   -},
                   some_struct_field2 :: Some_struct_field1
                   {- ^ __C declaration:__ @field2@

                        __defined at:__ @edge-cases\/anon_multiple_fields.h 5:36@

                        __exported by:__ @edge-cases\/anon_multiple_fields.h@
                   -},
                   some_struct_field3 :: Some_struct_field1
                   {- ^ __C declaration:__ @field3@

                        __defined at:__ @edge-cases\/anon_multiple_fields.h 5:44@

                        __exported by:__ @edge-cases\/anon_multiple_fields.h@
                   -}}
      {- ^ __C declaration:__ @struct some_struct@

           __defined at:__ @edge-cases\/anon_multiple_fields.h 4:8@

           __exported by:__ @edge-cases\/anon_multiple_fields.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Some_struct
    where staticSizeOf = \_ -> 24 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Some_struct
    where readRaw = \ptr_0 -> ((pure Some_struct <*> readRaw (Proxy @"some_struct_field1") ptr_0) <*> readRaw (Proxy @"some_struct_field2") ptr_0) <*> readRaw (Proxy @"some_struct_field3") ptr_0
instance WriteRaw Some_struct
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Some_struct some_struct_field1_2
                                                   some_struct_field2_3
                                                   some_struct_field3_4 -> writeRaw (Proxy @"some_struct_field1") ptr_0 some_struct_field1_2 >> (writeRaw (Proxy @"some_struct_field2") ptr_0 some_struct_field2_3 >> writeRaw (Proxy @"some_struct_field3") ptr_0 some_struct_field3_4)
deriving via (EquivStorable Some_struct) instance Storable Some_struct
instance HasCField Some_struct "some_struct_field1"
    where type CFieldType Some_struct
                          "some_struct_field1" = Some_struct_field1
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Some_struct "some_struct_field1") =>
         HasField "some_struct_field1" (Ptr Some_struct) (Ptr ty)
    where getField = fromPtr (Proxy @"some_struct_field1")
instance HasCField Some_struct "some_struct_field2"
    where type CFieldType Some_struct
                          "some_struct_field2" = Some_struct_field1
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType Some_struct "some_struct_field2") =>
         HasField "some_struct_field2" (Ptr Some_struct) (Ptr ty)
    where getField = fromPtr (Proxy @"some_struct_field2")
instance HasCField Some_struct "some_struct_field3"
    where type CFieldType Some_struct
                          "some_struct_field3" = Some_struct_field1
          offset# = \_ -> \_ -> 16
instance TyEq ty (CFieldType Some_struct "some_struct_field3") =>
         HasField "some_struct_field3" (Ptr Some_struct) (Ptr ty)
    where getField = fromPtr (Proxy @"some_struct_field3")
