-- addDependentFile musl-include/x86_64/bits/stdint.h
-- addDependentFile musl-include/x86_64/bits/alltypes.h
-- addDependentFile musl-include/x86_64/stdint.h
-- addDependentFile musl-include/x86_64/stdbool.h
-- addDependentFile examples/golden/edge-cases/distilled_lib_1.h
-- #include <edge-cases/distilled_lib_1.h>
-- int32_t hs_bindgen_57cb99ed92c001ad (
--   a_type_t *arg1,
--   uint32_t arg2,
--   uint8_t (*arg3)[]
-- )
-- {
--   return some_fun(arg1, arg2, *arg3);
-- }
-- int32_t hs_bindgen_2a91c367a9380a63 (
--   a_type_t *arg1,
--   uint32_t arg2,
--   uint8_t (*arg3)[]
-- )
-- {
--   return some_fun(arg1, arg2, *arg3);
-- }
-- /* test_edgecasesdistilled_lib_1_Example_get_some_fun */
-- __attribute__ ((const))
-- int32_t (*hs_bindgen_1ade3cfc18679577 (void)) (
--   a_type_t *arg1,
--   uint32_t arg2,
--   uint8_t arg3[]
-- )
-- {
--   return &some_fun;
-- }
-- /* test_edgecasesdistilled_lib_1_Example_get_v */
-- __attribute__ ((const))
-- var_t *hs_bindgen_226b16768d8906f3 (void)
-- {
--   return &v;
-- }
{-| __C declaration:__ @struct another_typedef_struct_t@

    __defined at:__ @edge-cases\/distilled_lib_1.h 9:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
data Another_typedef_struct_t
    = Another_typedef_struct_t {another_typedef_struct_t_foo :: CInt
                                {- ^ __C declaration:__ @foo@

                                     __defined at:__ @edge-cases\/distilled_lib_1.h 9:22@

                                     __exported by:__ @edge-cases\/distilled_lib_1.h@
                                -},
                                another_typedef_struct_t_bar :: CChar
                                {- ^ __C declaration:__ @bar@

                                     __defined at:__ @edge-cases\/distilled_lib_1.h 9:32@

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

           __defined at:__ @edge-cases\/distilled_lib_1.h 9:9@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Another_typedef_struct_t
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Another_typedef_struct_t
    where readRaw = \ptr_0 -> (pure Another_typedef_struct_t <*> readRaw (Proxy @"another_typedef_struct_t_foo") ptr_0) <*> readRaw (Proxy @"another_typedef_struct_t_bar") ptr_0
instance WriteRaw Another_typedef_struct_t
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Another_typedef_struct_t another_typedef_struct_t_foo_2
                                                                another_typedef_struct_t_bar_3 -> writeRaw (Proxy @"another_typedef_struct_t_foo") ptr_0 another_typedef_struct_t_foo_2 >> writeRaw (Proxy @"another_typedef_struct_t_bar") ptr_0 another_typedef_struct_t_bar_3
deriving via (EquivStorable Another_typedef_struct_t) instance Storable Another_typedef_struct_t
instance HasCField Another_typedef_struct_t
                   "another_typedef_struct_t_foo"
    where type CFieldType Another_typedef_struct_t
                          "another_typedef_struct_t_foo" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty
              (CFieldType Another_typedef_struct_t
                          "another_typedef_struct_t_foo") =>
         HasField "another_typedef_struct_t_foo"
                  (Ptr Another_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"another_typedef_struct_t_foo")
instance HasCField Another_typedef_struct_t
                   "another_typedef_struct_t_bar"
    where type CFieldType Another_typedef_struct_t
                          "another_typedef_struct_t_bar" = CChar
          offset# = \_ -> \_ -> 4
instance TyEq ty
              (CFieldType Another_typedef_struct_t
                          "another_typedef_struct_t_bar") =>
         HasField "another_typedef_struct_t_bar"
                  (Ptr Another_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"another_typedef_struct_t_bar")
{-| __C declaration:__ @enum another_typedef_enum_e@

    __defined at:__ @edge-cases\/distilled_lib_1.h 10:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype Another_typedef_enum_e
    = Another_typedef_enum_e {unwrapAnother_typedef_enum_e :: CUInt}
      {- ^ __C declaration:__ @enum another_typedef_enum_e@

           __defined at:__ @edge-cases\/distilled_lib_1.h 10:9@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize Another_typedef_enum_e
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Another_typedef_enum_e
    where readRaw = \ptr_0 -> pure Another_typedef_enum_e <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw Another_typedef_enum_e
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Another_typedef_enum_e unwrapAnother_typedef_enum_e_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapAnother_typedef_enum_e_2
deriving via (EquivStorable Another_typedef_enum_e) instance Storable Another_typedef_enum_e
deriving via CUInt instance Prim Another_typedef_enum_e
instance CEnum Another_typedef_enum_e
    where type CEnumZ Another_typedef_enum_e = CUInt
          toCEnum = Another_typedef_enum_e
          fromCEnum = unwrapAnother_typedef_enum_e
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "FOO"),
                                                         (1, singleton "BAR")]
          showsUndeclared = showsWrappedUndeclared "Another_typedef_enum_e"
          readPrecUndeclared = readPrecWrappedUndeclared "Another_typedef_enum_e"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum Another_typedef_enum_e
    where minDeclaredValue = FOO
          maxDeclaredValue = BAR
instance Show Another_typedef_enum_e
    where showsPrec = shows
instance Read Another_typedef_enum_e
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty
              (CFieldType Another_typedef_enum_e
                          "unwrapAnother_typedef_enum_e") =>
         HasField "unwrapAnother_typedef_enum_e"
                  (Ptr Another_typedef_enum_e)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapAnother_typedef_enum_e")
instance HasCField Another_typedef_enum_e
                   "unwrapAnother_typedef_enum_e"
    where type CFieldType Another_typedef_enum_e
                          "unwrapAnother_typedef_enum_e" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @FOO@

    __defined at:__ @edge-cases\/distilled_lib_1.h 10:16@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern FOO :: Another_typedef_enum_e
{-| __C declaration:__ @FOO@

    __defined at:__ @edge-cases\/distilled_lib_1.h 10:16@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern FOO = Another_typedef_enum_e 0
{-| __C declaration:__ @BAR@

    __defined at:__ @edge-cases\/distilled_lib_1.h 10:21@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern BAR :: Another_typedef_enum_e
{-| __C declaration:__ @BAR@

    __defined at:__ @edge-cases\/distilled_lib_1.h 10:21@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern BAR = Another_typedef_enum_e 1
{-| __C declaration:__ @A@

    __defined at:__ @edge-cases\/distilled_lib_1.h 11:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a :: CInt
{-| __C declaration:__ @A@

    __defined at:__ @edge-cases\/distilled_lib_1.h 11:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a = 5 :: CInt
{-| __C declaration:__ @B@

    __defined at:__ @edge-cases\/distilled_lib_1.h 12:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
b :: CInt
{-| __C declaration:__ @B@

    __defined at:__ @edge-cases\/distilled_lib_1.h 12:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
b = 3 :: CInt
{-| __C declaration:__ @SOME_DEFINED_CONSTANT@

    __defined at:__ @edge-cases\/distilled_lib_1.h 13:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
sOME_DEFINED_CONSTANT :: CInt
{-| __C declaration:__ @SOME_DEFINED_CONSTANT@

    __defined at:__ @edge-cases\/distilled_lib_1.h 13:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
sOME_DEFINED_CONSTANT = 4 :: CInt
{-| __C declaration:__ @a_type_t@

    __defined at:__ @edge-cases\/distilled_lib_1.h 14:13@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype A_type_t
    = A_type_t {unwrapA_type_t :: CInt}
      {- ^ __C declaration:__ @a_type_t@

           __defined at:__ @edge-cases\/distilled_lib_1.h 14:13@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Ord, Read, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType,
                      Prim,
                      Bitfield,
                      Bits,
                      Bounded,
                      Enum,
                      FiniteBits,
                      Integral,
                      Ix,
                      Num,
                      Real)
instance TyEq ty (CFieldType A_type_t "unwrapA_type_t") =>
         HasField "unwrapA_type_t" (Ptr A_type_t) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapA_type_t")
instance HasCField A_type_t "unwrapA_type_t"
    where type CFieldType A_type_t "unwrapA_type_t" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @var_t@

    __defined at:__ @edge-cases\/distilled_lib_1.h 15:13@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype Var_t
    = Var_t {unwrapVar_t :: CInt}
      {- ^ __C declaration:__ @var_t@

           __defined at:__ @edge-cases\/distilled_lib_1.h 15:13@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Ord, Read, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType,
                      Prim,
                      Bitfield,
                      Bits,
                      Bounded,
                      Enum,
                      FiniteBits,
                      Integral,
                      Ix,
                      Num,
                      Real)
instance TyEq ty (CFieldType Var_t "unwrapVar_t") =>
         HasField "unwrapVar_t" (Ptr Var_t) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapVar_t")
instance HasCField Var_t "unwrapVar_t"
    where type CFieldType Var_t "unwrapVar_t" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct a_typedef_struct@

    __defined at:__ @edge-cases\/distilled_lib_1.h 35:16@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
data A_typedef_struct_t
    = A_typedef_struct_t {a_typedef_struct_t_field_0 :: CBool
                          {- ^ __C declaration:__ @field_0@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 37:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_1 :: HsBindgen.Runtime.LibC.Word8
                          {- ^ __C declaration:__ @field_1@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 38:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_2 :: HsBindgen.Runtime.LibC.Word16
                          {- ^ __C declaration:__ @field_2@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 39:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_3 :: HsBindgen.Runtime.LibC.Word32
                          {- ^ __C declaration:__ @field_3@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 40:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_4 :: Another_typedef_struct_t
                          {- ^ __C declaration:__ @field_4@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 41:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_5 :: (Ptr Another_typedef_struct_t)
                          {- ^ __C declaration:__ @field_5@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 42:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_6 :: (Ptr Void)
                          {- ^ __C declaration:__ @field_6@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 43:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_7 :: (ConstantArray 7
                                                                       HsBindgen.Runtime.LibC.Word32)
                          {- ^ __C declaration:__ @field_7@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 44:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_8 :: Another_typedef_enum_e
                          {- ^ __C declaration:__ @field_8@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 45:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_9 :: (ConstantArray 4
                                                                       Another_typedef_enum_e)
                          {- ^ __C declaration:__ @field_9@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 46:31@

                               __exported by:__ @edge-cases\/distilled_lib_1.h@
                          -},
                          a_typedef_struct_t_field_10 :: (ConstantArray 5
                                                                        (ConstantArray 3
                                                                                       Another_typedef_enum_e))
                          {- ^ __C declaration:__ @field_10@

                               __defined at:__ @edge-cases\/distilled_lib_1.h 47:31@

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

           __defined at:__ @edge-cases\/distilled_lib_1.h 35:16@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize A_typedef_struct_t
    where staticSizeOf = \_ -> 140 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw A_typedef_struct_t
    where readRaw = \ptr_0 -> ((((((((((pure A_typedef_struct_t <*> readRaw (Proxy @"a_typedef_struct_t_field_0") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_1") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_2") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_3") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_4") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_5") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_6") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_7") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_8") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_9") ptr_0) <*> readRaw (Proxy @"a_typedef_struct_t_field_10") ptr_0
instance WriteRaw A_typedef_struct_t
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       A_typedef_struct_t a_typedef_struct_t_field_0_2
                                                          a_typedef_struct_t_field_1_3
                                                          a_typedef_struct_t_field_2_4
                                                          a_typedef_struct_t_field_3_5
                                                          a_typedef_struct_t_field_4_6
                                                          a_typedef_struct_t_field_5_7
                                                          a_typedef_struct_t_field_6_8
                                                          a_typedef_struct_t_field_7_9
                                                          a_typedef_struct_t_field_8_10
                                                          a_typedef_struct_t_field_9_11
                                                          a_typedef_struct_t_field_10_12 -> writeRaw (Proxy @"a_typedef_struct_t_field_0") ptr_0 a_typedef_struct_t_field_0_2 >> (writeRaw (Proxy @"a_typedef_struct_t_field_1") ptr_0 a_typedef_struct_t_field_1_3 >> (writeRaw (Proxy @"a_typedef_struct_t_field_2") ptr_0 a_typedef_struct_t_field_2_4 >> (writeRaw (Proxy @"a_typedef_struct_t_field_3") ptr_0 a_typedef_struct_t_field_3_5 >> (writeRaw (Proxy @"a_typedef_struct_t_field_4") ptr_0 a_typedef_struct_t_field_4_6 >> (writeRaw (Proxy @"a_typedef_struct_t_field_5") ptr_0 a_typedef_struct_t_field_5_7 >> (writeRaw (Proxy @"a_typedef_struct_t_field_6") ptr_0 a_typedef_struct_t_field_6_8 >> (writeRaw (Proxy @"a_typedef_struct_t_field_7") ptr_0 a_typedef_struct_t_field_7_9 >> (writeRaw (Proxy @"a_typedef_struct_t_field_8") ptr_0 a_typedef_struct_t_field_8_10 >> (writeRaw (Proxy @"a_typedef_struct_t_field_9") ptr_0 a_typedef_struct_t_field_9_11 >> writeRaw (Proxy @"a_typedef_struct_t_field_10") ptr_0 a_typedef_struct_t_field_10_12)))))))))
deriving via (EquivStorable A_typedef_struct_t) instance Storable A_typedef_struct_t
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_0"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_0" = CBool
          offset# = \_ -> \_ -> 0
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_0") =>
         HasField "a_typedef_struct_t_field_0"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_0")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_1"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_1" = HsBindgen.Runtime.LibC.Word8
          offset# = \_ -> \_ -> 1
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_1") =>
         HasField "a_typedef_struct_t_field_1"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_1")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_2"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_2" = HsBindgen.Runtime.LibC.Word16
          offset# = \_ -> \_ -> 2
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_2") =>
         HasField "a_typedef_struct_t_field_2"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_2")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_3"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_3" = HsBindgen.Runtime.LibC.Word32
          offset# = \_ -> \_ -> 4
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_3") =>
         HasField "a_typedef_struct_t_field_3"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_3")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_4"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_4" = Another_typedef_struct_t
          offset# = \_ -> \_ -> 8
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_4") =>
         HasField "a_typedef_struct_t_field_4"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_4")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_5"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_5" = Ptr Another_typedef_struct_t
          offset# = \_ -> \_ -> 16
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_5") =>
         HasField "a_typedef_struct_t_field_5"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_5")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_6"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_6" = Ptr Void
          offset# = \_ -> \_ -> 24
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_6") =>
         HasField "a_typedef_struct_t_field_6"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_6")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_7"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_7" = ConstantArray 7
                                                                       HsBindgen.Runtime.LibC.Word32
          offset# = \_ -> \_ -> 32
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_7") =>
         HasField "a_typedef_struct_t_field_7"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_7")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_8"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_8" = Another_typedef_enum_e
          offset# = \_ -> \_ -> 60
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_8") =>
         HasField "a_typedef_struct_t_field_8"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_8")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_9"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_9" = ConstantArray 4
                                                                       Another_typedef_enum_e
          offset# = \_ -> \_ -> 64
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_9") =>
         HasField "a_typedef_struct_t_field_9"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_9")
instance HasCField A_typedef_struct_t "a_typedef_struct_t_field_10"
    where type CFieldType A_typedef_struct_t
                          "a_typedef_struct_t_field_10" = ConstantArray 5
                                                                        (ConstantArray 3
                                                                                       Another_typedef_enum_e)
          offset# = \_ -> \_ -> 80
instance TyEq ty
              (CFieldType A_typedef_struct_t "a_typedef_struct_t_field_10") =>
         HasField "a_typedef_struct_t_field_10"
                  (Ptr A_typedef_struct_t)
                  (Ptr ty)
    where getField = fromPtr (Proxy @"a_typedef_struct_t_field_10")
{-| __C declaration:__ @A_DEFINE_0@

    __defined at:__ @edge-cases\/distilled_lib_1.h 53:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_0 :: CInt
{-| __C declaration:__ @A_DEFINE_0@

    __defined at:__ @edge-cases\/distilled_lib_1.h 53:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_0 = 0 :: CInt
{-| __C declaration:__ @A_DEFINE_1@

    __defined at:__ @edge-cases\/distilled_lib_1.h 54:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_1 :: CUInt
{-| __C declaration:__ @A_DEFINE_1@

    __defined at:__ @edge-cases\/distilled_lib_1.h 54:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_1 = 20560 :: CUInt
{-| __C declaration:__ @A_DEFINE_2@

    __defined at:__ @edge-cases\/distilled_lib_1.h 55:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_2 :: CInt
{-| __C declaration:__ @A_DEFINE_2@

    __defined at:__ @edge-cases\/distilled_lib_1.h 55:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
a_DEFINE_2 = 2 :: CInt
{-| __C declaration:__ @TWO_ARGS@

    __defined at:__ @edge-cases\/distilled_lib_1.h 56:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
tWO_ARGS :: (,) CInt CInt
{-| __C declaration:__ @TWO_ARGS@

    __defined at:__ @edge-cases\/distilled_lib_1.h 56:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
tWO_ARGS = (,) (13398 :: CInt) (30874 :: CInt)
{-| __C declaration:__ @enum a_typedef_enum_e@

    __defined at:__ @edge-cases\/distilled_lib_1.h 61:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype A_typedef_enum_e
    = A_typedef_enum_e {unwrapA_typedef_enum_e :: CUChar}
      {- ^ __C declaration:__ @enum a_typedef_enum_e@

           __defined at:__ @edge-cases\/distilled_lib_1.h 61:9@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize A_typedef_enum_e
    where staticSizeOf = \_ -> 1 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw A_typedef_enum_e
    where readRaw = \ptr_0 -> pure A_typedef_enum_e <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw A_typedef_enum_e
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       A_typedef_enum_e unwrapA_typedef_enum_e_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapA_typedef_enum_e_2
deriving via (EquivStorable A_typedef_enum_e) instance Storable A_typedef_enum_e
deriving via CUChar instance Prim A_typedef_enum_e
instance CEnum A_typedef_enum_e
    where type CEnumZ A_typedef_enum_e = CUChar
          toCEnum = A_typedef_enum_e
          fromCEnum = unwrapA_typedef_enum_e
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "ENUM_CASE_0"),
                                                         (1, singleton "ENUM_CASE_1"),
                                                         (2, singleton "ENUM_CASE_2"),
                                                         (3, singleton "ENUM_CASE_3")]
          showsUndeclared = showsWrappedUndeclared "A_typedef_enum_e"
          readPrecUndeclared = readPrecWrappedUndeclared "A_typedef_enum_e"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum A_typedef_enum_e
    where minDeclaredValue = ENUM_CASE_0
          maxDeclaredValue = ENUM_CASE_3
instance Show A_typedef_enum_e
    where showsPrec = shows
instance Read A_typedef_enum_e
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty
              (CFieldType A_typedef_enum_e "unwrapA_typedef_enum_e") =>
         HasField "unwrapA_typedef_enum_e" (Ptr A_typedef_enum_e) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapA_typedef_enum_e")
instance HasCField A_typedef_enum_e "unwrapA_typedef_enum_e"
    where type CFieldType A_typedef_enum_e
                          "unwrapA_typedef_enum_e" = CUChar
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @ENUM_CASE_0@

    __defined at:__ @edge-cases\/distilled_lib_1.h 63:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_0 :: A_typedef_enum_e
{-| __C declaration:__ @ENUM_CASE_0@

    __defined at:__ @edge-cases\/distilled_lib_1.h 63:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_0 = A_typedef_enum_e 0
{-| __C declaration:__ @ENUM_CASE_1@

    __defined at:__ @edge-cases\/distilled_lib_1.h 64:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_1 :: A_typedef_enum_e
{-| __C declaration:__ @ENUM_CASE_1@

    __defined at:__ @edge-cases\/distilled_lib_1.h 64:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_1 = A_typedef_enum_e 1
{-| __C declaration:__ @ENUM_CASE_2@

    __defined at:__ @edge-cases\/distilled_lib_1.h 65:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_2 :: A_typedef_enum_e
{-| __C declaration:__ @ENUM_CASE_2@

    __defined at:__ @edge-cases\/distilled_lib_1.h 65:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_2 = A_typedef_enum_e 2
{-| __C declaration:__ @ENUM_CASE_3@

    __defined at:__ @edge-cases\/distilled_lib_1.h 66:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_3 :: A_typedef_enum_e
{-| __C declaration:__ @ENUM_CASE_3@

    __defined at:__ @edge-cases\/distilled_lib_1.h 66:3@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
pattern ENUM_CASE_3 = A_typedef_enum_e 3
{-| Auxiliary type used by 'Callback_t'

__C declaration:__ @callback_t@

__defined at:__ @edge-cases\/distilled_lib_1.h 77:19@

__exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype Callback_t_Aux
    = Callback_t_Aux {unwrapCallback_t_Aux :: (Ptr Void ->
                                               HsBindgen.Runtime.LibC.Word32 ->
                                               IO HsBindgen.Runtime.LibC.Word32)}
      {- ^ Auxiliary type used by 'Callback_t'

      __C declaration:__ @callback_t@

      __defined at:__ @edge-cases\/distilled_lib_1.h 77:19@

      __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving newtype HasFFIType
foreign import ccall safe "wrapper" hs_bindgen_b6b6922e35047658_base ::
    Ptr Void -> Word32 -> IO Word32
 -> IO (FunPtr (Ptr Void -> Word32 -> IO Word32))
-- __unique:__ @toCallback_t_Aux@
hs_bindgen_b6b6922e35047658 :: Callback_t_Aux ->
                               IO (FunPtr Callback_t_Aux)
-- __unique:__ @toCallback_t_Aux@
hs_bindgen_b6b6922e35047658 = \fun_0 -> fmap castFunPtrFromFFIType (hs_bindgen_b6b6922e35047658_base (toFFIType fun_0))
foreign import ccall safe "dynamic" hs_bindgen_d6debb4b8d5bb869_base ::
    FunPtr (Ptr Void -> Word32 -> IO Word32)
 -> Ptr Void
 -> Word32
 -> IO Word32
-- __unique:__ @fromCallback_t_Aux@
hs_bindgen_d6debb4b8d5bb869 :: FunPtr Callback_t_Aux ->
                               Callback_t_Aux
-- __unique:__ @fromCallback_t_Aux@
hs_bindgen_d6debb4b8d5bb869 = \funPtr_0 -> fromFFIType (hs_bindgen_d6debb4b8d5bb869_base (castFunPtrToFFIType funPtr_0))
instance ToFunPtr Callback_t_Aux
    where toFunPtr = hs_bindgen_b6b6922e35047658
instance FromFunPtr Callback_t_Aux
    where fromFunPtr = hs_bindgen_d6debb4b8d5bb869
instance TyEq ty
              (CFieldType Callback_t_Aux "unwrapCallback_t_Aux") =>
         HasField "unwrapCallback_t_Aux" (Ptr Callback_t_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapCallback_t_Aux")
instance HasCField Callback_t_Aux "unwrapCallback_t_Aux"
    where type CFieldType Callback_t_Aux
                          "unwrapCallback_t_Aux" = Ptr Void ->
                                                   HsBindgen.Runtime.LibC.Word32 ->
                                                   IO HsBindgen.Runtime.LibC.Word32
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @callback_t@

    __defined at:__ @edge-cases\/distilled_lib_1.h 77:19@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
newtype Callback_t
    = Callback_t {unwrapCallback_t :: (FunPtr Callback_t_Aux)}
      {- ^ __C declaration:__ @callback_t@

           __defined at:__ @edge-cases\/distilled_lib_1.h 77:19@

           __exported by:__ @edge-cases\/distilled_lib_1.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType Callback_t "unwrapCallback_t") =>
         HasField "unwrapCallback_t" (Ptr Callback_t) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapCallback_t")
instance HasCField Callback_t "unwrapCallback_t"
    where type CFieldType Callback_t
                          "unwrapCallback_t" = FunPtr Callback_t_Aux
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Safe_some_fun@
foreign import ccall safe "hs_bindgen_57cb99ed92c001ad" hs_bindgen_57cb99ed92c001ad_base ::
    Ptr Void
 -> Word32
 -> Ptr Void
 -> IO Int32
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Safe_some_fun@
hs_bindgen_57cb99ed92c001ad :: Ptr A_type_t ->
                               HsBindgen.Runtime.LibC.Word32 ->
                               Ptr (IncompleteArray HsBindgen.Runtime.LibC.Word8) ->
                               IO HsBindgen.Runtime.LibC.Int32
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Safe_some_fun@
hs_bindgen_57cb99ed92c001ad = fromFFIType hs_bindgen_57cb99ed92c001ad_base
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun :: Ptr A_type_t ->
            HsBindgen.Runtime.LibC.Word32 ->
            Ptr (IncompleteArray HsBindgen.Runtime.LibC.Word8) ->
            IO HsBindgen.Runtime.LibC.Int32
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun = hs_bindgen_57cb99ed92c001ad
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Unsafe_some_fun@
foreign import ccall unsafe "hs_bindgen_2a91c367a9380a63" hs_bindgen_2a91c367a9380a63_base ::
    Ptr Void
 -> Word32
 -> Ptr Void
 -> IO Int32
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Unsafe_some_fun@
hs_bindgen_2a91c367a9380a63 :: Ptr A_type_t ->
                               HsBindgen.Runtime.LibC.Word32 ->
                               Ptr (IncompleteArray HsBindgen.Runtime.LibC.Word8) ->
                               IO HsBindgen.Runtime.LibC.Int32
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_Unsafe_some_fun@
hs_bindgen_2a91c367a9380a63 = fromFFIType hs_bindgen_2a91c367a9380a63_base
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun :: Ptr A_type_t ->
            HsBindgen.Runtime.LibC.Word32 ->
            Ptr (IncompleteArray HsBindgen.Runtime.LibC.Word8) ->
            IO HsBindgen.Runtime.LibC.Int32
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun = hs_bindgen_2a91c367a9380a63
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_some_fun@
foreign import ccall unsafe "hs_bindgen_1ade3cfc18679577" hs_bindgen_1ade3cfc18679577_base ::
    IO (FunPtr Void)
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_some_fun@
hs_bindgen_1ade3cfc18679577 :: IO (FunPtr (Ptr A_type_t ->
                                           HsBindgen.Runtime.LibC.Word32 ->
                                           IncompleteArray HsBindgen.Runtime.LibC.Word8 ->
                                           IO HsBindgen.Runtime.LibC.Int32))
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_some_fun@
hs_bindgen_1ade3cfc18679577 = fromFFIType hs_bindgen_1ade3cfc18679577_base
{-# NOINLINE some_fun #-}
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun :: FunPtr (Ptr A_type_t ->
                    HsBindgen.Runtime.LibC.Word32 ->
                    IncompleteArray HsBindgen.Runtime.LibC.Word8 ->
                    IO HsBindgen.Runtime.LibC.Int32)
{-| __C declaration:__ @some_fun@

    __defined at:__ @edge-cases\/distilled_lib_1.h 72:9@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
some_fun = unsafePerformIO hs_bindgen_1ade3cfc18679577
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_v@
foreign import ccall unsafe "hs_bindgen_226b16768d8906f3" hs_bindgen_226b16768d8906f3_base ::
    IO (Ptr Void)
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_v@
hs_bindgen_226b16768d8906f3 :: IO (Ptr Var_t)
-- __unique:__ @test_edgecasesdistilled_lib_1_Example_get_v@
hs_bindgen_226b16768d8906f3 = fromFFIType hs_bindgen_226b16768d8906f3_base
{-# NOINLINE v #-}
{-| __C declaration:__ @v@

    __defined at:__ @edge-cases\/distilled_lib_1.h 91:14@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
v :: Ptr Var_t
{-| __C declaration:__ @v@

    __defined at:__ @edge-cases\/distilled_lib_1.h 91:14@

    __exported by:__ @edge-cases\/distilled_lib_1.h@
-}
v = unsafePerformIO hs_bindgen_226b16768d8906f3
