美文网首页
Objective-C将main.m转换成main.cpp

Objective-C将main.m转换成main.cpp

作者: 大冯宇宙 | 来源:发表于2019-03-02 10:20 被阅读0次

    本文是文章OC的本质中嵌入的代码
    转换方法:
    xcrun -sdk iphoneos clang -arch arm64 -rewrite-objc main.m -o main.cpp

    // 转换的代码main.m
    int main(int argc, const char * argv[]) {
        @autoreleasepool {
            NSObject *obj = [[NSObject alloc] init];
        }
    }
    
    // 转成后的代码main.cpp 一共31634行,但是由于过长保存不了,只摘取了前边的千八百行
    #ifndef __OBJC2__
    #define __OBJC2__
    #endif
    struct objc_selector; struct objc_class;
    struct __rw_objc_super { 
        struct objc_object *object; 
        struct objc_object *superClass; 
        __rw_objc_super(struct objc_object *o, struct objc_object *s) : object(o), superClass(s) {} 
    };
    #ifndef _REWRITER_typedef_Protocol
    typedef struct objc_object Protocol;
    #define _REWRITER_typedef_Protocol
    #endif
    #define __OBJC_RW_DLLIMPORT extern
    __OBJC_RW_DLLIMPORT void objc_msgSend(void);
    __OBJC_RW_DLLIMPORT void objc_msgSendSuper(void);
    __OBJC_RW_DLLIMPORT void objc_msgSend_stret(void);
    __OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void);
    __OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void);
    __OBJC_RW_DLLIMPORT struct objc_class *objc_getClass(const char *);
    __OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass(struct objc_class *);
    __OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass(const char *);
    __OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);
    __OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *);
    __OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *);
    __OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);
    #ifdef _WIN64
    typedef unsigned long long  _WIN_NSUInteger;
    #else
    typedef unsigned int _WIN_NSUInteger;
    #endif
    #ifndef __FASTENUMERATIONSTATE
    struct __objcFastEnumerationState {
        unsigned long state;
        void **itemsPtr;
        unsigned long *mutationsPtr;
        unsigned long extra[5];
    };
    __OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);
    #define __FASTENUMERATIONSTATE
    #endif
    #ifndef __NSCONSTANTSTRINGIMPL
    struct __NSConstantStringImpl {
      int *isa;
      int flags;
      char *str;
    #if _WIN64
      long long length;
    #else
      long length;
    #endif
    };
    #ifdef CF_EXPORT_CONSTANT_STRING
    extern "C" __declspec(dllexport) int __CFConstantStringClassReference[];
    #else
    __OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];
    #endif
    #define __NSCONSTANTSTRINGIMPL
    #endif
    #ifndef BLOCK_IMPL
    #define BLOCK_IMPL
    struct __block_impl {
      void *isa;
      int Flags;
      int Reserved;
      void *FuncPtr;
    };
    // Runtime copy/destroy helper functions (from Block_private.h)
    #ifdef __OBJC_EXPORT_BLOCKS
    extern "C" __declspec(dllexport) void _Block_object_assign(void *, const void *, const int);
    extern "C" __declspec(dllexport) void _Block_object_dispose(const void *, const int);
    extern "C" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];
    extern "C" __declspec(dllexport) void *_NSConcreteStackBlock[32];
    #else
    __OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);
    __OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);
    __OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];
    __OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];
    #endif
    #endif
    #define __block
    #define __weak
    
    #include <stdarg.h>
    struct __NSContainer_literal {
      void * *arr;
      __NSContainer_literal (unsigned int count, ...) {
        va_list marker;
        va_start(marker, count);
        arr = new void *[count];
        for (unsigned i = 0; i < count; i++)
          arr[i] = va_arg(marker, void *);
        va_end( marker );
      };
      ~__NSContainer_literal() {
        delete[] arr;
      }
    };
    extern "C" __declspec(dllimport) void * objc_autoreleasePoolPush(void);
    extern "C" __declspec(dllimport) void objc_autoreleasePoolPop(void *);
    
    struct __AtAutoreleasePool {
      __AtAutoreleasePool() {atautoreleasepoolobj = objc_autoreleasePoolPush();}
      ~__AtAutoreleasePool() {objc_autoreleasePoolPop(atautoreleasepoolobj);}
      void * atautoreleasepoolobj;
    };
    
    #define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    typedef signed char __int8_t;
    
    
    
    typedef unsigned char __uint8_t;
    typedef short __int16_t;
    typedef unsigned short __uint16_t;
    typedef int __int32_t;
    typedef unsigned int __uint32_t;
    typedef long long __int64_t;
    typedef unsigned long long __uint64_t;
    
    typedef long __darwin_intptr_t;
    typedef unsigned int __darwin_natural_t;
    typedef int __darwin_ct_rune_t;
    
    
    
    
    
    typedef union {
     char __mbstate8[128];
     long long _mbstateL;
    } __mbstate_t;
    
    typedef __mbstate_t __darwin_mbstate_t;
    
    
    typedef long int __darwin_ptrdiff_t;
    typedef long unsigned int __darwin_size_t;
    
    
    
    
    
    typedef __builtin_va_list __darwin_va_list;
    
    
    
    
    
    typedef int __darwin_wchar_t;
    
    
    
    
    typedef __darwin_wchar_t __darwin_rune_t;
    
    
    typedef int __darwin_wint_t;
    
    
    
    
    typedef unsigned long __darwin_clock_t;
    typedef __uint32_t __darwin_socklen_t;
    typedef long __darwin_ssize_t;
    typedef long __darwin_time_t;
    
    
    
    
    
    typedef signed char int8_t;
    typedef short int16_t;
    typedef int int32_t;
    typedef long long int64_t;
    
    typedef unsigned char u_int8_t;
    typedef unsigned short u_int16_t;
    typedef unsigned int u_int32_t;
    typedef unsigned long long u_int64_t;
    
    
    typedef int64_t register_t;
    
    
    
    
    
    
    typedef __darwin_intptr_t intptr_t;
    typedef unsigned long uintptr_t;
    
    
    
    
    typedef u_int64_t user_addr_t;
    typedef u_int64_t user_size_t;
    typedef int64_t user_ssize_t;
    typedef int64_t user_long_t;
    typedef u_int64_t user_ulong_t;
    typedef int64_t user_time_t;
    typedef int64_t user_off_t;
    typedef u_int64_t syscall_arg_t;
    typedef __int64_t __darwin_blkcnt_t;
    typedef __int32_t __darwin_blksize_t;
    typedef __int32_t __darwin_dev_t;
    typedef unsigned int __darwin_fsblkcnt_t;
    typedef unsigned int __darwin_fsfilcnt_t;
    typedef __uint32_t __darwin_gid_t;
    typedef __uint32_t __darwin_id_t;
    typedef __uint64_t __darwin_ino64_t;
    
    typedef __darwin_ino64_t __darwin_ino_t;
    
    
    
    typedef __darwin_natural_t __darwin_mach_port_name_t;
    typedef __darwin_mach_port_name_t __darwin_mach_port_t;
    typedef __uint16_t __darwin_mode_t;
    typedef __int64_t __darwin_off_t;
    typedef __int32_t __darwin_pid_t;
    typedef __uint32_t __darwin_sigset_t;
    typedef __int32_t __darwin_suseconds_t;
    typedef __uint32_t __darwin_uid_t;
    typedef __uint32_t __darwin_useconds_t;
    typedef unsigned char __darwin_uuid_t[16];
    typedef char __darwin_uuid_string_t[37];
    
    
    struct __darwin_pthread_handler_rec {
     void (*__routine)(void *);
     void *__arg;
     struct __darwin_pthread_handler_rec *__next;
    };
    
    struct _opaque_pthread_attr_t {
     long __sig;
     char __opaque[56];
    };
    
    struct _opaque_pthread_cond_t {
     long __sig;
     char __opaque[40];
    };
    
    struct _opaque_pthread_condattr_t {
     long __sig;
     char __opaque[8];
    };
    
    struct _opaque_pthread_mutex_t {
     long __sig;
     char __opaque[56];
    };
    
    struct _opaque_pthread_mutexattr_t {
     long __sig;
     char __opaque[8];
    };
    
    struct _opaque_pthread_once_t {
     long __sig;
     char __opaque[8];
    };
    
    struct _opaque_pthread_rwlock_t {
     long __sig;
     char __opaque[192];
    };
    
    struct _opaque_pthread_rwlockattr_t {
     long __sig;
     char __opaque[16];
    };
    
    struct _opaque_pthread_t {
     long __sig;
     struct __darwin_pthread_handler_rec *__cleanup_stack;
     char __opaque[8176];
    };
    
    typedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t;
    typedef struct _opaque_pthread_cond_t __darwin_pthread_cond_t;
    typedef struct _opaque_pthread_condattr_t __darwin_pthread_condattr_t;
    typedef unsigned long __darwin_pthread_key_t;
    typedef struct _opaque_pthread_mutex_t __darwin_pthread_mutex_t;
    typedef struct _opaque_pthread_mutexattr_t __darwin_pthread_mutexattr_t;
    typedef struct _opaque_pthread_once_t __darwin_pthread_once_t;
    typedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t;
    typedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t;
    typedef struct _opaque_pthread_t *__darwin_pthread_t;
    
    
    
    
    
    
    
    
    typedef unsigned char uint8_t;
    typedef unsigned short uint16_t;
    typedef unsigned int uint32_t;
    typedef unsigned long long uint64_t;
    
    
    typedef int8_t int_least8_t;
    typedef int16_t int_least16_t;
    typedef int32_t int_least32_t;
    typedef int64_t int_least64_t;
    typedef uint8_t uint_least8_t;
    typedef uint16_t uint_least16_t;
    typedef uint32_t uint_least32_t;
    typedef uint64_t uint_least64_t;
    
    
    
    typedef int8_t int_fast8_t;
    typedef int16_t int_fast16_t;
    typedef int32_t int_fast32_t;
    typedef int64_t int_fast64_t;
    typedef uint8_t uint_fast8_t;
    typedef uint16_t uint_fast16_t;
    typedef uint32_t uint_fast32_t;
    typedef uint64_t uint_fast64_t;
    typedef long int intmax_t;
    typedef long unsigned int uintmax_t;
    
    
    
    static __inline__
    uint16_t
    _OSSwapInt16(
        uint16_t data
    )
    {
    
      return (uint16_t)(data << 8 | data >> 8);
    }
    
    static __inline__
    uint32_t
    _OSSwapInt32(
        uint32_t data
    )
    {
    
      data = __builtin_bswap32(data);
    
    
    
    
    
      return data;
    }
    
    static __inline__
    uint64_t
    _OSSwapInt64(
        uint64_t data
    )
    {
    
        return __builtin_bswap64(data);
    }
    
    
    
    static __inline__
    uint16_t
    OSReadSwapInt16(
        const volatile void * base,
        uintptr_t offset
    )
    {
        uint16_t result;
    
        result = *(volatile uint16_t *)((volatile uintptr_t)base + offset);
        return _OSSwapInt16(result);
    }
    
    static __inline__
    uint32_t
    OSReadSwapInt32(
        const volatile void * base,
        uintptr_t offset
    )
    {
        uint32_t result;
    
        result = *(volatile uint32_t *)((volatile uintptr_t)base + offset);
        return _OSSwapInt32(result);
    }
    
    static __inline__
    uint64_t
    OSReadSwapInt64(
        const volatile void * base,
        uintptr_t offset
    )
    {
        volatile uint32_t * inp;
        union ullc {
            uint64_t ull;
            uint32_t ul[2];
        } outv;
    
        inp = (volatile uint32_t *)((volatile uintptr_t)base + offset);
        outv.ul[0] = inp[1];
        outv.ul[1] = inp[0];
        outv.ul[0] = _OSSwapInt32(outv.ul[0]);
        outv.ul[1] = _OSSwapInt32(outv.ul[1]);
        return outv.ull;
    }
    
    
    
    static __inline__
    void
    OSWriteSwapInt16(
        volatile void * base,
        uintptr_t offset,
        uint16_t data
    )
    {
        *(volatile uint16_t *)((volatile uintptr_t)base + offset) = _OSSwapInt16(data);
    }
    
    static __inline__
    void
    OSWriteSwapInt32(
        volatile void * base,
        uintptr_t offset,
        uint32_t data
    )
    {
        *(volatile uint32_t *)((volatile uintptr_t)base + offset) = _OSSwapInt32(data);
    }
    
    static __inline__
    void
    OSWriteSwapInt64(
        volatile void * base,
        uintptr_t offset,
        uint64_t data
    )
    {
        *(volatile uint64_t *)((volatile uintptr_t)base + offset) = _OSSwapInt64(data);
    }
    
    
    typedef unsigned char u_char;
    typedef unsigned short u_short;
    typedef unsigned int u_int;
    
    typedef unsigned long u_long;
    
    
    typedef unsigned short ushort;
    typedef unsigned int uint;
    
    
    typedef u_int64_t u_quad_t;
    typedef int64_t quad_t;
    typedef quad_t * qaddr_t;
    
    
    typedef char * caddr_t;
    
    typedef int32_t daddr_t;
    
    
    typedef __darwin_dev_t dev_t;
    
    typedef u_int32_t fixpt_t;
    
    
    typedef __darwin_blkcnt_t blkcnt_t;
    typedef __darwin_blksize_t blksize_t;
    typedef __darwin_gid_t gid_t;
    typedef __uint32_t in_addr_t;
    typedef __uint16_t in_port_t;
    typedef __darwin_ino_t ino_t;
    
    
    typedef __darwin_ino64_t ino64_t;
    
    
    typedef __int32_t key_t;
    typedef __darwin_mode_t mode_t;
    typedef __uint16_t nlink_t;
    typedef __darwin_id_t id_t;
    typedef __darwin_pid_t pid_t;
    typedef __darwin_off_t off_t;
    
    typedef int32_t segsz_t;
    typedef int32_t swblk_t;
    
    
    typedef __darwin_uid_t uid_t;
    static inline __int32_t major(__uint32_t _x)
    {
     return (__int32_t)(((__uint32_t)_x >> 24) & 0xff);
    }
    
    static inline __int32_t minor(__uint32_t _x)
    {
     return (__int32_t)((_x) & 0xffffff);
    }
    
    static inline dev_t makedev(__uint32_t _major, __uint32_t _minor)
    {
     return (dev_t)(((_major) << 24) | (_minor));
    }
    typedef __darwin_clock_t clock_t;
    typedef __darwin_size_t size_t;
    typedef __darwin_ssize_t ssize_t;
    typedef __darwin_time_t time_t;
    
    typedef __darwin_useconds_t useconds_t;
    typedef __darwin_suseconds_t suseconds_t;
    
    
    typedef __darwin_size_t rsize_t;
    typedef int errno_t;
    
    
    
    
    
    
    
    
    extern "C" {
    typedef struct fd_set {
     __int32_t fds_bits[((((1024) % ((sizeof(__int32_t) * 8))) == 0) ? ((1024) / ((sizeof(__int32_t) * 8))) : (((1024) / ((sizeof(__int32_t) * 8))) + 1))];
    } fd_set;
    }
    
    
    static inline int
    __darwin_fd_isset(int _n, const struct fd_set *_p)
    {
     return (_p->fds_bits[(unsigned long)_n/(sizeof(__int32_t) * 8)] & ((__int32_t)(((unsigned long)1)<<((unsigned long)_n % (sizeof(__int32_t) * 8)))));
    }
    
    
    
    
    typedef __int32_t fd_mask;
    
    
    
    
    
    
    
    
    
    
    typedef __darwin_pthread_attr_t pthread_attr_t;
    typedef __darwin_pthread_cond_t pthread_cond_t;
    typedef __darwin_pthread_condattr_t pthread_condattr_t;
    typedef __darwin_pthread_mutex_t pthread_mutex_t;
    typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t;
    typedef __darwin_pthread_once_t pthread_once_t;
    typedef __darwin_pthread_rwlock_t pthread_rwlock_t;
    typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t;
    typedef __darwin_pthread_t pthread_t;
    
    
    
    typedef __darwin_pthread_key_t pthread_key_t;
    
    
    
    
    typedef __darwin_fsblkcnt_t fsblkcnt_t;
    typedef __darwin_fsfilcnt_t fsfilcnt_t;
    typedef __builtin_va_list va_list;
    typedef __builtin_va_list __gnuc_va_list;
    
    typedef int __darwin_nl_item;
    typedef int __darwin_wctrans_t;
    
    typedef __uint32_t __darwin_wctype_t;
    
    typedef enum {
     P_ALL,
     P_PID,
     P_PGID
    } idtype_t;
    typedef int sig_atomic_t;
    struct __darwin_arm_exception_state
    {
     __uint32_t __exception;
     __uint32_t __fsr;
     __uint32_t __far;
    };
    struct __darwin_arm_exception_state64
    {
     __uint64_t __far;
     __uint32_t __esr;
     __uint32_t __exception;
    };
    struct __darwin_arm_thread_state
    {
     __uint32_t __r[13];
     __uint32_t __sp;
     __uint32_t __lr;
     __uint32_t __pc;
     __uint32_t __cpsr;
    };
    struct __darwin_arm_thread_state64
    {
     __uint64_t __x[29];
     __uint64_t __fp;
     __uint64_t __lr;
     __uint64_t __sp;
     __uint64_t __pc;
     __uint32_t __cpsr;
     __uint32_t __pad;
    };
    struct __darwin_arm_vfp_state
    {
     __uint32_t __r[64];
     __uint32_t __fpscr;
    
    };
    struct __darwin_arm_neon_state64
    {
     __uint128_t __v[32];
     __uint32_t __fpsr;
     __uint32_t __fpcr;
    };
    
    struct __darwin_arm_neon_state
    {
     __uint128_t __v[16];
     __uint32_t __fpsr;
     __uint32_t __fpcr;
    };
    struct arm_legacy_debug_state
    {
     __uint32_t __bvr[16];
     __uint32_t __bcr[16];
     __uint32_t __wvr[16];
     __uint32_t __wcr[16];
    };
    struct __darwin_arm_debug_state32
    {
     __uint32_t __bvr[16];
     __uint32_t __bcr[16];
     __uint32_t __wvr[16];
     __uint32_t __wcr[16];
     __uint64_t __mdscr_el1;
    };
    
    
    struct __darwin_arm_debug_state64
    {
     __uint64_t __bvr[16];
     __uint64_t __bcr[16];
     __uint64_t __wvr[16];
     __uint64_t __wcr[16];
     __uint64_t __mdscr_el1;
    };
    struct __darwin_arm_cpmu_state64
    {
     __uint64_t __ctrs[16];
    };
    
    
    
    
    struct __darwin_mcontext32
    {
     struct __darwin_arm_exception_state __es;
     struct __darwin_arm_thread_state __ss;
     struct __darwin_arm_vfp_state __fs;
    };
    struct __darwin_mcontext64
    {
     struct __darwin_arm_exception_state64 __es;
     struct __darwin_arm_thread_state64 __ss;
     struct __darwin_arm_neon_state64 __ns;
    };
    typedef struct __darwin_mcontext64 *mcontext_t;
    
    
    
    struct __darwin_sigaltstack
    {
     void *ss_sp;
     __darwin_size_t ss_size;
     int ss_flags;
    };
    typedef struct __darwin_sigaltstack stack_t;
    
    
    struct __darwin_ucontext
    {
     int uc_onstack;
     __darwin_sigset_t uc_sigmask;
     struct __darwin_sigaltstack uc_stack;
     struct __darwin_ucontext *uc_link;
     __darwin_size_t uc_mcsize;
     struct __darwin_mcontext64 *uc_mcontext;
    
    
    
    };
    
    
    typedef struct __darwin_ucontext ucontext_t;
    
    
    typedef __darwin_sigset_t sigset_t;
    
    
    
    union sigval {
    
     int sival_int;
     void *sival_ptr;
    };
    
    
    
    
    
    struct sigevent {
     int sigev_notify;
     int sigev_signo;
     union sigval sigev_value;
     void (*sigev_notify_function)(union sigval);
     pthread_attr_t *sigev_notify_attributes;
    };
    
    
    typedef struct __siginfo {
     int si_signo;
     int si_errno;
     int si_code;
     pid_t si_pid;
     uid_t si_uid;
     int si_status;
     void *si_addr;
     union sigval si_value;
     long si_band;
     unsigned long __pad[7];
    } siginfo_t;
    union __sigaction_u {
     void (*__sa_handler)(int);
     void (*__sa_sigaction)(int, struct __siginfo *,
             void *);
    };
    
    
    struct __sigaction {
     union __sigaction_u __sigaction_u;
     void (*sa_tramp)(void *, int, int, siginfo_t *, void *);
     sigset_t sa_mask;
     int sa_flags;
    };
    
    
    
    
    struct sigaction {
     union __sigaction_u __sigaction_u;
     sigset_t sa_mask;
     int sa_flags;
    };
    typedef void (*sig_t)(int);
    struct sigvec {
     void (*sv_handler)(int);
     int sv_mask;
     int sv_flags;
    };
    struct sigstack {
     char *ss_sp;
     int ss_onstack;
    };
    extern "C" {
    void (*signal(int, void (*)(int)))(int);
    }
    struct timeval
    {
     __darwin_time_t tv_sec;
     __darwin_suseconds_t tv_usec;
    };
    
    
    
    
    
    
    
    
    typedef __uint64_t rlim_t;
    struct rusage {
     struct timeval ru_utime;
     struct timeval ru_stime;
     long ru_maxrss;
    
     long ru_ixrss;
     long ru_idrss;
     long ru_isrss;
     long ru_minflt;
     long ru_majflt;
     long ru_nswap;
     long ru_inblock;
     long ru_oublock;
     long ru_msgsnd;
     long ru_msgrcv;
     long ru_nsignals;
     long ru_nvcsw;
     long ru_nivcsw;
    
    
    };
    typedef void *rusage_info_t;
    
    struct rusage_info_v0 {
     uint8_t ri_uuid[16];
     uint64_t ri_user_time;
     uint64_t ri_system_time;
     uint64_t ri_pkg_idle_wkups;
     uint64_t ri_interrupt_wkups;
     uint64_t ri_pageins;
     uint64_t ri_wired_size;
     uint64_t ri_resident_size;
     uint64_t ri_phys_footprint;
     uint64_t ri_proc_start_abstime;
     uint64_t ri_proc_exit_abstime;
    };
    
    struct rusage_info_v1 {
     uint8_t ri_uuid[16];
     uint64_t ri_user_time;
     uint64_t ri_system_time;
     uint64_t ri_pkg_idle_wkups;
     uint64_t ri_interrupt_wkups;
     uint64_t ri_pageins;
     uint64_t ri_wired_size;
     uint64_t ri_resident_size;
     uint64_t ri_phys_footprint;
     uint64_t ri_proc_start_abstime;
     uint64_t ri_proc_exit_abstime;
     uint64_t ri_child_user_time;
     uint64_t ri_child_system_time;
     uint64_t ri_child_pkg_idle_wkups;
     uint64_t ri_child_interrupt_wkups;
     uint64_t ri_child_pageins;
     uint64_t ri_child_elapsed_abstime;
    };
    
    struct rusage_info_v2 {
     uint8_t ri_uuid[16];
     uint64_t ri_user_time;
     uint64_t ri_system_time;
     uint64_t ri_pkg_idle_wkups;
     uint64_t ri_interrupt_wkups;
     uint64_t ri_pageins;
     uint64_t ri_wired_size;
     uint64_t ri_resident_size;
     uint64_t ri_phys_footprint;
     uint64_t ri_proc_start_abstime;
     uint64_t ri_proc_exit_abstime;
     uint64_t ri_child_user_time;
     uint64_t ri_child_system_time;
     uint64_t ri_child_pkg_idle_wkups;
     uint64_t ri_child_interrupt_wkups;
     uint64_t ri_child_pageins;
     uint64_t ri_child_elapsed_abstime;
     uint64_t ri_diskio_bytesread;
     uint64_t ri_diskio_byteswritten;
    };
    
    struct rusage_info_v3 {
     uint8_t ri_uuid[16];
     uint64_t ri_user_time;
     uint64_t ri_system_time;
     uint64_t ri_pkg_idle_wkups;
     uint64_t ri_interrupt_wkups;
     uint64_t ri_pageins;
     uint64_t ri_wired_size;
     uint64_t ri_resident_size;
     uint64_t ri_phys_footprint;
     uint64_t ri_proc_start_abstime;
     uint64_t ri_proc_exit_abstime;
     uint64_t ri_child_user_time;
     uint64_t ri_child_system_time;
     uint64_t ri_child_pkg_idle_wkups;
     uint64_t ri_child_interrupt_wkups;
     uint64_t ri_child_pageins;
     uint64_t ri_child_elapsed_abstime;
     uint64_t ri_diskio_bytesread;
     uint64_t ri_diskio_byteswritten;
     uint64_t ri_cpu_time_qos_default;
     uint64_t ri_cpu_time_qos_maintenance;
     uint64_t ri_cpu_time_qos_background;
     uint64_t ri_cpu_time_qos_utility;
     uint64_t ri_cpu_time_qos_legacy;
     uint64_t ri_cpu_time_qos_user_initiated;
     uint64_t ri_cpu_time_qos_user_interactive;
     uint64_t ri_billed_system_time;
     uint64_t ri_serviced_system_time;
    };
    
    struct rusage_info_v4 {
     uint8_t ri_uuid[16];
     uint64_t ri_user_time;
     uint64_t ri_system_time;
     uint64_t ri_pkg_idle_wkups;
     uint64_t ri_interrupt_wkups;
     uint64_t ri_pageins;
     uint64_t ri_wired_size;
     uint64_t ri_resident_size;
     uint64_t ri_phys_footprint;
     uint64_t ri_proc_start_abstime;
     uint64_t ri_proc_exit_abstime;
     uint64_t ri_child_user_time;
     uint64_t ri_child_system_time;
     uint64_t ri_child_pkg_idle_wkups;
     uint64_t ri_child_interrupt_wkups;
     uint64_t ri_child_pageins;
     uint64_t ri_child_elapsed_abstime;
     uint64_t ri_diskio_bytesread;
     uint64_t ri_diskio_byteswritten;
     uint64_t ri_cpu_time_qos_default;
     uint64_t ri_cpu_time_qos_maintenance;
     uint64_t ri_cpu_time_qos_background;
     uint64_t ri_cpu_time_qos_utility;
     uint64_t ri_cpu_time_qos_legacy;
     uint64_t ri_cpu_time_qos_user_initiated;
     uint64_t ri_cpu_time_qos_user_interactive;
     uint64_t ri_billed_system_time;
     uint64_t ri_serviced_system_time;
     uint64_t ri_logical_writes;
     uint64_t ri_lifetime_max_phys_footprint;
     uint64_t ri_instructions;
     uint64_t ri_cycles;
     uint64_t ri_billed_energy;
     uint64_t ri_serviced_energy;
    
     uint64_t ri_unused[2];
    };
    
    typedef struct rusage_info_v4 rusage_info_current;
    struct rlimit {
     rlim_t rlim_cur;
     rlim_t rlim_max;
    };
    struct proc_rlimit_control_wakeupmon {
     uint32_t wm_flags;
     int32_t wm_rate;
    };
    extern "C" {
    int getpriority(int, id_t);
    
    int getiopolicy_np(int, int) __attribute__((availability(ios,introduced=2.0)));
    
    int getrlimit(int, struct rlimit *) __asm("_" "getrlimit" );
    int getrusage(int, struct rusage *);
    int setpriority(int, id_t, int);
    
    int setiopolicy_np(int, int, int) __attribute__((availability(ios,introduced=2.0)));
    
    int setrlimit(int, const struct rlimit *) __asm("_" "setrlimit" );
    }
    union wait {
     int w_status;
    
    
    
     struct {
    
      unsigned int w_Termsig:7,
        w_Coredump:1,
        w_Retcode:8,
        w_Filler:16;
    
    
    
    
    
    
    
     } w_T;
    
    
    
    
    
     struct {
    
      unsigned int w_Stopval:8,
        w_Stopsig:8,
        w_Filler:16;
    
    
    
    
    
    
     } w_S;
    };
    extern "C" {
    pid_t wait(int *) __asm("_" "wait" );
    pid_t waitpid(pid_t, int *, int) __asm("_" "waitpid" );
    
    int waitid(idtype_t, id_t, siginfo_t *, int) __asm("_" "waitid" );
    
    
    pid_t wait3(int *, int, struct rusage *);
    pid_t wait4(pid_t, int *, int, struct rusage *);
    
    }
    
    extern "C" {
    void *alloca(size_t);
    }
    
    
    
    
    
    
    
    
    typedef __darwin_ct_rune_t ct_rune_t;
    typedef __darwin_rune_t rune_t;
    
    
    
    typedef struct {
     int quot;
     int rem;
    } div_t;
    
    typedef struct {
     long quot;
     long rem;
    } ldiv_t;
    
    
    typedef struct {
     long long quot;
     long long rem;
    } lldiv_t;
    
    
    
    extern int __mb_cur_max;
    extern "C" {
    void abort(void) __attribute__((noreturn));
    int abs(int) __attribute__((const));
    int atexit(void (* _Nonnull)(void));
    double atof(const char *);
    int atoi(const char *);
    long atol(const char *);
    
    long long
      atoll(const char *);
    
    void *bsearch(const void *__key, const void *__base, size_t __nel,
         size_t __width, int (* _Nonnull __compar)(const void *, const void *));
    void *calloc(size_t __count, size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1,2)));
    div_t div(int, int) __attribute__((const));
    void exit(int) __attribute__((noreturn));
    void free(void *);
    char *getenv(const char *);
    long labs(long) __attribute__((const));
    ldiv_t ldiv(long, long) __attribute__((const));
    
    long long
      llabs(long long);
    lldiv_t lldiv(long long, long long);
    
    void *malloc(size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1)));
    int mblen(const char *__s, size_t __n);
    size_t mbstowcs(wchar_t * , const char * , size_t);
    int mbtowc(wchar_t * , const char * , size_t);
    int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __attribute__((availability(ios,introduced=3.0)));
    void qsort(void *__base, size_t __nel, size_t __width,
         int (* _Nonnull __compar)(const void *, const void *));
    int rand(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    void *realloc(void *__ptr, size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(2)));
    void srand(unsigned) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    double strtod(const char *, char **) __asm("_" "strtod" );
    float strtof(const char *, char **) __asm("_" "strtof" );
    long strtol(const char *__str, char **__endptr, int __base);
    long double
      strtold(const char *, char **);
    
    long long
      strtoll(const char *__str, char **__endptr, int __base);
    
    unsigned long
      strtoul(const char *__str, char **__endptr, int __base);
    
    unsigned long long
      strtoull(const char *__str, char **__endptr, int __base);
    __attribute__((__availability__(swift, unavailable, message="Use posix_spawn APIs or NSTask instead.")))
    __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable)))
    __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable)))
    int system(const char *) __asm("_" "system" );
    
    
    
    size_t wcstombs(char * , const wchar_t * , size_t);
    int wctomb(char *, wchar_t);
    
    
    void _Exit(int) __attribute__((noreturn));
    long a64l(const char *);
    double drand48(void);
    char *ecvt(double, int, int *, int *);
    double erand48(unsigned short[3]);
    char *fcvt(double, int, int *, int *);
    char *gcvt(double, int, char *);
    int getsubopt(char **, char * const *, char **);
    int grantpt(int);
    
    char *initstate(unsigned, char *, size_t);
    
    
    
    long jrand48(unsigned short[3]) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    char *l64a(long);
    void lcong48(unsigned short[7]);
    long lrand48(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    char *mktemp(char *);
    int mkstemp(char *);
    long mrand48(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    long nrand48(unsigned short[3]) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    int posix_openpt(int);
    char *ptsname(int);
    int putenv(char *) __asm("_" "putenv" );
    long random(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    int rand_r(unsigned *) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead.")));
    
    char *realpath(const char * , char * ) __asm("_" "realpath" "$DARWIN_EXTSN");
    
    
    
    unsigned short
     *seed48(unsigned short[3]);
    int setenv(const char * __name, const char * __value, int __overwrite) __asm("_" "setenv" );
    
    void setkey(const char *) __asm("_" "setkey" );
    
    
    
    char *setstate(const char *);
    void srand48(long);
    
    void srandom(unsigned);
    
    
    
    int unlockpt(int);
    
    int unsetenv(const char *) __asm("_" "unsetenv" );
    uint32_t arc4random(void);
    void arc4random_addrandom(unsigned char * , int )
        __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(macosx,deprecated=10.12,message="use arc4random_stir")))
        __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=10.0,message="use arc4random_stir")))
        __attribute__((availability(tvos,introduced=2.0))) __attribute__((availability(tvos,deprecated=10.0,message="use arc4random_stir")))
        __attribute__((availability(watchos,introduced=1.0))) __attribute__((availability(watchos,deprecated=3.0,message="use arc4random_stir")));
    void arc4random_buf(void * __buf, size_t __nbytes) __attribute__((availability(ios,introduced=4.3)));
    void arc4random_stir(void);
    uint32_t
      arc4random_uniform(uint32_t __upper_bound) __attribute__((availability(ios,introduced=4.3)));
    
    int atexit_b(void (^ _Nonnull)(void)) __attribute__((availability(ios,introduced=3.2)));
    void *bsearch_b(const void *__key, const void *__base, size_t __nel,
         size_t __width, int (^ _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    
    
    char *cgetcap(char *, const char *, int);
    int cgetclose(void);
    int cgetent(char **, char **, const char *);
    int cgetfirst(char **, char **);
    int cgetmatch(const char *, const char *);
    int cgetnext(char **, char **);
    int cgetnum(char *, const char *, long *);
    int cgetset(const char *);
    int cgetstr(char *, const char *, char **);
    int cgetustr(char *, const char *, char **);
    
    int daemon(int, int) __asm("_" "daemon" ) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use posix_spawn APIs instead."))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable)));
    char *devname(dev_t, mode_t);
    char *devname_r(dev_t, mode_t, char *buf, int len);
    char *getbsize(int *, long *);
    int getloadavg(double [], int);
    const char
     *getprogname(void);
    
    int heapsort(void *__base, size_t __nel, size_t __width,
         int (* _Nonnull __compar)(const void *, const void *));
    
    int heapsort_b(void *__base, size_t __nel, size_t __width,
         int (^ _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    int mergesort(void *__base, size_t __nel, size_t __width,
         int (* _Nonnull __compar)(const void *, const void *));
    
    int mergesort_b(void *__base, size_t __nel, size_t __width,
         int (^ _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    void psort(void *__base, size_t __nel, size_t __width,
         int (* _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    void psort_b(void *__base, size_t __nel, size_t __width,
         int (^ _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    void psort_r(void *__base, size_t __nel, size_t __width, void *,
         int (* _Nonnull __compar)(void *, const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    void qsort_b(void *__base, size_t __nel, size_t __width,
         int (^ _Nonnull __compar)(const void *, const void *)) __attribute__((availability(ios,introduced=3.2)));
    
    void qsort_r(void *__base, size_t __nel, size_t __width, void *,
         int (* _Nonnull __compar)(void *, const void *, const void *));
    int radixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
         unsigned __endbyte);
    void setprogname(const char *);
    int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
         unsigned __endbyte);
    void sranddev(void);
    void srandomdev(void);
    void *reallocf(void *__ptr, size_t __size) __attribute__((alloc_size(2)));
    
    long long
      strtoq(const char *__str, char **__endptr, int __base);
    unsigned long long
      strtouq(const char *__str, char **__endptr, int __base);
    
    extern char *suboptarg;
    void *valloc(size_t) __attribute__((alloc_size(1)));
    
    
    
    
    
    
    }
    extern "C" {
    void __assert_rtn(const char *, const char *, int, const char *) __attribute__((noreturn)) __attribute__((__disable_tail_calls__));
    
    
    
    }
    typedef __darwin_wint_t wint_t;
    typedef struct {
     __darwin_rune_t __min;
     __darwin_rune_t __max;
     __darwin_rune_t __map;
     __uint32_t *__types;
    } _RuneEntry;
    
    typedef struct {
     int __nranges;
     _RuneEntry *__ranges;
    } _RuneRange;
    
    typedef struct {
     char __name[14];
     __uint32_t __mask;
    } _RuneCharClass;
    
    typedef struct {
     char __magic[8];
     char __encoding[32];
    
     __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **);
     int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **);
     __darwin_rune_t __invalid_rune;
    
     __uint32_t __runetype[(1 <<8 )];
     __darwin_rune_t __maplower[(1 <<8 )];
     __darwin_rune_t __mapupper[(1 <<8 )];
    
    
    
    
    
    
     _RuneRange __runetype_ext;
     _RuneRange __maplower_ext;
     _RuneRange __mapupper_ext;
    
     void *__variable;
     int __variable_len;
    
    
    
    
     int __ncharclasses;
     _RuneCharClass *__charclasses;
    } _RuneLocale;
    
    
    
    extern "C" {
    extern _RuneLocale _DefaultRuneLocale;
    extern _RuneLocale *_CurrentRuneLocale;
    }
    extern "C" {
    unsigned long ___runetype(__darwin_ct_rune_t);
    __darwin_ct_rune_t ___tolower(__darwin_ct_rune_t);
    __darwin_ct_rune_t ___toupper(__darwin_ct_rune_t);
    }
    
    inline int
    isascii(int _c)
    {
     return ((_c & ~0x7F) == 0);
    }
    extern "C" {
    int __maskrune(__darwin_ct_rune_t, unsigned long);
    }
    
    
    inline int
    __istype(__darwin_ct_rune_t _c, unsigned long _f)
    {
    
    
    
     return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f)
      : !!__maskrune(_c, _f));
    
    }
    
    inline __darwin_ct_rune_t
    __isctype(__darwin_ct_rune_t _c, unsigned long _f)
    {
    
    
    
     return (_c < 0 || _c >= (1 <<8 )) ? 0 :
      !!(_DefaultRuneLocale.__runetype[_c] & _f);
    
    }
    extern "C" {
    __darwin_ct_rune_t __toupper(__darwin_ct_rune_t);
    __darwin_ct_rune_t __tolower(__darwin_ct_rune_t);
    }
    
    
    inline int
    __wcwidth(__darwin_ct_rune_t _c)
    {
     unsigned int _x;
    
     if (_c == 0)
      return (0);
     _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L);
     if ((_x & 0xe0000000L) != 0)
      return ((_x & 0xe0000000L) >> 30);
     return ((_x & 0x00040000L) != 0 ? 1 : -1);
    }
    
    
    
    
    
    
    inline int
    isalnum(int _c)
    {
     return (__istype(_c, 0x00000100L|0x00000400L));
    }
    
    inline int
    isalpha(int _c)
    {
     return (__istype(_c, 0x00000100L));
    }
    
    inline int
    isblank(int _c)
    {
     return (__istype(_c, 0x00020000L));
    }
    
    inline int
    iscntrl(int _c)
    {
     return (__istype(_c, 0x00000200L));
    }
    
    
    inline int
    isdigit(int _c)
    {
     return (__isctype(_c, 0x00000400L));
    }
    
    inline int
    isgraph(int _c)
    {
     return (__istype(_c, 0x00000800L));
    }
    
    inline int
    islower(int _c)
    {
     return (__istype(_c, 0x00001000L));
    }
    
    inline int
    isprint(int _c)
    {
     return (__istype(_c, 0x00040000L));
    }
    
    inline int
    ispunct(int _c)
    {
     return (__istype(_c, 0x00002000L));
    }
    
    inline int
    isspace(int _c)
    {
     return (__istype(_c, 0x00004000L));
    }
    
    inline int
    isupper(int _c)
    {
     return (__istype(_c, 0x00008000L));
    }
    
    
    inline int
    isxdigit(int _c)
    {
     return (__isctype(_c, 0x00010000L));
    }
    
    inline int
    toascii(int _c)
    {
     return (_c & 0x7F);
    }
    
    inline int
    tolower(int _c)
    {
            return (__tolower(_c));
    }
    
    inline int
    toupper(int _c)
    {
            return (__toupper(_c));
    }
    
    
    inline int
    digittoint(int _c)
    {
     return (__maskrune(_c, 0x0F));
    }
    
    inline int
    ishexnumber(int _c)
    {
     return (__istype(_c, 0x00010000L));
    }
    
    inline int
    isideogram(int _c)
    {
     return (__istype(_c, 0x00080000L));
    }
    
    inline int
    isnumber(int _c)
    {
     return (__istype(_c, 0x00000400L));
    }
    
    inline int
    isphonogram(int _c)
    {
     return (__istype(_c, 0x00200000L));
    }
    
    inline int
    isrune(int _c)
    {
     return (__istype(_c, 0xFFFFFFF0L));
    }
    
    inline int
    isspecial(int _c)
    {
     return (__istype(_c, 0x00100000L));
    }
    extern "C" {
    extern int * __error(void);
    
    }
    
    
    
    
    
    struct lconv {
     char *decimal_point;
     char *thousands_sep;
     char *grouping;
     char *int_curr_symbol;
     char *currency_symbol;
     char *mon_decimal_point;
     char *mon_thousands_sep;
     char *mon_grouping;
     char *positive_sign;
     char *negative_sign;
     char int_frac_digits;
     char frac_digits;
     char p_cs_precedes;
     char p_sep_by_space;
     char n_cs_precedes;
     char n_sep_by_space;
     char p_sign_posn;
     char n_sign_posn;
     char int_p_cs_precedes;
     char int_n_cs_precedes;
     char int_p_sep_by_space;
     char int_n_sep_by_space;
     char int_p_sign_posn;
     char int_n_sign_posn;
    };
    
    
    
    extern "C" {
    struct lconv *localeconv(void);
    }
    extern "C" {
    char *setlocale(int, const char *);
    }
    extern "C" {
        typedef float float_t;
        typedef double double_t;
    extern int __math_errhandling(void);
    extern int __fpclassifyf(float);
    extern int __fpclassifyd(double);
    extern int __fpclassifyl(long double);
    inline __attribute__ ((__always_inline__)) int __inline_isfinitef(float);
    inline __attribute__ ((__always_inline__)) int __inline_isfinited(double);
    inline __attribute__ ((__always_inline__)) int __inline_isfinitel(long double);
    inline __attribute__ ((__always_inline__)) int __inline_isinff(float);
    inline __attribute__ ((__always_inline__)) int __inline_isinfd(double);
    inline __attribute__ ((__always_inline__)) int __inline_isinfl(long double);
    inline __attribute__ ((__always_inline__)) int __inline_isnanf(float);
    inline __attribute__ ((__always_inline__)) int __inline_isnand(double);
    inline __attribute__ ((__always_inline__)) int __inline_isnanl(long double);
    inline __attribute__ ((__always_inline__)) int __inline_isnormalf(float);
    inline __attribute__ ((__always_inline__)) int __inline_isnormald(double);
    inline __attribute__ ((__always_inline__)) int __inline_isnormall(long double);
    inline __attribute__ ((__always_inline__)) int __inline_signbitf(float);
    inline __attribute__ ((__always_inline__)) int __inline_signbitd(double);
    inline __attribute__ ((__always_inline__)) int __inline_signbitl(long double);
    
    inline __attribute__ ((__always_inline__)) int __inline_isfinitef(float __x) {
        return __x == __x && __builtin_fabsf(__x) != __builtin_inff();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isfinited(double __x) {
        return __x == __x && __builtin_fabs(__x) != __builtin_inf();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isfinitel(long double __x) {
        return __x == __x && __builtin_fabsl(__x) != __builtin_infl();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isinff(float __x) {
        return __builtin_fabsf(__x) == __builtin_inff();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isinfd(double __x) {
        return __builtin_fabs(__x) == __builtin_inf();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isinfl(long double __x) {
        return __builtin_fabsl(__x) == __builtin_infl();
    }
    inline __attribute__ ((__always_inline__)) int __inline_isnanf(float __x) {
        return __x != __x;
    }
    inline __attribute__ ((__always_inline__)) int __inline_isnand(double __x) {
        return __x != __x;
    }
    inline __attribute__ ((__always_inline__)) int __inline_isnanl(long double __x) {
        return __x != __x;
    }
    inline __attribute__ ((__always_inline__)) int __inline_signbitf(float __x) {
        union { float __f; unsigned int __u; } __u;
        __u.__f = __x;
        return (int)(__u.__u >> 31);
    }
    inline __attribute__ ((__always_inline__)) int __inline_signbitd(double __x) {
        union { double __f; unsigned long long __u; } __u;
        __u.__f = __x;
        return (int)(__u.__u >> 63);
    }
    inline __attribute__ ((__always_inline__)) int __inline_signbitl(long double __x) {
        union { long double __f; unsigned long long __u;} __u;
        __u.__f = __x;
        return (int)(__u.__u >> 63);
    }
    
    inline __attribute__ ((__always_inline__)) int __inline_isnormalf(float __x) {
        return __inline_isfinitef(__x) && __builtin_fabsf(__x) >= 1.17549435e-38F;
    }
    inline __attribute__ ((__always_inline__)) int __inline_isnormald(double __x) {
        return __inline_isfinited(__x) && __builtin_fabs(__x) >= 2.2250738585072014e-308;
    }
    inline __attribute__ ((__always_inline__)) int __inline_isnormall(long double __x) {
        return __inline_isfinitel(__x) && __builtin_fabsl(__x) >= 2.2250738585072014e-308L;
    }
    extern float acosf(float);
    extern double acos(double);
    extern long double acosl(long double);
    
    extern float asinf(float);
    extern double asin(double);
    extern long double asinl(long double);
    
    extern float atanf(float);
    extern double atan(double);
    extern long double atanl(long double);
    
    extern float atan2f(float, float);
    extern double atan2(double, double);
    extern long double atan2l(long double, long double);
    
    extern float cosf(float);
    extern double cos(double);
    extern long double cosl(long double);
    
    extern float sinf(float);
    extern double sin(double);
    extern long double sinl(long double);
    
    extern float tanf(float);
    extern double tan(double);
    extern long double tanl(long double);
    
    extern float acoshf(float);
    extern double acosh(double);
    extern long double acoshl(long double);
    
    extern float asinhf(float);
    extern double asinh(double);
    extern long double asinhl(long double);
    
    extern float atanhf(float);
    extern double atanh(double);
    extern long double atanhl(long double);
    
    extern float coshf(float);
    extern double cosh(double);
    extern long double coshl(long double);
    
    extern float sinhf(float);
    extern double sinh(double);
    extern long double sinhl(long double);
    
    extern float tanhf(float);
    extern double tanh(double);
    extern long double tanhl(long double);
    
    extern float expf(float);
    extern double exp(double);
    extern long double expl(long double);
    
    extern float exp2f(float);
    extern double exp2(double);
    extern long double exp2l(long double);
    
    extern float expm1f(float);
    extern double expm1(double);
    extern long double expm1l(long double);
    
    extern float logf(float);
    extern double log(double);
    extern long double logl(long double);
    
    extern float log10f(float);
    extern double log10(double);
    extern long double log10l(long double);
    
    extern float log2f(float);
    extern double log2(double);
    extern long double log2l(long double);
    
    extern float log1pf(float);
    extern double log1p(double);
    extern long double log1pl(long double);
    
    extern float logbf(float);
    extern double logb(double);
    extern long double logbl(long double);
    
    extern float modff(float, float *);
    extern double modf(double, double *);
    extern long double modfl(long double, long double *);
    
    extern float ldexpf(float, int);
    extern double ldexp(double, int);
    extern long double ldexpl(long double, int);
    
    extern float frexpf(float, int *);
    extern double frexp(double, int *);
    extern long double frexpl(long double, int *);
    
    extern int ilogbf(float);
    extern int ilogb(double);
    extern int ilogbl(long double);
    
    extern float scalbnf(float, int);
    extern double scalbn(double, int);
    extern long double scalbnl(long double, int);
    
    extern float scalblnf(float, long int);
    extern double scalbln(double, long int);
    extern long double scalblnl(long double, long int);
    
    extern float fabsf(float);
    extern double fabs(double);
    extern long double fabsl(long double);
    
    extern float cbrtf(float);
    extern double cbrt(double);
    extern long double cbrtl(long double);
    
    extern float hypotf(float, float);
    extern double hypot(double, double);
    extern long double hypotl(long double, long double);
    
    extern float powf(float, float);
    extern double pow(double, double);
    extern long double powl(long double, long double);
    
    extern float sqrtf(float);
    extern double sqrt(double);
    extern long double sqrtl(long double);
    
    extern float erff(float);
    extern double erf(double);
    extern long double erfl(long double);
    
    extern float erfcf(float);
    extern double erfc(double);
    extern long double erfcl(long double);
    
    
    
    
    extern float lgammaf(float);
    extern double lgamma(double);
    extern long double lgammal(long double);
    
    extern float tgammaf(float);
    extern double tgamma(double);
    extern long double tgammal(long double);
    
    extern float ceilf(float);
    extern double ceil(double);
    extern long double ceill(long double);
    
    extern float floorf(float);
    extern double floor(double);
    extern long double floorl(long double);
    
    extern float nearbyintf(float);
    extern double nearbyint(double);
    extern long double nearbyintl(long double);
    
    extern float rintf(float);
    extern double rint(double);
    extern long double rintl(long double);
    
    extern long int lrintf(float);
    extern long int lrint(double);
    extern long int lrintl(long double);
    
    extern float roundf(float);
    extern double round(double);
    extern long double roundl(long double);
    
    extern long int lroundf(float);
    extern long int lround(double);
    extern long int lroundl(long double);
    
    
    
    
    extern long long int llrintf(float);
    extern long long int llrint(double);
    extern long long int llrintl(long double);
    
    extern long long int llroundf(float);
    extern long long int llround(double);
    extern long long int llroundl(long double);
    
    
    extern float truncf(float);
    extern double trunc(double);
    extern long double truncl(long double);
    
    extern float fmodf(float, float);
    extern double fmod(double, double);
    extern long double fmodl(long double, long double);
    
    extern float remainderf(float, float);
    extern double remainder(double, double);
    extern long double remainderl(long double, long double);
    
    extern float remquof(float, float, int *);
    extern double remquo(double, double, int *);
    extern long double remquol(long double, long double, int *);
    
    extern float copysignf(float, float);
    extern double copysign(double, double);
    extern long double copysignl(long double, long double);
    
    extern float nanf(const char *);
    extern double nan(const char *);
    extern long double nanl(const char *);
    
    extern float nextafterf(float, float);
    extern double nextafter(double, double);
    extern long double nextafterl(long double, long double);
    
    extern double nexttoward(double, long double);
    extern float nexttowardf(float, long double);
    extern long double nexttowardl(long double, long double);
    
    extern float fdimf(float, float);
    extern double fdim(double, double);
    extern long double fdiml(long double, long double);
    
    extern float fmaxf(float, float);
    extern double fmax(double, double);
    extern long double fmaxl(long double, long double);
    
    extern float fminf(float, float);
    extern double fmin(double, double);
    extern long double fminl(long double, long double);
    
    extern float fmaf(float, float, float);
    extern double fma(double, double, double);
    extern long double fmal(long double, long double, long double);
    extern float __inff(void) __attribute__((availability(ios,unavailable)));
    extern double __inf(void) __attribute__((availability(ios,unavailable)));
    extern long double __infl(void) __attribute__((availability(ios,unavailable)));
    
    extern float __nan(void) __attribute__((availability(ios,unavailable)));
    extern float __exp10f(float) __attribute__((availability(ios,introduced=7.0)));
    extern double __exp10(double) __attribute__((availability(ios,introduced=7.0)));
    
    
    
    
    
    inline __attribute__ ((__always_inline__)) void __sincosf(float __x, float *__sinp, float *__cosp);
    inline __attribute__ ((__always_inline__)) void __sincos(double __x, double *__sinp, double *__cosp);
    extern float __cospif(float) __attribute__((availability(ios,introduced=7.0)));
    extern double __cospi(double) __attribute__((availability(ios,introduced=7.0)));
    extern float __sinpif(float) __attribute__((availability(ios,introduced=7.0)));
    extern double __sinpi(double) __attribute__((availability(ios,introduced=7.0)));
    extern float __tanpif(float) __attribute__((availability(ios,introduced=7.0)));
    extern double __tanpi(double) __attribute__((availability(ios,introduced=7.0)));
    inline __attribute__ ((__always_inline__)) void __sincospif(float __x, float *__sinp, float *__cosp);
    inline __attribute__ ((__always_inline__)) void __sincospi(double __x, double *__sinp, double *__cosp);
    
    
    
    
    
    
    struct __float2 { float __sinval; float __cosval; };
    struct __double2 { double __sinval; double __cosval; };
    
    extern struct __float2 __sincosf_stret(float);
    extern struct __double2 __sincos_stret(double);
    extern struct __float2 __sincospif_stret(float);
    extern struct __double2 __sincospi_stret(double);
    
    inline __attribute__ ((__always_inline__)) void __sincosf(float __x, float *__sinp, float *__cosp) {
        const struct __float2 __stret = __sincosf_stret(__x);
        *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
    }
    
    inline __attribute__ ((__always_inline__)) void __sincos(double __x, double *__sinp, double *__cosp) {
        const struct __double2 __stret = __sincos_stret(__x);
        *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
    }
    
    inline __attribute__ ((__always_inline__)) void __sincospif(float __x, float *__sinp, float *__cosp) {
        const struct __float2 __stret = __sincospif_stret(__x);
        *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
    }
    
    inline __attribute__ ((__always_inline__)) void __sincospi(double __x, double *__sinp, double *__cosp) {
        const struct __double2 __stret = __sincospi_stret(__x);
        *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
    }
    
    
    
    
    
    
    
    extern double j0(double) __attribute__((availability(ios,introduced=3.2)));
    extern double j1(double) __attribute__((availability(ios,introduced=3.2)));
    extern double jn(int, double) __attribute__((availability(ios,introduced=3.2)));
    extern double y0(double) __attribute__((availability(ios,introduced=3.2)));
    extern double y1(double) __attribute__((availability(ios,introduced=3.2)));
    extern double yn(int, double) __attribute__((availability(ios,introduced=3.2)));
    extern double scalb(double, double);
    extern int signgam;
    extern long int rinttol(double) __attribute__((availability(ios,unavailable)));
    
    extern long int roundtol(double) __attribute__((availability(ios,unavailable)));
    
    extern double drem(double, double) __attribute__((availability(ios,unavailable)));
    
    extern int finite(double) __attribute__((availability(ios,unavailable)));
    
    extern double gamma(double) __attribute__((availability(ios,unavailable)));
    
    extern double significand(double) __attribute__((availability(ios,unavailable)));
    }
    typedef int jmp_buf[((14 + 8 + 2) * 2)];
    typedef int sigjmp_buf[((14 + 8 + 2) * 2) + 1];
    
    
    
    
    
    extern "C" {
    extern int setjmp(jmp_buf);
    extern void longjmp(jmp_buf, int) __attribute__((noreturn));
    
    
    int _setjmp(jmp_buf);
    void _longjmp(jmp_buf, int) __attribute__((noreturn));
    int sigsetjmp(sigjmp_buf, int);
    void siglongjmp(sigjmp_buf, int) __attribute__((noreturn));
    
    
    
    void longjmperror(void);
    
    }
    extern const char *const sys_signame[32];
    extern const char *const sys_siglist[32];
    
    
    extern "C" {
    int raise(int);
    }
    
    
    extern "C" {
    void (* _Nullable bsd_signal(int, void (* _Nullable)(int)))(int);
    int kill(pid_t, int) __asm("_" "kill" );
    int killpg(pid_t, int) __asm("_" "killpg" );
    int pthread_kill(pthread_t, int);
    int pthread_sigmask(int, const sigset_t *, sigset_t *) __asm("_" "pthread_sigmask" );
    int sigaction(int, const struct sigaction * ,
         struct sigaction * );
    int sigaddset(sigset_t *, int);
    int sigaltstack(const stack_t * , stack_t * ) __asm("_" "sigaltstack" ) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable)));
    int sigdelset(sigset_t *, int);
    int sigemptyset(sigset_t *);
    int sigfillset(sigset_t *);
    int sighold(int);
    int sigignore(int);
    int siginterrupt(int, int);
    int sigismember(const sigset_t *, int);
    int sigpause(int) __asm("_" "sigpause" );
    int sigpending(sigset_t *);
    int sigprocmask(int, const sigset_t * , sigset_t * );
    int sigrelse(int);
    void (* _Nullable sigset(int, void (* _Nullable)(int)))(int);
    int sigsuspend(const sigset_t *) __asm("_" "sigsuspend" );
    int sigwait(const sigset_t * , int * ) __asm("_" "sigwait" );
    
    void psignal(unsigned int, const char *);
    int sigblock(int);
    int sigsetmask(int);
    int sigvec(int, struct sigvec *, struct sigvec *);
    
    }
    typedef long int ptrdiff_t;
    typedef __darwin_va_list va_list;
    
    
    

    相关文章

      网友评论

          本文标题:Objective-C将main.m转换成main.cpp

          本文链接:https://www.haomeiwen.com/subject/njfeuqtx.html