Commit 1b97881e38

Jakub Konka <kubkon@jakubkonka.com>
2023-03-25 21:27:47
libc: update macOS libc headers
1 parent 37f6f79
Changed files (193)
lib
libc
include
aarch64-macos.11-none
any-macos-any
any-macos.11-any
any-macos.12-any
any-macos.13-any
x86_64-macos.11-none
lib/libc/include/aarch64-macos.11-none/arm/_limits.h
@@ -4,10 +4,6 @@
 #ifndef _ARM__LIMITS_H_
 #define _ARM__LIMITS_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #define __DARWIN_CLK_TCK                100     /* ticks per second */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _ARM__LIMITS_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/_mcontext.h
@@ -29,8 +29,6 @@
 #ifndef __ARM_MCONTEXT_H_
 #define __ARM_MCONTEXT_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <sys/cdefs.h> /* __DARWIN_UNIX03 */
 #include <sys/appleapiopts.h>
 #include <mach/machine/_structs.h>
@@ -90,6 +88,4 @@ typedef _STRUCT_MCONTEXT32      *mcontext_t;
 #endif
 #endif /* _MCONTEXT_T */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* __ARM_MCONTEXT_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/_param.h
@@ -5,8 +5,6 @@
 #ifndef _ARM__PARAM_H_
 #define _ARM__PARAM_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <arm/_types.h>
 
 /*
@@ -20,6 +18,5 @@
 #define      __DARWIN_ALIGNBYTES32     (sizeof(__uint32_t) - 1)
 #define       __DARWIN_ALIGN32(p)       ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
 
-#endif /* defined (__arm__) || defined (__arm64__) */
 
 #endif /* _ARM__PARAM_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/_types.h
@@ -4,8 +4,6 @@
 #ifndef _BSD_ARM__TYPES_H_
 #define _BSD_ARM__TYPES_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 /*
  * This header file contains integer types.  It's intended to also contain
  * flotaing point and other arithmetic types, as needed, later.
@@ -97,6 +95,4 @@ typedef __uint32_t              __darwin_socklen_t;     /* socklen_t (duh) */
 typedef long                    __darwin_ssize_t;       /* byte count or error */
 typedef long                    __darwin_time_t;        /* time() */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _BSD_ARM__TYPES_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/arch.h
@@ -28,8 +28,6 @@
 #ifndef _ARM_ARCH_H
 #define _ARM_ARCH_H
 
-#if defined (__arm__) || defined (__arm64__)
-
 /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */
 #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__)
 #define _ARM_ARCH_7
@@ -66,6 +64,4 @@
 #define _ARM_ARCH_4
 #endif
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/endian.h
@@ -42,8 +42,6 @@
 #ifndef _ARM__ENDIAN_H_
 #define _ARM__ENDIAN_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <sys/cdefs.h>
 /*
  * Define _NOQUAD if the compiler does NOT support 64-bit integers.
@@ -77,5 +75,4 @@
 #include <sys/_endian.h>
 
 #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
-#endif /* defined (__arm__) || defined (__arm64__) */
 #endif /* !_ARM__ENDIAN_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/limits.h
@@ -39,8 +39,6 @@
 #ifndef _ARM_LIMITS_H_
 #define _ARM_LIMITS_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <sys/cdefs.h>
 #include <arm/_limits.h>
 
@@ -109,6 +107,4 @@
 #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
 #endif /* !_ANSI_SOURCE */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _ARM_LIMITS_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/param.h
@@ -48,8 +48,6 @@
 #ifndef _ARM_PARAM_H_
 #define _ARM_PARAM_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <arm/_param.h>
 
 /*
@@ -146,6 +144,4 @@
 #define DELAY(n)        { int N = (n); while (--N > 0); }
 #endif  /* defined(KERNEL) || defined(STANDALONE) */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _ARM_PARAM_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/signal.h
@@ -9,14 +9,10 @@
 #ifndef _ARM_SIGNAL_
 #define _ARM_SIGNAL_ 1
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <sys/cdefs.h>
 
 #ifndef _ANSI_SOURCE
 typedef int sig_atomic_t;
 #endif /* ! _ANSI_SOURCE */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _ARM_SIGNAL_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/arm/types.h
@@ -39,12 +39,9 @@
  *	@(#)types.h	8.3 (Berkeley) 1/5/94
  */
 
-#ifndef _ARM_MACHTYPES_H_
-#define _ARM_MACHTYPES_H_
+#ifndef _MACHTYPES_H_
 #define _MACHTYPES_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #ifndef __ASSEMBLER__
 #include <arm/_types.h>
 #include <sys/cdefs.h>
@@ -107,5 +104,4 @@ typedef u_int64_t               syscall_arg_t;
 #endif
 
 #endif /* __ASSEMBLER__ */
-#endif /* defined (__arm__) || defined (__arm64__) */
-#endif  /* _ARM_MACHTYPES_H_ */
\ No newline at end of file
+#endif  /* _MACHTYPES_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/_structs.h
@@ -31,8 +31,6 @@
 #ifndef _MACH_ARM__STRUCTS_H_
 #define _MACH_ARM__STRUCTS_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <sys/cdefs.h> /* __DARWIN_UNIX03 */
 #include <machine/types.h> /* __uint32_t */
 
@@ -509,6 +507,25 @@ _STRUCT_ARM_NEON_STATE
 
 #endif /* __DARWIN_UNIX03 */
 
+#if __DARWIN_UNIX03
+#define _STRUCT_ARM_AMX_STATE_V1 struct __darwin_arm_amx_state_v1
+_STRUCT_ARM_AMX_STATE_V1
+{
+	__uint8_t  __x[8][64];        /* 8 64-byte registers */
+	__uint8_t  __y[8][64];        /* 8 64-byte registers */
+	__uint8_t  __z[64][64];       /* 64 64-byte registers in an M-by-N matrix */
+	__uint64_t __amx_state_t_el1; /* AMX_STATE_T_EL1 value */
+} __attribute__((aligned(64)));
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_ARM_AMX_STATE_V1 struct arm_amx_state_v1
+_STRUCT_ARM_AMX_STATE_V1
+{
+	__uint8_t  x[8][64];        /* 8 64-byte registers */
+	__uint8_t  y[8][64];        /* 8 64-byte registers */
+	__uint8_t  z[64][64];       /* 64 64-byte registers in an M-by-N matrix */
+	__uint64_t amx_state_t_el1; /* AMX_STATE_T_EL1 value. */
+} __attribute__((aligned(64)));
+#endif /* __DARWIN_UNIX03 */
 
 #define _STRUCT_ARM_PAGEIN_STATE struct __arm_pagein_state
 _STRUCT_ARM_PAGEIN_STATE
@@ -625,6 +642,4 @@ _STRUCT_ARM_CPMU_STATE64
 };
 #endif /* !__DARWIN_UNIX03 */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _MACH_ARM__STRUCTS_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/boolean.h
@@ -65,10 +65,6 @@
 #ifndef _MACH_ARM_BOOLEAN_H_
 #define _MACH_ARM_BOOLEAN_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 typedef int             boolean_t;
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _MACH_ARM_BOOLEAN_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/exception.h
@@ -29,8 +29,6 @@
 #ifndef _MACH_ARM_EXCEPTION_H_
 #define _MACH_ARM_EXCEPTION_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #define EXC_TYPES_COUNT         14      /* incl. illegal exception 0 */
 
 #define EXC_MASK_MACHINE         0
@@ -77,6 +75,5 @@
 
 #define EXC_ARM_BREAKPOINT      1       /* breakpoint trap */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
 
 #endif  /* _MACH_ARM_EXCEPTION_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/kern_return.h
@@ -67,12 +67,8 @@
 #ifndef _MACH_ARM_KERN_RETURN_H_
 #define _MACH_ARM_KERN_RETURN_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #ifndef ASSEMBLER
 typedef int             kern_return_t;
 #endif  /* ASSEMBLER */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _MACH_ARM_KERN_RETURN_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/processor_info.h
@@ -29,8 +29,6 @@
 #ifndef _MACH_ARM_PROCESSOR_INFO_H_
 #define _MACH_ARM_PROCESSOR_INFO_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #define PROCESSOR_CPU_STAT   0x10000003 /* Low-level CPU statistics */
 #define PROCESSOR_CPU_STAT64 0x10000004 /* Low-level CPU statistics, in full 64-bit */
 
@@ -71,6 +69,4 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t;
 #define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \
 	        (sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t)))
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _MACH_ARM_PROCESSOR_INFO_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/rpc.h
@@ -32,8 +32,4 @@
 #ifndef _MACH_ARM_RPC_H_
 #define _MACH_ARM_RPC_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _MACH_ARM_RPC_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_state.h
@@ -32,11 +32,13 @@
 #ifndef _MACH_ARM_THREAD_STATE_H_
 #define _MACH_ARM_THREAD_STATE_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 /* Size of maximum exported thread state in words */
 #define ARM_THREAD_STATE_MAX    (1296)    /* Size of biggest state possible */
 
-#endif /* defined (__arm__) || defined (__arm64__) */
+#if defined (__arm__) || defined(__arm64__)
+#define THREAD_STATE_MAX        ARM_THREAD_STATE_MAX
+#else
+#error Unsupported arch
+#endif
 
 #endif  /* _MACH_ARM_THREAD_STATE_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_status.h
@@ -33,12 +33,10 @@
 #ifndef _ARM_THREAD_STATUS_H_
 #define _ARM_THREAD_STATUS_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #include <mach/machine/_structs.h>
-#include <mach/machine/thread_state.h>
 #include <mach/message.h>
 #include <mach/vm_types.h>
+#include <mach/arm/thread_state.h>
 
 /*
  *    Support for determining the state of a thread
@@ -69,12 +67,13 @@
 #define ARM_CPMU_STATE64         18
 
 
+/* API */
+#define ARM_AMX_STATE            24
+#define ARM_AMX_STATE_V1         25
+#define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) \
+	((_flavor_) == ARM_AMX_STATE_V1)
 #define ARM_PAGEIN_STATE         27
 
-#ifndef ARM_STATE_FLAVOR_IS_OTHER_VALID
-#define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) 0
-#endif
-
 #define VALID_THREAD_STATE_FLAVOR(x) \
 	((x == ARM_THREAD_STATE) ||           \
 	 (x == ARM_VFP_STATE) ||              \
@@ -171,6 +170,7 @@ typedef _STRUCT_ARM_NEON_STATE        arm_neon_state_t;
 typedef _STRUCT_ARM_NEON_STATE        arm_neon_state32_t;
 typedef _STRUCT_ARM_NEON_STATE64      arm_neon_state64_t;
 
+typedef _STRUCT_ARM_AMX_STATE_V1       arm_amx_state_v1_t;
 
 typedef _STRUCT_ARM_EXCEPTION_STATE   arm_exception_state_t;
 typedef _STRUCT_ARM_EXCEPTION_STATE   arm_exception_state32_t;
@@ -224,12 +224,26 @@ typedef _STRUCT_ARM_LEGACY_DEBUG_STATE arm_debug_state_t;
 #define MACHINE_THREAD_STATE_COUNT ARM_UNIFIED_THREAD_STATE_COUNT
 
 
+struct arm_amx_state {
+	arm_state_hdr_t ash;
+	union {
+		arm_amx_state_v1_t as_v1;
+	} uas;
+};
+#define as_v1 uas.as_v1
+typedef struct arm_amx_state arm_amx_state_t;
+
+#define ARM_AMX_STATE_V1_COUNT ((mach_msg_type_number_t) \
+	(sizeof(arm_amx_state_v1_t)/sizeof(unsigned int)))
+
+#define ARM_AMX_STATE_COUNT ((mach_msg_type_number_t) \
+	(sizeof(arm_amx_state_t)/sizeof(unsigned int)))
+
+
 /*
  * Largest state on this machine:
  */
 #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX
 
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif /* _ARM_THREAD_STATUS_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/vm_param.h
@@ -36,8 +36,6 @@
 #ifndef _MACH_ARM_VM_PARAM_H_
 #define _MACH_ARM_VM_PARAM_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 
 #if !defined (KERNEL) && !defined (__ASSEMBLER__)
 #include <mach/vm_page_size.h>
@@ -106,6 +104,4 @@
 
 #define SWI_SYSCALL     0x80
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _MACH_ARM_VM_PARAM_H_ */
\ No newline at end of file
lib/libc/include/aarch64-macos.11-none/mach/arm/vm_types.h
@@ -67,14 +67,11 @@
 #ifndef _MACH_ARM_VM_TYPES_H_
 #define _MACH_ARM_VM_TYPES_H_
 
-#if defined (__arm__) || defined (__arm64__)
-
 #ifndef ASSEMBLER
 
 #include <arm/_types.h>
 #include <stdint.h>
 #include <Availability.h>
-#include <sys/cdefs.h>
 
 /*
  * natural_t and integer_t are Mach's legacy types for machine-
@@ -101,18 +98,18 @@ typedef int                     integer_t;
  * e.g. an offset into a virtual memory space.
  */
 #ifdef __LP64__
-typedef uintptr_t               vm_offset_t __kernel_ptr_semantics;
+typedef uintptr_t               vm_offset_t;
 typedef uintptr_t               vm_size_t;
 
-typedef uint64_t                mach_vm_address_t __kernel_ptr_semantics;
-typedef uint64_t                mach_vm_offset_t __kernel_ptr_semantics;
+typedef uint64_t                mach_vm_address_t;
+typedef uint64_t                mach_vm_offset_t;
 typedef uint64_t                mach_vm_size_t;
 
-typedef uint64_t                vm_map_offset_t __kernel_ptr_semantics;
-typedef uint64_t                vm_map_address_t __kernel_ptr_semantics;
+typedef uint64_t                vm_map_offset_t;
+typedef uint64_t                vm_map_address_t;
 typedef uint64_t                vm_map_size_t;
 #else
-typedef natural_t               vm_offset_t __kernel_ptr_semantics;
+typedef natural_t               vm_offset_t;
 /*
  * A vm_size_t is the proper type for e.g.
  * expressing the difference between two
@@ -132,13 +129,13 @@ typedef uint32_t                mach_vm_address_t;
 typedef uint32_t                mach_vm_offset_t;
 typedef uint32_t                mach_vm_size_t;
 #else
-typedef uint64_t                mach_vm_address_t __kernel_ptr_semantics;
-typedef uint64_t                mach_vm_offset_t __kernel_ptr_semantics;
+typedef uint64_t                mach_vm_address_t;
+typedef uint64_t                mach_vm_offset_t;
 typedef uint64_t                mach_vm_size_t;
 #endif
 
-typedef uint32_t                vm_map_offset_t __kernel_ptr_semantics;
-typedef uint32_t                vm_map_address_t __kernel_ptr_semantics;
+typedef uint32_t                vm_map_offset_t;
+typedef uint32_t                vm_map_address_t;
 typedef uint32_t                vm_map_size_t;
 #endif /* __LP64__ */
 
@@ -157,6 +154,4 @@ typedef vm_offset_t             mach_port_context_t;
  */
 #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
 
-#endif /* defined (__arm__) || defined (__arm64__) */
-
 #endif  /* _MACH_ARM_VM_TYPES_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/libkern/OSCacheControl.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _OS_CACHE_CONTROL_H_
+#define _OS_CACHE_CONTROL_H_
+
+#include    <stddef.h>
+#include    <sys/cdefs.h>
+#include    <stdint.h>
+#include    <Availability.h>
+
+__BEGIN_DECLS
+
+
+/* Functions performed by sys_cache_control(): */
+
+/* Prepare memory for execution.  This should be called
+ * after writing machine instructions to memory, before
+ * executing them.  It syncs the dcache and icache.
+ * On IA32 processors this function is a NOP, because
+ * no synchronization is required.
+ */
+#define	kCacheFunctionPrepareForExecution	1
+
+/* Flush data cache(s).  This ensures that cached data 
+ * makes it all the way out to DRAM, and then removes
+ * copies of the data from all processor caches.
+ * It can be useful when dealing with cache incoherent
+ * devices or DMA.
+ */
+#define	kCacheFunctionFlushDcache	2
+
+
+/* perform one of the above cache functions: */
+int	sys_cache_control( int function, void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+ 
+/* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */
+void	sys_icache_invalidate( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+/* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */
+void	sys_dcache_flush( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+
+__END_DECLS
+
+#endif /* _OS_CACHE_CONTROL_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/libkern/OSDebug.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
+ *
+ * HISTORY
+ *
+ */
+
+#ifndef _OS_OSDEBBUG_H
+#define _OS_OSDEBBUG_H
+
+#include <sys/cdefs.h>
+#include <mach/mach_types.h>
+
+__BEGIN_DECLS
+
+/* Report a message with a 4 entry backtrace - very slow */
+extern void OSReportWithBacktrace(const char *str, ...) __printflike(1, 2);
+extern unsigned OSBacktrace(void **bt, unsigned maxAddrs);
+
+/* Simple dump of 20 backtrace entries */
+extern void OSPrintBacktrace(void);
+
+/*! @function OSKernelStackRemaining
+ *   @abstract Returns bytes available below the current stack frame.
+ *   @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context.
+ *   @result Approximate byte count available. */
+
+vm_offset_t OSKernelStackRemaining( void );
+
+__END_DECLS
+
+#endif /* !_OS_OSDEBBUG_H */
\ No newline at end of file
lib/libc/include/any-macos-any/libkern/OSKextLib.h
@@ -0,0 +1,571 @@
+/*
+ * Copyright (c) 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _LIBKERN_OSKEXTLIB_H
+#define _LIBKERN_OSKEXTLIB_H
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+#include <stdint.h>
+#include <mach/kmod.h>
+#include <mach/vm_types.h>
+#include <uuid/uuid.h>
+
+#include <libkern/OSReturn.h>
+
+/*!
+ * @header
+ *
+ * Declares functions, basic return values, and other constants
+ * related to kernel extensions (kexts).
+ */
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark OSReturn Values for Kernel Extensions
+/********************************************************************/
+#endif
+/*!
+ * @group OSReturn Values for Kernel Extensions
+ * Many kext-related functions return these values,
+ * as well as those defined under
+ * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code>
+ * and other variants of <code>kern_return_t</code>.
+ */
+
+
+#define sub_libkern_kext           err_sub(2)
+#define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))
+
+
+/*!
+ * @define   kOSKextReturnInternalError
+ * @abstract An internal error in the kext library.
+ *           Contrast with <code>@link //apple_ref/c/econst/OSReturnError
+ *           OSReturnError@/link</code>.
+ */
+#define kOSKextReturnInternalError                   libkern_kext_err(0x1)
+
+/*!
+ * @define   kOSKextReturnNoMemory
+ * @abstract Memory allocation failed.
+ */
+#define kOSKextReturnNoMemory                        libkern_kext_err(0x2)
+
+/*!
+ * @define   kOSKextReturnNoResources
+ * @abstract Some resource other than memory (such as available load tags)
+ *           is exhausted.
+ */
+#define kOSKextReturnNoResources                     libkern_kext_err(0x3)
+
+/*!
+ * @define   kOSKextReturnNotPrivileged
+ * @abstract The caller lacks privileges to perform the requested operation.
+ */
+#define kOSKextReturnNotPrivileged                   libkern_kext_err(0x4)
+
+/*!
+ * @define   kOSKextReturnInvalidArgument
+ * @abstract Invalid argument.
+ */
+#define kOSKextReturnInvalidArgument                 libkern_kext_err(0x5)
+
+/*!
+ * @define   kOSKextReturnNotFound
+ * @abstract Search item not found.
+ */
+#define kOSKextReturnNotFound                        libkern_kext_err(0x6)
+
+/*!
+ * @define   kOSKextReturnBadData
+ * @abstract Malformed data (not used for XML).
+ */
+#define kOSKextReturnBadData                         libkern_kext_err(0x7)
+
+/*!
+ * @define   kOSKextReturnSerialization
+ * @abstract Error converting or (un)serializing URL, string, or XML.
+ */
+#define kOSKextReturnSerialization                   libkern_kext_err(0x8)
+
+/*!
+ * @define   kOSKextReturnUnsupported
+ * @abstract Operation is no longer or not yet supported.
+ */
+#define kOSKextReturnUnsupported                     libkern_kext_err(0x9)
+
+/*!
+ * @define   kOSKextReturnDisabled
+ * @abstract Operation is currently disabled.
+ */
+#define kOSKextReturnDisabled                        libkern_kext_err(0xa)
+
+/*!
+ * @define   kOSKextReturnNotAKext
+ * @abstract Bundle is not a kernel extension.
+ */
+#define kOSKextReturnNotAKext                        libkern_kext_err(0xb)
+
+/*!
+ * @define   kOSKextReturnValidation
+ * @abstract Validation failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnValidation                      libkern_kext_err(0xc)
+
+/*!
+ * @define   kOSKextReturnAuthentication
+ * @abstract Authetication failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnAuthentication                  libkern_kext_err(0xd)
+
+/*!
+ * @define   kOSKextReturnDependencies
+ * @abstract Dependency resolution failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnDependencies                    libkern_kext_err(0xe)
+
+/*!
+ * @define   kOSKextReturnArchNotFound
+ * @abstract Kext does not contain code for the requested architecture.
+ */
+#define kOSKextReturnArchNotFound                    libkern_kext_err(0xf)
+
+/*!
+ * @define   kOSKextReturnCache
+ * @abstract An error occurred processing a system kext cache.
+ */
+#define kOSKextReturnCache                           libkern_kext_err(0x10)
+
+/*!
+ * @define   kOSKextReturnDeferred
+ * @abstract Operation has been posted asynchronously to user space (kernel only).
+ */
+#define kOSKextReturnDeferred                        libkern_kext_err(0x11)
+
+/*!
+ * @define   kOSKextReturnBootLevel
+ * @abstract Kext not loadable or operation not allowed at current boot level.
+ */
+#define kOSKextReturnBootLevel                       libkern_kext_err(0x12)
+
+/*!
+ * @define   kOSKextReturnNotLoadable
+ * @abstract Kext cannot be loaded; check diagnostics for details.
+ */
+#define kOSKextReturnNotLoadable                     libkern_kext_err(0x13)
+
+/*!
+ * @define   kOSKextReturnLoadedVersionDiffers
+ * @abstract A different version (or executable UUID, or executable by checksum)
+ *           of the requested kext is already loaded.
+ */
+#define kOSKextReturnLoadedVersionDiffers            libkern_kext_err(0x14)
+
+/*!
+ * @define   kOSKextReturnDependencyLoadError
+ * @abstract A load error occurred on a dependency of the kext being loaded.
+ */
+#define kOSKextReturnDependencyLoadError             libkern_kext_err(0x15)
+
+/*!
+ * @define   kOSKextReturnLinkError
+ * @abstract A link failure occured with this kext or a dependency.
+ */
+#define kOSKextReturnLinkError                       libkern_kext_err(0x16)
+
+/*!
+ * @define   kOSKextReturnStartStopError
+ * @abstract The kext start or stop routine returned an error.
+ */
+#define kOSKextReturnStartStopError                  libkern_kext_err(0x17)
+
+/*!
+ * @define   kOSKextReturnInUse
+ * @abstract The kext is currently in use or has outstanding references,
+ *           and cannot be unloaded.
+ */
+#define kOSKextReturnInUse                           libkern_kext_err(0x18)
+
+/*!
+ * @define   kOSKextReturnTimeout
+ * @abstract A kext request has timed out.
+ */
+#define kOSKextReturnTimeout                         libkern_kext_err(0x19)
+
+/*!
+ * @define   kOSKextReturnStopping
+ * @abstract The kext is in the process of stopping; requests cannot be made.
+ */
+#define kOSKextReturnStopping                        libkern_kext_err(0x1a)
+
+/*!
+ * @define   kOSKextReturnSystemPolicy
+ * @abstract The kext was prevented from loading due to system policy.
+ */
+#define kOSKextReturnSystemPolicy                    libkern_kext_err(0x1b)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailure
+ * @abstract Loading of the System KC failed
+ */
+#define kOSKextReturnKCLoadFailure                  libkern_kext_err(0x1c)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailureSystemKC
+ * @abstract Loading of the System KC failed
+ *
+ * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
+ * with: kOSKextReturnKCLoadFailureAuxKC
+ *
+ * If both the System and Aux KCs fail to load, then the error code will be:
+ * libkern_kext_err(0x1f)
+ */
+#define kOSKextReturnKCLoadFailureSystemKC          libkern_kext_err(0x1d)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailureAuxKC
+ * @abstract Loading of the Aux KC failed
+ *
+ * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
+ * with: kOSKextReturnKCLoadFailureSystemKC
+ *
+ * If both the System and Aux KCs fail to load, then the error code will be:
+ * libkern_kext_err(0x1f)
+ */
+#define kOSKextReturnKCLoadFailureAuxKC             libkern_kext_err(0x1e)
+
+/* next available error is: libkern_kext_err(0x20) */
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark Kext/OSBundle Property List Keys
+/********************************************************************/
+#endif
+/*!
+ * @group Kext Property List Keys
+ * These constants cover CFBundle properties defined for kernel extensions.
+ * Because they are used in the kernel, if you want to use one with
+ * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro.
+ */
+
+
+/*!
+ * @define   kOSBundleCompatibleVersionKey
+ * @abstract A string giving the backwards-compatible version of a library kext
+ *           in extended Mac OS 'vers' format (####.##.##s{1-255} where 's'
+ *           is a build stage 'd', 'a', 'b', 'f' or 'fc').
+ */
+#define kOSBundleCompatibleVersionKey           "OSBundleCompatibleVersion"
+
+/*!
+ * @define   kOSBundleEnableKextLoggingKey
+ * @abstract Set to true to have the kernel kext logging spec applied
+ *           to the kext.
+ *           See <code>@link //apple_ref/c/econst/OSKextLogSpec
+ *           OSKextLogSpec@/link</code>.
+ */
+#define kOSBundleEnableKextLoggingKey           "OSBundleEnableKextLogging"
+
+/*!
+ * @define   kOSBundleIsInterfaceKey
+ * @abstract A boolean value indicating whether the kext executable
+ *           contains only symbol references.
+ */
+#define kOSBundleIsInterfaceKey                 "OSBundleIsInterface"
+
+/*!
+ * @define   kOSBundleLibrariesKey
+ * @abstract A dictionary listing link dependencies for this kext.
+ *           Keys are bundle identifiers, values are version strings.
+ */
+#define kOSBundleLibrariesKey                   "OSBundleLibraries"
+
+/*!
+ * @define   kOSBundleRequiredKey
+ * @abstract A string indicating in which kinds of startup this kext
+ *           may need to load during early startup (before
+ *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>).
+ * @discussion
+ * The value is one of:
+ * <ul>
+ * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li>
+ * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li>
+ * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li>
+ * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li>
+ * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li>
+ * </ul>
+ *
+ * Use this property judiciously.
+ * Every kext that declares a value other than "OSBundleRequiredSafeBoot"
+ * increases startup time, as the booter must read it into memory,
+ * or startup kext caches must include it.
+ */
+#define kOSBundleRequiredKey                    "OSBundleRequired"
+
+/*!
+ * @define   kOSBundleRequireExplicitLoadKey
+ * @abstract A boolean value indicating whether the kext requires an
+ *           explicit kextload in order to start/match.
+ */
+#define kOSBundleRequireExplicitLoadKey         "OSBundleRequireExplicitLoad"
+
+/*!
+ * @define   kOSBundleAllowUserLoadKey
+ * @abstract A boolean value indicating whether
+ *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>
+ *           will honor a non-root process's request to load a kext.
+ * @discussion
+ * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL
+ * KextManagerLoadKextWithURL@/link</code>
+ * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier
+ * KextManagerLoadKextWithIdentifier@/link</code>.
+ */
+#define kOSBundleAllowUserLoadKey               "OSBundleAllowUserLoad"
+
+/*!
+ * @define   kOSBundleAllowUserTerminateKey
+ * @abstract A boolean value indicating whether the kextunload tool
+ *           is allowed to issue IOService terminate to classes defined in this kext.
+ * @discussion A boolean value indicating whether the kextunload tool
+ *           is allowed to issue IOService terminate to classes defined in this kext.
+ */
+#define kOSBundleAllowUserTerminateKey          "OSBundleAllowUserTerminate"
+
+/*!
+ * @define   kOSKernelResourceKey
+ * @abstract A boolean value indicating whether the kext represents a built-in
+ *           component of the kernel.
+ */
+#define kOSKernelResourceKey                    "OSKernelResource"
+
+/*!
+ * @define   kOSKextVariantOverrideKey
+ * @abstract A dictionary with target names as key and a target-specific variant
+ *           name as value.
+ */
+#define kOSKextVariantOverrideKey               "OSKextVariantOverride"
+
+/*!
+ * @define   kIOKitPersonalitiesKey
+ * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers.
+ */
+#define kIOKitPersonalitiesKey                  "IOKitPersonalities"
+
+/*
+ * @define   kIOPersonalityPublisherKey
+ * @abstract Used in personalities sent to the I/O Kit,
+ *           contains the CFBundleIdentifier of the kext
+ *           that the personality originated in.
+ */
+#define kIOPersonalityPublisherKey              "IOPersonalityPublisher"
+
+#if CONFIG_KEC_FIPS
+/*
+ * @define   kAppleTextHashesKey
+ * @abstract A dictionary conataining hashes for corecrypto kext.
+ */
+#define kAppleTextHashesKey                     "AppleTextHashes"
+#endif
+
+/*!
+ * @define   kOSMutableSegmentCopy
+ * @abstract A boolean value indicating whether the kext requires a copy of
+ *           its mutable segments to be kept in memory, and then reset when the kext
+ *           unloads. This should be used with caution as it will increase the
+ *           amount of memory used by the kext.
+ */
+#define kOSMutableSegmentCopy                   "OSMutableSegmentCopy"
+
+
+#if PRAGMA_MARK
+/********************************************************************/
+#pragma mark Kext/OSBundle Property Deprecated Keys
+/********************************************************************/
+#endif
+/*
+ * @define   kOSBundleDebugLevelKey
+ * @abstract
+ * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard).
+ * Value is an integer from 1-6, corresponding to the verbose levels
+ * of kext tools on those releases.
+ * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging
+ * OSKextEnableKextLogging@/link</code>.
+ */
+#define kOSBundleDebugLevelKey                  "OSBundleDebugLevel"
+
+/*!
+ * @define   kOSBundleSharedExecutableIdentifierKey
+ * @abstract Deprecated (used on some releases of Mac OS X
+ *           prior to 10.6 Snow Leopard).
+ *           Value is the bundle identifier of the pseudokext
+ *           that contains an executable shared by this kext.
+ */
+#define kOSBundleSharedExecutableIdentifierKey  "OSBundleSharedExecutableIdentifier"
+
+
+#if PRAGMA_MARK
+/********************************************************************/
+#pragma mark Kext/OSBundle Property List Values
+/********************************************************************/
+#endif
+
+/*!
+ * @group Kext Property List Values
+ * These constants encompass established values
+ * for kernel extension bundle properties.
+ */
+
+/*!
+ * @define   kOSKextKernelIdentifier
+ * @abstract
+ * This is the CFBundleIdentifier user for the kernel itself.
+ */
+#define kOSKextKernelIdentifier                 "__kernel__"
+
+/*!
+ * @define  kOSKextBundlePackageTypeKext
+ * @abstract
+ * The bundle type value for Kernel Extensions.
+ */
+#define kOSKextBundlePackageTypeKext        "KEXT"
+
+/*!
+ * @define  kOSKextBundlePackageTypeDriverKit
+ * @abstract
+ * The bundle type value for Driver Extensions.
+ */
+#define kOSKextBundlePackageTypeDriverKit   "DEXT"
+
+/*!
+ * @define   kOSBundleRequiredRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * whether starting from a local or a network volume.
+ */
+#define kOSBundleRequiredRoot                   "Root"
+
+/*!
+ * @define   kOSBundleRequiredLocalRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * when starting from a local disk.
+ */
+#define kOSBundleRequiredLocalRoot              "Local-Root"
+
+/*!
+ * @define   kOSBundleRequiredNetworkRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * when starting over a network connection.
+ */
+#define kOSBundleRequiredNetworkRoot            "Network-Root"
+
+/*!
+ * @define   kOSBundleRequiredSafeBoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext can be loaded during a safe startup.
+ * This value does not normally cause the kext to be read by the booter
+ * or included in startup kext caches.
+ */
+#define kOSBundleRequiredSafeBoot               "Safe Boot"
+
+/*!
+ * @define   kOSBundleRequiredConsole
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed for console access
+ * (specifically in a single-user startup when
+ * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>.
+ * does not run)
+ * and should be loaded during early startup.
+ */
+#define kOSBundleRequiredConsole                "Console"
+
+/*!
+ * @define   kOSBundleRequiredDriverKit
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the driver extension's (DriverKit driver's)
+ * personalities must be present in the kernel at early boot (specifically
+ * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts)
+ * in order to compete with kexts built into the prelinkedkernel. Note that
+ * kextd is still required to launch the user space driver binary. The IOKit
+ * matching will happen during early boot, and the actual driver launch
+ * will happen after kextd starts.
+ */
+#define kOSBundleRequiredDriverKit              "DriverKit"
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark Kext Information
+/********************************************************************/
+#endif
+/*!
+ * @group Kext Information
+ * Types, constants, and macros providing a kext with information
+ * about itself.
+ */
+
+/*!
+ * @typedef OSKextLoadTag
+ *
+ * @abstract
+ * A unique identifier assigned to a loaded instanace of a kext.
+ *
+ * @discussion
+ * If a kext is unloaded and later reloaded, the new instance
+ * has a different load tag.
+ *
+ * A kext can get its own load tag in the <code>kmod_info_t</code>
+ * structure passed into its module start routine, as the
+ * <code>id</code> field (cast to this type).
+ */
+typedef uint32_t  OSKextLoadTag;
+
+/*!
+ * @define kOSKextInvalidLoadTag
+ *
+ * @abstract
+ * A load tag value that will never be used for a loaded kext;
+ * indicates kext not found.
+ */
+#define  kOSKextInvalidLoadTag  ((OSKextLoadTag)(-1))
+
+
+__END_DECLS
+
+#endif /* _LIBKERN_OSKEXTLIB_H */
\ No newline at end of file
lib/libc/include/any-macos-any/libkern/OSReturn.h
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2000 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1998 Apple Inc.  All rights reserved.
+ *
+ * HISTORY
+ *
+ */
+
+/*
+ * Core OSReturn values.
+ */
+
+#ifndef __LIBKERN_OSRETURN_H
+#define __LIBKERN_OSRETURN_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#include <mach/error.h>
+
+
+/*!
+ * @header
+ *
+ * Declares functions, basic return values, and other constants
+ * related to kernel extensions (kexts).
+ */
+
+#if PRAGMA_MARK
+#pragma mark Core OSReturn Values for Libkern
+#endif
+/*********************************************************************
+* Core OSReturn Values for Libkern
+*********************************************************************/
+/*!
+ * @group Core OSReturn Values for Libkern
+ * Some kext and I/O Kit functions can return these values,
+ * as well as  other values of
+ * <code>kern_return_t</code>.
+ *
+ * Many of these return values represent internal errors
+ * in the Libkern C++ run-time typing information system
+ * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link;
+ * you are unlikely to ever see them.
+ *
+ */
+
+
+/*!
+ * @typedef  OSReturn
+ * @abstract The return type for many Libkern functions.
+ */
+typedef kern_return_t OSReturn;
+
+#ifndef sys_libkern
+#define sys_libkern                   err_system(0x37)
+#endif /* sys_libkern */
+
+#define sub_libkern_common            err_sub(0)
+#define sub_libkern_metaclass         err_sub(1)
+#define sub_libkern_reserved          err_sub(-1)
+
+#define libkern_common_err(return )    (sys_libkern|sub_libkern_common|(return))
+#define libkern_metaclass_err(return ) (sys_libkern|sub_libkern_metaclass|(return))
+
+/* See OSKextLib.h for these
+ * #define sub_libkern_kext           err_sub(2)
+ * #define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))
+ */
+
+/*!
+ * @define   kOSReturnSuccess
+ * @abstract Operation successful.
+ *           Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS
+ *           KERN_SUCCESS@/link</code>.
+ */
+#define kOSReturnSuccess              KERN_SUCCESS
+
+/*!
+ * @define   kOSReturnError
+ * @abstract Unspecified Libkern error.
+ *           <b>Not equal</b> to
+ *           <code>@link //apple_ref/c/econst/KERN_FAILURE
+ *           KERN_FAILURE@/link</code>.
+ */
+#define kOSReturnError                libkern_common_err(1)
+
+/*!
+ * @define   kOSMetaClassInternal
+ * @abstract Internal OSMetaClass run-time error.
+ */
+#define kOSMetaClassInternal          libkern_metaclass_err(1)
+
+/*!
+ * @define   kOSMetaClassHasInstances
+ * @abstract A kext cannot be unloaded because there are instances
+ *           derived from Libkern C++ classes that it defines.
+ */
+#define kOSMetaClassHasInstances      libkern_metaclass_err(2)
+
+/*!
+ * @define   kOSMetaClassNoInit
+ * @abstract Internal error: The Libkern C++ class registration system
+ *           was not properly initialized during kext loading.
+ */
+#define kOSMetaClassNoInit            libkern_metaclass_err(3)
+// OSMetaClass::preModLoad wasn't called, runtime internal error
+
+/*!
+ * @define   kOSMetaClassNoTempData
+ * @abstract Internal error: An allocation failure occurred
+ *           registering Libkern C++ classes during kext loading.
+ */
+#define kOSMetaClassNoTempData        libkern_metaclass_err(4)
+// Allocation failure internal data
+
+/*!
+ * @define   kOSMetaClassNoDicts
+ * @abstract Internal error: An allocation failure occurred
+ *           registering Libkern C++ classes during kext loading.
+ */
+#define kOSMetaClassNoDicts           libkern_metaclass_err(5)
+// Allocation failure for Metaclass internal dictionaries
+
+/*!
+ * @define   kOSMetaClassNoKModSet
+ * @abstract Internal error: An allocation failure occurred
+ *           registering Libkern C++ classes during kext loading.
+ */
+#define kOSMetaClassNoKModSet         libkern_metaclass_err(6)
+// Allocation failure for internal kmodule set
+
+/*!
+ * @define   kOSMetaClassNoInsKModSet
+ * @abstract Internal error: An error occurred registering
+ *           a specific Libkern C++ class during kext loading.
+ */
+#define kOSMetaClassNoInsKModSet      libkern_metaclass_err(7)
+// Can't insert the KMod set into the module dictionary
+
+/*!
+ * @define   kOSMetaClassNoSuper
+ * @abstract Internal error: No superclass can be found
+ *           for a specific Libkern C++ class during kext loading.
+ */
+#define kOSMetaClassNoSuper           libkern_metaclass_err(8)
+
+/*!
+ * @define   kOSMetaClassInstNoSuper
+ * @abstract Internal error: No superclass can be found when constructing
+ *           an instance of a Libkern C++ class.
+ */
+#define kOSMetaClassInstNoSuper       libkern_metaclass_err(9)
+
+/*!
+ * @define   kOSMetaClassDuplicateClass
+ * @abstract A duplicate Libkern C++ classname was encountered
+ *           during kext loading.
+ */
+#define kOSMetaClassDuplicateClass    libkern_metaclass_err(10)
+
+/*!
+ * @define   kOSMetaClassNoKext
+ * @abstract Internal error: The kext for a Libkern C++ class
+ *           can't be found during kext loading.
+ */
+#define kOSMetaClassNoKext            libkern_metaclass_err(11)
+
+__END_DECLS
+
+#endif /* ! __LIBKERN_OSRETURN_H */
\ No newline at end of file
lib/libc/include/any-macos-any/libkern/OSThermalNotification.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _OSTHERMALNOTIFICATION_H_
+#define _OSTHERMALNOTIFICATION_H_
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+/*
+**  OSThermalNotification.h
+**  
+**  Notification mechanism to alert registered tasks when device thermal conditions
+**  reach certain thresholds. Notifications are triggered in both directions
+**  so clients can manage their memory usage more and less aggressively.
+**
+*/
+
+__BEGIN_DECLS
+
+/* Define pressure levels usable by OSThermalPressureLevel */
+typedef enum {
+#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
+	kOSThermalPressureLevelNominal = 0,
+	kOSThermalPressureLevelModerate,
+	kOSThermalPressureLevelHeavy,
+	kOSThermalPressureLevelTrapping,
+	kOSThermalPressureLevelSleeping
+#else
+	kOSThermalPressureLevelNominal = 0,
+	kOSThermalPressureLevelLight = 10,
+	kOSThermalPressureLevelModerate = 20,
+	kOSThermalPressureLevelHeavy = 30,
+	kOSThermalPressureLevelTrapping = 40,
+	kOSThermalPressureLevelSleeping = 50
+#endif
+} OSThermalPressureLevel;
+
+/*
+ ** External notify(3) string for thermal pressure level notification
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0)
+extern const char * const kOSThermalNotificationPressureLevelName;
+
+
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
+	__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0
+
+typedef enum {
+	OSThermalNotificationLevelAny      = -1,
+	OSThermalNotificationLevelNormal   =  0,
+} OSThermalNotificationLevel;
+
+extern OSThermalNotificationLevel _OSThermalNotificationLevelForBehavior(int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);
+extern void _OSThermalNotificationSetLevelForBehavior(int, int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);
+
+enum {
+	kOSThermalMitigationNone,
+	kOSThermalMitigation70PercentTorch,
+	kOSThermalMitigation70PercentBacklight,
+	kOSThermalMitigation50PercentTorch,
+	kOSThermalMitigation50PercentBacklight,
+	kOSThermalMitigationDisableTorch,
+	kOSThermalMitigation25PercentBacklight,
+	kOSThermalMitigationDisableMapsHalo,
+	kOSThermalMitigationAppTerminate,
+	kOSThermalMitigationDeviceRestart,
+	kOSThermalMitigationThermalTableReady,
+	kOSThermalMitigationCount
+};
+
+#define OSThermalNotificationLevel70PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentTorch)
+#define OSThermalNotificationLevel70PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentBacklight)
+#define OSThermalNotificationLevel50PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentTorch)
+#define OSThermalNotificationLevel50PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentBacklight)
+#define OSThermalNotificationLevelDisableTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableTorch)
+#define OSThermalNotificationLevel25PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation25PercentBacklight)
+#define OSThermalNotificationLevelDisableMapsHalo _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableMapsHalo)
+#define OSThermalNotificationLevelAppTerminate _OSThermalNotificationLevelForBehavior(kOSThermalMitigationAppTerminate)
+#define OSThermalNotificationLevelDeviceRestart _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDeviceRestart)
+
+/* Backwards compatibility */
+#define OSThermalNotificationLevelWarning OSThermalNotificationLevel70PercentBacklight
+#define OSThermalNotificationLevelUrgent OSThermalNotificationLevelAppTerminate
+#define OSThermalNotificationLevelCritical OSThermalNotificationLevelDeviceRestart
+
+/*
+** Simple polling interface to detect current thermal level
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
+extern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void);
+
+/*
+** External notify(3) string for manual notification setup
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
+extern const char * const kOSThermalNotificationName;
+
+/*
+** External notify(3) string for alerting user of a thermal condition
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
+extern const char * const kOSThermalNotificationAlert;
+
+/*
+** External notify(3) string for notifying system the options taken to resolve thermal condition
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
+extern const char * const kOSThermalNotificationDecision;
+
+#endif // __IPHONE_OS_VERSION_MIN_REQUIRED
+
+__END_DECLS
+
+#endif /* _OSTHERMALNOTIFICATION_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/sys/_types/_offsetof.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef offsetof
+#define offsetof(type, field) __offsetof(type, field)
+#endif /* offsetof */
\ No newline at end of file
lib/libc/include/any-macos-any/sys/_types/_ptrdiff_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _PTRDIFF_T
+#define _PTRDIFF_T
+#include <machine/types.h> /* __darwin_ptrdiff_t */
+typedef __darwin_ptrdiff_t ptrdiff_t;
+#endif /* _PTRDIFF_T */
\ No newline at end of file
lib/libc/include/any-macos-any/db.h
@@ -0,0 +1,219 @@
+/*-
+ * Copyright (c) 1990, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)db.h	8.7 (Berkeley) 6/16/94
+ * $FreeBSD: src/include/db.h,v 1.5 2002/03/26 01:35:05 bde Exp $
+ */
+
+#ifndef _DB_H_
+#define	_DB_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+#include <limits.h>
+
+#define	RET_ERROR	-1		/* Return values. */
+#define	RET_SUCCESS	 0
+#define	RET_SPECIAL	 1
+
+#define	MAX_PAGE_NUMBER	0xffffffff	/* >= # of pages in a file */
+typedef u_int32_t	pgno_t;
+#define	MAX_PAGE_OFFSET	65535		/* >= # of bytes in a page */
+typedef u_int16_t	indx_t;
+#define	MAX_REC_NUMBER	0xffffffff	/* >= # of records in a tree */
+typedef u_int32_t	recno_t;
+
+/* Key/data structure -- a Data-Base Thang. */
+typedef struct {
+	void	*data;			/* data */
+	size_t	 size;			/* data length */
+} DBT;
+
+/* Routine flags. */
+#define	R_CURSOR	1		/* del, put, seq */
+#define	__R_UNUSED	2		/* UNUSED */
+#define	R_FIRST		3		/* seq */
+#define	R_IAFTER	4		/* put (RECNO) */
+#define	R_IBEFORE	5		/* put (RECNO) */
+#define	R_LAST		6		/* seq (BTREE, RECNO) */
+#define	R_NEXT		7		/* seq */
+#define	R_NOOVERWRITE	8		/* put */
+#define	R_PREV		9		/* seq (BTREE, RECNO) */
+#define	R_SETCURSOR	10		/* put (RECNO) */
+#define	R_RECNOSYNC	11		/* sync (RECNO) */
+
+typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
+
+/*
+ * !!!
+ * The following flags are included in the dbopen(3) call as part of the
+ * open(2) flags.  In order to avoid conflicts with the open flags, start
+ * at the top of the 16 or 32-bit number space and work our way down.  If
+ * the open flags were significantly expanded in the future, it could be
+ * a problem.  Wish I'd left another flags word in the dbopen call.
+ *
+ * !!!
+ * None of this stuff is implemented yet.  The only reason that it's here
+ * is so that the access methods can skip copying the key/data pair when
+ * the DB_LOCK flag isn't set.
+ */
+#if UINT_MAX > 65535
+#define	DB_LOCK		0x20000000	/* Do locking. */
+#define	DB_SHMEM	0x40000000	/* Use shared memory. */
+#define	DB_TXN		0x80000000	/* Do transactions. */
+#else
+#define	DB_LOCK		    0x2000	/* Do locking. */
+#define	DB_SHMEM	    0x4000	/* Use shared memory. */
+#define	DB_TXN		    0x8000	/* Do transactions. */
+#endif
+
+/* Access method description structure. */
+typedef struct __db {
+	DBTYPE type;			/* Underlying db type. */
+	int (*close)(struct __db *);
+	int (*del)(const struct __db *, const DBT *, unsigned int);
+	int (*get)(const struct __db *, const DBT *, DBT *, unsigned int);
+	int (*put)(const struct __db *, DBT *, const DBT *, unsigned int);
+	int (*seq)(const struct __db *, DBT *, DBT *, unsigned int);
+	int (*sync)(const struct __db *, unsigned int);
+	void *internal;			/* Access method private. */
+	int (*fd)(const struct __db *);
+} DB;
+
+#define	BTREEMAGIC	0x053162
+#define	BTREEVERSION	3
+
+/* Structure used to pass parameters to the btree routines. */
+typedef struct {
+#define	R_DUP		0x01	/* duplicate keys */
+	unsigned long	flags;
+	unsigned int	cachesize;	/* bytes to cache */
+	int		maxkeypage;	/* maximum keys per page */
+	int		minkeypage;	/* minimum keys per page */
+	unsigned int	psize;		/* page size */
+	int		(*compare)	/* comparison function */
+			(const DBT *, const DBT *);
+	size_t		(*prefix)	/* prefix function */
+	    		(const DBT *, const DBT *);
+	int		lorder;		/* byte order */
+} BTREEINFO;
+
+#define	HASHMAGIC	0x061561
+#define	HASHVERSION	2
+
+/* Structure used to pass parameters to the hashing routines. */
+typedef struct {
+	unsigned int	bsize;		/* bucket size */
+	unsigned int	ffactor;	/* fill factor */
+	unsigned int	nelem;		/* number of elements */
+	unsigned int	cachesize;	/* bytes to cache */
+	u_int32_t		/* hash function */
+		(*hash)(const void *, size_t);
+	int	lorder;		/* byte order */
+} HASHINFO;
+
+/* Structure used to pass parameters to the record routines. */
+typedef struct {
+#define	R_FIXEDLEN	0x01	/* fixed-length records */
+#define	R_NOKEY		0x02	/* key not required */
+#define	R_SNAPSHOT	0x04	/* snapshot the input */
+	unsigned long	flags;
+	unsigned int	cachesize;	/* bytes to cache */
+	unsigned int	psize;		/* page size */
+	int		lorder;		/* byte order */
+	size_t		reclen;		/* record length (fixed-length records) */
+	unsigned char	bval;		/* delimiting byte (variable-length records */
+	char	*bfname;	/* btree file name */ 
+} RECNOINFO;
+
+#ifdef __DBINTERFACE_PRIVATE
+/*
+ * Little endian <==> big endian 32-bit swap macros.
+ *	M_32_SWAP	swap a memory location
+ *	P_32_SWAP	swap a referenced memory location
+ *	P_32_COPY	swap from one location to another
+ */
+#define	M_32_SWAP(a) {							\
+	u_int32_t _tmp = a;						\
+	((char *)&a)[0] = ((char *)&_tmp)[3];				\
+	((char *)&a)[1] = ((char *)&_tmp)[2];				\
+	((char *)&a)[2] = ((char *)&_tmp)[1];				\
+	((char *)&a)[3] = ((char *)&_tmp)[0];				\
+}
+#define	P_32_SWAP(a) {							\
+	u_int32_t _tmp = *(u_int32_t *)a;				\
+	((char *)a)[0] = ((char *)&_tmp)[3];				\
+	((char *)a)[1] = ((char *)&_tmp)[2];				\
+	((char *)a)[2] = ((char *)&_tmp)[1];				\
+	((char *)a)[3] = ((char *)&_tmp)[0];				\
+}
+#define	P_32_COPY(a, b) {						\
+	((char *)&(b))[0] = ((char *)&(a))[3];				\
+	((char *)&(b))[1] = ((char *)&(a))[2];				\
+	((char *)&(b))[2] = ((char *)&(a))[1];				\
+	((char *)&(b))[3] = ((char *)&(a))[0];				\
+}
+
+/*
+ * Little endian <==> big endian 16-bit swap macros.
+ *	M_16_SWAP	swap a memory location
+ *	P_16_SWAP	swap a referenced memory location
+ *	P_16_COPY	swap from one location to another
+ */
+#define	M_16_SWAP(a) {							\
+	u_int16_t _tmp = a;						\
+	((char *)&a)[0] = ((char *)&_tmp)[1];				\
+	((char *)&a)[1] = ((char *)&_tmp)[0];				\
+}
+#define	P_16_SWAP(a) {							\
+	u_int16_t _tmp = *(u_int16_t *)a;				\
+	((char *)a)[0] = ((char *)&_tmp)[1];				\
+	((char *)a)[1] = ((char *)&_tmp)[0];				\
+}
+#define	P_16_COPY(a, b) {						\
+	((char *)&(b))[0] = ((char *)&(a))[1];				\
+	((char *)&(b))[1] = ((char *)&(a))[0];				\
+}
+#endif
+
+__BEGIN_DECLS
+DB *dbopen(const char *, int, int, DBTYPE, const void *);
+
+#ifdef __DBINTERFACE_PRIVATE
+DB	*__bt_open(const char *, int, int, const BTREEINFO *, int);
+DB	*__hash_open(const char *, int, int, const HASHINFO *, int);
+DB	*__rec_open(const char *, int, int, const RECNOINFO *, int);
+void	 __dbpanic(DB *dbp);
+#endif
+__END_DECLS
+#endif /* !_DB_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/err.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2000, 2003, 2004, 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)err.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _ERR_H_
+#define	_ERR_H_
+
+/*
+ * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
+ * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
+ * of them here we may collide with the utility's includes.  It's unreasonable
+ * for utilities to have to include one of them to include err.h, so we get
+ * __darwin_va_list from <machine/_type.h> and use it.
+ */
+#include <sys/cdefs.h>
+#include <_types.h>
+#include <Availability.h>
+
+__BEGIN_DECLS
+void	err(int, const char *, ...) __cold __dead2 __printflike(2, 3);
+void	verr(int, const char *, __darwin_va_list) __cold __dead2 __printflike(2, 0);
+void	errc(int, int, const char *, ...) __cold __dead2 __printflike(3, 4);
+void	verrc(int, int, const char *, __darwin_va_list) __cold __dead2 __printflike(3, 0);
+void	errx(int, const char *, ...) __cold __dead2 __printflike(2, 3);
+void	verrx(int, const char *, __darwin_va_list) __cold __dead2 __printflike(2, 0);
+void	warn(const char *, ...) __cold __printflike(1, 2);
+void	vwarn(const char *, __darwin_va_list) __cold __printflike(1, 0);
+void	warnc(int, const char *, ...) __cold __printflike(2, 3);
+void	vwarnc(int, const char *, __darwin_va_list) __cold __printflike(2, 0);
+void	warnx(const char *, ...) __cold __printflike(1, 2);
+void	vwarnx(const char *, __darwin_va_list) __cold __printflike(1, 0);
+void	err_set_file(void *);
+void	err_set_exit(void (* _Nullable)(int));
+#ifdef __BLOCKS__
+void	err_set_exit_b(void (^ _Nullable)(int)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+
+__END_DECLS
+
+#endif /* !_ERR_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/fts.h
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2000, 2003-2006, 2008, 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)fts.h	8.3 (Berkeley) 8/14/94
+ */
+
+#ifndef	_FTS_H_
+#define	_FTS_H_
+
+#include <sys/_types.h>
+#include <sys/_types/_dev_t.h>
+#include <sys/_types/_ino_t.h>
+#include <sys/_types/_nlink_t.h>
+
+#include <Availability.h>
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
+
+typedef struct {
+	struct _ftsent *fts_cur;	/* current node */
+	struct _ftsent *fts_child;	/* linked list of children */
+	struct _ftsent **fts_array;	/* sort array */
+	dev_t fts_dev;			/* starting device # */
+	char *fts_path;			/* path for this descent */
+	int fts_rfd;			/* fd for root */
+	int fts_pathlen;		/* sizeof(path) */
+	int fts_nitems;			/* elements in the sort array */
+#ifdef __BLOCKS__
+	union {
+#endif /* __BLOCKS__ */
+	    int (*fts_compar)();	/* compare function */
+#ifdef __BLOCKS__
+	    int (^fts_compar_b)();	/* compare block */
+	};
+#endif /* __BLOCKS__ */
+
+#define	FTS_COMFOLLOW	0x001		/* follow command line symlinks */
+#define	FTS_LOGICAL	0x002		/* logical walk */
+#define	FTS_NOCHDIR	0x004		/* don't change directories */
+#define	FTS_NOSTAT	0x008		/* don't get stat info */
+#define	FTS_PHYSICAL	0x010		/* physical walk */
+#define	FTS_SEEDOT	0x020		/* return dot and dot-dot */
+#define	FTS_XDEV	0x040		/* don't cross devices */
+#define	FTS_WHITEOUT	0x080		/* (no longer supported) return whiteout information */
+#define	FTS_COMFOLLOWDIR 0x400		/* (non-std) follow command line symlinks for directories only */
+#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1090) || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 70000)
+#define	FTS_OPTIONMASK	0x4ff		/* valid user option mask */
+#else
+#define	FTS_NOSTAT_TYPE	0x800		/* (non-std) no stat, but use d_type in struct dirent when available */
+#define	FTS_OPTIONMASK	0xcff		/* valid user option mask */
+#endif
+
+#define	FTS_NAMEONLY	0x100		/* (private) child names only */
+#define	FTS_STOP	0x200		/* (private) unrecoverable error */
+#ifdef __BLOCKS__
+#define	FTS_BLOCK_COMPAR 0x80000000	/* fts_compar is a block */
+#endif /* __BLOCKS__ */
+	int fts_options;		/* fts_open options, global flags */
+} FTS;
+
+typedef struct _ftsent {
+	struct _ftsent *fts_cycle;	/* cycle node */
+	struct _ftsent *fts_parent;	/* parent directory */
+	struct _ftsent *fts_link;	/* next file in directory */
+	long fts_number;	        /* local numeric value */
+	void *fts_pointer;	        /* local address value */
+	char *fts_accpath;		/* access path */
+	char *fts_path;			/* root path */
+	int fts_errno;			/* errno for this node */
+	int fts_symfd;			/* fd for symlink or chdir */
+	unsigned short fts_pathlen;	/* strlen(fts_path) */
+	unsigned short fts_namelen;	/* strlen(fts_name) */
+
+	ino_t fts_ino;			/* inode */
+	dev_t fts_dev;			/* device */
+	nlink_t fts_nlink;		/* link count */
+
+#define	FTS_ROOTPARENTLEVEL	-1
+#define	FTS_ROOTLEVEL		 0
+#define	FTS_MAXLEVEL		 0x7fffffff
+	short fts_level;		/* depth (-1 to N) */
+
+#define	FTS_D		 1		/* preorder directory */
+#define	FTS_DC		 2		/* directory that causes cycles */
+#define	FTS_DEFAULT	 3		/* none of the above */
+#define	FTS_DNR		 4		/* unreadable directory */
+#define	FTS_DOT		 5		/* dot or dot-dot */
+#define	FTS_DP		 6		/* postorder directory */
+#define	FTS_ERR		 7		/* error; errno is set */
+#define	FTS_F		 8		/* regular file */
+#define	FTS_INIT	 9		/* initialized only */
+#define	FTS_NS		10		/* stat(2) failed */
+#define	FTS_NSOK	11		/* no stat(2) requested */
+#define	FTS_SL		12		/* symbolic link */
+#define	FTS_SLNONE	13		/* symbolic link without target */
+#define	FTS_W		14		/* whiteout object */
+	unsigned short fts_info;	/* user flags for FTSENT structure */
+
+#define	FTS_DONTCHDIR	 0x01		/* don't chdir .. to the parent */
+#define	FTS_SYMFOLLOW	 0x02		/* followed a symlink to get here */
+#define	FTS_ISW		 0x04		/* this is a whiteout object */
+#define	FTS_CHDIRFD 0x08 /* indicates the fts_symfd field was set for chdir */
+	unsigned short fts_flags;	/* private flags for FTSENT structure */
+
+#define	FTS_AGAIN	 1		/* read node again */
+#define	FTS_FOLLOW	 2		/* follow symbolic link */
+#define	FTS_NOINSTR	 3		/* no instructions */
+#define	FTS_SKIP	 4		/* discard node */
+	unsigned short fts_instr;	/* fts_set() instructions */
+
+	struct stat *fts_statp;		/* stat(2) information */
+	char fts_name[1];		/* file name */
+} FTSENT;
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+__BEGIN_DECLS
+FTSENT	*fts_children(FTS *, int) __DARWIN_INODE64(fts_children);
+int	 fts_close(FTS *) __DARWIN_INODE64(fts_close);
+FTS	*fts_open(char * const *, int,
+	    int (*)(const FTSENT **, const FTSENT **)) __DARWIN_INODE64(fts_open);
+#ifdef __BLOCKS__
+#if __has_attribute(noescape)
+#define __fts_noescape __attribute__((__noescape__))
+#else
+#define __fts_noescape
+#endif
+FTS	*fts_open_b(char * const *, int,
+	    int (^)(const FTSENT **, const FTSENT **) __fts_noescape)
+	    __DARWIN_INODE64(fts_open_b) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+FTSENT	*fts_read(FTS *) __DARWIN_INODE64(fts_read);
+int	 fts_set(FTS *, FTSENT *, int) __DARWIN_INODE64(fts_set);
+__END_DECLS
+
+#pragma clang diagnostic pop
+#endif /* !_FTS_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/iso646.h
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 1998 Alex Nash
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/include/iso646.h,v 1.4 2002/09/18 22:23:59 mike Exp $
+ */
+
+#ifndef _ISO646_H_
+#define	_ISO646_H_
+
+#include <sys/cdefs.h>
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+
+#ifndef __cplusplus
+#define	and	&&
+#define	and_eq	&=
+#define	bitand	&
+#define	bitor	|
+#define	compl	~
+#define	not	!
+#define	not_eq	!=
+#define	or	||
+#define	or_eq	|=
+#define	xor	^
+#define	xor_eq	^=
+#endif /* ! __cplusplus */
+
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#endif /* !_ISO646_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/stddef.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*	$OpenBSD: stddef.h,v 1.2 1997/09/21 10:45:52 niklas Exp $	*/
+/*	$NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $	*/
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stddef.h	5.5 (Berkeley) 4/3/91
+ */
+
+#ifndef __STDDEF_H__
+#define __STDDEF_H__
+
+#include <_types.h>
+
+#include <sys/_types.h>
+#include <sys/_types/_null.h>
+#include <sys/_types/_offsetof.h>
+#include <sys/_types/_ptrdiff_t.h>
+
+#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
+#include <sys/_types/_rsize_t.h>
+#endif /* __STDC_WANT_LIB_EXT1__ >= 1 */
+
+/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
+ * _GCC_SIZE_T */
+#include <sys/_types/_size_t.h>
+
+#include <sys/_types/_wchar_t.h>
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <sys/_types/_wint_t.h>
+#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
+    || (defined(__cplusplus) && __cplusplus >= 201103L)
+typedef long double max_align_t;
+#endif
+
+#endif /* __STDDEF_H__ */
\ No newline at end of file
lib/libc/include/any-macos-any/vis.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*	$NetBSD: vis.h,v 1.21 2013/02/20 17:01:15 christos Exp $	*/
+/*	$FreeBSD$	*/
+
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)vis.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _VIS_H_
+#define	_VIS_H_
+
+#include <_types.h>
+#include <sys/_types/_size_t.h>
+
+/*
+ * to select alternate encoding format
+ */
+#define	VIS_OCTAL	0x0001	/* use octal \ddd format */
+#define	VIS_CSTYLE	0x0002	/* use \[nrft0..] where appropiate */
+
+/*
+ * to alter set of characters encoded (default is to encode all
+ * non-graphic except space, tab, and newline).
+ */
+#define	VIS_SP		0x0004	/* also encode space */
+#define	VIS_TAB		0x0008	/* also encode tab */
+#define	VIS_NL		0x0010	/* also encode newline */
+#define	VIS_WHITE	(VIS_SP | VIS_TAB | VIS_NL)
+#define	VIS_SAFE	0x0020	/* only encode "unsafe" characters */
+
+/*
+ * other
+ */
+#define	VIS_NOSLASH	0x0040	/* inhibit printing '\' */
+#define	VIS_HTTP1808	0x0080	/* http-style escape % hex hex */
+#define	VIS_HTTPSTYLE	0x0080	/* http-style escape % hex hex */
+#define	VIS_GLOB	0x0100	/* encode glob(3) magic characters */
+#define	VIS_MIMESTYLE	0x0200	/* mime-style escape = HEX HEX */
+#define	VIS_HTTP1866	0x0400	/* http-style &#num; or &string; */
+#define	VIS_NOESCAPE	0x0800	/* don't decode `\' */
+#define	_VIS_END	0x1000	/* for unvis */
+
+/*
+ * unvis return codes
+ */
+#define	UNVIS_VALID	 1	/* character valid */
+#define	UNVIS_VALIDPUSH	 2	/* character valid, push back passed char */
+#define	UNVIS_NOCHAR	 3	/* valid sequence, no character produced */
+#define	UNVIS_SYNBAD	-1	/* unrecognized escape sequence */
+#define	UNVIS_ERROR	-2	/* decoder in unknown state (unrecoverable) */
+
+/*
+ * unvis flags
+ */
+#define	UNVIS_END	_VIS_END	/* no more characters */
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+char	*vis(char *, int, int, int);
+char	*nvis(char *, size_t, int, int, int);
+
+char	*svis(char *, int, int, int, const char *);
+char	*snvis(char *, size_t, int, int, int, const char *);
+
+int	strvis(char *, const char *, int);
+int	strnvis(char *, size_t, const char *, int);
+
+int	strsvis(char *, const char *, int, const char *);
+int	strsnvis(char *, size_t, const char *, int, const char *);
+
+int	strvisx(char *, const char *, size_t, int);
+int	strnvisx(char *, size_t, const char *, size_t, int);
+int 	strenvisx(char *, size_t, const char *, size_t, int, int *);
+
+int	strsvisx(char *, const char *, size_t, int, const char *);
+int	strsnvisx(char *, size_t, const char *, size_t, int, const char *);
+int	strsenvisx(char *, size_t, const char *, size_t , int, const char *,
+    int *);
+
+int	strunvis(char *, const char *);
+int	strnunvis(char *, size_t, const char *);
+
+int	strunvisx(char *, const char *, int);
+int	strnunvisx(char *, size_t, const char *, int);
+
+int	unvis(char *, int, int *, int);
+__END_DECLS
+
+#endif /* !_VIS_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/device/device_types.h
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	Author: David B. Golub, Carnegie Mellon University
+ *	Date:   3/89
+ */
+
+#ifndef DEVICE_TYPES_H
+#define DEVICE_TYPES_H
+
+/*
+ * Types for device interface.
+ */
+#include <mach/std_types.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/port.h>
+
+
+
+/*
+ * IO buffer - out-of-line array of characters.
+ */
+typedef char *  io_buf_ptr_t;
+
+/*
+ * Some types for IOKit.
+ */
+
+#ifdef IOKIT
+
+/* must match device_types.defs */
+typedef char                    io_name_t[128];
+typedef char                    io_string_t[512];
+typedef char                    io_string_inband_t[4096];
+typedef char                    io_struct_inband_t[4096];
+
+#if   __LP64__
+typedef uint64_t                io_user_scalar_t;
+typedef uint64_t                io_user_reference_t;
+typedef io_user_scalar_t        io_scalar_inband_t[16];
+typedef io_user_reference_t     io_async_ref_t[8];
+typedef io_user_scalar_t        io_scalar_inband64_t[16];
+typedef io_user_reference_t     io_async_ref64_t[8];
+#else
+typedef int                     io_user_scalar_t;
+typedef natural_t               io_user_reference_t;
+typedef io_user_scalar_t        io_scalar_inband_t[16];
+typedef io_user_reference_t     io_async_ref_t[8];
+typedef uint64_t                io_scalar_inband64_t[16];
+typedef uint64_t                io_async_ref64_t[8];
+#endif // __LP64__
+
+
+#ifndef __IOKIT_PORTS_DEFINED__
+#define __IOKIT_PORTS_DEFINED__
+typedef mach_port_t     io_object_t;
+#endif  /* __IOKIT_PORTS_DEFINED__ */
+
+
+#endif  /* IOKIT */
+
+#endif  /* DEVICE_TYPES_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/dispatch/base.h
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2008-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+#ifndef __DISPATCH_BASE__
+#define __DISPATCH_BASE__
+
+#ifndef __DISPATCH_INDIRECT__
+#error "Please #include <dispatch/dispatch.h> instead of this file directly."
+#endif
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+#ifndef __has_include
+#define __has_include(x) 0
+#endif
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+#ifndef __has_extension
+#define __has_extension(x) 0
+#endif
+
+#if __GNUC__
+#define DISPATCH_NORETURN __attribute__((__noreturn__))
+#define DISPATCH_NOTHROW __attribute__((__nothrow__))
+#define DISPATCH_NONNULL1 __attribute__((__nonnull__(1)))
+#define DISPATCH_NONNULL2 __attribute__((__nonnull__(2)))
+#define DISPATCH_NONNULL3 __attribute__((__nonnull__(3)))
+#define DISPATCH_NONNULL4 __attribute__((__nonnull__(4)))
+#define DISPATCH_NONNULL5 __attribute__((__nonnull__(5)))
+#define DISPATCH_NONNULL6 __attribute__((__nonnull__(6)))
+#define DISPATCH_NONNULL7 __attribute__((__nonnull__(7)))
+#if __clang__ && __clang_major__ < 3
+// rdar://problem/6857843
+#define DISPATCH_NONNULL_ALL
+#else
+#define DISPATCH_NONNULL_ALL __attribute__((__nonnull__))
+#endif
+#define DISPATCH_SENTINEL __attribute__((__sentinel__))
+#define DISPATCH_PURE __attribute__((__pure__))
+#define DISPATCH_CONST __attribute__((__const__))
+#define DISPATCH_WARN_RESULT __attribute__((__warn_unused_result__))
+#define DISPATCH_MALLOC __attribute__((__malloc__))
+#define DISPATCH_ALWAYS_INLINE __attribute__((__always_inline__))
+#define DISPATCH_UNAVAILABLE __attribute__((__unavailable__))
+#define DISPATCH_UNAVAILABLE_MSG(msg) __attribute__((__unavailable__(msg)))
+#elif defined(_MSC_VER)
+#define DISPATCH_NORETURN __declspec(noreturn)
+#define DISPATCH_NOTHROW __declspec(nothrow)
+#define DISPATCH_NONNULL1
+#define DISPATCH_NONNULL2
+#define DISPATCH_NONNULL3
+#define DISPATCH_NONNULL4
+#define DISPATCH_NONNULL5
+#define DISPATCH_NONNULL6
+#define DISPATCH_NONNULL7
+#define DISPATCH_NONNULL_ALL
+#define DISPATCH_SENTINEL
+#define DISPATCH_PURE
+#define DISPATCH_CONST
+#if (_MSC_VER >= 1700)
+#define DISPATCH_WARN_RESULT _Check_return_
+#else
+#define DISPATCH_WARN_RESULT
+#endif
+#define DISPATCH_MALLOC
+#define DISPATCH_ALWAYS_INLINE __forceinline
+#define DISPATCH_UNAVAILABLE
+#define DISPATCH_UNAVAILABLE_MSG(msg)
+#else
+/*! @parseOnly */
+#define DISPATCH_NORETURN
+/*! @parseOnly */
+#define DISPATCH_NOTHROW
+/*! @parseOnly */
+#define DISPATCH_NONNULL1
+/*! @parseOnly */
+#define DISPATCH_NONNULL2
+/*! @parseOnly */
+#define DISPATCH_NONNULL3
+/*! @parseOnly */
+#define DISPATCH_NONNULL4
+/*! @parseOnly */
+#define DISPATCH_NONNULL5
+/*! @parseOnly */
+#define DISPATCH_NONNULL6
+/*! @parseOnly */
+#define DISPATCH_NONNULL7
+/*! @parseOnly */
+#define DISPATCH_NONNULL_ALL
+/*! @parseOnly */
+#define DISPATCH_SENTINEL
+/*! @parseOnly */
+#define DISPATCH_PURE
+/*! @parseOnly */
+#define DISPATCH_CONST
+/*! @parseOnly */
+#define DISPATCH_WARN_RESULT
+/*! @parseOnly */
+#define DISPATCH_MALLOC
+/*! @parseOnly */
+#define DISPATCH_ALWAYS_INLINE
+/*! @parseOnly */
+#define DISPATCH_UNAVAILABLE
+/*! @parseOnly */
+#define DISPATCH_UNAVAILABLE_MSG(msg)
+#endif
+
+#define DISPATCH_LINUX_UNAVAILABLE()
+
+#ifdef __FreeBSD__
+#define DISPATCH_FREEBSD_UNAVAILABLE() \
+		DISPATCH_UNAVAILABLE_MSG( \
+		"This interface is unavailable on FreeBSD systems")
+#else
+#define DISPATCH_FREEBSD_UNAVAILABLE()
+#endif
+
+#ifndef DISPATCH_ALIAS_V2
+#if TARGET_OS_MAC
+#define DISPATCH_ALIAS_V2(sym)	 __asm__("_" #sym "$V2")
+#else
+#define DISPATCH_ALIAS_V2(sym)
+#endif
+#endif
+
+#if defined(_WIN32)
+#if defined(__cplusplus)
+#define DISPATCH_EXPORT extern "C" __declspec(dllimport)
+#else
+#define DISPATCH_EXPORT extern __declspec(dllimport)
+#endif
+#elif __GNUC__
+#define DISPATCH_EXPORT extern __attribute__((visibility("default")))
+#else
+#define DISPATCH_EXPORT extern
+#endif
+
+#if __GNUC__
+#define DISPATCH_INLINE static __inline__
+#else
+#define DISPATCH_INLINE static inline
+#endif
+
+#if __GNUC__
+#define DISPATCH_EXPECT(x, v) __builtin_expect((x), (v))
+#define dispatch_compiler_barrier()  __asm__ __volatile__("" ::: "memory")
+#else
+#define DISPATCH_EXPECT(x, v) (x)
+#define dispatch_compiler_barrier()  do { } while (0)
+#endif
+
+#if __has_attribute(not_tail_called)
+#define DISPATCH_NOT_TAIL_CALLED __attribute__((__not_tail_called__))
+#else
+#define DISPATCH_NOT_TAIL_CALLED
+#endif
+
+#if __has_builtin(__builtin_assume)
+#define DISPATCH_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr)
+#else
+#define DISPATCH_COMPILER_CAN_ASSUME(expr) ((void)(expr))
+#endif
+
+#if __has_attribute(noescape)
+#define DISPATCH_NOESCAPE __attribute__((__noescape__))
+#else
+#define DISPATCH_NOESCAPE
+#endif
+
+#if __has_attribute(cold)
+#define DISPATCH_COLD __attribute__((__cold__))
+#else
+#define DISPATCH_COLD
+#endif
+
+#if __has_feature(assume_nonnull)
+#define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
+#define DISPATCH_ASSUME_NONNULL_END   _Pragma("clang assume_nonnull end")
+#else
+#define DISPATCH_ASSUME_NONNULL_BEGIN
+#define DISPATCH_ASSUME_NONNULL_END
+#endif
+
+#if !__has_feature(nullability)
+#ifndef _Nullable
+#define _Nullable
+#endif
+#ifndef _Nonnull
+#define _Nonnull
+#endif
+#ifndef _Null_unspecified
+#define _Null_unspecified
+#endif
+#endif
+
+#ifndef DISPATCH_RETURNS_RETAINED_BLOCK
+#if __has_attribute(ns_returns_retained)
+#define DISPATCH_RETURNS_RETAINED_BLOCK __attribute__((__ns_returns_retained__))
+#else
+#define DISPATCH_RETURNS_RETAINED_BLOCK
+#endif
+#endif
+
+#if __has_attribute(enum_extensibility)
+#define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open)))
+#define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed)))
+#else
+#define __DISPATCH_ENUM_ATTR
+#define __DISPATCH_ENUM_ATTR_CLOSED
+#endif // __has_attribute(enum_extensibility)
+
+#if __has_attribute(flag_enum)
+#define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__))
+#else
+#define __DISPATCH_OPTIONS_ATTR
+#endif // __has_attribute(flag_enum)
+
+
+#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \
+		__has_extension(cxx_fixed_enum) || defined(_WIN32)
+#define DISPATCH_ENUM(name, type, ...) \
+		typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t
+#define DISPATCH_OPTIONS(name, type, ...) \
+		typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t
+#else
+#define DISPATCH_ENUM(name, type, ...) \
+		enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t
+#define DISPATCH_OPTIONS(name, type, ...) \
+		enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t
+#endif // __has_feature(objc_fixed_enum) ...
+
+
+
+#if __has_feature(enumerator_attributes)
+#define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
+#define DISPATCH_ENUM_API_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__)
+#define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) \
+		API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__)
+#else
+#define DISPATCH_ENUM_API_AVAILABLE(...)
+#define DISPATCH_ENUM_API_DEPRECATED(...)
+#define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...)
+#endif
+
+#ifdef __swift__
+#define DISPATCH_SWIFT3_OVERLAY 1
+#else // __swift__
+#define DISPATCH_SWIFT3_OVERLAY 0
+#endif // __swift__
+
+#if __has_feature(attribute_availability_swift)
+#define DISPATCH_SWIFT_UNAVAILABLE(_msg) \
+		__attribute__((__availability__(swift, unavailable, message=_msg)))
+#else
+#define DISPATCH_SWIFT_UNAVAILABLE(_msg)
+#endif
+
+#if DISPATCH_SWIFT3_OVERLAY
+#define DISPATCH_SWIFT3_UNAVAILABLE(_msg) DISPATCH_SWIFT_UNAVAILABLE(_msg)
+#else
+#define DISPATCH_SWIFT3_UNAVAILABLE(_msg)
+#endif
+
+#if __has_attribute(swift_private)
+#define DISPATCH_REFINED_FOR_SWIFT __attribute__((__swift_private__))
+#else
+#define DISPATCH_REFINED_FOR_SWIFT
+#endif
+
+#if __has_attribute(swift_name)
+#define DISPATCH_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name)))
+#else
+#define DISPATCH_SWIFT_NAME(_name)
+#endif
+
+#ifndef __cplusplus
+#define DISPATCH_TRANSPARENT_UNION __attribute__((__transparent_union__))
+#else
+#define DISPATCH_TRANSPARENT_UNION
+#endif
+
+typedef void (*dispatch_function_t)(void *_Nullable);
+
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/dispatch/queue.h
@@ -480,7 +480,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NOTHROW
 void
 dispatch_apply(size_t iterations,
 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue,
-		DISPATCH_NOESCAPE void (^block)(size_t iteration));
+		DISPATCH_NOESCAPE void (^block)(size_t));
 #endif
 
 /*!
@@ -515,7 +515,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL4 DISPATCH_NOTHROW
 void
 dispatch_apply_f(size_t iterations,
 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue,
-		void *_Nullable context, void (*work)(void *_Nullable context, size_t iteration));
+		void *_Nullable context, void (*work)(void *_Nullable, size_t));
 
 /*!
  * @function dispatch_get_current_queue
lib/libc/include/any-macos.11-any/libkern/OSDebug.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
+ *
+ * HISTORY
+ *
+ */
+
+#ifndef _OS_OSDEBBUG_H
+#define _OS_OSDEBBUG_H
+
+#include <sys/cdefs.h>
+#include <mach/mach_types.h>
+
+__BEGIN_DECLS
+
+extern int log_leaks;
+
+/* Use kernel_debug() to log a backtrace */
+extern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data);
+/* Report a message with a 4 entry backtrace - very slow */
+extern void OSReportWithBacktrace(const char *str, ...);
+extern unsigned OSBacktrace(void **bt, unsigned maxAddrs);
+
+/* Simple dump of 20 backtrace entries */
+extern void OSPrintBacktrace(void);
+
+/*! @function OSKernelStackRemaining
+ *   @abstract Returns bytes available below the current stack frame.
+ *   @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context.
+ *   @result Approximate byte count available. */
+
+vm_offset_t OSKernelStackRemaining( void );
+
+__END_DECLS
+
+#define TRACE_MACHLEAKS(a, b, c, d)        \
+do {                                    \
+    if (__builtin_expect(!!log_leaks, 0))                      \
+	trace_backtrace(a,b,c,d);       \
+} while(0)
+
+#endif /* !_OS_OSDEBBUG_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/libkern/OSKextLib.h
@@ -0,0 +1,572 @@
+/*
+ * Copyright (c) 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _LIBKERN_OSKEXTLIB_H
+#define _LIBKERN_OSKEXTLIB_H
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+#include <stdint.h>
+#include <mach/kmod.h>
+#include <mach/vm_types.h>
+#include <uuid/uuid.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <libkern/OSReturn.h>
+
+/*!
+ * @header
+ *
+ * Declares functions, basic return values, and other constants
+ * related to kernel extensions (kexts).
+ */
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark OSReturn Values for Kernel Extensions
+/********************************************************************/
+#endif
+/*!
+ * @group OSReturn Values for Kernel Extensions
+ * Many kext-related functions return these values,
+ * as well as those defined under
+ * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code>
+ * and other variants of <code>kern_return_t</code>.
+ */
+
+
+#define sub_libkern_kext           err_sub(2)
+#define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))
+
+
+/*!
+ * @define   kOSKextReturnInternalError
+ * @abstract An internal error in the kext library.
+ *           Contrast with <code>@link //apple_ref/c/econst/OSReturnError
+ *           OSReturnError@/link</code>.
+ */
+#define kOSKextReturnInternalError                   libkern_kext_err(0x1)
+
+/*!
+ * @define   kOSKextReturnNoMemory
+ * @abstract Memory allocation failed.
+ */
+#define kOSKextReturnNoMemory                        libkern_kext_err(0x2)
+
+/*!
+ * @define   kOSKextReturnNoResources
+ * @abstract Some resource other than memory (such as available load tags)
+ *           is exhausted.
+ */
+#define kOSKextReturnNoResources                     libkern_kext_err(0x3)
+
+/*!
+ * @define   kOSKextReturnNotPrivileged
+ * @abstract The caller lacks privileges to perform the requested operation.
+ */
+#define kOSKextReturnNotPrivileged                   libkern_kext_err(0x4)
+
+/*!
+ * @define   kOSKextReturnInvalidArgument
+ * @abstract Invalid argument.
+ */
+#define kOSKextReturnInvalidArgument                 libkern_kext_err(0x5)
+
+/*!
+ * @define   kOSKextReturnNotFound
+ * @abstract Search item not found.
+ */
+#define kOSKextReturnNotFound                        libkern_kext_err(0x6)
+
+/*!
+ * @define   kOSKextReturnBadData
+ * @abstract Malformed data (not used for XML).
+ */
+#define kOSKextReturnBadData                         libkern_kext_err(0x7)
+
+/*!
+ * @define   kOSKextReturnSerialization
+ * @abstract Error converting or (un)serializing URL, string, or XML.
+ */
+#define kOSKextReturnSerialization                   libkern_kext_err(0x8)
+
+/*!
+ * @define   kOSKextReturnUnsupported
+ * @abstract Operation is no longer or not yet supported.
+ */
+#define kOSKextReturnUnsupported                     libkern_kext_err(0x9)
+
+/*!
+ * @define   kOSKextReturnDisabled
+ * @abstract Operation is currently disabled.
+ */
+#define kOSKextReturnDisabled                        libkern_kext_err(0xa)
+
+/*!
+ * @define   kOSKextReturnNotAKext
+ * @abstract Bundle is not a kernel extension.
+ */
+#define kOSKextReturnNotAKext                        libkern_kext_err(0xb)
+
+/*!
+ * @define   kOSKextReturnValidation
+ * @abstract Validation failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnValidation                      libkern_kext_err(0xc)
+
+/*!
+ * @define   kOSKextReturnAuthentication
+ * @abstract Authetication failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnAuthentication                  libkern_kext_err(0xd)
+
+/*!
+ * @define   kOSKextReturnDependencies
+ * @abstract Dependency resolution failures encountered; check diagnostics for details.
+ */
+#define kOSKextReturnDependencies                    libkern_kext_err(0xe)
+
+/*!
+ * @define   kOSKextReturnArchNotFound
+ * @abstract Kext does not contain code for the requested architecture.
+ */
+#define kOSKextReturnArchNotFound                    libkern_kext_err(0xf)
+
+/*!
+ * @define   kOSKextReturnCache
+ * @abstract An error occurred processing a system kext cache.
+ */
+#define kOSKextReturnCache                           libkern_kext_err(0x10)
+
+/*!
+ * @define   kOSKextReturnDeferred
+ * @abstract Operation has been posted asynchronously to user space (kernel only).
+ */
+#define kOSKextReturnDeferred                        libkern_kext_err(0x11)
+
+/*!
+ * @define   kOSKextReturnBootLevel
+ * @abstract Kext not loadable or operation not allowed at current boot level.
+ */
+#define kOSKextReturnBootLevel                       libkern_kext_err(0x12)
+
+/*!
+ * @define   kOSKextReturnNotLoadable
+ * @abstract Kext cannot be loaded; check diagnostics for details.
+ */
+#define kOSKextReturnNotLoadable                     libkern_kext_err(0x13)
+
+/*!
+ * @define   kOSKextReturnLoadedVersionDiffers
+ * @abstract A different version (or executable UUID, or executable by checksum)
+ *           of the requested kext is already loaded.
+ */
+#define kOSKextReturnLoadedVersionDiffers            libkern_kext_err(0x14)
+
+/*!
+ * @define   kOSKextReturnDependencyLoadError
+ * @abstract A load error occurred on a dependency of the kext being loaded.
+ */
+#define kOSKextReturnDependencyLoadError             libkern_kext_err(0x15)
+
+/*!
+ * @define   kOSKextReturnLinkError
+ * @abstract A link failure occured with this kext or a dependency.
+ */
+#define kOSKextReturnLinkError                       libkern_kext_err(0x16)
+
+/*!
+ * @define   kOSKextReturnStartStopError
+ * @abstract The kext start or stop routine returned an error.
+ */
+#define kOSKextReturnStartStopError                  libkern_kext_err(0x17)
+
+/*!
+ * @define   kOSKextReturnInUse
+ * @abstract The kext is currently in use or has outstanding references,
+ *           and cannot be unloaded.
+ */
+#define kOSKextReturnInUse                           libkern_kext_err(0x18)
+
+/*!
+ * @define   kOSKextReturnTimeout
+ * @abstract A kext request has timed out.
+ */
+#define kOSKextReturnTimeout                         libkern_kext_err(0x19)
+
+/*!
+ * @define   kOSKextReturnStopping
+ * @abstract The kext is in the process of stopping; requests cannot be made.
+ */
+#define kOSKextReturnStopping                        libkern_kext_err(0x1a)
+
+/*!
+ * @define   kOSKextReturnSystemPolicy
+ * @abstract The kext was prevented from loading due to system policy.
+ */
+#define kOSKextReturnSystemPolicy                    libkern_kext_err(0x1b)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailure
+ * @abstract Loading of the System KC failed
+ */
+#define kOSKextReturnKCLoadFailure                  libkern_kext_err(0x1c)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailureSystemKC
+ * @abstract Loading of the System KC failed
+ *
+ * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
+ * with: kOSKextReturnKCLoadFailureAuxKC
+ *
+ * If both the System and Aux KCs fail to load, then the error code will be:
+ * libkern_kext_err(0x1f)
+ */
+#define kOSKextReturnKCLoadFailureSystemKC          libkern_kext_err(0x1d)
+
+/*!
+ * @define   kOSKextReturnKCLoadFailureAuxKC
+ * @abstract Loading of the Aux KC failed
+ *
+ * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
+ * with: kOSKextReturnKCLoadFailureSystemKC
+ *
+ * If both the System and Aux KCs fail to load, then the error code will be:
+ * libkern_kext_err(0x1f)
+ */
+#define kOSKextReturnKCLoadFailureAuxKC             libkern_kext_err(0x1e)
+
+/* next available error is: libkern_kext_err(0x20) */
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark Kext/OSBundle Property List Keys
+/********************************************************************/
+#endif
+/*!
+ * @group Kext Property List Keys
+ * These constants cover CFBundle properties defined for kernel extensions.
+ * Because they are used in the kernel, if you want to use one with
+ * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro.
+ */
+
+
+/*!
+ * @define   kOSBundleCompatibleVersionKey
+ * @abstract A string giving the backwards-compatible version of a library kext
+ *           in extended Mac OS 'vers' format (####.##.##s{1-255} where 's'
+ *           is a build stage 'd', 'a', 'b', 'f' or 'fc').
+ */
+#define kOSBundleCompatibleVersionKey           "OSBundleCompatibleVersion"
+
+/*!
+ * @define   kOSBundleEnableKextLoggingKey
+ * @abstract Set to true to have the kernel kext logging spec applied
+ *           to the kext.
+ *           See <code>@link //apple_ref/c/econst/OSKextLogSpec
+ *           OSKextLogSpec@/link</code>.
+ */
+#define kOSBundleEnableKextLoggingKey           "OSBundleEnableKextLogging"
+
+/*!
+ * @define   kOSBundleIsInterfaceKey
+ * @abstract A boolean value indicating whether the kext executable
+ *           contains only symbol references.
+ */
+#define kOSBundleIsInterfaceKey                 "OSBundleIsInterface"
+
+/*!
+ * @define   kOSBundleLibrariesKey
+ * @abstract A dictionary listing link dependencies for this kext.
+ *           Keys are bundle identifiers, values are version strings.
+ */
+#define kOSBundleLibrariesKey                   "OSBundleLibraries"
+
+/*!
+ * @define   kOSBundleRequiredKey
+ * @abstract A string indicating in which kinds of startup this kext
+ *           may need to load during early startup (before
+ *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>).
+ * @discussion
+ * The value is one of:
+ * <ul>
+ * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li>
+ * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li>
+ * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li>
+ * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li>
+ * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li>
+ * </ul>
+ *
+ * Use this property judiciously.
+ * Every kext that declares a value other than "OSBundleRequiredSafeBoot"
+ * increases startup time, as the booter must read it into memory,
+ * or startup kext caches must include it.
+ */
+#define kOSBundleRequiredKey                    "OSBundleRequired"
+
+/*!
+ * @define   kOSBundleRequireExplicitLoadKey
+ * @abstract A boolean value indicating whether the kext requires an
+ *           explicit kextload in order to start/match.
+ */
+#define kOSBundleRequireExplicitLoadKey         "OSBundleRequireExplicitLoad"
+
+/*!
+ * @define   kOSBundleAllowUserLoadKey
+ * @abstract A boolean value indicating whether
+ *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>
+ *           will honor a non-root process's request to load a kext.
+ * @discussion
+ * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL
+ * KextManagerLoadKextWithURL@/link</code>
+ * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier
+ * KextManagerLoadKextWithIdentifier@/link</code>.
+ */
+#define kOSBundleAllowUserLoadKey               "OSBundleAllowUserLoad"
+
+/*!
+ * @define   kOSBundleAllowUserTerminateKey
+ * @abstract A boolean value indicating whether the kextunload tool
+ *           is allowed to issue IOService terminate to classes defined in this kext.
+ * @discussion A boolean value indicating whether the kextunload tool
+ *           is allowed to issue IOService terminate to classes defined in this kext.
+ */
+#define kOSBundleAllowUserTerminateKey          "OSBundleAllowUserTerminate"
+
+/*!
+ * @define   kOSKernelResourceKey
+ * @abstract A boolean value indicating whether the kext represents a built-in
+ *           component of the kernel.
+ */
+#define kOSKernelResourceKey                    "OSKernelResource"
+
+/*!
+ * @define   kOSKextVariantOverrideKey
+ * @abstract A dictionary with target names as key and a target-specific variant
+ *           name as value.
+ */
+#define kOSKextVariantOverrideKey               "OSKextVariantOverride"
+
+/*!
+ * @define   kIOKitPersonalitiesKey
+ * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers.
+ */
+#define kIOKitPersonalitiesKey                  "IOKitPersonalities"
+
+/*
+ * @define   kIOPersonalityPublisherKey
+ * @abstract Used in personalities sent to the I/O Kit,
+ *           contains the CFBundleIdentifier of the kext
+ *           that the personality originated in.
+ */
+#define kIOPersonalityPublisherKey              "IOPersonalityPublisher"
+
+#if CONFIG_KEC_FIPS
+/*
+ * @define   kAppleTextHashesKey
+ * @abstract A dictionary conataining hashes for corecrypto kext.
+ */
+#define kAppleTextHashesKey                     "AppleTextHashes"
+#endif
+
+/*!
+ * @define   kOSMutableSegmentCopy
+ * @abstract A boolean value indicating whether the kext requires a copy of
+ *           its mutable segments to be kept in memory, and then reset when the kext
+ *           unloads. This should be used with caution as it will increase the
+ *           amount of memory used by the kext.
+ */
+#define kOSMutableSegmentCopy                   "OSMutableSegmentCopy"
+
+
+#if PRAGMA_MARK
+/********************************************************************/
+#pragma mark Kext/OSBundle Property Deprecated Keys
+/********************************************************************/
+#endif
+/*
+ * @define   kOSBundleDebugLevelKey
+ * @abstract
+ * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard).
+ * Value is an integer from 1-6, corresponding to the verbose levels
+ * of kext tools on those releases.
+ * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging
+ * OSKextEnableKextLogging@/link</code>.
+ */
+#define kOSBundleDebugLevelKey                  "OSBundleDebugLevel"
+
+/*!
+ * @define   kOSBundleSharedExecutableIdentifierKey
+ * @abstract Deprecated (used on some releases of Mac OS X
+ *           prior to 10.6 Snow Leopard).
+ *           Value is the bundle identifier of the pseudokext
+ *           that contains an executable shared by this kext.
+ */
+#define kOSBundleSharedExecutableIdentifierKey  "OSBundleSharedExecutableIdentifier"
+
+
+#if PRAGMA_MARK
+/********************************************************************/
+#pragma mark Kext/OSBundle Property List Values
+/********************************************************************/
+#endif
+
+/*!
+ * @group Kext Property List Values
+ * These constants encompass established values
+ * for kernel extension bundle properties.
+ */
+
+/*!
+ * @define   kOSKextKernelIdentifier
+ * @abstract
+ * This is the CFBundleIdentifier user for the kernel itself.
+ */
+#define kOSKextKernelIdentifier                 "__kernel__"
+
+/*!
+ * @define  kOSKextBundlePackageTypeKext
+ * @abstract
+ * The bundle type value for Kernel Extensions.
+ */
+#define kOSKextBundlePackageTypeKext        "KEXT"
+
+/*!
+ * @define  kOSKextBundlePackageTypeDriverKit
+ * @abstract
+ * The bundle type value for Driver Extensions.
+ */
+#define kOSKextBundlePackageTypeDriverKit   "DEXT"
+
+/*!
+ * @define   kOSBundleRequiredRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * whether starting from a local or a network volume.
+ */
+#define kOSBundleRequiredRoot                   "Root"
+
+/*!
+ * @define   kOSBundleRequiredLocalRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * when starting from a local disk.
+ */
+#define kOSBundleRequiredLocalRoot              "Local-Root"
+
+/*!
+ * @define   kOSBundleRequiredNetworkRoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed to mount the root filesystem
+ * when starting over a network connection.
+ */
+#define kOSBundleRequiredNetworkRoot            "Network-Root"
+
+/*!
+ * @define   kOSBundleRequiredSafeBoot
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext can be loaded during a safe startup.
+ * This value does not normally cause the kext to be read by the booter
+ * or included in startup kext caches.
+ */
+#define kOSBundleRequiredSafeBoot               "Safe Boot"
+
+/*!
+ * @define   kOSBundleRequiredConsole
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the kext may be needed for console access
+ * (specifically in a single-user startup when
+ * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>.
+ * does not run)
+ * and should be loaded during early startup.
+ */
+#define kOSBundleRequiredConsole                "Console"
+
+/*!
+ * @define   kOSBundleRequiredDriverKit
+ * @abstract
+ * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
+ * value indicates that the driver extension's (DriverKit driver's)
+ * personalities must be present in the kernel at early boot (specifically
+ * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts)
+ * in order to compete with kexts built into the prelinkedkernel. Note that
+ * kextd is still required to launch the user space driver binary. The IOKit
+ * matching will happen during early boot, and the actual driver launch
+ * will happen after kextd starts.
+ */
+#define kOSBundleRequiredDriverKit              "DriverKit"
+
+#if PRAGMA_MARK
+#pragma mark -
+/********************************************************************/
+#pragma mark Kext Information
+/********************************************************************/
+#endif
+/*!
+ * @group Kext Information
+ * Types, constants, and macros providing a kext with information
+ * about itself.
+ */
+
+/*!
+ * @typedef OSKextLoadTag
+ *
+ * @abstract
+ * A unique identifier assigned to a loaded instanace of a kext.
+ *
+ * @discussion
+ * If a kext is unloaded and later reloaded, the new instance
+ * has a different load tag.
+ *
+ * A kext can get its own load tag in the <code>kmod_info_t</code>
+ * structure passed into its module start routine, as the
+ * <code>id</code> field (cast to this type).
+ */
+typedef uint32_t  OSKextLoadTag;
+
+/*!
+ * @define kOSKextInvalidLoadTag
+ *
+ * @abstract
+ * A load tag value that will never be used for a loaded kext;
+ * indicates kext not found.
+ */
+#define  kOSKextInvalidLoadTag  ((OSKextLoadTag)(-1))
+
+
+__END_DECLS
+
+#endif /* _LIBKERN_OSKEXTLIB_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/machine/thread_state.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MACH_MACHINE_THREAD_STATE_H_
+#define _MACH_MACHINE_THREAD_STATE_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "mach/i386/thread_state.h"
+#elif defined (__arm__) || defined (__arm64__)
+#include "mach/arm/thread_state.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _MACH_MACHINE_THREAD_STATE_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/clock.h
@@ -0,0 +1,245 @@
+#ifndef	_clock_user_
+#define	_clock_user_
+
+/* Module clock */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	clock_MSG_COUNT
+#define	clock_MSG_COUNT	3
+#endif	/* clock_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine clock_get_time */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t clock_get_time
+(
+	clock_serv_t clock_serv,
+	mach_timespec_t *cur_time
+);
+
+/* Routine clock_get_attributes */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t clock_get_attributes
+(
+	clock_serv_t clock_serv,
+	clock_flavor_t flavor,
+	clock_attr_t clock_attr,
+	mach_msg_type_number_t *clock_attrCnt
+);
+
+/* Routine clock_alarm */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t clock_alarm
+(
+	clock_serv_t clock_serv,
+	alarm_type_t alarm_type,
+	mach_timespec_t alarm_time,
+	clock_reply_t alarm_port
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__clock_subsystem__defined
+#define __Request__clock_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__clock_get_time_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		clock_flavor_t flavor;
+		mach_msg_type_number_t clock_attrCnt;
+	} __Request__clock_get_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t alarm_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		alarm_type_t alarm_type;
+		mach_timespec_t alarm_time;
+	} __Request__clock_alarm_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__clock_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__clock_subsystem__defined
+#define __RequestUnion__clock_subsystem__defined
+union __RequestUnion__clock_subsystem {
+	__Request__clock_get_time_t Request_clock_get_time;
+	__Request__clock_get_attributes_t Request_clock_get_attributes;
+	__Request__clock_alarm_t Request_clock_alarm;
+};
+#endif /* !__RequestUnion__clock_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__clock_subsystem__defined
+#define __Reply__clock_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_timespec_t cur_time;
+	} __Reply__clock_get_time_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t clock_attrCnt;
+		int clock_attr[1];
+	} __Reply__clock_get_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__clock_alarm_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__clock_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__clock_subsystem__defined
+#define __ReplyUnion__clock_subsystem__defined
+union __ReplyUnion__clock_subsystem {
+	__Reply__clock_get_time_t Reply_clock_get_time;
+	__Reply__clock_get_attributes_t Reply_clock_get_attributes;
+	__Reply__clock_alarm_t Reply_clock_alarm;
+};
+#endif /* !__RequestUnion__clock_subsystem__defined */
+
+#ifndef subsystem_to_name_map_clock
+#define subsystem_to_name_map_clock \
+    { "clock_get_time", 1000 },\
+    { "clock_get_attributes", 1001 },\
+    { "clock_alarm", 1002 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _clock_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/clock_priv.h
@@ -0,0 +1,199 @@
+#ifndef	_clock_priv_user_
+#define	_clock_priv_user_
+
+/* Module clock_priv */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	clock_priv_MSG_COUNT
+#define	clock_priv_MSG_COUNT	2
+#endif	/* clock_priv_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine clock_set_time */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t clock_set_time
+(
+	clock_ctrl_t clock_ctrl,
+	mach_timespec_t new_time
+);
+
+/* Routine clock_set_attributes */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t clock_set_attributes
+(
+	clock_ctrl_t clock_ctrl,
+	clock_flavor_t flavor,
+	clock_attr_t clock_attr,
+	mach_msg_type_number_t clock_attrCnt
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__clock_priv_subsystem__defined
+#define __Request__clock_priv_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_timespec_t new_time;
+	} __Request__clock_set_time_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		clock_flavor_t flavor;
+		mach_msg_type_number_t clock_attrCnt;
+		int clock_attr[1];
+	} __Request__clock_set_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__clock_priv_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__clock_priv_subsystem__defined
+#define __RequestUnion__clock_priv_subsystem__defined
+union __RequestUnion__clock_priv_subsystem {
+	__Request__clock_set_time_t Request_clock_set_time;
+	__Request__clock_set_attributes_t Request_clock_set_attributes;
+};
+#endif /* !__RequestUnion__clock_priv_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__clock_priv_subsystem__defined
+#define __Reply__clock_priv_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__clock_set_time_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__clock_set_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__clock_priv_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__clock_priv_subsystem__defined
+#define __ReplyUnion__clock_priv_subsystem__defined
+union __ReplyUnion__clock_priv_subsystem {
+	__Reply__clock_set_time_t Reply_clock_set_time;
+	__Reply__clock_set_attributes_t Reply_clock_set_attributes;
+};
+#endif /* !__RequestUnion__clock_priv_subsystem__defined */
+
+#ifndef subsystem_to_name_map_clock_priv
+#define subsystem_to_name_map_clock_priv \
+    { "clock_set_time", 1200 },\
+    { "clock_set_attributes", 1201 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _clock_priv_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/exception_types.h
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+
+#ifndef _MACH_EXCEPTION_TYPES_H_
+#define _MACH_EXCEPTION_TYPES_H_
+
+#include <mach/machine/exception.h>
+
+/*
+ *	Machine-independent exception definitions.
+ */
+
+#define EXC_BAD_ACCESS          1       /* Could not access memory */
+/* Code contains kern_return_t describing error. */
+/* Subcode contains bad memory address. */
+
+#define EXC_BAD_INSTRUCTION     2       /* Instruction failed */
+/* Illegal or undefined instruction or operand */
+
+#define EXC_ARITHMETIC          3       /* Arithmetic exception */
+/* Exact nature of exception is in code field */
+
+#define EXC_EMULATION           4       /* Emulation instruction */
+/* Emulation support instruction encountered */
+/* Details in code and subcode fields	*/
+
+#define EXC_SOFTWARE            5       /* Software generated exception */
+/* Exact exception is in code field. */
+/* Codes 0 - 0xFFFF reserved to hardware */
+/* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */
+
+#define EXC_BREAKPOINT          6       /* Trace, breakpoint, etc. */
+/* Details in code field. */
+
+#define EXC_SYSCALL             7       /* System calls. */
+
+#define EXC_MACH_SYSCALL        8       /* Mach system calls. */
+
+#define EXC_RPC_ALERT           9       /* RPC alert */
+
+#define EXC_CRASH               10      /* Abnormal process exit */
+
+#define EXC_RESOURCE            11      /* Hit resource consumption limit */
+/* Exact resource is in code field. */
+
+#define EXC_GUARD               12      /* Violated guarded resource protections */
+
+#define EXC_CORPSE_NOTIFY       13      /* Abnormal process exited to corpse state */
+
+#define EXC_CORPSE_VARIANT_BIT  0x100  /* bit set for EXC_*_CORPSE variants of EXC_* */
+
+
+/*
+ *	Machine-independent exception behaviors
+ */
+
+# define EXCEPTION_DEFAULT              1
+/*	Send a catch_exception_raise message including the identity.
+ */
+
+# define EXCEPTION_STATE                2
+/*	Send a catch_exception_raise_state message including the
+ *	thread state.
+ */
+
+# define EXCEPTION_STATE_IDENTITY       3
+/*	Send a catch_exception_raise_state_identity message including
+ *	the thread identity and state.
+ */
+
+#define MACH_EXCEPTION_ERRORS           0x40000000
+/*	include additional exception specific errors, not used yet.  */
+
+#define MACH_EXCEPTION_CODES            0x80000000
+/*	Send 64-bit code and subcode in the exception header */
+
+#define MACH_EXCEPTION_MASK             (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS)
+/*
+ * Masks for exception definitions, above
+ * bit zero is unused, therefore 1 word = 31 exception types
+ */
+
+#define EXC_MASK_BAD_ACCESS             (1 << EXC_BAD_ACCESS)
+#define EXC_MASK_BAD_INSTRUCTION        (1 << EXC_BAD_INSTRUCTION)
+#define EXC_MASK_ARITHMETIC             (1 << EXC_ARITHMETIC)
+#define EXC_MASK_EMULATION              (1 << EXC_EMULATION)
+#define EXC_MASK_SOFTWARE               (1 << EXC_SOFTWARE)
+#define EXC_MASK_BREAKPOINT             (1 << EXC_BREAKPOINT)
+#define EXC_MASK_SYSCALL                (1 << EXC_SYSCALL)
+#define EXC_MASK_MACH_SYSCALL           (1 << EXC_MACH_SYSCALL)
+#define EXC_MASK_RPC_ALERT              (1 << EXC_RPC_ALERT)
+#define EXC_MASK_CRASH                  (1 << EXC_CRASH)
+#define EXC_MASK_RESOURCE               (1 << EXC_RESOURCE)
+#define EXC_MASK_GUARD                  (1 << EXC_GUARD)
+#define EXC_MASK_CORPSE_NOTIFY          (1 << EXC_CORPSE_NOTIFY)
+
+#define EXC_MASK_ALL    (EXC_MASK_BAD_ACCESS |                  \
+	                 EXC_MASK_BAD_INSTRUCTION |             \
+	                 EXC_MASK_ARITHMETIC |                  \
+	                 EXC_MASK_EMULATION |                   \
+	                 EXC_MASK_SOFTWARE |                    \
+	                 EXC_MASK_BREAKPOINT |                  \
+	                 EXC_MASK_SYSCALL |                     \
+	                 EXC_MASK_MACH_SYSCALL |                \
+	                 EXC_MASK_RPC_ALERT |                   \
+	                 EXC_MASK_RESOURCE |                    \
+	                 EXC_MASK_GUARD |                       \
+	                 EXC_MASK_MACHINE)
+
+
+#define FIRST_EXCEPTION         1       /* ZERO is illegal */
+
+/*
+ * Machine independent codes for EXC_SOFTWARE
+ * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix)
+ * 0x10000 - 0x10002 in use for unix signals
+ * 0x20000 - 0x2FFFF reserved for MACF
+ */
+#define EXC_SOFT_SIGNAL         0x10003 /* Unix signal exceptions */
+
+#define EXC_MACF_MIN            0x20000 /* MACF exceptions */
+#define EXC_MACF_MAX            0x2FFFF
+
+#ifndef ASSEMBLER
+
+#include <mach/port.h>
+#include <mach/thread_status.h>
+#include <mach/machine/vm_types.h>
+#include <mach_debug/ipc_info.h>
+/*
+ * Exported types
+ */
+
+typedef int                             exception_type_t;
+typedef integer_t                       exception_data_type_t;
+typedef int64_t                         mach_exception_data_type_t;
+typedef int                             exception_behavior_t;
+typedef exception_data_type_t           *exception_data_t;
+typedef mach_exception_data_type_t      *mach_exception_data_t;
+typedef unsigned int                    exception_mask_t;
+typedef exception_mask_t                *exception_mask_array_t;
+typedef exception_behavior_t            *exception_behavior_array_t;
+typedef thread_state_flavor_t           *exception_flavor_array_t;
+typedef mach_port_t                     *exception_port_array_t;
+typedef ipc_info_port_t                 *exception_port_info_array_t;
+typedef mach_exception_data_type_t      mach_exception_code_t;
+typedef mach_exception_data_type_t      mach_exception_subcode_t;
+
+#endif  /* ASSEMBLER */
+
+#endif  /* _MACH_EXCEPTION_TYPES_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/host_priv.h
@@ -0,0 +1,1163 @@
+#ifndef	_host_priv_user_
+#define	_host_priv_user_
+
+/* Module host_priv */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	host_priv_MSG_COUNT
+#define	host_priv_MSG_COUNT	26
+#endif	/* host_priv_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach/mach_types.h>
+#include <mach_debug/mach_debug_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine host_get_boot_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_boot_info
+(
+	host_priv_t host_priv,
+	kernel_boot_info_t boot_info
+);
+
+/* Routine host_reboot */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_reboot
+(
+	host_priv_t host_priv,
+	int options
+);
+
+/* Routine host_priv_statistics */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_priv_statistics
+(
+	host_priv_t host_priv,
+	host_flavor_t flavor,
+	host_info_t host_info_out,
+	mach_msg_type_number_t *host_info_outCnt
+);
+
+/* Routine host_default_memory_manager */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_default_memory_manager
+(
+	host_priv_t host_priv,
+	memory_object_default_t *default_manager,
+	memory_object_cluster_size_t cluster_size
+);
+
+/* Routine vm_wire */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_wire
+(
+	host_priv_t host_priv,
+	vm_map_t task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_prot_t desired_access
+);
+
+/* Routine thread_wire */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_wire
+(
+	host_priv_t host_priv,
+	thread_act_t thread,
+	boolean_t wired
+);
+
+/* Routine vm_allocate_cpm */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_allocate_cpm
+(
+	host_priv_t host_priv,
+	vm_map_t task,
+	vm_address_t *address,
+	vm_size_t size,
+	int flags
+);
+
+/* Routine host_processors */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_processors
+(
+	host_priv_t host_priv,
+	processor_array_t *out_processor_list,
+	mach_msg_type_number_t *out_processor_listCnt
+);
+
+/* Routine host_get_clock_control */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_clock_control
+(
+	host_priv_t host_priv,
+	clock_id_t clock_id,
+	clock_ctrl_t *clock_ctrl
+);
+
+/* Routine kmod_create */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t kmod_create
+(
+	host_priv_t host_priv,
+	vm_address_t info,
+	kmod_t *module
+);
+
+/* Routine kmod_destroy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t kmod_destroy
+(
+	host_priv_t host_priv,
+	kmod_t module
+);
+
+/* Routine kmod_control */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t kmod_control
+(
+	host_priv_t host_priv,
+	kmod_t module,
+	kmod_control_flavor_t flavor,
+	kmod_args_t *data,
+	mach_msg_type_number_t *dataCnt
+);
+
+/* Routine host_get_special_port */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_special_port
+(
+	host_priv_t host_priv,
+	int node,
+	int which,
+	mach_port_t *port
+);
+
+/* Routine host_set_special_port */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_set_special_port
+(
+	host_priv_t host_priv,
+	int which,
+	mach_port_t port
+);
+
+/* Routine host_set_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_set_exception_ports
+(
+	host_priv_t host_priv,
+	exception_mask_t exception_mask,
+	mach_port_t new_port,
+	exception_behavior_t behavior,
+	thread_state_flavor_t new_flavor
+);
+
+/* Routine host_get_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_exception_ports
+(
+	host_priv_t host_priv,
+	exception_mask_t exception_mask,
+	exception_mask_array_t masks,
+	mach_msg_type_number_t *masksCnt,
+	exception_handler_array_t old_handlers,
+	exception_behavior_array_t old_behaviors,
+	exception_flavor_array_t old_flavors
+);
+
+/* Routine host_swap_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_swap_exception_ports
+(
+	host_priv_t host_priv,
+	exception_mask_t exception_mask,
+	mach_port_t new_port,
+	exception_behavior_t behavior,
+	thread_state_flavor_t new_flavor,
+	exception_mask_array_t masks,
+	mach_msg_type_number_t *masksCnt,
+	exception_handler_array_t old_handlerss,
+	exception_behavior_array_t old_behaviors,
+	exception_flavor_array_t old_flavors
+);
+
+/* Routine mach_vm_wire */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_vm_wire
+(
+	host_priv_t host_priv,
+	vm_map_t task,
+	mach_vm_address_t address,
+	mach_vm_size_t size,
+	vm_prot_t desired_access
+);
+
+/* Routine host_processor_sets */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_processor_sets
+(
+	host_priv_t host_priv,
+	processor_set_name_array_t *processor_sets,
+	mach_msg_type_number_t *processor_setsCnt
+);
+
+/* Routine host_processor_set_priv */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_processor_set_priv
+(
+	host_priv_t host_priv,
+	processor_set_name_t set_name,
+	processor_set_t *set
+);
+
+/* Routine host_set_UNDServer */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_set_UNDServer
+(
+	host_priv_t host,
+	UNDServerRef server
+);
+
+/* Routine host_get_UNDServer */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_UNDServer
+(
+	host_priv_t host,
+	UNDServerRef *server
+);
+
+/* Routine kext_request */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t kext_request
+(
+	host_priv_t host_priv,
+	uint32_t user_log_flags,
+	vm_offset_t request_data,
+	mach_msg_type_number_t request_dataCnt,
+	vm_offset_t *response_data,
+	mach_msg_type_number_t *response_dataCnt,
+	vm_offset_t *log_data,
+	mach_msg_type_number_t *log_dataCnt,
+	kern_return_t *op_result
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__host_priv_subsystem__defined
+#define __Request__host_priv_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_get_boot_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int options;
+	} __Request__host_reboot_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		host_flavor_t flavor;
+		mach_msg_type_number_t host_info_outCnt;
+	} __Request__host_priv_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t default_manager;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		memory_object_cluster_size_t cluster_size;
+	} __Request__host_default_memory_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t task;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_prot_t desired_access;
+	} __Request__vm_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t thread;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		boolean_t wired;
+	} __Request__thread_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t task;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		int flags;
+	} __Request__vm_allocate_cpm_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_processors_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		clock_id_t clock_id;
+	} __Request__host_get_clock_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t info;
+	} __Request__kmod_create_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kmod_t module;
+	} __Request__kmod_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		kmod_t module;
+		kmod_control_flavor_t flavor;
+		mach_msg_type_number_t dataCnt;
+	} __Request__kmod_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int node;
+		int which;
+	} __Request__host_get_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		int which;
+	} __Request__host_set_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+		exception_behavior_t behavior;
+		thread_state_flavor_t new_flavor;
+	} __Request__host_set_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+	} __Request__host_get_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+		exception_behavior_t behavior;
+		thread_state_flavor_t new_flavor;
+	} __Request__host_swap_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t task;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_vm_address_t address;
+		mach_vm_size_t size;
+		vm_prot_t desired_access;
+	} __Request__mach_vm_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_processor_sets_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t set_name;
+		/* end of the kernel processed data */
+	} __Request__host_processor_set_priv_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t server;
+		/* end of the kernel processed data */
+	} __Request__host_set_UNDServer_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_get_UNDServer_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t request_data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		uint32_t user_log_flags;
+		mach_msg_type_number_t request_dataCnt;
+	} __Request__kext_request_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__host_priv_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__host_priv_subsystem__defined
+#define __RequestUnion__host_priv_subsystem__defined
+union __RequestUnion__host_priv_subsystem {
+	__Request__host_get_boot_info_t Request_host_get_boot_info;
+	__Request__host_reboot_t Request_host_reboot;
+	__Request__host_priv_statistics_t Request_host_priv_statistics;
+	__Request__host_default_memory_manager_t Request_host_default_memory_manager;
+	__Request__vm_wire_t Request_vm_wire;
+	__Request__thread_wire_t Request_thread_wire;
+	__Request__vm_allocate_cpm_t Request_vm_allocate_cpm;
+	__Request__host_processors_t Request_host_processors;
+	__Request__host_get_clock_control_t Request_host_get_clock_control;
+	__Request__kmod_create_t Request_kmod_create;
+	__Request__kmod_destroy_t Request_kmod_destroy;
+	__Request__kmod_control_t Request_kmod_control;
+	__Request__host_get_special_port_t Request_host_get_special_port;
+	__Request__host_set_special_port_t Request_host_set_special_port;
+	__Request__host_set_exception_ports_t Request_host_set_exception_ports;
+	__Request__host_get_exception_ports_t Request_host_get_exception_ports;
+	__Request__host_swap_exception_ports_t Request_host_swap_exception_ports;
+	__Request__mach_vm_wire_t Request_mach_vm_wire;
+	__Request__host_processor_sets_t Request_host_processor_sets;
+	__Request__host_processor_set_priv_t Request_host_processor_set_priv;
+	__Request__host_set_UNDServer_t Request_host_set_UNDServer;
+	__Request__host_get_UNDServer_t Request_host_get_UNDServer;
+	__Request__kext_request_t Request_kext_request;
+};
+#endif /* !__RequestUnion__host_priv_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__host_priv_subsystem__defined
+#define __Reply__host_priv_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */
+		mach_msg_type_number_t boot_infoCnt;
+		char boot_info[4096];
+	} __Reply__host_get_boot_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_reboot_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t host_info_outCnt;
+		integer_t host_info_out[68];
+	} __Reply__host_priv_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t default_manager;
+		/* end of the kernel processed data */
+	} __Reply__host_default_memory_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+	} __Reply__vm_allocate_cpm_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_ports_descriptor_t out_processor_list;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t out_processor_listCnt;
+	} __Reply__host_processors_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t clock_ctrl;
+		/* end of the kernel processed data */
+	} __Reply__host_get_clock_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		kmod_t module;
+	} __Reply__kmod_create_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__kmod_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t dataCnt;
+	} __Reply__kmod_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t port;
+		/* end of the kernel processed data */
+	} __Reply__host_get_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_set_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_set_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t old_handlers[32];
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t masksCnt;
+		exception_mask_t masks[32];
+		exception_behavior_t old_behaviors[32];
+		thread_state_flavor_t old_flavors[32];
+	} __Reply__host_get_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t old_handlerss[32];
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t masksCnt;
+		exception_mask_t masks[32];
+		exception_behavior_t old_behaviors[32];
+		thread_state_flavor_t old_flavors[32];
+	} __Reply__host_swap_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_vm_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_ports_descriptor_t processor_sets;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t processor_setsCnt;
+	} __Reply__host_processor_sets_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t set;
+		/* end of the kernel processed data */
+	} __Reply__host_processor_set_priv_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_set_UNDServer_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t server;
+		/* end of the kernel processed data */
+	} __Reply__host_get_UNDServer_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t response_data;
+		mach_msg_ool_descriptor_t log_data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t response_dataCnt;
+		mach_msg_type_number_t log_dataCnt;
+		kern_return_t op_result;
+	} __Reply__kext_request_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__host_priv_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__host_priv_subsystem__defined
+#define __ReplyUnion__host_priv_subsystem__defined
+union __ReplyUnion__host_priv_subsystem {
+	__Reply__host_get_boot_info_t Reply_host_get_boot_info;
+	__Reply__host_reboot_t Reply_host_reboot;
+	__Reply__host_priv_statistics_t Reply_host_priv_statistics;
+	__Reply__host_default_memory_manager_t Reply_host_default_memory_manager;
+	__Reply__vm_wire_t Reply_vm_wire;
+	__Reply__thread_wire_t Reply_thread_wire;
+	__Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm;
+	__Reply__host_processors_t Reply_host_processors;
+	__Reply__host_get_clock_control_t Reply_host_get_clock_control;
+	__Reply__kmod_create_t Reply_kmod_create;
+	__Reply__kmod_destroy_t Reply_kmod_destroy;
+	__Reply__kmod_control_t Reply_kmod_control;
+	__Reply__host_get_special_port_t Reply_host_get_special_port;
+	__Reply__host_set_special_port_t Reply_host_set_special_port;
+	__Reply__host_set_exception_ports_t Reply_host_set_exception_ports;
+	__Reply__host_get_exception_ports_t Reply_host_get_exception_ports;
+	__Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports;
+	__Reply__mach_vm_wire_t Reply_mach_vm_wire;
+	__Reply__host_processor_sets_t Reply_host_processor_sets;
+	__Reply__host_processor_set_priv_t Reply_host_processor_set_priv;
+	__Reply__host_set_UNDServer_t Reply_host_set_UNDServer;
+	__Reply__host_get_UNDServer_t Reply_host_get_UNDServer;
+	__Reply__kext_request_t Reply_kext_request;
+};
+#endif /* !__RequestUnion__host_priv_subsystem__defined */
+
+#ifndef subsystem_to_name_map_host_priv
+#define subsystem_to_name_map_host_priv \
+    { "host_get_boot_info", 400 },\
+    { "host_reboot", 401 },\
+    { "host_priv_statistics", 402 },\
+    { "host_default_memory_manager", 403 },\
+    { "vm_wire", 404 },\
+    { "thread_wire", 405 },\
+    { "vm_allocate_cpm", 406 },\
+    { "host_processors", 407 },\
+    { "host_get_clock_control", 408 },\
+    { "kmod_create", 409 },\
+    { "kmod_destroy", 410 },\
+    { "kmod_control", 411 },\
+    { "host_get_special_port", 412 },\
+    { "host_set_special_port", 413 },\
+    { "host_set_exception_ports", 414 },\
+    { "host_get_exception_ports", 415 },\
+    { "host_swap_exception_ports", 416 },\
+    { "mach_vm_wire", 418 },\
+    { "host_processor_sets", 419 },\
+    { "host_processor_set_priv", 420 },\
+    { "host_set_UNDServer", 423 },\
+    { "host_get_UNDServer", 424 },\
+    { "kext_request", 425 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _host_priv_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/host_security.h
@@ -0,0 +1,221 @@
+#ifndef	_host_security_user_
+#define	_host_security_user_
+
+/* Module host_security */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	host_security_MSG_COUNT
+#define	host_security_MSG_COUNT	2
+#endif	/* host_security_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine host_security_create_task_token */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_security_create_task_token
+(
+	host_security_t host_security,
+	task_t parent_task,
+	security_token_t sec_token,
+	audit_token_t audit_token,
+	host_t host,
+	ledger_array_t ledgers,
+	mach_msg_type_number_t ledgersCnt,
+	boolean_t inherit_memory,
+	task_t *child_task
+);
+
+/* Routine host_security_set_task_token */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_security_set_task_token
+(
+	host_security_t host_security,
+	task_t target_task,
+	security_token_t sec_token,
+	audit_token_t audit_token,
+	host_t host
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__host_security_subsystem__defined
+#define __Request__host_security_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t parent_task;
+		mach_msg_port_descriptor_t host;
+		mach_msg_ool_ports_descriptor_t ledgers;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		security_token_t sec_token;
+		audit_token_t audit_token;
+		mach_msg_type_number_t ledgersCnt;
+		boolean_t inherit_memory;
+	} __Request__host_security_create_task_token_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t target_task;
+		mach_msg_port_descriptor_t host;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		security_token_t sec_token;
+		audit_token_t audit_token;
+	} __Request__host_security_set_task_token_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__host_security_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__host_security_subsystem__defined
+#define __RequestUnion__host_security_subsystem__defined
+union __RequestUnion__host_security_subsystem {
+	__Request__host_security_create_task_token_t Request_host_security_create_task_token;
+	__Request__host_security_set_task_token_t Request_host_security_set_task_token;
+};
+#endif /* !__RequestUnion__host_security_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__host_security_subsystem__defined
+#define __Reply__host_security_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t child_task;
+		/* end of the kernel processed data */
+	} __Reply__host_security_create_task_token_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_security_set_task_token_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__host_security_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__host_security_subsystem__defined
+#define __ReplyUnion__host_security_subsystem__defined
+union __ReplyUnion__host_security_subsystem {
+	__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
+	__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
+};
+#endif /* !__RequestUnion__host_security_subsystem__defined */
+
+#ifndef subsystem_to_name_map_host_security
+#define subsystem_to_name_map_host_security \
+    { "host_security_create_task_token", 600 },\
+    { "host_security_set_task_token", 601 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _host_security_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/kern_return.h
@@ -0,0 +1,342 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	File:	h/kern_return.h
+ *	Author:	Avadis Tevanian, Jr.
+ *	Date:	1985
+ *
+ *	Kernel return codes.
+ *
+ */
+
+#ifndef _MACH_KERN_RETURN_H_
+#define _MACH_KERN_RETURN_H_
+
+#include <mach/machine/kern_return.h>
+
+#define KERN_SUCCESS                    0
+
+#define KERN_INVALID_ADDRESS            1
+/* Specified address is not currently valid.
+ */
+
+#define KERN_PROTECTION_FAILURE         2
+/* Specified memory is valid, but does not permit the
+ * required forms of access.
+ */
+
+#define KERN_NO_SPACE                   3
+/* The address range specified is already in use, or
+ * no address range of the size specified could be
+ * found.
+ */
+
+#define KERN_INVALID_ARGUMENT           4
+/* The function requested was not applicable to this
+ * type of argument, or an argument is invalid
+ */
+
+#define KERN_FAILURE                    5
+/* The function could not be performed.  A catch-all.
+ */
+
+#define KERN_RESOURCE_SHORTAGE          6
+/* A system resource could not be allocated to fulfill
+ * this request.  This failure may not be permanent.
+ */
+
+#define KERN_NOT_RECEIVER               7
+/* The task in question does not hold receive rights
+ * for the port argument.
+ */
+
+#define KERN_NO_ACCESS                  8
+/* Bogus access restriction.
+ */
+
+#define KERN_MEMORY_FAILURE             9
+/* During a page fault, the target address refers to a
+ * memory object that has been destroyed.  This
+ * failure is permanent.
+ */
+
+#define KERN_MEMORY_ERROR               10
+/* During a page fault, the memory object indicated
+ * that the data could not be returned.  This failure
+ * may be temporary; future attempts to access this
+ * same data may succeed, as defined by the memory
+ * object.
+ */
+
+#define KERN_ALREADY_IN_SET             11
+/* The receive right is already a member of the portset.
+ */
+
+#define KERN_NOT_IN_SET                 12
+/* The receive right is not a member of a port set.
+ */
+
+#define KERN_NAME_EXISTS                13
+/* The name already denotes a right in the task.
+ */
+
+#define KERN_ABORTED                    14
+/* The operation was aborted.  Ipc code will
+ * catch this and reflect it as a message error.
+ */
+
+#define KERN_INVALID_NAME               15
+/* The name doesn't denote a right in the task.
+ */
+
+#define KERN_INVALID_TASK               16
+/* Target task isn't an active task.
+ */
+
+#define KERN_INVALID_RIGHT              17
+/* The name denotes a right, but not an appropriate right.
+ */
+
+#define KERN_INVALID_VALUE              18
+/* A blatant range error.
+ */
+
+#define KERN_UREFS_OVERFLOW             19
+/* Operation would overflow limit on user-references.
+ */
+
+#define KERN_INVALID_CAPABILITY         20
+/* The supplied (port) capability is improper.
+ */
+
+#define KERN_RIGHT_EXISTS               21
+/* The task already has send or receive rights
+ * for the port under another name.
+ */
+
+#define KERN_INVALID_HOST               22
+/* Target host isn't actually a host.
+ */
+
+#define KERN_MEMORY_PRESENT             23
+/* An attempt was made to supply "precious" data
+ * for memory that is already present in a
+ * memory object.
+ */
+
+#define KERN_MEMORY_DATA_MOVED          24
+/* A page was requested of a memory manager via
+ * memory_object_data_request for an object using
+ * a MEMORY_OBJECT_COPY_CALL strategy, with the
+ * VM_PROT_WANTS_COPY flag being used to specify
+ * that the page desired is for a copy of the
+ * object, and the memory manager has detected
+ * the page was pushed into a copy of the object
+ * while the kernel was walking the shadow chain
+ * from the copy to the object. This error code
+ * is delivered via memory_object_data_error
+ * and is handled by the kernel (it forces the
+ * kernel to restart the fault). It will not be
+ * seen by users.
+ */
+
+#define KERN_MEMORY_RESTART_COPY        25
+/* A strategic copy was attempted of an object
+ * upon which a quicker copy is now possible.
+ * The caller should retry the copy using
+ * vm_object_copy_quickly. This error code
+ * is seen only by the kernel.
+ */
+
+#define KERN_INVALID_PROCESSOR_SET      26
+/* An argument applied to assert processor set privilege
+ * was not a processor set control port.
+ */
+
+#define KERN_POLICY_LIMIT               27
+/* The specified scheduling attributes exceed the thread's
+ * limits.
+ */
+
+#define KERN_INVALID_POLICY             28
+/* The specified scheduling policy is not currently
+ * enabled for the processor set.
+ */
+
+#define KERN_INVALID_OBJECT             29
+/* The external memory manager failed to initialize the
+ * memory object.
+ */
+
+#define KERN_ALREADY_WAITING            30
+/* A thread is attempting to wait for an event for which
+ * there is already a waiting thread.
+ */
+
+#define KERN_DEFAULT_SET                31
+/* An attempt was made to destroy the default processor
+ * set.
+ */
+
+#define KERN_EXCEPTION_PROTECTED        32
+/* An attempt was made to fetch an exception port that is
+ * protected, or to abort a thread while processing a
+ * protected exception.
+ */
+
+#define KERN_INVALID_LEDGER             33
+/* A ledger was required but not supplied.
+ */
+
+#define KERN_INVALID_MEMORY_CONTROL     34
+/* The port was not a memory cache control port.
+ */
+
+#define KERN_INVALID_SECURITY           35
+/* An argument supplied to assert security privilege
+ * was not a host security port.
+ */
+
+#define KERN_NOT_DEPRESSED              36
+/* thread_depress_abort was called on a thread which
+ * was not currently depressed.
+ */
+
+#define KERN_TERMINATED                 37
+/* Object has been terminated and is no longer available
+ */
+
+#define KERN_LOCK_SET_DESTROYED         38
+/* Lock set has been destroyed and is no longer available.
+ */
+
+#define KERN_LOCK_UNSTABLE              39
+/* The thread holding the lock terminated before releasing
+ * the lock
+ */
+
+#define KERN_LOCK_OWNED                 40
+/* The lock is already owned by another thread
+ */
+
+#define KERN_LOCK_OWNED_SELF            41
+/* The lock is already owned by the calling thread
+ */
+
+#define KERN_SEMAPHORE_DESTROYED        42
+/* Semaphore has been destroyed and is no longer available.
+ */
+
+#define KERN_RPC_SERVER_TERMINATED      43
+/* Return from RPC indicating the target server was
+ * terminated before it successfully replied
+ */
+
+#define KERN_RPC_TERMINATE_ORPHAN       44
+/* Terminate an orphaned activation.
+ */
+
+#define KERN_RPC_CONTINUE_ORPHAN        45
+/* Allow an orphaned activation to continue executing.
+ */
+
+#define KERN_NOT_SUPPORTED              46
+/* Empty thread activation (No thread linked to it)
+ */
+
+#define KERN_NODE_DOWN                  47
+/* Remote node down or inaccessible.
+ */
+
+#define KERN_NOT_WAITING                48
+/* A signalled thread was not actually waiting. */
+
+#define KERN_OPERATION_TIMED_OUT        49
+/* Some thread-oriented operation (semaphore_wait) timed out
+ */
+
+#define KERN_CODESIGN_ERROR             50
+/* During a page fault, indicates that the page was rejected
+ * as a result of a signature check.
+ */
+
+#define KERN_POLICY_STATIC              51
+/* The requested property cannot be changed at this time.
+ */
+
+#define KERN_INSUFFICIENT_BUFFER_SIZE   52
+/* The provided buffer is of insufficient size for the requested data.
+ */
+
+#define KERN_DENIED                     53
+/* Denied by security policy
+ */
+
+#define KERN_MISSING_KC                 54
+/* The KC on which the function is operating is missing
+ */
+
+#define KERN_INVALID_KC                 55
+/* The KC on which the function is operating is invalid
+ */
+
+#define KERN_RETURN_MAX                 0x100
+/* Maximum return value allowable
+ */
+
+#endif  /* _MACH_KERN_RETURN_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/lock_set.h
@@ -0,0 +1,350 @@
+#ifndef	_lock_set_user_
+#define	_lock_set_user_
+
+/* Module lock_set */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	lock_set_MSG_COUNT
+#define	lock_set_MSG_COUNT	6
+#endif	/* lock_set_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine lock_acquire */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_acquire
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+/* Routine lock_release */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_release
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+/* Routine lock_try */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_try
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+/* Routine lock_make_stable */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_make_stable
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+/* Routine lock_handoff */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_handoff
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+/* Routine lock_handoff_accept */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t lock_handoff_accept
+(
+	lock_set_t lock_set,
+	int lock_id
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__lock_set_subsystem__defined
+#define __Request__lock_set_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_acquire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_release_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_try_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_make_stable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_handoff_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int lock_id;
+	} __Request__lock_handoff_accept_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__lock_set_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__lock_set_subsystem__defined
+#define __RequestUnion__lock_set_subsystem__defined
+union __RequestUnion__lock_set_subsystem {
+	__Request__lock_acquire_t Request_lock_acquire;
+	__Request__lock_release_t Request_lock_release;
+	__Request__lock_try_t Request_lock_try;
+	__Request__lock_make_stable_t Request_lock_make_stable;
+	__Request__lock_handoff_t Request_lock_handoff;
+	__Request__lock_handoff_accept_t Request_lock_handoff_accept;
+};
+#endif /* !__RequestUnion__lock_set_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__lock_set_subsystem__defined
+#define __Reply__lock_set_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_acquire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_release_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_try_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_make_stable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_handoff_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__lock_handoff_accept_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__lock_set_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__lock_set_subsystem__defined
+#define __ReplyUnion__lock_set_subsystem__defined
+union __ReplyUnion__lock_set_subsystem {
+	__Reply__lock_acquire_t Reply_lock_acquire;
+	__Reply__lock_release_t Reply_lock_release;
+	__Reply__lock_try_t Reply_lock_try;
+	__Reply__lock_make_stable_t Reply_lock_make_stable;
+	__Reply__lock_handoff_t Reply_lock_handoff;
+	__Reply__lock_handoff_accept_t Reply_lock_handoff_accept;
+};
+#endif /* !__RequestUnion__lock_set_subsystem__defined */
+
+#ifndef subsystem_to_name_map_lock_set
+#define subsystem_to_name_map_lock_set \
+    { "lock_acquire", 617000 },\
+    { "lock_release", 617001 },\
+    { "lock_try", 617002 },\
+    { "lock_make_stable", 617003 },\
+    { "lock_handoff", 617004 },\
+    { "lock_handoff_accept", 617005 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _lock_set_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/mach.h
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 1999-2014 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+
+/*
+ *  Includes all the types that a normal user
+ *  of Mach programs should need
+ */
+
+#ifndef _MACH_H_
+#define _MACH_H_
+
+#define __MACH30__
+#define MACH_IPC_FLAVOR UNTYPED
+
+#include <mach/std_types.h>
+#include <mach/mach_types.h>
+#include <mach/mach_interface.h>
+#include <mach/mach_port.h>
+#include <mach/mach_init.h>
+#include <mach/mach_host.h>
+#include <mach/thread_switch.h>
+
+#include <mach/rpc.h>           /* for compatibility only */
+#include <mach/mig.h>
+
+#include <mach/mig_errors.h>
+#include <mach/mach_error.h>
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+/*
+ * Standard prototypes
+ */
+extern void                     panic_init(mach_port_t);
+extern void                     panic(const char *, ...);
+
+extern void                     safe_gets(char *,
+    char *,
+    int);
+
+extern void                     slot_name(cpu_type_t,
+    cpu_subtype_t,
+    char **,
+    char **);
+
+extern void                     mig_reply_setup(mach_msg_header_t *,
+    mach_msg_header_t *);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern void                     mach_msg_destroy(mach_msg_header_t *);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_receive(mach_msg_header_t *);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_send(mach_msg_header_t *);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_server_once(boolean_t (*)
+    (mach_msg_header_t *,
+    mach_msg_header_t *),
+    mach_msg_size_t,
+    mach_port_t,
+    mach_msg_options_t);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_server(boolean_t (*)
+    (mach_msg_header_t *,
+    mach_msg_header_t *),
+    mach_msg_size_t,
+    mach_port_t,
+    mach_msg_options_t);
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_server_importance(boolean_t (*)
+    (mach_msg_header_t *,
+    mach_msg_header_t *),
+    mach_msg_size_t,
+    mach_port_t,
+    mach_msg_options_t);
+
+/*
+ * Prototypes for compatibility
+ */
+extern kern_return_t    clock_get_res(mach_port_t,
+    clock_res_t *);
+extern kern_return_t    clock_set_res(mach_port_t,
+    clock_res_t);
+
+extern kern_return_t    clock_sleep(mach_port_t,
+    int,
+    mach_timespec_t,
+    mach_timespec_t *);
+
+/*!
+ * @group voucher_mach_msg Prototypes
+ */
+
+#define VOUCHER_MACH_MSG_API_VERSION 20140205
+
+/*!
+ * @typedef voucher_mach_msg_state_t
+ *
+ * @abstract
+ * Opaque object encapsulating state changed by voucher_mach_msg_adopt().
+ */
+typedef struct voucher_mach_msg_state_s *voucher_mach_msg_state_t;
+
+/*!
+ * @const VOUCHER_MACH_MSG_STATE_UNCHANGED
+ *
+ * @discussion
+ * Constant indicating no state change occurred.
+ */
+#define VOUCHER_MACH_MSG_STATE_UNCHANGED ((voucher_mach_msg_state_t)~0ul)
+
+/*!
+ * @function voucher_mach_msg_set
+ *
+ * @abstract
+ * Change specified message header to contain current mach voucher with a
+ * COPY_SEND disposition.
+ * Does not change message if it already has non-zero MACH_MSGH_BITS_VOUCHER.
+ *
+ * @discussion
+ * Borrows reference to current thread voucher so message should be sent
+ * immediately (without intervening calls that might change that voucher).
+ *
+ * @param msg
+ * The message to modify.
+ *
+ * @result
+ * True if header was changed.
+ */
+extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg);
+
+/*!
+ * @function voucher_mach_msg_clear
+ *
+ * @abstract
+ * Removes changes made to specified message header by voucher_mach_msg_set()
+ * and any mach_msg() send operations (successful or not).
+ * If the message is not needed further, mach_msg_destroy() should be called
+ * instead.
+ *
+ * @discussion
+ * Not intended to be called if voucher_mach_msg_set() returned false.
+ * Releases reference to message mach voucher if an extra reference was
+ * acquired due to an unsuccessful send operation (pseudo-receive).
+ *
+ * @param msg
+ * The message to modify.
+ */
+extern void voucher_mach_msg_clear(mach_msg_header_t *msg);
+
+/*!
+ * @function voucher_mach_msg_adopt
+ *
+ * @abstract
+ * Adopt the voucher contained in the specified message on the current thread
+ * and return the previous thread voucher state.
+ *
+ * @discussion
+ * Ownership of the mach voucher in the message is transferred to the current
+ * thread and the message header voucher fields are cleared.
+ *
+ * @param msg
+ * The message to query and modify.
+ *
+ * @result
+ * The previous thread voucher state or VOUCHER_MACH_MSG_STATE_UNCHANGED if no
+ * state change occurred.
+ */
+extern voucher_mach_msg_state_t voucher_mach_msg_adopt(mach_msg_header_t *msg);
+
+/*!
+ * @function voucher_mach_msg_revert
+ *
+ * @abstract
+ * Restore thread voucher state previously modified by voucher_mach_msg_adopt().
+ *
+ * @discussion
+ * Current thread voucher reference is released.
+ * No change to thread voucher state if passed VOUCHER_MACH_MSG_STATE_UNCHANGED.
+ *
+ * @param state
+ * The thread voucher state to restore.
+ */
+
+extern void voucher_mach_msg_revert(voucher_mach_msg_state_t state);
+
+__END_DECLS
+
+#endif  /* _MACH_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/mach_host.h
@@ -0,0 +1,1295 @@
+#ifndef	_mach_host_user_
+#define	_mach_host_user_
+
+/* Module mach_host */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	mach_host_MSG_COUNT
+#define	mach_host_MSG_COUNT	35
+#endif	/* mach_host_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach/mach_types.h>
+#include <mach_debug/mach_debug_types.h>
+#include <mach/mach_init.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine host_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_info
+(
+	host_t host,
+	host_flavor_t flavor,
+	host_info_t host_info_out,
+	mach_msg_type_number_t *host_info_outCnt
+);
+
+/* Routine host_kernel_version */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_kernel_version
+(
+	host_t host,
+	kernel_version_t kernel_version
+);
+
+/* Routine _host_page_size */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t _host_page_size
+(
+	host_t host,
+	vm_size_t *out_page_size
+);
+
+/* Routine mach_memory_object_memory_entry */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_memory_object_memory_entry
+(
+	host_t host,
+	boolean_t internal,
+	vm_size_t size,
+	vm_prot_t permission,
+	memory_object_t pager,
+	mach_port_t *entry_handle
+);
+
+/* Routine host_processor_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_processor_info
+(
+	host_t host,
+	processor_flavor_t flavor,
+	natural_t *out_processor_count,
+	processor_info_array_t *out_processor_info,
+	mach_msg_type_number_t *out_processor_infoCnt
+);
+
+/* Routine host_get_io_master */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_io_master
+(
+	host_t host,
+	io_master_t *io_master
+);
+
+/* Routine host_get_clock_service */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_clock_service
+(
+	host_t host,
+	clock_id_t clock_id,
+	clock_serv_t *clock_serv
+);
+
+/* Routine kmod_get_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t kmod_get_info
+(
+	host_t host,
+	kmod_args_t *modules,
+	mach_msg_type_number_t *modulesCnt
+);
+
+/* Routine host_virtual_physical_table_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_virtual_physical_table_info
+(
+	host_t host,
+	hash_info_bucket_array_t *info,
+	mach_msg_type_number_t *infoCnt
+);
+
+/* Routine processor_set_default */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_default
+(
+	host_t host,
+	processor_set_name_t *default_set
+);
+
+/* Routine processor_set_create */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_create
+(
+	host_t host,
+	processor_set_t *new_set,
+	processor_set_name_t *new_name
+);
+
+/* Routine mach_memory_object_memory_entry_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_memory_object_memory_entry_64
+(
+	host_t host,
+	boolean_t internal,
+	memory_object_size_t size,
+	vm_prot_t permission,
+	memory_object_t pager,
+	mach_port_t *entry_handle
+);
+
+/* Routine host_statistics */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_statistics
+(
+	host_t host_priv,
+	host_flavor_t flavor,
+	host_info_t host_info_out,
+	mach_msg_type_number_t *host_info_outCnt
+);
+
+/* Routine host_request_notification */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_request_notification
+(
+	host_t host,
+	host_flavor_t notify_type,
+	mach_port_t notify_port
+);
+
+/* Routine host_lockgroup_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_lockgroup_info
+(
+	host_t host,
+	lockgroup_info_array_t *lockgroup_info,
+	mach_msg_type_number_t *lockgroup_infoCnt
+);
+
+/* Routine host_statistics64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_statistics64
+(
+	host_t host_priv,
+	host_flavor_t flavor,
+	host_info64_t host_info64_out,
+	mach_msg_type_number_t *host_info64_outCnt
+);
+
+/* Routine mach_zone_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_zone_info
+(
+	host_priv_t host,
+	mach_zone_name_array_t *names,
+	mach_msg_type_number_t *namesCnt,
+	mach_zone_info_array_t *info,
+	mach_msg_type_number_t *infoCnt
+);
+
+/* Routine host_create_mach_voucher */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_create_mach_voucher
+(
+	host_t host,
+	mach_voucher_attr_raw_recipe_array_t recipes,
+	mach_msg_type_number_t recipesCnt,
+	ipc_voucher_t *voucher
+);
+
+/* Routine host_register_mach_voucher_attr_manager */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_register_mach_voucher_attr_manager
+(
+	host_t host,
+	mach_voucher_attr_manager_t attr_manager,
+	mach_voucher_attr_value_handle_t default_value,
+	mach_voucher_attr_key_t *new_key,
+	ipc_voucher_attr_control_t *new_attr_control
+);
+
+/* Routine host_register_well_known_mach_voucher_attr_manager */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_register_well_known_mach_voucher_attr_manager
+(
+	host_t host,
+	mach_voucher_attr_manager_t attr_manager,
+	mach_voucher_attr_value_handle_t default_value,
+	mach_voucher_attr_key_t key,
+	ipc_voucher_attr_control_t *new_attr_control
+);
+
+/* Routine host_set_atm_diagnostic_flag */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_set_atm_diagnostic_flag
+(
+	host_t host,
+	uint32_t diagnostic_flag
+);
+
+/* Routine host_get_atm_diagnostic_flag */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t host_get_atm_diagnostic_flag
+(
+	host_t host,
+	uint32_t *diagnostic_flag
+);
+
+/* Routine mach_memory_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_memory_info
+(
+	host_priv_t host,
+	mach_zone_name_array_t *names,
+	mach_msg_type_number_t *namesCnt,
+	mach_zone_info_array_t *info,
+	mach_msg_type_number_t *infoCnt,
+	mach_memory_info_array_t *memory_info,
+	mach_msg_type_number_t *memory_infoCnt
+);
+
+/* Routine host_set_multiuser_config_flags */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_set_multiuser_config_flags
+(
+	host_priv_t host_priv,
+	uint32_t multiuser_flags
+);
+
+/* Routine host_get_multiuser_config_flags */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_get_multiuser_config_flags
+(
+	host_t host,
+	uint32_t *multiuser_flags
+);
+
+/* Routine host_check_multiuser_mode */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t host_check_multiuser_mode
+(
+	host_t host,
+	uint32_t *multiuser_mode
+);
+
+/* Routine mach_zone_info_for_zone */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_zone_info_for_zone
+(
+	host_priv_t host,
+	mach_zone_name_t name,
+	mach_zone_info_t *info
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__mach_host_subsystem__defined
+#define __Request__mach_host_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		host_flavor_t flavor;
+		mach_msg_type_number_t host_info_outCnt;
+	} __Request__host_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_kernel_version_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request___host_page_size_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t pager;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		boolean_t internal;
+		vm_size_t size;
+		vm_prot_t permission;
+	} __Request__mach_memory_object_memory_entry_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		processor_flavor_t flavor;
+	} __Request__host_processor_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_get_io_master_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		clock_id_t clock_id;
+	} __Request__host_get_clock_service_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__kmod_get_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_virtual_physical_table_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_default_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_create_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t pager;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		boolean_t internal;
+		memory_object_size_t size;
+		vm_prot_t permission;
+	} __Request__mach_memory_object_memory_entry_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		host_flavor_t flavor;
+		mach_msg_type_number_t host_info_outCnt;
+	} __Request__host_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t notify_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		host_flavor_t notify_type;
+	} __Request__host_request_notification_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_lockgroup_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		host_flavor_t flavor;
+		mach_msg_type_number_t host_info64_outCnt;
+	} __Request__host_statistics64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__mach_zone_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_msg_type_number_t recipesCnt;
+		uint8_t recipes[5120];
+	} __Request__host_create_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t attr_manager;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_voucher_attr_value_handle_t default_value;
+	} __Request__host_register_mach_voucher_attr_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t attr_manager;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_voucher_attr_value_handle_t default_value;
+		mach_voucher_attr_key_t key;
+	} __Request__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		uint32_t diagnostic_flag;
+	} __Request__host_set_atm_diagnostic_flag_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_get_atm_diagnostic_flag_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__mach_memory_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		uint32_t multiuser_flags;
+	} __Request__host_set_multiuser_config_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_get_multiuser_config_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__host_check_multiuser_mode_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_zone_name_t name;
+	} __Request__mach_zone_info_for_zone_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__mach_host_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__mach_host_subsystem__defined
+#define __RequestUnion__mach_host_subsystem__defined
+union __RequestUnion__mach_host_subsystem {
+	__Request__host_info_t Request_host_info;
+	__Request__host_kernel_version_t Request_host_kernel_version;
+	__Request___host_page_size_t Request__host_page_size;
+	__Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry;
+	__Request__host_processor_info_t Request_host_processor_info;
+	__Request__host_get_io_master_t Request_host_get_io_master;
+	__Request__host_get_clock_service_t Request_host_get_clock_service;
+	__Request__kmod_get_info_t Request_kmod_get_info;
+	__Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info;
+	__Request__processor_set_default_t Request_processor_set_default;
+	__Request__processor_set_create_t Request_processor_set_create;
+	__Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64;
+	__Request__host_statistics_t Request_host_statistics;
+	__Request__host_request_notification_t Request_host_request_notification;
+	__Request__host_lockgroup_info_t Request_host_lockgroup_info;
+	__Request__host_statistics64_t Request_host_statistics64;
+	__Request__mach_zone_info_t Request_mach_zone_info;
+	__Request__host_create_mach_voucher_t Request_host_create_mach_voucher;
+	__Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager;
+	__Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager;
+	__Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag;
+	__Request__host_get_atm_diagnostic_flag_t Request_host_get_atm_diagnostic_flag;
+	__Request__mach_memory_info_t Request_mach_memory_info;
+	__Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags;
+	__Request__host_get_multiuser_config_flags_t Request_host_get_multiuser_config_flags;
+	__Request__host_check_multiuser_mode_t Request_host_check_multiuser_mode;
+	__Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone;
+};
+#endif /* !__RequestUnion__mach_host_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__mach_host_subsystem__defined
+#define __Reply__mach_host_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t host_info_outCnt;
+		integer_t host_info_out[68];
+	} __Reply__host_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */
+		mach_msg_type_number_t kernel_versionCnt;
+		char kernel_version[512];
+	} __Reply__host_kernel_version_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_size_t out_page_size;
+	} __Reply___host_page_size_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t entry_handle;
+		/* end of the kernel processed data */
+	} __Reply__mach_memory_object_memory_entry_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t out_processor_info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		natural_t out_processor_count;
+		mach_msg_type_number_t out_processor_infoCnt;
+	} __Reply__host_processor_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t io_master;
+		/* end of the kernel processed data */
+	} __Reply__host_get_io_master_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t clock_serv;
+		/* end of the kernel processed data */
+	} __Reply__host_get_clock_service_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t modules;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t modulesCnt;
+	} __Reply__kmod_get_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t infoCnt;
+	} __Reply__host_virtual_physical_table_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t default_set;
+		/* end of the kernel processed data */
+	} __Reply__processor_set_default_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_set;
+		mach_msg_port_descriptor_t new_name;
+		/* end of the kernel processed data */
+	} __Reply__processor_set_create_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t entry_handle;
+		/* end of the kernel processed data */
+	} __Reply__mach_memory_object_memory_entry_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t host_info_outCnt;
+		integer_t host_info_out[68];
+	} __Reply__host_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_request_notification_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t lockgroup_info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t lockgroup_infoCnt;
+	} __Reply__host_lockgroup_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t host_info64_outCnt;
+		integer_t host_info64_out[256];
+	} __Reply__host_statistics64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t names;
+		mach_msg_ool_descriptor_t info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t namesCnt;
+		mach_msg_type_number_t infoCnt;
+	} __Reply__mach_zone_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t voucher;
+		/* end of the kernel processed data */
+	} __Reply__host_create_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_attr_control;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_voucher_attr_key_t new_key;
+	} __Reply__host_register_mach_voucher_attr_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_attr_control;
+		/* end of the kernel processed data */
+	} __Reply__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_set_atm_diagnostic_flag_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		uint32_t diagnostic_flag;
+	} __Reply__host_get_atm_diagnostic_flag_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t names;
+		mach_msg_ool_descriptor_t info;
+		mach_msg_ool_descriptor_t memory_info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t namesCnt;
+		mach_msg_type_number_t infoCnt;
+		mach_msg_type_number_t memory_infoCnt;
+	} __Reply__mach_memory_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__host_set_multiuser_config_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		uint32_t multiuser_flags;
+	} __Reply__host_get_multiuser_config_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		uint32_t multiuser_mode;
+	} __Reply__host_check_multiuser_mode_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_zone_info_t info;
+	} __Reply__mach_zone_info_for_zone_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__mach_host_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__mach_host_subsystem__defined
+#define __ReplyUnion__mach_host_subsystem__defined
+union __ReplyUnion__mach_host_subsystem {
+	__Reply__host_info_t Reply_host_info;
+	__Reply__host_kernel_version_t Reply_host_kernel_version;
+	__Reply___host_page_size_t Reply__host_page_size;
+	__Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry;
+	__Reply__host_processor_info_t Reply_host_processor_info;
+	__Reply__host_get_io_master_t Reply_host_get_io_master;
+	__Reply__host_get_clock_service_t Reply_host_get_clock_service;
+	__Reply__kmod_get_info_t Reply_kmod_get_info;
+	__Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info;
+	__Reply__processor_set_default_t Reply_processor_set_default;
+	__Reply__processor_set_create_t Reply_processor_set_create;
+	__Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64;
+	__Reply__host_statistics_t Reply_host_statistics;
+	__Reply__host_request_notification_t Reply_host_request_notification;
+	__Reply__host_lockgroup_info_t Reply_host_lockgroup_info;
+	__Reply__host_statistics64_t Reply_host_statistics64;
+	__Reply__mach_zone_info_t Reply_mach_zone_info;
+	__Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher;
+	__Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager;
+	__Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager;
+	__Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag;
+	__Reply__host_get_atm_diagnostic_flag_t Reply_host_get_atm_diagnostic_flag;
+	__Reply__mach_memory_info_t Reply_mach_memory_info;
+	__Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags;
+	__Reply__host_get_multiuser_config_flags_t Reply_host_get_multiuser_config_flags;
+	__Reply__host_check_multiuser_mode_t Reply_host_check_multiuser_mode;
+	__Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone;
+};
+#endif /* !__RequestUnion__mach_host_subsystem__defined */
+
+#ifndef subsystem_to_name_map_mach_host
+#define subsystem_to_name_map_mach_host \
+    { "host_info", 200 },\
+    { "host_kernel_version", 201 },\
+    { "_host_page_size", 202 },\
+    { "mach_memory_object_memory_entry", 203 },\
+    { "host_processor_info", 204 },\
+    { "host_get_io_master", 205 },\
+    { "host_get_clock_service", 206 },\
+    { "kmod_get_info", 207 },\
+    { "host_virtual_physical_table_info", 209 },\
+    { "processor_set_default", 213 },\
+    { "processor_set_create", 214 },\
+    { "mach_memory_object_memory_entry_64", 215 },\
+    { "host_statistics", 216 },\
+    { "host_request_notification", 217 },\
+    { "host_lockgroup_info", 218 },\
+    { "host_statistics64", 219 },\
+    { "mach_zone_info", 220 },\
+    { "host_create_mach_voucher", 222 },\
+    { "host_register_mach_voucher_attr_manager", 223 },\
+    { "host_register_well_known_mach_voucher_attr_manager", 224 },\
+    { "host_set_atm_diagnostic_flag", 225 },\
+    { "host_get_atm_diagnostic_flag", 226 },\
+    { "mach_memory_info", 227 },\
+    { "host_set_multiuser_config_flags", 228 },\
+    { "host_get_multiuser_config_flags", 229 },\
+    { "host_check_multiuser_mode", 230 },\
+    { "mach_zone_info_for_zone", 231 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _mach_host_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/mach_init.h
@@ -64,7 +64,9 @@
 
 #include <sys/cdefs.h>
 
+#ifndef KERNEL
 #include <Availability.h>
+#endif
 
 /*
  *	Kernel-related ports; how a task/thread controls itself
lib/libc/include/any-macos.11-any/mach/mach_port.h
@@ -0,0 +1,1808 @@
+#ifndef	_mach_port_user_
+#define	_mach_port_user_
+
+/* Module mach_port */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	mach_port_MSG_COUNT
+#define	mach_port_MSG_COUNT	40
+#endif	/* mach_port_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach_debug/mach_debug_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine mach_port_names */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_names
+(
+	ipc_space_t task,
+	mach_port_name_array_t *names,
+	mach_msg_type_number_t *namesCnt,
+	mach_port_type_array_t *types,
+	mach_msg_type_number_t *typesCnt
+);
+
+/* Routine mach_port_type */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_type
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_type_t *ptype
+);
+
+/* Routine mach_port_rename */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_rename
+(
+	ipc_space_t task,
+	mach_port_name_t old_name,
+	mach_port_name_t new_name
+);
+
+/* Routine mach_port_allocate_name */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t mach_port_allocate_name
+(
+	ipc_space_t task,
+	mach_port_right_t right,
+	mach_port_name_t name
+);
+
+/* Routine mach_port_allocate */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_allocate
+(
+	ipc_space_t task,
+	mach_port_right_t right,
+	mach_port_name_t *name
+);
+
+/* Routine mach_port_destroy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_destroy
+(
+	ipc_space_t task,
+	mach_port_name_t name
+);
+
+/* Routine mach_port_deallocate */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_deallocate
+(
+	ipc_space_t task,
+	mach_port_name_t name
+);
+
+/* Routine mach_port_get_refs */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_get_refs
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_right_t right,
+	mach_port_urefs_t *refs
+);
+
+/* Routine mach_port_mod_refs */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_mod_refs
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_right_t right,
+	mach_port_delta_t delta
+);
+
+/* Routine mach_port_peek */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_peek
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_msg_trailer_type_t trailer_type,
+	mach_port_seqno_t *request_seqnop,
+	mach_msg_size_t *msg_sizep,
+	mach_msg_id_t *msg_idp,
+	mach_msg_trailer_info_t trailer_infop,
+	mach_msg_type_number_t *trailer_infopCnt
+);
+
+/* Routine mach_port_set_mscount */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_set_mscount
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_mscount_t mscount
+);
+
+/* Routine mach_port_get_set_status */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_get_set_status
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	mach_port_name_array_t *members,
+	mach_msg_type_number_t *membersCnt
+);
+
+/* Routine mach_port_move_member */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_move_member
+(
+	ipc_space_t task,
+	mach_port_name_t member,
+	mach_port_name_t after
+);
+
+/* Routine mach_port_request_notification */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_request_notification
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_msg_id_t msgid,
+	mach_port_mscount_t sync,
+	mach_port_t notify,
+	mach_msg_type_name_t notifyPoly,
+	mach_port_t *previous
+);
+
+/* Routine mach_port_insert_right */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_insert_right
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_t poly,
+	mach_msg_type_name_t polyPoly
+);
+
+/* Routine mach_port_extract_right */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_extract_right
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_msg_type_name_t msgt_name,
+	mach_port_t *poly,
+	mach_msg_type_name_t *polyPoly
+);
+
+/* Routine mach_port_set_seqno */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_set_seqno
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_seqno_t seqno
+);
+
+/* Routine mach_port_get_attributes */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_get_attributes
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	mach_port_flavor_t flavor,
+	mach_port_info_t port_info_out,
+	mach_msg_type_number_t *port_info_outCnt
+);
+
+/* Routine mach_port_set_attributes */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_set_attributes
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_flavor_t flavor,
+	mach_port_info_t port_info,
+	mach_msg_type_number_t port_infoCnt
+);
+
+/* Routine mach_port_allocate_qos */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_allocate_qos
+(
+	ipc_space_t task,
+	mach_port_right_t right,
+	mach_port_qos_t *qos,
+	mach_port_name_t *name
+);
+
+/* Routine mach_port_allocate_full */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_allocate_full
+(
+	ipc_space_t task,
+	mach_port_right_t right,
+	mach_port_t proto,
+	mach_port_qos_t *qos,
+	mach_port_name_t *name
+);
+
+/* Routine task_set_port_space */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t task_set_port_space
+(
+	ipc_space_t task,
+	int table_entries
+);
+
+/* Routine mach_port_get_srights */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_get_srights
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_rights_t *srights
+);
+
+/* Routine mach_port_space_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_space_info
+(
+	ipc_space_read_t space,
+	ipc_info_space_t *space_info,
+	ipc_info_name_array_t *table_info,
+	mach_msg_type_number_t *table_infoCnt,
+	ipc_info_tree_name_array_t *tree_info,
+	mach_msg_type_number_t *tree_infoCnt
+);
+
+/* Routine mach_port_dnrequest_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_dnrequest_info
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	unsigned *dnr_total,
+	unsigned *dnr_used
+);
+
+/* Routine mach_port_kernel_object */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_kernel_object
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	unsigned *object_type,
+	unsigned *object_addr
+);
+
+/* Routine mach_port_insert_member */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_insert_member
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_name_t pset
+);
+
+/* Routine mach_port_extract_member */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_extract_member
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_name_t pset
+);
+
+/* Routine mach_port_get_context */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_get_context
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	mach_port_context_t *context
+);
+
+/* Routine mach_port_set_context */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_set_context
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_context_t context
+);
+
+/* Routine mach_port_kobject */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_kobject
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	natural_t *object_type,
+	mach_vm_address_t *object_addr
+);
+
+/* Routine mach_port_construct */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_construct
+(
+	ipc_space_t task,
+	mach_port_options_ptr_t options,
+	mach_port_context_t context,
+	mach_port_name_t *name
+);
+
+/* Routine mach_port_destruct */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_destruct
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_delta_t srdelta,
+	mach_port_context_t guard
+);
+
+/* Routine mach_port_guard */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_guard
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_context_t guard,
+	boolean_t strict
+);
+
+/* Routine mach_port_unguard */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_unguard
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_context_t guard
+);
+
+/* Routine mach_port_space_basic_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_space_basic_info
+(
+	ipc_space_inspect_t task,
+	ipc_info_space_basic_t *basic_info
+);
+
+/* Routine mach_port_guard_with_flags */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_guard_with_flags
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_context_t guard,
+	uint64_t flags
+);
+
+/* Routine mach_port_swap_guard */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_swap_guard
+(
+	ipc_space_t task,
+	mach_port_name_t name,
+	mach_port_context_t old_guard,
+	mach_port_context_t new_guard
+);
+
+/* Routine mach_port_kobject_description */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_port_kobject_description
+(
+	ipc_space_read_t task,
+	mach_port_name_t name,
+	natural_t *object_type,
+	mach_vm_address_t *object_addr,
+	kobject_description_t description
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__mach_port_subsystem__defined
+#define __Request__mach_port_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__mach_port_names_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_type_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t old_name;
+		mach_port_name_t new_name;
+	} __Request__mach_port_rename_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_right_t right;
+		mach_port_name_t name;
+	} __Request__mach_port_allocate_name_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_right_t right;
+	} __Request__mach_port_allocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_deallocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_right_t right;
+	} __Request__mach_port_get_refs_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_right_t right;
+		mach_port_delta_t delta;
+	} __Request__mach_port_mod_refs_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_msg_trailer_type_t trailer_type;
+		mach_port_seqno_t request_seqnop;
+		mach_msg_type_number_t trailer_infopCnt;
+	} __Request__mach_port_peek_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_mscount_t mscount;
+	} __Request__mach_port_set_mscount_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_get_set_status_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t member;
+		mach_port_name_t after;
+	} __Request__mach_port_move_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t notify;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_msg_id_t msgid;
+		mach_port_mscount_t sync;
+	} __Request__mach_port_request_notification_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t poly;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_insert_right_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_msg_type_name_t msgt_name;
+	} __Request__mach_port_extract_right_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_seqno_t seqno;
+	} __Request__mach_port_set_seqno_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_flavor_t flavor;
+		mach_msg_type_number_t port_info_outCnt;
+	} __Request__mach_port_get_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_flavor_t flavor;
+		mach_msg_type_number_t port_infoCnt;
+		integer_t port_info[17];
+	} __Request__mach_port_set_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_right_t right;
+		mach_port_qos_t qos;
+	} __Request__mach_port_allocate_qos_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t proto;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_port_right_t right;
+		mach_port_qos_t qos;
+		mach_port_name_t name;
+	} __Request__mach_port_allocate_full_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int table_entries;
+	} __Request__task_set_port_space_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_get_srights_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__mach_port_space_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_dnrequest_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_kernel_object_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_name_t pset;
+	} __Request__mach_port_insert_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_name_t pset;
+	} __Request__mach_port_extract_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_get_context_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_context_t context;
+	} __Request__mach_port_set_context_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_kobject_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t options;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_port_context_t context;
+	} __Request__mach_port_construct_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_delta_t srdelta;
+		mach_port_context_t guard;
+	} __Request__mach_port_destruct_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_context_t guard;
+		boolean_t strict;
+	} __Request__mach_port_guard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_context_t guard;
+	} __Request__mach_port_unguard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__mach_port_space_basic_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_context_t guard;
+		uint64_t flags;
+	} __Request__mach_port_guard_with_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+		mach_port_context_t old_guard;
+		mach_port_context_t new_guard;
+	} __Request__mach_port_swap_guard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_port_name_t name;
+	} __Request__mach_port_kobject_description_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__mach_port_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__mach_port_subsystem__defined
+#define __RequestUnion__mach_port_subsystem__defined
+union __RequestUnion__mach_port_subsystem {
+	__Request__mach_port_names_t Request_mach_port_names;
+	__Request__mach_port_type_t Request_mach_port_type;
+	__Request__mach_port_rename_t Request_mach_port_rename;
+	__Request__mach_port_allocate_name_t Request_mach_port_allocate_name;
+	__Request__mach_port_allocate_t Request_mach_port_allocate;
+	__Request__mach_port_destroy_t Request_mach_port_destroy;
+	__Request__mach_port_deallocate_t Request_mach_port_deallocate;
+	__Request__mach_port_get_refs_t Request_mach_port_get_refs;
+	__Request__mach_port_mod_refs_t Request_mach_port_mod_refs;
+	__Request__mach_port_peek_t Request_mach_port_peek;
+	__Request__mach_port_set_mscount_t Request_mach_port_set_mscount;
+	__Request__mach_port_get_set_status_t Request_mach_port_get_set_status;
+	__Request__mach_port_move_member_t Request_mach_port_move_member;
+	__Request__mach_port_request_notification_t Request_mach_port_request_notification;
+	__Request__mach_port_insert_right_t Request_mach_port_insert_right;
+	__Request__mach_port_extract_right_t Request_mach_port_extract_right;
+	__Request__mach_port_set_seqno_t Request_mach_port_set_seqno;
+	__Request__mach_port_get_attributes_t Request_mach_port_get_attributes;
+	__Request__mach_port_set_attributes_t Request_mach_port_set_attributes;
+	__Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos;
+	__Request__mach_port_allocate_full_t Request_mach_port_allocate_full;
+	__Request__task_set_port_space_t Request_task_set_port_space;
+	__Request__mach_port_get_srights_t Request_mach_port_get_srights;
+	__Request__mach_port_space_info_t Request_mach_port_space_info;
+	__Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info;
+	__Request__mach_port_kernel_object_t Request_mach_port_kernel_object;
+	__Request__mach_port_insert_member_t Request_mach_port_insert_member;
+	__Request__mach_port_extract_member_t Request_mach_port_extract_member;
+	__Request__mach_port_get_context_t Request_mach_port_get_context;
+	__Request__mach_port_set_context_t Request_mach_port_set_context;
+	__Request__mach_port_kobject_t Request_mach_port_kobject;
+	__Request__mach_port_construct_t Request_mach_port_construct;
+	__Request__mach_port_destruct_t Request_mach_port_destruct;
+	__Request__mach_port_guard_t Request_mach_port_guard;
+	__Request__mach_port_unguard_t Request_mach_port_unguard;
+	__Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info;
+	__Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags;
+	__Request__mach_port_swap_guard_t Request_mach_port_swap_guard;
+	__Request__mach_port_kobject_description_t Request_mach_port_kobject_description;
+};
+#endif /* !__RequestUnion__mach_port_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__mach_port_subsystem__defined
+#define __Reply__mach_port_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t names;
+		mach_msg_ool_descriptor_t types;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t namesCnt;
+		mach_msg_type_number_t typesCnt;
+	} __Reply__mach_port_names_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_type_t ptype;
+	} __Reply__mach_port_type_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_rename_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_allocate_name_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_name_t name;
+	} __Reply__mach_port_allocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_deallocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_urefs_t refs;
+	} __Reply__mach_port_get_refs_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_mod_refs_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_seqno_t request_seqnop;
+		mach_msg_size_t msg_sizep;
+		mach_msg_id_t msg_idp;
+		mach_msg_type_number_t trailer_infopCnt;
+		char trailer_infop[68];
+	} __Reply__mach_port_peek_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_set_mscount_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t members;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t membersCnt;
+	} __Reply__mach_port_get_set_status_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_move_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t previous;
+		/* end of the kernel processed data */
+	} __Reply__mach_port_request_notification_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_insert_right_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t poly;
+		/* end of the kernel processed data */
+	} __Reply__mach_port_extract_right_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_set_seqno_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t port_info_outCnt;
+		integer_t port_info_out[17];
+	} __Reply__mach_port_get_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_set_attributes_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_qos_t qos;
+		mach_port_name_t name;
+	} __Reply__mach_port_allocate_qos_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_qos_t qos;
+		mach_port_name_t name;
+	} __Reply__mach_port_allocate_full_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__task_set_port_space_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_rights_t srights;
+	} __Reply__mach_port_get_srights_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t table_info;
+		mach_msg_ool_descriptor_t tree_info;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		ipc_info_space_t space_info;
+		mach_msg_type_number_t table_infoCnt;
+		mach_msg_type_number_t tree_infoCnt;
+	} __Reply__mach_port_space_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		unsigned dnr_total;
+		unsigned dnr_used;
+	} __Reply__mach_port_dnrequest_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		unsigned object_type;
+		unsigned object_addr;
+	} __Reply__mach_port_kernel_object_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_insert_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_extract_member_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_context_t context;
+	} __Reply__mach_port_get_context_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_set_context_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		natural_t object_type;
+		mach_vm_address_t object_addr;
+	} __Reply__mach_port_kobject_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_port_name_t name;
+	} __Reply__mach_port_construct_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_destruct_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_guard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_unguard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		ipc_info_space_basic_t basic_info;
+	} __Reply__mach_port_space_basic_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_guard_with_flags_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__mach_port_swap_guard_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		natural_t object_type;
+		mach_vm_address_t object_addr;
+		mach_msg_type_number_t descriptionOffset; /* MiG doesn't use it */
+		mach_msg_type_number_t descriptionCnt;
+		char description[512];
+	} __Reply__mach_port_kobject_description_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__mach_port_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__mach_port_subsystem__defined
+#define __ReplyUnion__mach_port_subsystem__defined
+union __ReplyUnion__mach_port_subsystem {
+	__Reply__mach_port_names_t Reply_mach_port_names;
+	__Reply__mach_port_type_t Reply_mach_port_type;
+	__Reply__mach_port_rename_t Reply_mach_port_rename;
+	__Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name;
+	__Reply__mach_port_allocate_t Reply_mach_port_allocate;
+	__Reply__mach_port_destroy_t Reply_mach_port_destroy;
+	__Reply__mach_port_deallocate_t Reply_mach_port_deallocate;
+	__Reply__mach_port_get_refs_t Reply_mach_port_get_refs;
+	__Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs;
+	__Reply__mach_port_peek_t Reply_mach_port_peek;
+	__Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount;
+	__Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status;
+	__Reply__mach_port_move_member_t Reply_mach_port_move_member;
+	__Reply__mach_port_request_notification_t Reply_mach_port_request_notification;
+	__Reply__mach_port_insert_right_t Reply_mach_port_insert_right;
+	__Reply__mach_port_extract_right_t Reply_mach_port_extract_right;
+	__Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno;
+	__Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes;
+	__Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes;
+	__Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos;
+	__Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full;
+	__Reply__task_set_port_space_t Reply_task_set_port_space;
+	__Reply__mach_port_get_srights_t Reply_mach_port_get_srights;
+	__Reply__mach_port_space_info_t Reply_mach_port_space_info;
+	__Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info;
+	__Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object;
+	__Reply__mach_port_insert_member_t Reply_mach_port_insert_member;
+	__Reply__mach_port_extract_member_t Reply_mach_port_extract_member;
+	__Reply__mach_port_get_context_t Reply_mach_port_get_context;
+	__Reply__mach_port_set_context_t Reply_mach_port_set_context;
+	__Reply__mach_port_kobject_t Reply_mach_port_kobject;
+	__Reply__mach_port_construct_t Reply_mach_port_construct;
+	__Reply__mach_port_destruct_t Reply_mach_port_destruct;
+	__Reply__mach_port_guard_t Reply_mach_port_guard;
+	__Reply__mach_port_unguard_t Reply_mach_port_unguard;
+	__Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info;
+	__Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags;
+	__Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard;
+	__Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description;
+};
+#endif /* !__RequestUnion__mach_port_subsystem__defined */
+
+#ifndef subsystem_to_name_map_mach_port
+#define subsystem_to_name_map_mach_port \
+    { "mach_port_names", 3200 },\
+    { "mach_port_type", 3201 },\
+    { "mach_port_rename", 3202 },\
+    { "mach_port_allocate_name", 3203 },\
+    { "mach_port_allocate", 3204 },\
+    { "mach_port_destroy", 3205 },\
+    { "mach_port_deallocate", 3206 },\
+    { "mach_port_get_refs", 3207 },\
+    { "mach_port_mod_refs", 3208 },\
+    { "mach_port_peek", 3209 },\
+    { "mach_port_set_mscount", 3210 },\
+    { "mach_port_get_set_status", 3211 },\
+    { "mach_port_move_member", 3212 },\
+    { "mach_port_request_notification", 3213 },\
+    { "mach_port_insert_right", 3214 },\
+    { "mach_port_extract_right", 3215 },\
+    { "mach_port_set_seqno", 3216 },\
+    { "mach_port_get_attributes", 3217 },\
+    { "mach_port_set_attributes", 3218 },\
+    { "mach_port_allocate_qos", 3219 },\
+    { "mach_port_allocate_full", 3220 },\
+    { "task_set_port_space", 3221 },\
+    { "mach_port_get_srights", 3222 },\
+    { "mach_port_space_info", 3223 },\
+    { "mach_port_dnrequest_info", 3224 },\
+    { "mach_port_kernel_object", 3225 },\
+    { "mach_port_insert_member", 3226 },\
+    { "mach_port_extract_member", 3227 },\
+    { "mach_port_get_context", 3228 },\
+    { "mach_port_set_context", 3229 },\
+    { "mach_port_kobject", 3230 },\
+    { "mach_port_construct", 3231 },\
+    { "mach_port_destruct", 3232 },\
+    { "mach_port_guard", 3233 },\
+    { "mach_port_unguard", 3234 },\
+    { "mach_port_space_basic_info", 3235 },\
+    { "mach_port_guard_with_flags", 3237 },\
+    { "mach_port_swap_guard", 3238 },\
+    { "mach_port_kobject_description", 3239 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _mach_port_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/mach_types.h
@@ -218,7 +218,6 @@ typedef exception_handler_t     exception_port_t;
 typedef exception_handler_array_t exception_port_arrary_t;
 typedef char vfs_path_t[4096];
 typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */
-typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */
 typedef char suid_cred_path_t[1024];
 typedef uint32_t suid_cred_uid_t;
 
@@ -262,16 +261,12 @@ typedef unsigned int            mach_task_flavor_t;
 #define TASK_FLAVOR_INSPECT     2    /* a task_inspect_t */
 #define TASK_FLAVOR_NAME        3    /* a task_name_t */
 
-#define TASK_FLAVOR_MAX         TASK_FLAVOR_NAME
-
 /* capability strictly _DECREASING_ */
 typedef unsigned int            mach_thread_flavor_t;
 #define THREAD_FLAVOR_CONTROL   0    /* a thread_t */
 #define THREAD_FLAVOR_READ      1    /* a thread_read_t */
 #define THREAD_FLAVOR_INSPECT   2    /* a thread_inspect_t */
 
-#define THREAD_FLAVOR_MAX       THREAD_FLAVOR_INSPECT
-
 /* DEPRECATED */
 typedef natural_t               ledger_item_t;
 #define LEDGER_ITEM_INFINITY    ((ledger_item_t) (~0))
lib/libc/include/any-macos.11-any/mach/mach_voucher_types.h
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MACH_VOUCHER_TYPES_H_
+#define _MACH_VOUCHER_TYPES_H_
+
+#include <mach/std_types.h>
+#include <mach/port.h>
+
+/*
+ * Mach Voucher - an immutable collection of attribute value handles.
+ *
+ * The mach voucher is such that it can be passed between processes
+ * as a Mach port send right (by convention in the mach_msg_header_tโ€™s
+ * msgh_voucher field).
+ *
+ * You may construct a new mach voucher by passing a construction
+ * recipe to host_create_mach_voucher().  The construction recipe supports
+ * generic commands for copying, removing, and redeeming attribute value
+ * handles from previous vouchers, or running attribute-mananger-specific
+ * commands within the recipe.
+ *
+ * Once the set of attribute value handles is constructed and returned,
+ * that set will not change for the life of the voucher (just because the
+ * attribute value handle itself doesn't change, the value the handle refers
+ * to is free to change at will).
+ */
+typedef mach_port_t             mach_voucher_t;
+#define MACH_VOUCHER_NULL       ((mach_voucher_t) 0)
+
+typedef mach_port_name_t        mach_voucher_name_t;
+#define MACH_VOUCHER_NAME_NULL  ((mach_voucher_name_t) 0)
+
+typedef mach_voucher_name_t     *mach_voucher_name_array_t;
+#define MACH_VOUCHER_NAME_ARRAY_NULL ((mach_voucher_name_array_t) 0)
+
+/*
+ * This type changes appearance between user-space and kernel.  It is
+ * a port at user-space and a reference to an ipc_voucher structure in-kernel.
+ */
+typedef mach_voucher_t          ipc_voucher_t;
+#define IPC_VOUCHER_NULL        ((ipc_voucher_t) 0)
+
+/*
+ * mach_voucher_selector_t - A means of specifying which thread/task value to extract -
+ *  the current voucher set at this level, or a voucher representing
+ * the full [layered] effective value for the task/thread.
+ */
+typedef uint32_t mach_voucher_selector_t;
+#define MACH_VOUCHER_SELECTOR_CURRENT           ((mach_voucher_selector_t)0)
+#define MACH_VOUCHER_SELECTOR_EFFECTIVE         ((mach_voucher_selector_t)1)
+
+
+/*
+ * mach_voucher_attr_key_t - The key used to identify a particular managed resource or
+ * to select the specific resource managerโ€™s data associated
+ * with a given voucher.
+ */
+typedef uint32_t mach_voucher_attr_key_t;
+typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t;
+
+#define MACH_VOUCHER_ATTR_KEY_ALL               ((mach_voucher_attr_key_t)~0)
+#define MACH_VOUCHER_ATTR_KEY_NONE              ((mach_voucher_attr_key_t)0)
+
+/* other well-known-keys will be added here */
+#define MACH_VOUCHER_ATTR_KEY_ATM               ((mach_voucher_attr_key_t)1)
+#define MACH_VOUCHER_ATTR_KEY_IMPORTANCE        ((mach_voucher_attr_key_t)2)
+#define MACH_VOUCHER_ATTR_KEY_BANK              ((mach_voucher_attr_key_t)3)
+#define MACH_VOUCHER_ATTR_KEY_PTHPRIORITY       ((mach_voucher_attr_key_t)4)
+
+#define MACH_VOUCHER_ATTR_KEY_USER_DATA         ((mach_voucher_attr_key_t)7)
+#define MACH_VOUCHER_ATTR_KEY_BITS              MACH_VOUCHER_ATTR_KEY_USER_DATA /* deprecated */
+#define MACH_VOUCHER_ATTR_KEY_TEST              ((mach_voucher_attr_key_t)8)
+
+#define MACH_VOUCHER_ATTR_KEY_NUM_WELL_KNOWN    MACH_VOUCHER_ATTR_KEY_TEST
+
+/*
+ * mach_voucher_attr_content_t
+ *
+ * Data passed to a resource manager for modifying an attribute
+ * value or returned from the resource manager in response to a
+ * request to externalize the current value for that attribute.
+ */
+typedef uint8_t *mach_voucher_attr_content_t;
+typedef uint32_t mach_voucher_attr_content_size_t;
+
+/*
+ * mach_voucher_attr_command_t - The private verbs implemented by each voucher
+ * attribute manager via mach_voucher_attr_command().
+ */
+typedef uint32_t mach_voucher_attr_command_t;
+
+/*
+ * mach_voucher_attr_recipe_command_t
+ *
+ * The verbs used to create/morph a voucher attribute value.
+ * We define some system-wide commands here - related to creation, and transport of
+ * vouchers and attributes.  Additional commands can be defined by, and supported by,
+ * individual attribute resource managers.
+ */
+typedef uint32_t mach_voucher_attr_recipe_command_t;
+typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t;
+
+#define MACH_VOUCHER_ATTR_NOOP                  ((mach_voucher_attr_recipe_command_t)0)
+#define MACH_VOUCHER_ATTR_COPY                  ((mach_voucher_attr_recipe_command_t)1)
+#define MACH_VOUCHER_ATTR_REMOVE                ((mach_voucher_attr_recipe_command_t)2)
+#define MACH_VOUCHER_ATTR_SET_VALUE_HANDLE      ((mach_voucher_attr_recipe_command_t)3)
+#define MACH_VOUCHER_ATTR_AUTO_REDEEM           ((mach_voucher_attr_recipe_command_t)4)
+#define MACH_VOUCHER_ATTR_SEND_PREPROCESS       ((mach_voucher_attr_recipe_command_t)5)
+
+/* redeem is on its way out? */
+#define MACH_VOUCHER_ATTR_REDEEM                ((mach_voucher_attr_recipe_command_t)10)
+
+/* recipe command(s) for importance attribute manager */
+#define MACH_VOUCHER_ATTR_IMPORTANCE_SELF       ((mach_voucher_attr_recipe_command_t)200)
+
+/* recipe command(s) for bit-store attribute manager */
+#define MACH_VOUCHER_ATTR_USER_DATA_STORE       ((mach_voucher_attr_recipe_command_t)211)
+#define MACH_VOUCHER_ATTR_BITS_STORE            MACH_VOUCHER_ATTR_USER_DATA_STORE /* deprecated */
+
+/* recipe command(s) for test attribute manager */
+#define MACH_VOUCHER_ATTR_TEST_STORE            MACH_VOUCHER_ATTR_USER_DATA_STORE
+
+/*
+ * mach_voucher_attr_recipe_t
+ *
+ * An element in a recipe list to create a voucher.
+ */
+#pragma pack(push, 1)
+
+typedef struct mach_voucher_attr_recipe_data {
+	mach_voucher_attr_key_t                 key;
+	mach_voucher_attr_recipe_command_t      command;
+	mach_voucher_name_t                     previous_voucher;
+	mach_voucher_attr_content_size_t        content_size;
+	uint8_t                                 content[];
+} mach_voucher_attr_recipe_data_t;
+typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t;
+typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t;
+
+/* Make the above palatable to MIG */
+typedef uint8_t *mach_voucher_attr_raw_recipe_t;
+typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t;
+typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t;
+typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t;
+
+#define MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE   5120
+#define MACH_VOUCHER_TRAP_STACK_LIMIT                 256
+
+#pragma pack(pop)
+
+/*
+ * VOUCHER ATTRIBUTE MANAGER Writer types
+ */
+
+/*
+ * mach_voucher_attr_manager_t
+ *
+ * A handle through which the mach voucher mechanism communicates with the voucher
+ * attribute manager for a given attribute key.
+ */
+typedef mach_port_t                     mach_voucher_attr_manager_t;
+#define MACH_VOUCHER_ATTR_MANAGER_NULL  ((mach_voucher_attr_manager_t) 0)
+
+/*
+ * mach_voucher_attr_control_t
+ *
+ * A handle provided to the voucher attribute manager for a given attribute key
+ * through which it makes inquiries or control operations of the mach voucher mechanism.
+ */
+typedef mach_port_t                     mach_voucher_attr_control_t;
+#define MACH_VOUCHER_ATTR_CONTROL_NULL  ((mach_voucher_attr_control_t) 0)
+
+/*
+ * These types are different in-kernel vs user-space.  They are ports in user-space,
+ * pointers to opaque structs in most of the kernel, and pointers to known struct
+ * types in the Mach portion of the kernel.
+ */
+typedef mach_port_t             ipc_voucher_attr_manager_t;
+typedef mach_port_t             ipc_voucher_attr_control_t;
+#define IPC_VOUCHER_ATTR_MANAGER_NULL ((ipc_voucher_attr_manager_t) 0)
+#define IPC_VOUCHER_ATTR_CONTROL_NULL ((ipc_voucher_attr_control_t) 0)
+
+/*
+ * mach_voucher_attr_value_handle_t
+ *
+ * The private handle that the voucher attribute manager provides to
+ * the mach voucher mechanism to represent a given attr content/value.
+ */
+typedef uint64_t mach_voucher_attr_value_handle_t;
+typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t;
+
+typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t;
+#define MACH_VOUCHER_ATTR_VALUE_MAX_NESTED      ((mach_voucher_attr_value_handle_array_size_t)4)
+
+typedef uint32_t mach_voucher_attr_value_reference_t;
+typedef uint32_t mach_voucher_attr_value_flags_t;
+#define MACH_VOUCHER_ATTR_VALUE_FLAGS_NONE      ((mach_voucher_attr_value_flags_t)0)
+#define MACH_VOUCHER_ATTR_VALUE_FLAGS_PERSIST   ((mach_voucher_attr_value_flags_t)1)
+
+/* USE - TBD */
+typedef uint32_t mach_voucher_attr_control_flags_t;
+#define MACH_VOUCHER_ATTR_CONTROL_FLAGS_NONE    ((mach_voucher_attr_control_flags_t)0)
+
+/*
+ * Commands and types for the IPC Importance Attribute Manager
+ *
+ * These are the valid mach_voucher_attr_command() options with the
+ * MACH_VOUCHER_ATTR_KEY_IMPORTANCE key.
+ */
+#define MACH_VOUCHER_IMPORTANCE_ATTR_ADD_EXTERNAL       1  /* Add some number of external refs (not supported) */
+#define MACH_VOUCHER_IMPORTANCE_ATTR_DROP_EXTERNAL      2  /* Drop some number of external refs */
+typedef uint32_t mach_voucher_attr_importance_refs;
+
+/*
+ * Activity id Generation defines
+ */
+#define MACH_ACTIVITY_ID_COUNT_MAX 16
+
+#endif  /* _MACH_VOUCHER_TYPES_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/machine.h
@@ -0,0 +1,409 @@
+/*
+ * Copyright (c) 2007-2016 Apple, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*	File:	machine.h
+ *	Author:	Avadis Tevanian, Jr.
+ *	Date:	1986
+ *
+ *	Machine independent machine abstraction.
+ */
+
+#ifndef _MACH_MACHINE_H_
+#define _MACH_MACHINE_H_
+
+#ifndef __ASSEMBLER__
+
+#include <stdint.h>
+#include <mach/machine/vm_types.h>
+#include <mach/boolean.h>
+
+typedef integer_t       cpu_type_t;
+typedef integer_t       cpu_subtype_t;
+typedef integer_t       cpu_threadtype_t;
+
+#define CPU_STATE_MAX           4
+
+#define CPU_STATE_USER          0
+#define CPU_STATE_SYSTEM        1
+#define CPU_STATE_IDLE          2
+#define CPU_STATE_NICE          3
+
+
+
+/*
+ * Capability bits used in the definition of cpu_type.
+ */
+#define CPU_ARCH_MASK           0xff000000      /* mask for architecture bits */
+#define CPU_ARCH_ABI64          0x01000000      /* 64 bit ABI */
+#define CPU_ARCH_ABI64_32       0x02000000      /* ABI for 64-bit hardware with 32-bit types; LP32 */
+
+/*
+ *	Machine types known by all.
+ */
+
+#define CPU_TYPE_ANY            ((cpu_type_t) -1)
+
+#define CPU_TYPE_VAX            ((cpu_type_t) 1)
+/* skip				((cpu_type_t) 2)	*/
+/* skip				((cpu_type_t) 3)	*/
+/* skip				((cpu_type_t) 4)	*/
+/* skip				((cpu_type_t) 5)	*/
+#define CPU_TYPE_MC680x0        ((cpu_type_t) 6)
+#define CPU_TYPE_X86            ((cpu_type_t) 7)
+#define CPU_TYPE_I386           CPU_TYPE_X86            /* compatibility */
+#define CPU_TYPE_X86_64         (CPU_TYPE_X86 | CPU_ARCH_ABI64)
+
+/* skip CPU_TYPE_MIPS		((cpu_type_t) 8)	*/
+/* skip                         ((cpu_type_t) 9)	*/
+#define CPU_TYPE_MC98000        ((cpu_type_t) 10)
+#define CPU_TYPE_HPPA           ((cpu_type_t) 11)
+#define CPU_TYPE_ARM            ((cpu_type_t) 12)
+#define CPU_TYPE_ARM64          (CPU_TYPE_ARM | CPU_ARCH_ABI64)
+#define CPU_TYPE_ARM64_32       (CPU_TYPE_ARM | CPU_ARCH_ABI64_32)
+#define CPU_TYPE_MC88000        ((cpu_type_t) 13)
+#define CPU_TYPE_SPARC          ((cpu_type_t) 14)
+#define CPU_TYPE_I860           ((cpu_type_t) 15)
+/* skip	CPU_TYPE_ALPHA		((cpu_type_t) 16)	*/
+/* skip				((cpu_type_t) 17)	*/
+#define CPU_TYPE_POWERPC                ((cpu_type_t) 18)
+#define CPU_TYPE_POWERPC64              (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
+/* skip				((cpu_type_t) 19)	*/
+/* skip				((cpu_type_t) 20 */
+/* skip				((cpu_type_t) 21 */
+/* skip				((cpu_type_t) 22 */
+
+/*
+ *	Machine subtypes (these are defined here, instead of in a machine
+ *	dependent directory, so that any program can get all definitions
+ *	regardless of where is it compiled).
+ */
+
+/*
+ * Capability bits used in the definition of cpu_subtype.
+ */
+#define CPU_SUBTYPE_MASK        0xff000000      /* mask for feature flags */
+#define CPU_SUBTYPE_LIB64       0x80000000      /* 64 bit libraries */
+#define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000      /* pointer authentication with versioned ABI */
+
+/*
+ *      When selecting a slice, ANY will pick the slice with the best
+ *      grading for the selected cpu_type_t, unlike the "ALL" subtypes,
+ *      which are the slices that can run on any hardware for that cpu type.
+ */
+#define CPU_SUBTYPE_ANY         ((cpu_subtype_t) -1)
+
+/*
+ *	Object files that are hand-crafted to run on any
+ *	implementation of an architecture are tagged with
+ *	CPU_SUBTYPE_MULTIPLE.  This functions essentially the same as
+ *	the "ALL" subtype of an architecture except that it allows us
+ *	to easily find object files that may need to be modified
+ *	whenever a new implementation of an architecture comes out.
+ *
+ *	It is the responsibility of the implementor to make sure the
+ *	software handles unsupported implementations elegantly.
+ */
+#define CPU_SUBTYPE_MULTIPLE            ((cpu_subtype_t) -1)
+#define CPU_SUBTYPE_LITTLE_ENDIAN       ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_BIG_ENDIAN          ((cpu_subtype_t) 1)
+
+/*
+ *     Machine threadtypes.
+ *     This is none - not defined - for most machine types/subtypes.
+ */
+#define CPU_THREADTYPE_NONE             ((cpu_threadtype_t) 0)
+
+/*
+ *	VAX subtypes (these do *not* necessary conform to the actual cpu
+ *	ID assigned by DEC available via the SID register).
+ */
+
+#define CPU_SUBTYPE_VAX_ALL     ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_VAX780      ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_VAX785      ((cpu_subtype_t) 2)
+#define CPU_SUBTYPE_VAX750      ((cpu_subtype_t) 3)
+#define CPU_SUBTYPE_VAX730      ((cpu_subtype_t) 4)
+#define CPU_SUBTYPE_UVAXI       ((cpu_subtype_t) 5)
+#define CPU_SUBTYPE_UVAXII      ((cpu_subtype_t) 6)
+#define CPU_SUBTYPE_VAX8200     ((cpu_subtype_t) 7)
+#define CPU_SUBTYPE_VAX8500     ((cpu_subtype_t) 8)
+#define CPU_SUBTYPE_VAX8600     ((cpu_subtype_t) 9)
+#define CPU_SUBTYPE_VAX8650     ((cpu_subtype_t) 10)
+#define CPU_SUBTYPE_VAX8800     ((cpu_subtype_t) 11)
+#define CPU_SUBTYPE_UVAXIII     ((cpu_subtype_t) 12)
+
+/*
+ *      680x0 subtypes
+ *
+ * The subtype definitions here are unusual for historical reasons.
+ * NeXT used to consider 68030 code as generic 68000 code.  For
+ * backwards compatability:
+ *
+ *	CPU_SUBTYPE_MC68030 symbol has been preserved for source code
+ *	compatability.
+ *
+ *	CPU_SUBTYPE_MC680x0_ALL has been defined to be the same
+ *	subtype as CPU_SUBTYPE_MC68030 for binary comatability.
+ *
+ *	CPU_SUBTYPE_MC68030_ONLY has been added to allow new object
+ *	files to be tagged as containing 68030-specific instructions.
+ */
+
+#define CPU_SUBTYPE_MC680x0_ALL         ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_MC68030             ((cpu_subtype_t) 1) /* compat */
+#define CPU_SUBTYPE_MC68040             ((cpu_subtype_t) 2)
+#define CPU_SUBTYPE_MC68030_ONLY        ((cpu_subtype_t) 3)
+
+/*
+ *	I386 subtypes
+ */
+
+#define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4))
+
+#define CPU_SUBTYPE_I386_ALL                    CPU_SUBTYPE_INTEL(3, 0)
+#define CPU_SUBTYPE_386                                 CPU_SUBTYPE_INTEL(3, 0)
+#define CPU_SUBTYPE_486                                 CPU_SUBTYPE_INTEL(4, 0)
+#define CPU_SUBTYPE_486SX                               CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128
+#define CPU_SUBTYPE_586                                 CPU_SUBTYPE_INTEL(5, 0)
+#define CPU_SUBTYPE_PENT        CPU_SUBTYPE_INTEL(5, 0)
+#define CPU_SUBTYPE_PENTPRO     CPU_SUBTYPE_INTEL(6, 1)
+#define CPU_SUBTYPE_PENTII_M3   CPU_SUBTYPE_INTEL(6, 3)
+#define CPU_SUBTYPE_PENTII_M5   CPU_SUBTYPE_INTEL(6, 5)
+#define CPU_SUBTYPE_CELERON                             CPU_SUBTYPE_INTEL(7, 6)
+#define CPU_SUBTYPE_CELERON_MOBILE              CPU_SUBTYPE_INTEL(7, 7)
+#define CPU_SUBTYPE_PENTIUM_3                   CPU_SUBTYPE_INTEL(8, 0)
+#define CPU_SUBTYPE_PENTIUM_3_M                 CPU_SUBTYPE_INTEL(8, 1)
+#define CPU_SUBTYPE_PENTIUM_3_XEON              CPU_SUBTYPE_INTEL(8, 2)
+#define CPU_SUBTYPE_PENTIUM_M                   CPU_SUBTYPE_INTEL(9, 0)
+#define CPU_SUBTYPE_PENTIUM_4                   CPU_SUBTYPE_INTEL(10, 0)
+#define CPU_SUBTYPE_PENTIUM_4_M                 CPU_SUBTYPE_INTEL(10, 1)
+#define CPU_SUBTYPE_ITANIUM                             CPU_SUBTYPE_INTEL(11, 0)
+#define CPU_SUBTYPE_ITANIUM_2                   CPU_SUBTYPE_INTEL(11, 1)
+#define CPU_SUBTYPE_XEON                                CPU_SUBTYPE_INTEL(12, 0)
+#define CPU_SUBTYPE_XEON_MP                             CPU_SUBTYPE_INTEL(12, 1)
+
+#define CPU_SUBTYPE_INTEL_FAMILY(x)     ((x) & 15)
+#define CPU_SUBTYPE_INTEL_FAMILY_MAX    15
+
+#define CPU_SUBTYPE_INTEL_MODEL(x)      ((x) >> 4)
+#define CPU_SUBTYPE_INTEL_MODEL_ALL     0
+
+/*
+ *	X86 subtypes.
+ */
+
+#define CPU_SUBTYPE_X86_ALL             ((cpu_subtype_t)3)
+#define CPU_SUBTYPE_X86_64_ALL          ((cpu_subtype_t)3)
+#define CPU_SUBTYPE_X86_ARCH1           ((cpu_subtype_t)4)
+#define CPU_SUBTYPE_X86_64_H            ((cpu_subtype_t)8)      /* Haswell feature subset */
+
+
+#define CPU_THREADTYPE_INTEL_HTT        ((cpu_threadtype_t) 1)
+
+/*
+ *	Mips subtypes.
+ */
+
+#define CPU_SUBTYPE_MIPS_ALL    ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_MIPS_R2300  ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_MIPS_R2600  ((cpu_subtype_t) 2)
+#define CPU_SUBTYPE_MIPS_R2800  ((cpu_subtype_t) 3)
+#define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4)     /* pmax */
+#define CPU_SUBTYPE_MIPS_R2000  ((cpu_subtype_t) 5)
+#define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6)     /* 3max */
+#define CPU_SUBTYPE_MIPS_R3000  ((cpu_subtype_t) 7)
+
+/*
+ *	MC98000 (PowerPC) subtypes
+ */
+#define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_MC98601     ((cpu_subtype_t) 1)
+
+/*
+ *	HPPA subtypes for Hewlett-Packard HP-PA family of
+ *	risc processors. Port by NeXT to 700 series.
+ */
+
+#define CPU_SUBTYPE_HPPA_ALL            ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_HPPA_7100           ((cpu_subtype_t) 0) /* compat */
+#define CPU_SUBTYPE_HPPA_7100LC         ((cpu_subtype_t) 1)
+
+/*
+ *	MC88000 subtypes.
+ */
+#define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_MC88100     ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_MC88110     ((cpu_subtype_t) 2)
+
+/*
+ *	SPARC subtypes
+ */
+#define CPU_SUBTYPE_SPARC_ALL           ((cpu_subtype_t) 0)
+
+/*
+ *	I860 subtypes
+ */
+#define CPU_SUBTYPE_I860_ALL    ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_I860_860    ((cpu_subtype_t) 1)
+
+/*
+ *	PowerPC subtypes
+ */
+#define CPU_SUBTYPE_POWERPC_ALL         ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_POWERPC_601         ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_POWERPC_602         ((cpu_subtype_t) 2)
+#define CPU_SUBTYPE_POWERPC_603         ((cpu_subtype_t) 3)
+#define CPU_SUBTYPE_POWERPC_603e        ((cpu_subtype_t) 4)
+#define CPU_SUBTYPE_POWERPC_603ev       ((cpu_subtype_t) 5)
+#define CPU_SUBTYPE_POWERPC_604         ((cpu_subtype_t) 6)
+#define CPU_SUBTYPE_POWERPC_604e        ((cpu_subtype_t) 7)
+#define CPU_SUBTYPE_POWERPC_620         ((cpu_subtype_t) 8)
+#define CPU_SUBTYPE_POWERPC_750         ((cpu_subtype_t) 9)
+#define CPU_SUBTYPE_POWERPC_7400        ((cpu_subtype_t) 10)
+#define CPU_SUBTYPE_POWERPC_7450        ((cpu_subtype_t) 11)
+#define CPU_SUBTYPE_POWERPC_970         ((cpu_subtype_t) 100)
+
+/*
+ *	ARM subtypes
+ */
+#define CPU_SUBTYPE_ARM_ALL             ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_ARM_V4T             ((cpu_subtype_t) 5)
+#define CPU_SUBTYPE_ARM_V6              ((cpu_subtype_t) 6)
+#define CPU_SUBTYPE_ARM_V5TEJ           ((cpu_subtype_t) 7)
+#define CPU_SUBTYPE_ARM_XSCALE          ((cpu_subtype_t) 8)
+#define CPU_SUBTYPE_ARM_V7              ((cpu_subtype_t) 9)  /* ARMv7-A and ARMv7-R */
+#define CPU_SUBTYPE_ARM_V7F             ((cpu_subtype_t) 10) /* Cortex A9 */
+#define CPU_SUBTYPE_ARM_V7S             ((cpu_subtype_t) 11) /* Swift */
+#define CPU_SUBTYPE_ARM_V7K             ((cpu_subtype_t) 12)
+#define CPU_SUBTYPE_ARM_V8              ((cpu_subtype_t) 13)
+#define CPU_SUBTYPE_ARM_V6M             ((cpu_subtype_t) 14) /* Not meant to be run under xnu */
+#define CPU_SUBTYPE_ARM_V7M             ((cpu_subtype_t) 15) /* Not meant to be run under xnu */
+#define CPU_SUBTYPE_ARM_V7EM            ((cpu_subtype_t) 16) /* Not meant to be run under xnu */
+#define CPU_SUBTYPE_ARM_V8M             ((cpu_subtype_t) 17) /* Not meant to be run under xnu */
+
+/*
+ *  ARM64 subtypes
+ */
+#define CPU_SUBTYPE_ARM64_ALL           ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_ARM64_V8            ((cpu_subtype_t) 1)
+#define CPU_SUBTYPE_ARM64E              ((cpu_subtype_t) 2)
+
+/* CPU subtype feature flags for ptrauth on arm64e platforms */
+#define CPU_SUBTYPE_ARM64_PTR_AUTH_MASK 0x0f000000
+#define CPU_SUBTYPE_ARM64_PTR_AUTH_VERSION(x) (((x) & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) >> 24)
+
+/*
+ *  ARM64_32 subtypes
+ */
+#define CPU_SUBTYPE_ARM64_32_ALL        ((cpu_subtype_t) 0)
+#define CPU_SUBTYPE_ARM64_32_V8 ((cpu_subtype_t) 1)
+
+#endif /* !__ASSEMBLER__ */
+
+/*
+ *	CPU families (sysctl hw.cpufamily)
+ *
+ * These are meant to identify the CPU's marketing name - an
+ * application can map these to (possibly) localized strings.
+ * NB: the encodings of the CPU families are intentionally arbitrary.
+ * There is no ordering, and you should never try to deduce whether
+ * or not some feature is available based on the family.
+ * Use feature flags (eg, hw.optional.altivec) to test for optional
+ * functionality.
+ */
+#define CPUFAMILY_UNKNOWN               0
+#define CPUFAMILY_POWERPC_G3            0xcee41549
+#define CPUFAMILY_POWERPC_G4            0x77c184ae
+#define CPUFAMILY_POWERPC_G5            0xed76d8aa
+#define CPUFAMILY_INTEL_6_13            0xaa33392b
+#define CPUFAMILY_INTEL_PENRYN          0x78ea4fbc
+#define CPUFAMILY_INTEL_NEHALEM         0x6b5a4cd2
+#define CPUFAMILY_INTEL_WESTMERE        0x573b5eec
+#define CPUFAMILY_INTEL_SANDYBRIDGE     0x5490b78c
+#define CPUFAMILY_INTEL_IVYBRIDGE       0x1f65e835
+#define CPUFAMILY_INTEL_HASWELL         0x10b282dc
+#define CPUFAMILY_INTEL_BROADWELL       0x582ed09c
+#define CPUFAMILY_INTEL_SKYLAKE         0x37fc219f
+#define CPUFAMILY_INTEL_KABYLAKE        0x0f817246
+#define CPUFAMILY_INTEL_ICELAKE         0x38435547
+#define CPUFAMILY_INTEL_COMETLAKE       0x1cf8a03e
+#define CPUFAMILY_ARM_9                 0xe73283ae
+#define CPUFAMILY_ARM_11                0x8ff620d8
+#define CPUFAMILY_ARM_XSCALE            0x53b005f5
+#define CPUFAMILY_ARM_12                0xbd1b0ae9
+#define CPUFAMILY_ARM_13                0x0cc90e64
+#define CPUFAMILY_ARM_14                0x96077ef1
+#define CPUFAMILY_ARM_15                0xa8511bca
+#define CPUFAMILY_ARM_SWIFT             0x1e2d6381
+#define CPUFAMILY_ARM_CYCLONE           0x37a09642
+#define CPUFAMILY_ARM_TYPHOON           0x2c91a47e
+#define CPUFAMILY_ARM_TWISTER           0x92fb37c8
+#define CPUFAMILY_ARM_HURRICANE         0x67ceee93
+#define CPUFAMILY_ARM_MONSOON_MISTRAL   0xe81e7ef6
+#define CPUFAMILY_ARM_VORTEX_TEMPEST    0x07d34b9f
+#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2
+#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3
+
+#define CPUSUBFAMILY_UNKNOWN            0
+#define CPUSUBFAMILY_ARM_HP             1
+#define CPUSUBFAMILY_ARM_HG             2
+#define CPUSUBFAMILY_ARM_M              3
+#define CPUSUBFAMILY_ARM_HS             4
+#define CPUSUBFAMILY_ARM_HC_HD          5
+
+/* The following synonyms are deprecated: */
+#define CPUFAMILY_INTEL_6_23    CPUFAMILY_INTEL_PENRYN
+#define CPUFAMILY_INTEL_6_26    CPUFAMILY_INTEL_NEHALEM
+
+
+#endif  /* _MACH_MACHINE_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/message.h
@@ -0,0 +1,908 @@
+/*
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ * NOTICE: This file was modified by McAfee Research in 2004 to introduce
+ * support for mandatory and extensible security protections.  This notice
+ * is included in support of clause 2.2 (b) of the Apple Public License,
+ * Version 2.0.
+ * Copyright (c) 2005 SPARTA, Inc.
+ */
+/*
+ */
+/*
+ *	File:	mach/message.h
+ *
+ *	Mach IPC message and primitive function definitions.
+ */
+
+#ifndef _MACH_MESSAGE_H_
+#define _MACH_MESSAGE_H_
+
+#include <stdint.h>
+#include <mach/port.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/machine/vm_types.h>
+
+#include <sys/cdefs.h>
+#include <sys/appleapiopts.h>
+#include <Availability.h>
+
+/*
+ *  The timeout mechanism uses mach_msg_timeout_t values,
+ *  passed by value.  The timeout units are milliseconds.
+ *  It is controlled with the MACH_SEND_TIMEOUT
+ *  and MACH_RCV_TIMEOUT options.
+ */
+
+typedef natural_t mach_msg_timeout_t;
+
+/*
+ *  The value to be used when there is no timeout.
+ *  (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.)
+ */
+
+#define MACH_MSG_TIMEOUT_NONE           ((mach_msg_timeout_t) 0)
+
+/*
+ *  The kernel uses MACH_MSGH_BITS_COMPLEX as a hint.  If it isn't on, it
+ *  assumes the body of the message doesn't contain port rights or OOL
+ *  data.  The field is set in received messages.  A user task must
+ *  use caution in interpreting the body of a message if the bit isn't
+ *  on, because the mach_msg_type's in the body might "lie" about the
+ *  contents.  If the bit isn't on, but the mach_msg_types
+ *  in the body specify rights or OOL data, the behavior is undefined.
+ *  (Ie, an error may or may not be produced.)
+ *
+ *  The value of MACH_MSGH_BITS_REMOTE determines the interpretation
+ *  of the msgh_remote_port field.  It is handled like a msgt_name,
+ *  but must result in a send or send-once type right.
+ *
+ *  The value of MACH_MSGH_BITS_LOCAL determines the interpretation
+ *  of the msgh_local_port field.  It is handled like a msgt_name,
+ *  and also must result in a send or send-once type right.
+ *
+ *  The value of MACH_MSGH_BITS_VOUCHER determines the interpretation
+ *  of the msgh_voucher_port field.  It is handled like a msgt_name,
+ *  but must result in a send right (and the msgh_voucher_port field
+ *  must be the name of a send right to a Mach voucher kernel object.
+ *
+ *  MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote
+ *  and local fields, into a single value suitable for msgh_bits.
+ *
+ *  MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally.
+ *
+ *  The unused bits should be zero and are reserved for the kernel
+ *  or for future interface expansion.
+ */
+
+#define MACH_MSGH_BITS_ZERO             0x00000000
+
+#define MACH_MSGH_BITS_REMOTE_MASK      0x0000001f
+#define MACH_MSGH_BITS_LOCAL_MASK       0x00001f00
+#define MACH_MSGH_BITS_VOUCHER_MASK     0x001f0000
+
+#define MACH_MSGH_BITS_PORTS_MASK               \
+	        (MACH_MSGH_BITS_REMOTE_MASK |   \
+	         MACH_MSGH_BITS_LOCAL_MASK |    \
+	         MACH_MSGH_BITS_VOUCHER_MASK)
+
+#define MACH_MSGH_BITS_COMPLEX          0x80000000U     /* message is complex */
+
+#define MACH_MSGH_BITS_USER             0x801f1f1fU     /* allowed bits user->kernel */
+
+#define MACH_MSGH_BITS_RAISEIMP         0x20000000U     /* importance raised due to msg */
+#define MACH_MSGH_BITS_DENAP            MACH_MSGH_BITS_RAISEIMP
+
+#define MACH_MSGH_BITS_IMPHOLDASRT      0x10000000U     /* assertion help, userland private */
+#define MACH_MSGH_BITS_DENAPHOLDASRT    MACH_MSGH_BITS_IMPHOLDASRT
+
+#define MACH_MSGH_BITS_CIRCULAR         0x10000000U     /* message circular, kernel private */
+
+#define MACH_MSGH_BITS_USED             0xb01f1f1fU
+
+/* setter macros for the bits */
+#define MACH_MSGH_BITS(remote, local)  /* legacy */             \
+	        ((remote) | ((local) << 8))
+#define MACH_MSGH_BITS_SET_PORTS(remote, local, voucher)        \
+	(((remote) & MACH_MSGH_BITS_REMOTE_MASK) |              \
+	 (((local) << 8) & MACH_MSGH_BITS_LOCAL_MASK) |         \
+	 (((voucher) << 16) & MACH_MSGH_BITS_VOUCHER_MASK))
+#define MACH_MSGH_BITS_SET(remote, local, voucher, other)       \
+	(MACH_MSGH_BITS_SET_PORTS((remote), (local), (voucher)) \
+	 | ((other) &~ MACH_MSGH_BITS_PORTS_MASK))
+
+/* getter macros for pulling values out of the bits field */
+#define MACH_MSGH_BITS_REMOTE(bits)                             \
+	        ((bits) & MACH_MSGH_BITS_REMOTE_MASK)
+#define MACH_MSGH_BITS_LOCAL(bits)                              \
+	        (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8)
+#define MACH_MSGH_BITS_VOUCHER(bits)                            \
+	        (((bits) & MACH_MSGH_BITS_VOUCHER_MASK) >> 16)
+#define MACH_MSGH_BITS_PORTS(bits)                              \
+	((bits) & MACH_MSGH_BITS_PORTS_MASK)
+#define MACH_MSGH_BITS_OTHER(bits)                              \
+	        ((bits) &~ MACH_MSGH_BITS_PORTS_MASK)
+
+/* checking macros */
+#define MACH_MSGH_BITS_HAS_REMOTE(bits)                         \
+	(MACH_MSGH_BITS_REMOTE(bits) != MACH_MSGH_BITS_ZERO)
+#define MACH_MSGH_BITS_HAS_LOCAL(bits)                          \
+	(MACH_MSGH_BITS_LOCAL(bits) != MACH_MSGH_BITS_ZERO)
+#define MACH_MSGH_BITS_HAS_VOUCHER(bits)                        \
+	(MACH_MSGH_BITS_VOUCHER(bits) != MACH_MSGH_BITS_ZERO)
+#define MACH_MSGH_BITS_IS_COMPLEX(bits)                         \
+	(((bits) & MACH_MSGH_BITS_COMPLEX) != MACH_MSGH_BITS_ZERO)
+
+/* importance checking macros */
+#define MACH_MSGH_BITS_RAISED_IMPORTANCE(bits)                  \
+	(((bits) & MACH_MSGH_BITS_RAISEIMP) != MACH_MSGH_BITS_ZERO)
+#define MACH_MSGH_BITS_HOLDS_IMPORTANCE_ASSERTION(bits)         \
+	(((bits) & MACH_MSGH_BITS_IMPHOLDASRT) != MACH_MSGH_BITS_ZERO)
+
+/*
+ *  Every message starts with a message header.
+ *  Following the message header, if the message is complex, are a count
+ *  of type descriptors and the type descriptors themselves
+ *  (mach_msg_descriptor_t). The size of the message must be specified in
+ *  bytes, and includes the message header, descriptor count, descriptors,
+ *  and inline data.
+ *
+ *  The msgh_remote_port field specifies the destination of the message.
+ *  It must specify a valid send or send-once right for a port.
+ *
+ *  The msgh_local_port field specifies a "reply port".  Normally,
+ *  This field carries a send-once right that the receiver will use
+ *  to reply to the message.  It may carry the values MACH_PORT_NULL,
+ *  MACH_PORT_DEAD, a send-once right, or a send right.
+ *
+ *  The msgh_voucher_port field specifies a Mach voucher port. Only
+ *  send rights to kernel-implemented Mach Voucher kernel objects in
+ *  addition to MACH_PORT_NULL or MACH_PORT_DEAD may be passed.
+ *
+ *  The msgh_id field is uninterpreted by the message primitives.
+ *  It normally carries information specifying the format
+ *  or meaning of the message.
+ */
+
+typedef unsigned int mach_msg_bits_t;
+typedef natural_t mach_msg_size_t;
+typedef integer_t mach_msg_id_t;
+
+#define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0
+
+typedef unsigned int mach_msg_priority_t;
+
+#define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0
+
+
+typedef unsigned int mach_msg_type_name_t;
+
+#define MACH_MSG_TYPE_MOVE_RECEIVE      16      /* Must hold receive right */
+#define MACH_MSG_TYPE_MOVE_SEND         17      /* Must hold send right(s) */
+#define MACH_MSG_TYPE_MOVE_SEND_ONCE    18      /* Must hold sendonce right */
+#define MACH_MSG_TYPE_COPY_SEND         19      /* Must hold send right(s) */
+#define MACH_MSG_TYPE_MAKE_SEND         20      /* Must hold receive right */
+#define MACH_MSG_TYPE_MAKE_SEND_ONCE    21      /* Must hold receive right */
+#define MACH_MSG_TYPE_COPY_RECEIVE      22      /* NOT VALID */
+#define MACH_MSG_TYPE_DISPOSE_RECEIVE   24      /* must hold receive right */
+#define MACH_MSG_TYPE_DISPOSE_SEND      25      /* must hold send right(s) */
+#define MACH_MSG_TYPE_DISPOSE_SEND_ONCE 26      /* must hold sendonce right */
+
+typedef unsigned int mach_msg_copy_options_t;
+
+#define MACH_MSG_PHYSICAL_COPY          0
+#define MACH_MSG_VIRTUAL_COPY           1
+#define MACH_MSG_ALLOCATE               2
+#define MACH_MSG_OVERWRITE              3       /* deprecated */
+#ifdef  MACH_KERNEL
+#define MACH_MSG_KALLOC_COPY_T          4
+#endif  /* MACH_KERNEL */
+
+#define MACH_MSG_GUARD_FLAGS_NONE                   0x0000
+#define MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE      0x0001    /* Move the receive right and mark it as immovable */
+#define MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND      0x0002    /* Verify that the port is unguarded */
+#define MACH_MSG_GUARD_FLAGS_MASK                   0x0003    /* Valid flag bits */
+typedef unsigned int mach_msg_guard_flags_t;
+
+/*
+ * In a complex mach message, the mach_msg_header_t is followed by
+ * a descriptor count, then an array of that number of descriptors
+ * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t
+ * (which any descriptor can be cast to) indicates the flavor of the
+ * descriptor.
+ *
+ * Note that in LP64, the various types of descriptors are no longer all
+ * the same size as mach_msg_descriptor_t, so the array cannot be indexed
+ * as expected.
+ */
+
+typedef unsigned int mach_msg_descriptor_type_t;
+
+#define MACH_MSG_PORT_DESCRIPTOR                0
+#define MACH_MSG_OOL_DESCRIPTOR                 1
+#define MACH_MSG_OOL_PORTS_DESCRIPTOR           2
+#define MACH_MSG_OOL_VOLATILE_DESCRIPTOR        3
+#define MACH_MSG_GUARDED_PORT_DESCRIPTOR        4
+
+#pragma pack(push, 4)
+
+typedef struct{
+	natural_t                     pad1;
+	mach_msg_size_t               pad2;
+	unsigned int                  pad3 : 24;
+	mach_msg_descriptor_type_t    type : 8;
+} mach_msg_type_descriptor_t;
+
+typedef struct{
+	mach_port_t                   name;
+// Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes
+	mach_msg_size_t               pad1;
+	unsigned int                  pad2 : 16;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+} mach_msg_port_descriptor_t;
+
+typedef struct{
+	uint32_t                      address;
+	mach_msg_size_t               size;
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	unsigned int                  pad1: 8;
+	mach_msg_descriptor_type_t    type: 8;
+} mach_msg_ool_descriptor32_t;
+
+typedef struct{
+	uint64_t                      address;
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	unsigned int                  pad1: 8;
+	mach_msg_descriptor_type_t    type: 8;
+	mach_msg_size_t               size;
+} mach_msg_ool_descriptor64_t;
+
+typedef struct{
+	void*                         address;
+#if !defined(__LP64__)
+	mach_msg_size_t               size;
+#endif
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	unsigned int                  pad1: 8;
+	mach_msg_descriptor_type_t    type: 8;
+#if defined(__LP64__)
+	mach_msg_size_t               size;
+#endif
+} mach_msg_ool_descriptor_t;
+
+typedef struct{
+	uint32_t                      address;
+	mach_msg_size_t               count;
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+} mach_msg_ool_ports_descriptor32_t;
+
+typedef struct{
+	uint64_t                      address;
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+	mach_msg_size_t               count;
+} mach_msg_ool_ports_descriptor64_t;
+
+typedef struct{
+	void*                         address;
+#if !defined(__LP64__)
+	mach_msg_size_t               count;
+#endif
+	boolean_t                     deallocate: 8;
+	mach_msg_copy_options_t       copy: 8;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+#if defined(__LP64__)
+	mach_msg_size_t               count;
+#endif
+} mach_msg_ool_ports_descriptor_t;
+
+typedef struct{
+	uint32_t                      context;
+	mach_port_name_t              name;
+	mach_msg_guard_flags_t        flags : 16;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+} mach_msg_guarded_port_descriptor32_t;
+
+typedef struct{
+	uint64_t                      context;
+	mach_msg_guard_flags_t        flags : 16;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+	mach_port_name_t              name;
+} mach_msg_guarded_port_descriptor64_t;
+
+typedef struct{
+	mach_port_context_t           context;
+#if !defined(__LP64__)
+	mach_port_name_t              name;
+#endif
+	mach_msg_guard_flags_t        flags : 16;
+	mach_msg_type_name_t          disposition : 8;
+	mach_msg_descriptor_type_t    type : 8;
+#if defined(__LP64__)
+	mach_port_name_t              name;
+#endif /* defined(__LP64__) */
+} mach_msg_guarded_port_descriptor_t;
+
+/*
+ * LP64support - This union definition is not really
+ * appropriate in LP64 mode because not all descriptors
+ * are of the same size in that environment.
+ */
+typedef union{
+	mach_msg_port_descriptor_t            port;
+	mach_msg_ool_descriptor_t             out_of_line;
+	mach_msg_ool_ports_descriptor_t       ool_ports;
+	mach_msg_type_descriptor_t            type;
+	mach_msg_guarded_port_descriptor_t    guarded_port;
+} mach_msg_descriptor_t;
+
+typedef struct{
+	mach_msg_size_t msgh_descriptor_count;
+} mach_msg_body_t;
+
+#define MACH_MSG_BODY_NULL (mach_msg_body_t *) 0
+#define MACH_MSG_DESCRIPTOR_NULL (mach_msg_descriptor_t *) 0
+
+typedef struct{
+	mach_msg_bits_t       msgh_bits;
+	mach_msg_size_t       msgh_size;
+	mach_port_t           msgh_remote_port;
+	mach_port_t           msgh_local_port;
+	mach_port_name_t      msgh_voucher_port;
+	mach_msg_id_t         msgh_id;
+} mach_msg_header_t;
+
+#define msgh_reserved           msgh_voucher_port
+#define MACH_MSG_NULL   (mach_msg_header_t *) 0
+
+typedef struct{
+	mach_msg_header_t       header;
+	mach_msg_body_t         body;
+} mach_msg_base_t;
+
+typedef unsigned int mach_msg_trailer_type_t;
+
+#define MACH_MSG_TRAILER_FORMAT_0       0
+
+typedef unsigned int mach_msg_trailer_size_t;
+typedef char *mach_msg_trailer_info_t;
+
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+} mach_msg_trailer_t;
+
+/*
+ *  The msgh_seqno field carries a sequence number
+ *  associated with the received-from port.  A port's
+ *  sequence number is incremented every time a message
+ *  is received from it and included in the received
+ *  trailer to help put messages back in sequence if
+ *  multiple threads receive and/or process received
+ *  messages.
+ */
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+	mach_port_seqno_t             msgh_seqno;
+} mach_msg_seqno_trailer_t;
+
+typedef struct{
+	unsigned int                  val[2];
+} security_token_t;
+
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+	mach_port_seqno_t             msgh_seqno;
+	security_token_t              msgh_sender;
+} mach_msg_security_trailer_t;
+
+/*
+ * The audit token is an opaque token which identifies
+ * Mach tasks and senders of Mach messages as subjects
+ * to the BSM audit system.  Only the appropriate BSM
+ * library routines should be used to interpret the
+ * contents of the audit token as the representation
+ * of the subject identity within the token may change
+ * over time.
+ */
+typedef struct{
+	unsigned int                  val[8];
+} audit_token_t;
+
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+	mach_port_seqno_t             msgh_seqno;
+	security_token_t              msgh_sender;
+	audit_token_t                 msgh_audit;
+} mach_msg_audit_trailer_t;
+
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+	mach_port_seqno_t             msgh_seqno;
+	security_token_t              msgh_sender;
+	audit_token_t                 msgh_audit;
+	mach_port_context_t           msgh_context;
+} mach_msg_context_trailer_t;
+
+
+
+typedef struct{
+	mach_port_name_t sender;
+} msg_labels_t;
+
+typedef int mach_msg_filter_id;
+#define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0
+
+/*
+ *  Trailer type to pass MAC policy label info as a mach message trailer.
+ *
+ */
+
+typedef struct{
+	mach_msg_trailer_type_t       msgh_trailer_type;
+	mach_msg_trailer_size_t       msgh_trailer_size;
+	mach_port_seqno_t             msgh_seqno;
+	security_token_t              msgh_sender;
+	audit_token_t                 msgh_audit;
+	mach_port_context_t           msgh_context;
+	mach_msg_filter_id            msgh_ad;
+	msg_labels_t                  msgh_labels;
+} mach_msg_mac_trailer_t;
+
+
+#define MACH_MSG_TRAILER_MINIMUM_SIZE  sizeof(mach_msg_trailer_t)
+
+/*
+ * These values can change from release to release - but clearly
+ * code cannot request additional trailer elements one was not
+ * compiled to understand.  Therefore, it is safe to use this
+ * constant when the same module specified the receive options.
+ * Otherwise, you run the risk that the options requested by
+ * another module may exceed the local modules notion of
+ * MAX_TRAILER_SIZE.
+ */
+
+typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t;
+#define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t))
+
+/*
+ * Legacy requirements keep us from ever updating these defines (even
+ * when the format_0 trailers gain new option data fields in the future).
+ * Therefore, they shouldn't be used going forward.  Instead, the sizes
+ * should be compared against the specific element size requested using
+ * REQUESTED_TRAILER_SIZE.
+ */
+typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t;
+
+/*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t;
+ */
+
+#define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t)
+
+#define   KERNEL_SECURITY_TOKEN_VALUE  { {0, 1} }
+extern const security_token_t KERNEL_SECURITY_TOKEN;
+
+#define   KERNEL_AUDIT_TOKEN_VALUE  { {0, 0, 0, 0, 0, 0, 0, 0} }
+extern const audit_token_t KERNEL_AUDIT_TOKEN;
+
+typedef integer_t mach_msg_options_t;
+
+typedef struct{
+	mach_msg_header_t     header;
+} mach_msg_empty_send_t;
+
+typedef struct{
+	mach_msg_header_t     header;
+	mach_msg_trailer_t    trailer;
+} mach_msg_empty_rcv_t;
+
+typedef union{
+	mach_msg_empty_send_t send;
+	mach_msg_empty_rcv_t  rcv;
+} mach_msg_empty_t;
+
+#pragma pack(pop)
+
+/* utility to round the message size - will become machine dependent */
+#define round_msg(x)    (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \
+	                        ~(sizeof (natural_t) - 1))
+
+
+/*
+ *  There is no fixed upper bound to the size of Mach messages.
+ */
+#define MACH_MSG_SIZE_MAX       ((mach_msg_size_t) ~0)
+
+#if defined(__APPLE_API_PRIVATE)
+/*
+ *  But architectural limits of a given implementation, or
+ *  temporal conditions may cause unpredictable send failures
+ *  for messages larger than MACH_MSG_SIZE_RELIABLE.
+ *
+ *  In either case, waiting for memory is [currently] outside
+ *  the scope of send timeout values provided to IPC.
+ */
+#define MACH_MSG_SIZE_RELIABLE  ((mach_msg_size_t) 256 * 1024)
+#endif
+/*
+ *  Compatibility definitions, for code written
+ *  when there was a msgh_kind instead of msgh_seqno.
+ */
+#define MACH_MSGH_KIND_NORMAL           0x00000000
+#define MACH_MSGH_KIND_NOTIFICATION     0x00000001
+#define msgh_kind                       msgh_seqno
+#define mach_msg_kind_t                 mach_port_seqno_t
+
+typedef natural_t mach_msg_type_size_t;
+typedef natural_t mach_msg_type_number_t;
+
+/*
+ *  Values received/carried in messages.  Tells the receiver what
+ *  sort of port right he now has.
+ *
+ *  MACH_MSG_TYPE_PORT_NAME is used to transfer a port name
+ *  which should remain uninterpreted by the kernel.  (Port rights
+ *  are not transferred, just the port name.)
+ */
+
+#define MACH_MSG_TYPE_PORT_NONE         0
+
+#define MACH_MSG_TYPE_PORT_NAME         15
+#define MACH_MSG_TYPE_PORT_RECEIVE      MACH_MSG_TYPE_MOVE_RECEIVE
+#define MACH_MSG_TYPE_PORT_SEND         MACH_MSG_TYPE_MOVE_SEND
+#define MACH_MSG_TYPE_PORT_SEND_ONCE    MACH_MSG_TYPE_MOVE_SEND_ONCE
+
+#define MACH_MSG_TYPE_LAST              22              /* Last assigned */
+
+/*
+ *  A dummy value.  Mostly used to indicate that the actual value
+ *  will be filled in later, dynamically.
+ */
+
+#define MACH_MSG_TYPE_POLYMORPHIC       ((mach_msg_type_name_t) -1)
+
+/*
+ *	Is a given item a port type?
+ */
+
+#define MACH_MSG_TYPE_PORT_ANY(x)                       \
+	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) &&         \
+	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE))
+
+#define MACH_MSG_TYPE_PORT_ANY_SEND(x)                  \
+	(((x) >= MACH_MSG_TYPE_MOVE_SEND) &&            \
+	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE))
+
+#define MACH_MSG_TYPE_PORT_ANY_RIGHT(x)                 \
+	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) &&         \
+	 ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE))
+
+typedef integer_t mach_msg_option_t;
+
+#define MACH_MSG_OPTION_NONE    0x00000000
+
+#define MACH_SEND_MSG           0x00000001
+#define MACH_RCV_MSG            0x00000002
+
+#define MACH_RCV_LARGE          0x00000004      /* report large message sizes */
+#define MACH_RCV_LARGE_IDENTITY 0x00000008      /* identify source of large messages */
+
+#define MACH_SEND_TIMEOUT       0x00000010      /* timeout value applies to send */
+#define MACH_SEND_OVERRIDE      0x00000020      /* priority override for send */
+#define MACH_SEND_INTERRUPT     0x00000040      /* don't restart interrupted sends */
+#define MACH_SEND_NOTIFY        0x00000080      /* arm send-possible notify */
+#define MACH_SEND_ALWAYS        0x00010000      /* ignore qlimits - kernel only */
+#define MACH_SEND_TRAILER       0x00020000      /* sender-provided trailer */
+#define MACH_SEND_NOIMPORTANCE  0x00040000      /* msg won't carry importance */
+#define MACH_SEND_NODENAP       MACH_SEND_NOIMPORTANCE
+#define MACH_SEND_IMPORTANCE    0x00080000      /* msg carries importance - kernel only */
+#define MACH_SEND_SYNC_OVERRIDE 0x00100000      /* msg should do sync ipc override */
+#define MACH_SEND_PROPAGATE_QOS 0x00200000      /* IPC should propagate the caller's QoS */
+#define MACH_SEND_SYNC_USE_THRPRI       MACH_SEND_PROPAGATE_QOS /* obsolete name */
+#define MACH_SEND_KERNEL        0x00400000      /* full send from kernel space - kernel only */
+#define MACH_SEND_SYNC_BOOTSTRAP_CHECKIN  0x00800000      /* special reply port should boost thread doing sync bootstrap checkin */
+
+#define MACH_RCV_TIMEOUT        0x00000100      /* timeout value applies to receive */
+#define MACH_RCV_NOTIFY         0x00000000      /* legacy name (value was: 0x00000200) */
+#define MACH_RCV_INTERRUPT      0x00000400      /* don't restart interrupted receive */
+#define MACH_RCV_VOUCHER        0x00000800      /* willing to receive voucher port */
+#define MACH_RCV_OVERWRITE      0x00000000      /* scatter receive (deprecated) */
+#define MACH_RCV_GUARDED_DESC   0x00001000      /* Can receive new guarded descriptor */
+#define MACH_RCV_SYNC_WAIT      0x00004000      /* sync waiter waiting for rcv */
+#define MACH_RCV_SYNC_PEEK      0x00008000      /* sync waiter waiting to peek */
+
+#define MACH_MSG_STRICT_REPLY   0x00000200      /* Enforce specific properties about the reply port, and
+	                                         * the context in which a thread replies to a message.
+	                                         * This flag must be passed on both the SEND and RCV */
+
+
+/*
+ * NOTE: a 0x00------ RCV mask implies to ask for
+ * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements,
+ * which is equivalent to a mach_msg_trailer_t.
+ *
+ * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS
+ * needs its own private bit since we only calculate its fields when absolutely
+ * required.
+ */
+#define MACH_RCV_TRAILER_NULL   0
+#define MACH_RCV_TRAILER_SEQNO  1
+#define MACH_RCV_TRAILER_SENDER 2
+#define MACH_RCV_TRAILER_AUDIT  3
+#define MACH_RCV_TRAILER_CTX    4
+#define MACH_RCV_TRAILER_AV     7
+#define MACH_RCV_TRAILER_LABELS 8
+
+#define MACH_RCV_TRAILER_TYPE(x)     (((x) & 0xf) << 28)
+#define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24)
+#define MACH_RCV_TRAILER_MASK        ((0xf << 24))
+
+#define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf)
+
+
+/*
+ * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS,
+ * we just fall through to mach_msg_max_trailer_t.
+ * This is correct behavior since mach_msg_max_trailer_t is defined as
+ * mac_msg_mac_trailer_t which is used for the LABELS trailer.
+ * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed
+ * with one of the other options.
+ */
+
+#define REQUESTED_TRAILER_SIZE_NATIVE(y)                        \
+	((mach_msg_trailer_size_t)                              \
+	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ?      \
+	  sizeof(mach_msg_trailer_t) :                          \
+	  ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ?    \
+	   sizeof(mach_msg_seqno_trailer_t) :                   \
+	  ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ?   \
+	   sizeof(mach_msg_security_trailer_t) :                \
+	   ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ?   \
+	    sizeof(mach_msg_audit_trailer_t) :                  \
+	    ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ?    \
+	     sizeof(mach_msg_context_trailer_t) :               \
+	     ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ?    \
+	      sizeof(mach_msg_mac_trailer_t) :                  \
+	     sizeof(mach_msg_max_trailer_t))))))))
+
+
+#define REQUESTED_TRAILER_SIZE(y) REQUESTED_TRAILER_SIZE_NATIVE(y)
+
+/*
+ *  Much code assumes that mach_msg_return_t == kern_return_t.
+ *  This definition is useful for descriptive purposes.
+ *
+ *  See <mach/error.h> for the format of error codes.
+ *  IPC errors are system 4.  Send errors are subsystem 0;
+ *  receive errors are subsystem 1.  The code field is always non-zero.
+ *  The high bits of the code field communicate extra information
+ *  for some error codes.  MACH_MSG_MASK masks off these special bits.
+ */
+
+typedef kern_return_t mach_msg_return_t;
+
+#define MACH_MSG_SUCCESS                0x00000000
+
+
+#define MACH_MSG_MASK                   0x00003e00
+/* All special error code bits defined below. */
+#define MACH_MSG_IPC_SPACE              0x00002000
+/* No room in IPC name space for another capability name. */
+#define MACH_MSG_VM_SPACE               0x00001000
+/* No room in VM address space for out-of-line memory. */
+#define MACH_MSG_IPC_KERNEL             0x00000800
+/* Kernel resource shortage handling an IPC capability. */
+#define MACH_MSG_VM_KERNEL              0x00000400
+/* Kernel resource shortage handling out-of-line memory. */
+
+#define MACH_SEND_IN_PROGRESS           0x10000001
+/* Thread is waiting to send.  (Internal use only.) */
+#define MACH_SEND_INVALID_DATA          0x10000002
+/* Bogus in-line data. */
+#define MACH_SEND_INVALID_DEST          0x10000003
+/* Bogus destination port. */
+#define MACH_SEND_TIMED_OUT             0x10000004
+/* Message not sent before timeout expired. */
+#define MACH_SEND_INVALID_VOUCHER       0x10000005
+/* Bogus voucher port. */
+#define MACH_SEND_INTERRUPTED           0x10000007
+/* Software interrupt. */
+#define MACH_SEND_MSG_TOO_SMALL         0x10000008
+/* Data doesn't contain a complete message. */
+#define MACH_SEND_INVALID_REPLY         0x10000009
+/* Bogus reply port. */
+#define MACH_SEND_INVALID_RIGHT         0x1000000a
+/* Bogus port rights in the message body. */
+#define MACH_SEND_INVALID_NOTIFY        0x1000000b
+/* Bogus notify port argument. */
+#define MACH_SEND_INVALID_MEMORY        0x1000000c
+/* Invalid out-of-line memory pointer. */
+#define MACH_SEND_NO_BUFFER             0x1000000d
+/* No message buffer is available. */
+#define MACH_SEND_TOO_LARGE             0x1000000e
+/* Send is too large for port */
+#define MACH_SEND_INVALID_TYPE          0x1000000f
+/* Invalid msg-type specification. */
+#define MACH_SEND_INVALID_HEADER        0x10000010
+/* A field in the header had a bad value. */
+#define MACH_SEND_INVALID_TRAILER       0x10000011
+/* The trailer to be sent does not match kernel format. */
+#define MACH_SEND_INVALID_CONTEXT       0x10000012
+/* The sending thread context did not match the context on the dest port */
+#define MACH_SEND_INVALID_RT_OOL_SIZE   0x10000015
+/* compatibility: no longer a returned error */
+#define MACH_SEND_NO_GRANT_DEST         0x10000016
+/* The destination port doesn't accept ports in body */
+#define MACH_SEND_MSG_FILTERED          0x10000017
+/* Message send was rejected by message filter */
+
+#define MACH_RCV_IN_PROGRESS            0x10004001
+/* Thread is waiting for receive.  (Internal use only.) */
+#define MACH_RCV_INVALID_NAME           0x10004002
+/* Bogus name for receive port/port-set. */
+#define MACH_RCV_TIMED_OUT              0x10004003
+/* Didn't get a message within the timeout value. */
+#define MACH_RCV_TOO_LARGE              0x10004004
+/* Message buffer is not large enough for inline data. */
+#define MACH_RCV_INTERRUPTED            0x10004005
+/* Software interrupt. */
+#define MACH_RCV_PORT_CHANGED           0x10004006
+/* compatibility: no longer a returned error */
+#define MACH_RCV_INVALID_NOTIFY         0x10004007
+/* Bogus notify port argument. */
+#define MACH_RCV_INVALID_DATA           0x10004008
+/* Bogus message buffer for inline data. */
+#define MACH_RCV_PORT_DIED              0x10004009
+/* Port/set was sent away/died during receive. */
+#define MACH_RCV_IN_SET                 0x1000400a
+/* compatibility: no longer a returned error */
+#define MACH_RCV_HEADER_ERROR           0x1000400b
+/* Error receiving message header.  See special bits. */
+#define MACH_RCV_BODY_ERROR             0x1000400c
+/* Error receiving message body.  See special bits. */
+#define MACH_RCV_INVALID_TYPE           0x1000400d
+/* Invalid msg-type specification in scatter list. */
+#define MACH_RCV_SCATTER_SMALL          0x1000400e
+/* Out-of-line overwrite region is not large enough */
+#define MACH_RCV_INVALID_TRAILER        0x1000400f
+/* trailer type or number of trailer elements not supported */
+#define MACH_RCV_IN_PROGRESS_TIMED      0x10004011
+/* Waiting for receive with timeout. (Internal use only.) */
+#define MACH_RCV_INVALID_REPLY          0x10004012
+/* invalid reply port used in a STRICT_REPLY message */
+
+
+
+__BEGIN_DECLS
+
+/*
+ *	Routine:	mach_msg_overwrite
+ *	Purpose:
+ *		Send and/or receive a message.  If the message operation
+ *		is interrupted, and the user did not request an indication
+ *		of that fact, then restart the appropriate parts of the
+ *		operation silently (trap version does not restart).
+ *
+ *		Distinct send and receive buffers may be specified.  If
+ *		no separate receive buffer is specified, the msg parameter
+ *		will be used for both send and receive operations.
+ *
+ *		In addition to a distinct receive buffer, that buffer may
+ *		already contain scatter control information to direct the
+ *		receiving of the message.
+ */
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg_overwrite(
+	mach_msg_header_t *msg,
+	mach_msg_option_t option,
+	mach_msg_size_t send_size,
+	mach_msg_size_t rcv_size,
+	mach_port_name_t rcv_name,
+	mach_msg_timeout_t timeout,
+	mach_port_name_t notify,
+	mach_msg_header_t *rcv_msg,
+	mach_msg_size_t rcv_limit);
+
+
+/*
+ *	Routine:	mach_msg
+ *	Purpose:
+ *		Send and/or receive a message.  If the message operation
+ *		is interrupted, and the user did not request an indication
+ *		of that fact, then restart the appropriate parts of the
+ *		operation silently (trap version does not restart).
+ */
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern mach_msg_return_t        mach_msg(
+	mach_msg_header_t *msg,
+	mach_msg_option_t option,
+	mach_msg_size_t send_size,
+	mach_msg_size_t rcv_size,
+	mach_port_name_t rcv_name,
+	mach_msg_timeout_t timeout,
+	mach_port_name_t notify);
+
+/*
+ *	Routine:	mach_voucher_deallocate
+ *	Purpose:
+ *		Deallocate a mach voucher created or received in a message.  Drops
+ *		one (send right) reference to the voucher.
+ */
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+extern kern_return_t            mach_voucher_deallocate(
+	mach_port_name_t voucher);
+
+
+__END_DECLS
+
+#endif  /* _MACH_MESSAGE_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/mig.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+/*
+ * Mach MIG Subsystem Interfaces
+ */
+
+#ifndef _MACH_MIG_H_
+#define _MACH_MIG_H_
+
+#include <stdint.h>
+#include <mach/port.h>
+#include <mach/message.h>
+#include <mach/vm_types.h>
+
+#include <sys/cdefs.h>
+
+#if defined(MACH_KERNEL)
+
+#if !defined(__MigTypeCheck)
+/* Turn MIG type checking on by default for kernel */
+#define __MigTypeCheck 1
+#endif
+
+#define __MigKernelSpecificCode 1
+#define _MIG_KERNEL_SPECIFIC_CODE_ 1
+
+#elif !defined(__MigTypeCheck)
+
+#if defined(TypeCheck)
+/* use legacy setting (temporary) */
+#define __MigTypeCheck TypeCheck
+#else
+/* default MIG type checking on */
+#define __MigTypeCheck 1
+#endif
+
+#endif /* !defined(MACH_KERNEL) && !defined(__MigTypeCheck) */
+
+/*
+ * Pack MIG message structs.
+ * This is an indicator of the need to view shared structs in a
+ * binary-compatible format - and MIG message structs are no different.
+ */
+#define __MigPackStructs 1
+
+/*
+ * Definition for MIG-generated server stub routines.  These routines
+ * unpack the request message, call the server procedure, and pack the
+ * reply message.
+ */
+typedef void    (*mig_stub_routine_t) (mach_msg_header_t *InHeadP,
+    mach_msg_header_t *OutHeadP);
+
+typedef mig_stub_routine_t mig_routine_t;
+
+/*
+ * Definition for MIG-generated server routine.  This routine takes a
+ * message, and returns the appropriate stub function for handling that
+ * message.
+ */
+typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP);
+
+/*
+ * Generic definition for implementation routines.  These routines do
+ * the real work associated with this request.  This generic type is
+ * used for keeping the pointers in the subsystem array.
+ */
+typedef kern_return_t   (*mig_impl_routine_t)(void);
+
+typedef mach_msg_type_descriptor_t routine_arg_descriptor;
+typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t;
+typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t;
+
+#define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0)
+
+struct routine_descriptor {
+	mig_impl_routine_t      impl_routine;   /* Server work func pointer   */
+	mig_stub_routine_t      stub_routine;   /* Unmarshalling func pointer */
+	unsigned int            argc;                   /* Number of argument words   */
+	unsigned int            descr_count;    /* Number complex descriptors */
+	routine_arg_descriptor_t
+	    arg_descr;                                                  /* pointer to descriptor array*/
+	unsigned int            max_reply_msg;  /* Max size for reply msg     */
+};
+typedef struct routine_descriptor *routine_descriptor_t;
+
+typedef struct routine_descriptor mig_routine_descriptor;
+typedef mig_routine_descriptor *mig_routine_descriptor_t;
+
+#define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0)
+
+typedef struct mig_subsystem {
+	mig_server_routine_t server;            /* pointer to demux routine	*/
+	mach_msg_id_t            start;                 /* Min routine number	    */
+	mach_msg_id_t            end;                   /* Max routine number + 1   */
+	mach_msg_size_t          maxsize;               /* Max reply message size   */
+	vm_address_t             reserved;              /* reserved for MIG use	    */
+	mig_routine_descriptor
+	    routine[1];                                         /* Routine descriptor array */
+} *mig_subsystem_t;
+
+#define MIG_SUBSYSTEM_NULL              ((mig_subsystem_t)0)
+
+typedef struct mig_symtab {
+	char                            *ms_routine_name;
+	int                                     ms_routine_number;
+	void                            (*ms_routine)(void);    /* Since the functions in the
+	                                                         * symbol table have unknown
+	                                                         * signatures, this is the best
+	                                                         * we can do...
+	                                                         */
+} mig_symtab_t;
+
+/*
+ * A compiler attribute for annotating all MIG server routines and other
+ * functions that should behave similarly.  Allows the compiler to perform
+ * additional static bug-finding over them.
+ */
+#if __has_attribute(mig_server_routine)
+#define MIG_SERVER_ROUTINE __attribute__((mig_server_routine))
+#else
+#define MIG_SERVER_ROUTINE
+#endif
+
+
+__BEGIN_DECLS
+
+/* Client side reply port allocate */
+extern mach_port_t mig_get_reply_port(void);
+
+/* Client side reply port deallocate */
+extern void mig_dealloc_reply_port(mach_port_t reply_port);
+
+/* Client side reply port "deallocation" */
+extern void mig_put_reply_port(mach_port_t reply_port);
+
+/* Bounded string copy */
+extern int mig_strncpy(char     *dest, const char *src, int     len);
+extern int mig_strncpy_zerofill(char    *dest, const char *src, int     len);
+
+
+/* Allocate memory for out-of-line mig structures */
+extern void mig_allocate(vm_address_t *, vm_size_t);
+
+/* Deallocate memory used for out-of-line mig structures */
+extern void mig_deallocate(vm_address_t, vm_size_t);
+
+
+__END_DECLS
+
+#endif  /* _MACH_MIG_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/port.h
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ * NOTICE: This file was modified by McAfee Research in 2004 to introduce
+ * support for mandatory and extensible security protections.  This notice
+ * is included in support of clause 2.2 (b) of the Apple Public License,
+ * Version 2.0.
+ */
+/*
+ */
+/*
+ *	File:	mach/port.h
+ *
+ *	Definition of a Mach port
+ *
+ *	Mach ports are the endpoints to Mach-implemented communications
+ *	channels (usually uni-directional message queues, but other types
+ *	also exist).
+ *
+ *	Unique collections of these endpoints are maintained for each
+ *	Mach task.  Each Mach port in the task's collection is given a
+ *	[task-local] name to identify it - and the the various "rights"
+ *	held by the task for that specific endpoint.
+ *
+ *	This header defines the types used to identify these Mach ports
+ *	and the various rights associated with them.  For more info see:
+ *
+ *	<mach/mach_port.h> - manipulation of port rights in a given space
+ *	<mach/message.h> - message queue [and port right passing] mechanism
+ *
+ */
+
+#ifndef _MACH_PORT_H_
+#define _MACH_PORT_H_
+
+#include <sys/cdefs.h>
+#include <stdint.h>
+#include <mach/boolean.h>
+#include <mach/machine/vm_types.h>
+
+/*
+ *	mach_port_name_t - the local identity for a Mach port
+ *
+ *	The name is Mach port namespace specific.  It is used to
+ *	identify the rights held for that port by the task whose
+ *	namespace is implied [or specifically provided].
+ *
+ *	Use of this type usually implies just a name - no rights.
+ *	See mach_port_t for a type that implies a "named right."
+ *
+ */
+
+typedef natural_t mach_port_name_t;
+typedef mach_port_name_t *mach_port_name_array_t;
+
+
+/*
+ *	mach_port_t - a named port right
+ *
+ *	In user-space, "rights" are represented by the name of the
+ *	right in the Mach port namespace.  Even so, this type is
+ *	presented as a unique one to more clearly denote the presence
+ *	of a right coming along with the name.
+ *
+ *	Often, various rights for a port held in a single name space
+ *	will coalesce and are, therefore, be identified by a single name
+ *	[this is the case for send and receive rights].  But not
+ *	always [send-once rights currently get a unique name for
+ *	each right].
+ *
+ */
+
+#include <sys/_types.h>
+#include <sys/_types/_mach_port_t.h>
+
+
+typedef mach_port_t                     *mach_port_array_t;
+
+/*
+ *  MACH_PORT_NULL is a legal value that can be carried in messages.
+ *  It indicates the absence of any port or port rights.  (A port
+ *  argument keeps the message from being "simple", even if the
+ *  value is MACH_PORT_NULL.)  The value MACH_PORT_DEAD is also a legal
+ *  value that can be carried in messages.  It indicates
+ *  that a port right was present, but it died.
+ */
+
+#define MACH_PORT_NULL          0  /* intentional loose typing */
+#define MACH_PORT_DEAD          ((mach_port_name_t) ~0)
+#define MACH_PORT_VALID(name)                           \
+	        (((name) != MACH_PORT_NULL) &&          \
+	         ((name) != MACH_PORT_DEAD))
+
+
+/*
+ *	For kernel-selected [assigned] port names, the name is
+ *	comprised of two parts: a generation number and an index.
+ *	This approach keeps the exact same name from being generated
+ *	and reused too quickly [to catch right/reference counting bugs].
+ *	The dividing line between the constituent parts is exposed so
+ *	that efficient "mach_port_name_t to data structure pointer"
+ *	conversion implementation can be made.  But it is possible
+ *	for user-level code to assign their own names to Mach ports.
+ *	These are not required to participate in this algorithm.  So
+ *	care should be taken before "assuming" this model.
+ *
+ */
+
+#ifndef NO_PORT_GEN
+
+#define MACH_PORT_INDEX(name)           ((name) >> 8)
+#define MACH_PORT_GEN(name)             (((name) & 0xff) << 24)
+#define MACH_PORT_MAKE(index, gen)      \
+	        (((index) << 8) | (gen) >> 24)
+
+#else   /* NO_PORT_GEN */
+
+#define MACH_PORT_INDEX(name)           (name)
+#define MACH_PORT_GEN(name)             (0)
+#define MACH_PORT_MAKE(index, gen)      (index)
+
+#endif  /* NO_PORT_GEN */
+
+
+/*
+ *  These are the different rights a task may have for a port.
+ *  The MACH_PORT_RIGHT_* definitions are used as arguments
+ *  to mach_port_allocate, mach_port_get_refs, etc, to specify
+ *  a particular right to act upon.  The mach_port_names and
+ *  mach_port_type calls return bitmasks using the MACH_PORT_TYPE_*
+ *  definitions.  This is because a single name may denote
+ *  multiple rights.
+ */
+
+typedef natural_t mach_port_right_t;
+
+#define MACH_PORT_RIGHT_SEND            ((mach_port_right_t) 0)
+#define MACH_PORT_RIGHT_RECEIVE         ((mach_port_right_t) 1)
+#define MACH_PORT_RIGHT_SEND_ONCE       ((mach_port_right_t) 2)
+#define MACH_PORT_RIGHT_PORT_SET        ((mach_port_right_t) 3)
+#define MACH_PORT_RIGHT_DEAD_NAME       ((mach_port_right_t) 4)
+#define MACH_PORT_RIGHT_LABELH          ((mach_port_right_t) 5) /* obsolete right */
+#define MACH_PORT_RIGHT_NUMBER          ((mach_port_right_t) 6) /* right not implemented */
+
+
+typedef natural_t mach_port_type_t;
+typedef mach_port_type_t *mach_port_type_array_t;
+
+#define MACH_PORT_TYPE(right)                                           \
+	        ((mach_port_type_t)(((mach_port_type_t) 1)              \
+	        << ((right) + ((mach_port_right_t) 16))))
+#define MACH_PORT_TYPE_NONE         ((mach_port_type_t) 0L)
+#define MACH_PORT_TYPE_SEND         MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND)
+#define MACH_PORT_TYPE_RECEIVE      MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE)
+#define MACH_PORT_TYPE_SEND_ONCE    MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE)
+#define MACH_PORT_TYPE_PORT_SET     MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET)
+#define MACH_PORT_TYPE_DEAD_NAME    MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME)
+#define MACH_PORT_TYPE_LABELH       MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) /* obsolete */
+
+
+/* Convenient combinations. */
+
+#define MACH_PORT_TYPE_SEND_RECEIVE                                     \
+	        (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE)
+#define MACH_PORT_TYPE_SEND_RIGHTS                                      \
+	        (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE)
+#define MACH_PORT_TYPE_PORT_RIGHTS                                      \
+	        (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE)
+#define MACH_PORT_TYPE_PORT_OR_DEAD                                     \
+	        (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME)
+#define MACH_PORT_TYPE_ALL_RIGHTS                                       \
+	        (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET)
+
+/* Dummy type bits that mach_port_type/mach_port_names can return. */
+
+#define MACH_PORT_TYPE_DNREQUEST                0x80000000
+#define MACH_PORT_TYPE_SPREQUEST                0x40000000
+#define MACH_PORT_TYPE_SPREQUEST_DELAYED        0x20000000
+
+/* User-references for capabilities. */
+
+typedef natural_t mach_port_urefs_t;
+typedef integer_t mach_port_delta_t;                    /* change in urefs */
+
+/* Attributes of ports.  (See mach_port_get_receive_status.) */
+
+typedef natural_t mach_port_seqno_t;            /* sequence number */
+typedef natural_t mach_port_mscount_t;          /* make-send count */
+typedef natural_t mach_port_msgcount_t;         /* number of msgs */
+typedef natural_t mach_port_rights_t;           /* number of rights */
+
+/*
+ *	Are there outstanding send rights for a given port?
+ */
+#define MACH_PORT_SRIGHTS_NONE          0               /* no srights */
+#define MACH_PORT_SRIGHTS_PRESENT       1               /* srights */
+typedef unsigned int mach_port_srights_t;       /* status of send rights */
+
+typedef struct mach_port_status {
+	mach_port_rights_t      mps_pset;       /* count of containing port sets */
+	mach_port_seqno_t       mps_seqno;      /* sequence number */
+	mach_port_mscount_t     mps_mscount;    /* make-send count */
+	mach_port_msgcount_t    mps_qlimit;     /* queue limit */
+	mach_port_msgcount_t    mps_msgcount;   /* number in the queue */
+	mach_port_rights_t      mps_sorights;   /* how many send-once rights */
+	boolean_t               mps_srights;    /* do send rights exist? */
+	boolean_t               mps_pdrequest;  /* port-deleted requested? */
+	boolean_t               mps_nsrequest;  /* no-senders requested? */
+	natural_t               mps_flags;              /* port flags */
+} mach_port_status_t;
+
+/* System-wide values for setting queue limits on a port */
+#define MACH_PORT_QLIMIT_ZERO           (0)
+#define MACH_PORT_QLIMIT_BASIC          (5)
+#define MACH_PORT_QLIMIT_SMALL          (16)
+#define MACH_PORT_QLIMIT_LARGE          (1024)
+#define MACH_PORT_QLIMIT_KERNEL         (65534)
+#define MACH_PORT_QLIMIT_MIN            MACH_PORT_QLIMIT_ZERO
+#define MACH_PORT_QLIMIT_DEFAULT        MACH_PORT_QLIMIT_BASIC
+#define MACH_PORT_QLIMIT_MAX            MACH_PORT_QLIMIT_LARGE
+
+typedef struct mach_port_limits {
+	mach_port_msgcount_t    mpl_qlimit;     /* number of msgs */
+} mach_port_limits_t;
+
+/* Possible values for mps_flags (part of mach_port_status_t) */
+#define MACH_PORT_STATUS_FLAG_TEMPOWNER         0x01
+#define MACH_PORT_STATUS_FLAG_GUARDED           0x02
+#define MACH_PORT_STATUS_FLAG_STRICT_GUARD      0x04
+#define MACH_PORT_STATUS_FLAG_IMP_DONATION      0x08
+#define MACH_PORT_STATUS_FLAG_REVIVE            0x10
+#define MACH_PORT_STATUS_FLAG_TASKPTR           0x20
+#define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40
+#define MACH_PORT_STATUS_FLAG_NO_GRANT          0x80
+
+typedef struct mach_port_info_ext {
+	mach_port_status_t      mpie_status;
+	mach_port_msgcount_t    mpie_boost_cnt;
+	uint32_t                reserved[6];
+} mach_port_info_ext_t;
+
+typedef integer_t *mach_port_info_t;            /* varying array of natural_t */
+
+/* Flavors for mach_port_get/set_attributes() */
+typedef int     mach_port_flavor_t;
+#define MACH_PORT_LIMITS_INFO           1       /* uses mach_port_limits_t */
+#define MACH_PORT_RECEIVE_STATUS        2       /* uses mach_port_status_t */
+#define MACH_PORT_DNREQUESTS_SIZE       3       /* info is int */
+#define MACH_PORT_TEMPOWNER             4       /* indicates receive right will be reassigned to another task */
+#define MACH_PORT_IMPORTANCE_RECEIVER   5       /* indicates recieve right accepts priority donation */
+#define MACH_PORT_DENAP_RECEIVER        6       /* indicates receive right accepts de-nap donation */
+#define MACH_PORT_INFO_EXT              7       /* uses mach_port_info_ext_t */
+
+#define MACH_PORT_LIMITS_INFO_COUNT     ((natural_t) \
+	(sizeof(mach_port_limits_t)/sizeof(natural_t)))
+#define MACH_PORT_RECEIVE_STATUS_COUNT  ((natural_t) \
+	(sizeof(mach_port_status_t)/sizeof(natural_t)))
+#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1
+#define MACH_PORT_INFO_EXT_COUNT        ((natural_t) \
+	(sizeof(mach_port_info_ext_t)/sizeof(natural_t)))
+/*
+ * Structure used to pass information about port allocation requests.
+ * Must be padded to 64-bits total length.
+ */
+typedef struct mach_port_qos {
+	unsigned int            name:1;         /* name given */
+	unsigned int            prealloc:1;     /* prealloced message */
+	boolean_t               pad1:30;
+	natural_t               len;
+} mach_port_qos_t;
+
+/* Mach Port Guarding definitions */
+
+/*
+ * Flags for mach_port_options (used for
+ * invocation of mach_port_construct).
+ * Indicates attributes to be set for the newly
+ * allocated port.
+ */
+#define MPO_CONTEXT_AS_GUARD    0x01    /* Add guard to the port */
+#define MPO_QLIMIT              0x02    /* Set qlimit for the port msg queue */
+#define MPO_TEMPOWNER           0x04    /* Set the tempowner bit of the port */
+#define MPO_IMPORTANCE_RECEIVER 0x08    /* Mark the port as importance receiver */
+#define MPO_INSERT_SEND_RIGHT   0x10    /* Insert a send right for the port */
+#define MPO_STRICT              0x20    /* Apply strict guarding for port */
+#define MPO_DENAP_RECEIVER      0x40    /* Mark the port as App de-nap receiver */
+#define MPO_IMMOVABLE_RECEIVE   0x80    /* Mark the port as immovable; protected by the guard context */
+#define MPO_FILTER_MSG          0x100   /* Allow message filtering */
+#define MPO_TG_BLOCK_TRACKING   0x200   /* Track blocking relationship for thread group during sync IPC */
+
+/*
+ * Structure to define optional attributes for a newly
+ * constructed port.
+ */
+typedef struct mach_port_options {
+	uint32_t                flags;          /* Flags defining attributes for port */
+	mach_port_limits_t      mpl;            /* Message queue limit for port */
+	union {
+		uint64_t                reserved[2];           /* Reserved */
+		mach_port_name_t        work_interval_port;    /* Work interval port */
+	};
+}mach_port_options_t;
+
+typedef mach_port_options_t *mach_port_options_ptr_t;
+
+/*
+ * EXC_GUARD represents a guard violation for both
+ * mach ports and file descriptors. GUARD_TYPE_ is used
+ * to differentiate among them.
+ */
+#define GUARD_TYPE_MACH_PORT    0x1
+
+/* Reasons for exception for a guarded mach port */
+enum mach_port_guard_exception_codes {
+	kGUARD_EXC_DESTROY                       = 1u << 0,
+	kGUARD_EXC_MOD_REFS                      = 1u << 1,
+	kGUARD_EXC_SET_CONTEXT               = 1u << 2,
+	kGUARD_EXC_UNGUARDED                 = 1u << 3,
+	kGUARD_EXC_INCORRECT_GUARD           = 1u << 4,
+	kGUARD_EXC_IMMOVABLE                 = 1u << 5,
+	kGUARD_EXC_STRICT_REPLY              = 1u << 6,
+	kGUARD_EXC_MSG_FILTERED              = 1u << 7,
+	/* start of [optionally] non-fatal guards */
+	kGUARD_EXC_INVALID_RIGHT         = 1u << 8,
+	kGUARD_EXC_INVALID_NAME          = 1u << 9,
+	kGUARD_EXC_INVALID_VALUE         = 1u << 10,
+	kGUARD_EXC_INVALID_ARGUMENT      = 1u << 11,
+	kGUARD_EXC_RIGHT_EXISTS          = 1u << 12,
+	kGUARD_EXC_KERN_NO_SPACE         = 1u << 13,
+	kGUARD_EXC_KERN_FAILURE          = 1u << 14,
+	kGUARD_EXC_KERN_RESOURCE         = 1u << 15,
+	kGUARD_EXC_SEND_INVALID_REPLY    = 1u << 16,
+	kGUARD_EXC_SEND_INVALID_VOUCHER  = 1u << 17,
+	kGUARD_EXC_SEND_INVALID_RIGHT    = 1u << 18,
+	kGUARD_EXC_RCV_INVALID_NAME      = 1u << 19,
+	kGUARD_EXC_RCV_GUARDED_DESC      = 1u << 20, /* should never be fatal; for development only */
+	kGUARD_EXC_MOD_REFS_NON_FATAL    = 1u << 21,
+	kGUARD_EXC_IMMOVABLE_NON_FATAL   = 1u << 22,
+};
+
+#define MAX_FATAL_kGUARD_EXC_CODE (1u << 7)
+
+/*
+ * Mach port guard flags.
+ */
+#define MPG_FLAGS_NONE                             (0x00ull)
+
+/*
+ * These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions.
+ */
+#define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP  (0x01ull << 56)
+#define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT  (0x02ull << 56)
+#define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER     (0x04ull << 56)
+#define MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR        (0x08ull << 56)
+#define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA  (0x10ull << 56)
+#define MPG_FLAGS_STRICT_REPLY_MASK                (0xffull << 56)
+
+/*
+ * These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions.
+ */
+#define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC          (0x01ull << 56)
+
+/*
+ * These flags are used as bits in the subcode of kGUARD_EXC_IMMOVABLE exceptions.
+ */
+#define MPG_FLAGS_IMMOVABLE_PINNED                 (0x01ull << 56)
+
+/*
+ * Flags for mach_port_guard_with_flags. These flags extend
+ * the attributes associated with a guarded port.
+ */
+#define MPG_STRICT              0x01    /* Apply strict guarding for a port */
+#define MPG_IMMOVABLE_RECEIVE   0x02    /* Receive right cannot be moved out of the space */
+
+#if     !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH)
+/*
+ *  Mach 3.0 renamed everything to have mach_ in front of it.
+ *  These types and macros are provided for backward compatibility
+ *	but are deprecated.
+ */
+typedef mach_port_t             port_t;
+typedef mach_port_name_t        port_name_t;
+typedef mach_port_name_t        *port_name_array_t;
+
+#define PORT_NULL               ((port_t) 0)
+#define PORT_DEAD               ((port_t) ~0)
+#define PORT_VALID(name) \
+	        ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD)
+
+#endif  /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */
+
+#endif  /* _MACH_PORT_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/processor.h
@@ -0,0 +1,360 @@
+#ifndef	_processor_user_
+#define	_processor_user_
+
+/* Module processor */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	processor_MSG_COUNT
+#define	processor_MSG_COUNT	6
+#endif	/* processor_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine processor_start */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_start
+(
+	processor_t processor
+);
+
+/* Routine processor_exit */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_exit
+(
+	processor_t processor
+);
+
+/* Routine processor_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_info
+(
+	processor_t processor,
+	processor_flavor_t flavor,
+	host_t *host,
+	processor_info_t processor_info_out,
+	mach_msg_type_number_t *processor_info_outCnt
+);
+
+/* Routine processor_control */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_control
+(
+	processor_t processor,
+	processor_info_t processor_cmd,
+	mach_msg_type_number_t processor_cmdCnt
+);
+
+/* Routine processor_assign */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_assign
+(
+	processor_t processor,
+	processor_set_t new_set,
+	boolean_t wait
+);
+
+/* Routine processor_get_assignment */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_get_assignment
+(
+	processor_t processor,
+	processor_set_name_t *assigned_set
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__processor_subsystem__defined
+#define __Request__processor_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_start_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_exit_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		processor_flavor_t flavor;
+		mach_msg_type_number_t processor_info_outCnt;
+	} __Request__processor_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_msg_type_number_t processor_cmdCnt;
+		integer_t processor_cmd[20];
+	} __Request__processor_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_set;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		boolean_t wait;
+	} __Request__processor_assign_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_get_assignment_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__processor_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__processor_subsystem__defined
+#define __RequestUnion__processor_subsystem__defined
+union __RequestUnion__processor_subsystem {
+	__Request__processor_start_t Request_processor_start;
+	__Request__processor_exit_t Request_processor_exit;
+	__Request__processor_info_t Request_processor_info;
+	__Request__processor_control_t Request_processor_control;
+	__Request__processor_assign_t Request_processor_assign;
+	__Request__processor_get_assignment_t Request_processor_get_assignment;
+};
+#endif /* !__RequestUnion__processor_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__processor_subsystem__defined
+#define __Reply__processor_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_start_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_exit_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t host;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t processor_info_outCnt;
+		integer_t processor_info_out[20];
+	} __Reply__processor_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_assign_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t assigned_set;
+		/* end of the kernel processed data */
+	} __Reply__processor_get_assignment_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__processor_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__processor_subsystem__defined
+#define __ReplyUnion__processor_subsystem__defined
+union __ReplyUnion__processor_subsystem {
+	__Reply__processor_start_t Reply_processor_start;
+	__Reply__processor_exit_t Reply_processor_exit;
+	__Reply__processor_info_t Reply_processor_info;
+	__Reply__processor_control_t Reply_processor_control;
+	__Reply__processor_assign_t Reply_processor_assign;
+	__Reply__processor_get_assignment_t Reply_processor_get_assignment;
+};
+#endif /* !__RequestUnion__processor_subsystem__defined */
+
+#ifndef subsystem_to_name_map_processor
+#define subsystem_to_name_map_processor \
+    { "processor_start", 3000 },\
+    { "processor_exit", 3001 },\
+    { "processor_info", 3002 },\
+    { "processor_control", 3003 },\
+    { "processor_assign", 3004 },\
+    { "processor_get_assignment", 3005 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _processor_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/processor_set.h
@@ -0,0 +1,585 @@
+#ifndef	_processor_set_user_
+#define	_processor_set_user_
+
+/* Module processor_set */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	processor_set_MSG_COUNT
+#define	processor_set_MSG_COUNT	11
+#endif	/* processor_set_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine processor_set_statistics */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_statistics
+(
+	processor_set_name_t pset,
+	processor_set_flavor_t flavor,
+	processor_set_info_t info_out,
+	mach_msg_type_number_t *info_outCnt
+);
+
+/* Routine processor_set_destroy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_destroy
+(
+	processor_set_t set
+);
+
+/* Routine processor_set_max_priority */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_max_priority
+(
+	processor_set_t processor_set,
+	int max_priority,
+	boolean_t change_threads
+);
+
+/* Routine processor_set_policy_enable */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_policy_enable
+(
+	processor_set_t processor_set,
+	int policy
+);
+
+/* Routine processor_set_policy_disable */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_policy_disable
+(
+	processor_set_t processor_set,
+	int policy,
+	boolean_t change_threads
+);
+
+/* Routine processor_set_tasks */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_tasks
+(
+	processor_set_t processor_set,
+	task_array_t *task_list,
+	mach_msg_type_number_t *task_listCnt
+);
+
+/* Routine processor_set_threads */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_threads
+(
+	processor_set_t processor_set,
+	thread_act_array_t *thread_list,
+	mach_msg_type_number_t *thread_listCnt
+);
+
+/* Routine processor_set_policy_control */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_policy_control
+(
+	processor_set_t pset,
+	processor_set_flavor_t flavor,
+	processor_set_info_t policy_info,
+	mach_msg_type_number_t policy_infoCnt,
+	boolean_t change
+);
+
+/* Routine processor_set_stack_usage */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_stack_usage
+(
+	processor_set_t pset,
+	unsigned *ltotal,
+	vm_size_t *space,
+	vm_size_t *resident,
+	vm_size_t *maxusage,
+	vm_offset_t *maxstack
+);
+
+/* Routine processor_set_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_info
+(
+	processor_set_name_t set_name,
+	int flavor,
+	host_t *host,
+	processor_set_info_t info_out,
+	mach_msg_type_number_t *info_outCnt
+);
+
+/* Routine processor_set_tasks_with_flavor */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t processor_set_tasks_with_flavor
+(
+	processor_set_t processor_set,
+	mach_task_flavor_t flavor,
+	task_array_t *task_list,
+	mach_msg_type_number_t *task_listCnt
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__processor_set_subsystem__defined
+#define __Request__processor_set_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		processor_set_flavor_t flavor;
+		mach_msg_type_number_t info_outCnt;
+	} __Request__processor_set_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int max_priority;
+		boolean_t change_threads;
+	} __Request__processor_set_max_priority_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int policy;
+	} __Request__processor_set_policy_enable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int policy;
+		boolean_t change_threads;
+	} __Request__processor_set_policy_disable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_tasks_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_threads_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		processor_set_flavor_t flavor;
+		mach_msg_type_number_t policy_infoCnt;
+		integer_t policy_info[5];
+		boolean_t change;
+	} __Request__processor_set_policy_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__processor_set_stack_usage_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int flavor;
+		mach_msg_type_number_t info_outCnt;
+	} __Request__processor_set_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_task_flavor_t flavor;
+	} __Request__processor_set_tasks_with_flavor_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__processor_set_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__processor_set_subsystem__defined
+#define __RequestUnion__processor_set_subsystem__defined
+union __RequestUnion__processor_set_subsystem {
+	__Request__processor_set_statistics_t Request_processor_set_statistics;
+	__Request__processor_set_destroy_t Request_processor_set_destroy;
+	__Request__processor_set_max_priority_t Request_processor_set_max_priority;
+	__Request__processor_set_policy_enable_t Request_processor_set_policy_enable;
+	__Request__processor_set_policy_disable_t Request_processor_set_policy_disable;
+	__Request__processor_set_tasks_t Request_processor_set_tasks;
+	__Request__processor_set_threads_t Request_processor_set_threads;
+	__Request__processor_set_policy_control_t Request_processor_set_policy_control;
+	__Request__processor_set_stack_usage_t Request_processor_set_stack_usage;
+	__Request__processor_set_info_t Request_processor_set_info;
+	__Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor;
+};
+#endif /* !__RequestUnion__processor_set_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__processor_set_subsystem__defined
+#define __Reply__processor_set_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t info_outCnt;
+		integer_t info_out[5];
+	} __Reply__processor_set_statistics_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_set_destroy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_set_max_priority_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_set_policy_enable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_set_policy_disable_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_ports_descriptor_t task_list;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t task_listCnt;
+	} __Reply__processor_set_tasks_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_ports_descriptor_t thread_list;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t thread_listCnt;
+	} __Reply__processor_set_threads_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__processor_set_policy_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		unsigned ltotal;
+		vm_size_t space;
+		vm_size_t resident;
+		vm_size_t maxusage;
+		vm_offset_t maxstack;
+	} __Reply__processor_set_stack_usage_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t host;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t info_outCnt;
+		integer_t info_out[5];
+	} __Reply__processor_set_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_ports_descriptor_t task_list;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t task_listCnt;
+	} __Reply__processor_set_tasks_with_flavor_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__processor_set_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__processor_set_subsystem__defined
+#define __ReplyUnion__processor_set_subsystem__defined
+union __ReplyUnion__processor_set_subsystem {
+	__Reply__processor_set_statistics_t Reply_processor_set_statistics;
+	__Reply__processor_set_destroy_t Reply_processor_set_destroy;
+	__Reply__processor_set_max_priority_t Reply_processor_set_max_priority;
+	__Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable;
+	__Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable;
+	__Reply__processor_set_tasks_t Reply_processor_set_tasks;
+	__Reply__processor_set_threads_t Reply_processor_set_threads;
+	__Reply__processor_set_policy_control_t Reply_processor_set_policy_control;
+	__Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage;
+	__Reply__processor_set_info_t Reply_processor_set_info;
+	__Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor;
+};
+#endif /* !__RequestUnion__processor_set_subsystem__defined */
+
+#ifndef subsystem_to_name_map_processor_set
+#define subsystem_to_name_map_processor_set \
+    { "processor_set_statistics", 4000 },\
+    { "processor_set_destroy", 4001 },\
+    { "processor_set_max_priority", 4002 },\
+    { "processor_set_policy_enable", 4003 },\
+    { "processor_set_policy_disable", 4004 },\
+    { "processor_set_tasks", 4005 },\
+    { "processor_set_threads", 4006 },\
+    { "processor_set_policy_control", 4007 },\
+    { "processor_set_stack_usage", 4008 },\
+    { "processor_set_info", 4009 },\
+    { "processor_set_tasks_with_flavor", 4010 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _processor_set_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/sync_policy.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+#ifndef _MACH_SYNC_POLICY_H_
+#define _MACH_SYNC_POLICY_H_
+
+typedef int sync_policy_t;
+
+/*
+ *	These options define the wait ordering of the synchronizers
+ */
+#define SYNC_POLICY_FIFO                0x0
+#define SYNC_POLICY_FIXED_PRIORITY      0x1
+#define SYNC_POLICY_REVERSED            0x2
+#define SYNC_POLICY_ORDER_MASK          0x3
+#define SYNC_POLICY_LIFO                (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED)
+
+
+#define SYNC_POLICY_MAX                 0x7
+
+#endif  /* _MACH_SYNC_POLICY_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/task.h
@@ -49,10 +49,9 @@ typedef function_table_entry   *function_table_t;
 #endif /* AUTOTEST */
 
 #ifndef	task_MSG_COUNT
-#define	task_MSG_COUNT	63
+#define	task_MSG_COUNT	61
 #endif	/* task_MSG_COUNT */
 
-#include <Availability.h>
 #include <mach/std_types.h>
 #include <mach/mig.h>
 #include <mach/mig.h>
@@ -112,7 +111,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t mach_ports_register
 (
 	task_t target_task,
@@ -126,7 +126,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t mach_ports_lookup
 (
 	task_t target_task,
@@ -154,7 +155,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_info
 (
 	task_t target_task,
@@ -169,7 +171,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_suspend
 (
 	task_read_t target_task
@@ -181,7 +184,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_resume
 (
 	task_read_t target_task
@@ -193,7 +197,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_get_special_port
 (
 	task_inspect_t task,
@@ -207,7 +212,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_special_port
 (
 	task_t task,
@@ -221,7 +227,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t thread_create
 (
 	task_t parent_task,
@@ -234,7 +241,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t thread_create_running
 (
 	task_t parent_task,
@@ -250,7 +258,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_exception_ports
 (
 	task_t task,
@@ -266,7 +275,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_get_exception_ports
 (
 	task_t task,
@@ -284,7 +294,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_swap_exception_ports
 (
 	task_t task,
@@ -357,7 +368,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_policy_set
 (
 	task_policy_set_t task,
@@ -372,7 +384,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_policy_get
 (
 	task_policy_get_t task,
@@ -470,7 +483,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_zone_info
 (
 	task_inspect_t target_task,
@@ -541,7 +555,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_get_state
 (
 	task_read_t task,
@@ -556,7 +571,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_state
 (
 	task_t task,
@@ -571,7 +587,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_phys_footprint_limit
 (
 	task_t task,
@@ -585,7 +602,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_suspend2
 (
 	task_read_t target_task,
@@ -598,7 +616,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_resume2
 (
 	task_suspension_token_t suspend_token
@@ -622,7 +641,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_get_mach_voucher
 (
 	task_read_t task,
@@ -636,7 +656,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_set_mach_voucher
 (
 	task_t task,
@@ -649,7 +670,8 @@ mig_external
 #else
 extern
 #endif	/* mig_external */
-__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
 kern_return_t task_swap_mach_voucher
 (
 	task_t task,
@@ -892,30 +914,6 @@ kern_return_t task_get_exception_ports_info
 	exception_flavor_array_t old_flavors
 );
 
-/* Routine task_test_sync_upcall */
-#ifdef	mig_external
-mig_external
-#else
-extern
-#endif	/* mig_external */
-kern_return_t task_test_sync_upcall
-(
-	task_t task,
-	mach_port_t port
-);
-
-/* Routine task_set_corpse_forking_behavior */
-#ifdef	mig_external
-mig_external
-#else
-extern
-#endif	/* mig_external */
-kern_return_t task_set_corpse_forking_behavior
-(
-	task_t task,
-	task_corpse_forking_behavior_t behavior
-);
-
 __END_DECLS
 
 /********************** Caution **************************/
@@ -1714,32 +1712,6 @@ __END_DECLS
 #ifdef  __MigPackStructs
 #pragma pack(pop)
 #endif
-
-#ifdef  __MigPackStructs
-#pragma pack(push, 4)
-#endif
-	typedef struct {
-		mach_msg_header_t Head;
-		/* start of the kernel processed data */
-		mach_msg_body_t msgh_body;
-		mach_msg_port_descriptor_t port;
-		/* end of the kernel processed data */
-	} __Request__task_test_sync_upcall_t __attribute__((unused));
-#ifdef  __MigPackStructs
-#pragma pack(pop)
-#endif
-
-#ifdef  __MigPackStructs
-#pragma pack(push, 4)
-#endif
-	typedef struct {
-		mach_msg_header_t Head;
-		NDR_record_t NDR;
-		task_corpse_forking_behavior_t behavior;
-	} __Request__task_set_corpse_forking_behavior_t __attribute__((unused));
-#ifdef  __MigPackStructs
-#pragma pack(pop)
-#endif
 #endif /* !__Request__task_subsystem__defined */
 
 /* union of all requests */
@@ -1807,8 +1779,6 @@ union __RequestUnion__task_subsystem {
 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port;
 	__Request__task_dyld_process_info_notify_deregister_t Request_task_dyld_process_info_notify_deregister;
 	__Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info;
-	__Request__task_test_sync_upcall_t Request_task_test_sync_upcall;
-	__Request__task_set_corpse_forking_behavior_t Request_task_set_corpse_forking_behavior;
 };
 #endif /* !__RequestUnion__task_subsystem__defined */
 /* typedefs for all replies */
@@ -2622,30 +2592,6 @@ union __RequestUnion__task_subsystem {
 #ifdef  __MigPackStructs
 #pragma pack(pop)
 #endif
-
-#ifdef  __MigPackStructs
-#pragma pack(push, 4)
-#endif
-	typedef struct {
-		mach_msg_header_t Head;
-		NDR_record_t NDR;
-		kern_return_t RetCode;
-	} __Reply__task_test_sync_upcall_t __attribute__((unused));
-#ifdef  __MigPackStructs
-#pragma pack(pop)
-#endif
-
-#ifdef  __MigPackStructs
-#pragma pack(push, 4)
-#endif
-	typedef struct {
-		mach_msg_header_t Head;
-		NDR_record_t NDR;
-		kern_return_t RetCode;
-	} __Reply__task_set_corpse_forking_behavior_t __attribute__((unused));
-#ifdef  __MigPackStructs
-#pragma pack(pop)
-#endif
 #endif /* !__Reply__task_subsystem__defined */
 
 /* union of all replies */
@@ -2713,8 +2659,6 @@ union __ReplyUnion__task_subsystem {
 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port;
 	__Reply__task_dyld_process_info_notify_deregister_t Reply_task_dyld_process_info_notify_deregister;
 	__Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info;
-	__Reply__task_test_sync_upcall_t Reply_task_test_sync_upcall;
-	__Reply__task_set_corpse_forking_behavior_t Reply_task_set_corpse_forking_behavior;
 };
 #endif /* !__RequestUnion__task_subsystem__defined */
 
@@ -2779,9 +2723,7 @@ union __ReplyUnion__task_subsystem {
     { "task_create_identity_token", 3457 },\
     { "task_identity_token_get_task_port", 3458 },\
     { "task_dyld_process_info_notify_deregister", 3459 },\
-    { "task_get_exception_ports_info", 3460 },\
-    { "task_test_sync_upcall", 3461 },\
-    { "task_set_corpse_forking_behavior", 3462 }
+    { "task_get_exception_ports_info", 3460 }
 #endif
 
 #ifdef __AfterMigUserHeader
lib/libc/include/any-macos.11-any/mach/task_info.h
@@ -494,7 +494,6 @@ typedef struct task_flags_info * task_flags_info_t;
 typedef uint32_t task_exc_guard_behavior_t;
 
 /* EXC_GUARD optional delivery settings on a per-task basis */
-#define TASK_EXC_GUARD_NONE                  0x00
 #define TASK_EXC_GUARD_VM_DELIVER            0x01 /* Deliver virtual memory EXC_GUARD exceptions */
 #define TASK_EXC_GUARD_VM_ONCE               0x02 /* Deliver them only once */
 #define TASK_EXC_GUARD_VM_CORPSE             0x04 /* Deliver them via a forked corpse */
@@ -510,15 +509,6 @@ typedef uint32_t task_exc_guard_behavior_t;
 #define TASK_EXC_GUARD_ALL                   0xff /* All optional deliver settings */
 
 
-/*
- * Type to control corpse forking options for a task
- * via task_get/set_corpse_forking_behavior interface(s).
- */
-typedef uint32_t task_corpse_forking_behavior_t;
-
-#define TASK_CORPSE_FORKING_DISABLED_MEM_DIAG  0x01 /* Disable corpse forking because the task is running under a diagnostic tool */
-
-
 /*
  * Obsolete interfaces.
  */
lib/libc/include/any-macos.11-any/mach/task_inspect.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef MACH_TASK_INSPECT_H
+#define MACH_TASK_INSPECT_H
+
+/*
+ * XXX These interfaces are still in development -- they are subject to change
+ * without notice.
+ */
+
+typedef natural_t task_inspect_flavor_t;
+
+enum task_inspect_flavor {
+	TASK_INSPECT_BASIC_COUNTS = 1,
+};
+
+struct task_inspect_basic_counts {
+	uint64_t instructions;
+	uint64_t cycles;
+};
+#define TASK_INSPECT_BASIC_COUNTS_COUNT \
+	(sizeof(struct task_inspect_basic_counts) / sizeof(natural_t))
+typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t;
+typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t;
+
+typedef integer_t *task_inspect_info_t;
+
+#endif /* !defined(MACH_TASK_INSPECT_H) */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/task_special_ports.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2000-2010 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	File:	mach/task_special_ports.h
+ *
+ *	Defines codes for special_purpose task ports.  These are NOT
+ *	port identifiers - they are only used for the task_get_special_port
+ *	and task_set_special_port routines.
+ *
+ */
+
+#ifndef _MACH_TASK_SPECIAL_PORTS_H_
+#define _MACH_TASK_SPECIAL_PORTS_H_
+
+typedef int     task_special_port_t;
+
+#define TASK_KERNEL_PORT        1       /* The full task port for task. */
+
+#define TASK_HOST_PORT          2       /* The host (priv) port for task.  */
+
+#define TASK_NAME_PORT          3       /* The name port for task. */
+
+#define TASK_BOOTSTRAP_PORT     4       /* Bootstrap environment for task. */
+
+#define TASK_INSPECT_PORT       5       /* The inspect port for task. */
+
+#define TASK_READ_PORT          6       /* The read port for task. */
+
+/*
+ * Evolving and likely to change.
+ */
+
+#define TASK_SEATBELT_PORT      7       /* Seatbelt compiler/DEM port for task. */
+
+/* PORT 8 was the GSSD TASK PORT which transformed to a host port */
+
+#define TASK_ACCESS_PORT        9       /* Permission check for task_for_pid. */
+
+#define TASK_DEBUG_CONTROL_PORT 10      /* debug control port */
+
+#define TASK_RESOURCE_NOTIFY_PORT   11  /* overrides host special RN port */
+
+#define TASK_MAX_SPECIAL_PORT TASK_RESOURCE_NOTIFY_PORT
+
+/*
+ *	Definitions for ease of use
+ */
+
+#define task_get_kernel_port(task, port)        \
+	        (task_get_special_port((task), TASK_KERNEL_PORT, (port)))
+
+#define task_set_kernel_port(task, port)        \
+	        (task_set_special_port((task), TASK_KERNEL_PORT, (port)))
+
+#define task_get_host_port(task, port)          \
+	        (task_get_special_port((task), TASK_HOST_PORT, (port)))
+
+#define task_set_host_port(task, port)  \
+	        (task_set_special_port((task), TASK_HOST_PORT, (port)))
+
+#define task_get_bootstrap_port(task, port)     \
+	        (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
+
+#define task_get_debug_control_port(task, port) \
+	        (task_get_special_port((task), TASK_DEBUG_CONTROL_PORT, (port)))
+
+#define task_set_bootstrap_port(task, port)     \
+	        (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
+
+#define task_get_task_access_port(task, port)   \
+	        (task_get_special_port((task), TASK_ACCESS_PORT, (port)))
+
+#define task_set_task_access_port(task, port)   \
+	        (task_set_special_port((task), TASK_ACCESS_PORT, (port)))
+
+#define task_set_task_debug_control_port(task, port) \
+	        (task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port)))
+
+
+#endif  /* _MACH_TASK_SPECIAL_PORTS_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/thread_act.h
@@ -0,0 +1,1435 @@
+#ifndef	_thread_act_user_
+#define	_thread_act_user_
+
+/* Module thread_act */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	thread_act_MSG_COUNT
+#define	thread_act_MSG_COUNT	31
+#endif	/* thread_act_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine thread_terminate */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_terminate
+(
+	thread_act_t target_act
+);
+
+/* Routine act_get_state */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t act_get_state
+(
+	thread_read_t target_act,
+	int flavor,
+	thread_state_t old_state,
+	mach_msg_type_number_t *old_stateCnt
+);
+
+/* Routine act_set_state */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t act_set_state
+(
+	thread_act_t target_act,
+	int flavor,
+	thread_state_t new_state,
+	mach_msg_type_number_t new_stateCnt
+);
+
+/* Routine thread_get_state */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_get_state
+(
+	thread_read_t target_act,
+	thread_state_flavor_t flavor,
+	thread_state_t old_state,
+	mach_msg_type_number_t *old_stateCnt
+);
+
+/* Routine thread_set_state */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_set_state
+(
+	thread_act_t target_act,
+	thread_state_flavor_t flavor,
+	thread_state_t new_state,
+	mach_msg_type_number_t new_stateCnt
+);
+
+/* Routine thread_suspend */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_suspend
+(
+	thread_read_t target_act
+);
+
+/* Routine thread_resume */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_resume
+(
+	thread_read_t target_act
+);
+
+/* Routine thread_abort */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_abort
+(
+	thread_act_t target_act
+);
+
+/* Routine thread_abort_safely */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+kern_return_t thread_abort_safely
+(
+	thread_act_t target_act
+);
+
+/* Routine thread_depress_abort */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_depress_abort
+(
+	thread_act_t thread
+);
+
+/* Routine thread_get_special_port */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_get_special_port
+(
+	thread_inspect_t thr_act,
+	int which_port,
+	mach_port_t *special_port
+);
+
+/* Routine thread_set_special_port */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_set_special_port
+(
+	thread_act_t thr_act,
+	int which_port,
+	mach_port_t special_port
+);
+
+/* Routine thread_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_info
+(
+	thread_inspect_t target_act,
+	thread_flavor_t flavor,
+	thread_info_t thread_info_out,
+	mach_msg_type_number_t *thread_info_outCnt
+);
+
+/* Routine thread_set_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_set_exception_ports
+(
+	thread_act_t thread,
+	exception_mask_t exception_mask,
+	mach_port_t new_port,
+	exception_behavior_t behavior,
+	thread_state_flavor_t new_flavor
+);
+
+/* Routine thread_get_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_get_exception_ports
+(
+	thread_act_t thread,
+	exception_mask_t exception_mask,
+	exception_mask_array_t masks,
+	mach_msg_type_number_t *masksCnt,
+	exception_handler_array_t old_handlers,
+	exception_behavior_array_t old_behaviors,
+	exception_flavor_array_t old_flavors
+);
+
+/* Routine thread_swap_exception_ports */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_swap_exception_ports
+(
+	thread_act_t thread,
+	exception_mask_t exception_mask,
+	mach_port_t new_port,
+	exception_behavior_t behavior,
+	thread_state_flavor_t new_flavor,
+	exception_mask_array_t masks,
+	mach_msg_type_number_t *masksCnt,
+	exception_handler_array_t old_handlers,
+	exception_behavior_array_t old_behaviors,
+	exception_flavor_array_t old_flavors
+);
+
+/* Routine thread_policy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_policy
+(
+	thread_act_t thr_act,
+	policy_t policy,
+	policy_base_t base,
+	mach_msg_type_number_t baseCnt,
+	boolean_t set_limit
+);
+
+/* Routine thread_policy_set */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_policy_set
+(
+	thread_act_t thread,
+	thread_policy_flavor_t flavor,
+	thread_policy_t policy_info,
+	mach_msg_type_number_t policy_infoCnt
+);
+
+/* Routine thread_policy_get */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_policy_get
+(
+	thread_inspect_t thread,
+	thread_policy_flavor_t flavor,
+	thread_policy_t policy_info,
+	mach_msg_type_number_t *policy_infoCnt,
+	boolean_t *get_default
+);
+
+/* Routine thread_sample */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_sample
+(
+	thread_act_t thread,
+	mach_port_t reply
+);
+
+/* Routine etap_trace_thread */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t etap_trace_thread
+(
+	thread_act_t target_act,
+	boolean_t trace_status
+);
+
+/* Routine thread_assign */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_assign
+(
+	thread_act_t thread,
+	processor_set_t new_set
+);
+
+/* Routine thread_assign_default */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_assign_default
+(
+	thread_act_t thread
+);
+
+/* Routine thread_get_assignment */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_get_assignment
+(
+	thread_inspect_t thread,
+	processor_set_name_t *assigned_set
+);
+
+/* Routine thread_set_policy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_set_policy
+(
+	thread_act_t thr_act,
+	processor_set_t pset,
+	policy_t policy,
+	policy_base_t base,
+	mach_msg_type_number_t baseCnt,
+	policy_limit_t limit,
+	mach_msg_type_number_t limitCnt
+);
+
+/* Routine thread_get_mach_voucher */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_get_mach_voucher
+(
+	thread_read_t thr_act,
+	mach_voucher_selector_t which,
+	ipc_voucher_t *voucher
+);
+
+/* Routine thread_set_mach_voucher */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_set_mach_voucher
+(
+	thread_act_t thr_act,
+	ipc_voucher_t voucher
+);
+
+/* Routine thread_swap_mach_voucher */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t thread_swap_mach_voucher
+(
+	thread_act_t thr_act,
+	ipc_voucher_t new_voucher,
+	ipc_voucher_t *old_voucher
+);
+
+/* Routine thread_convert_thread_state */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_convert_thread_state
+(
+	thread_act_t thread,
+	int direction,
+	thread_state_flavor_t flavor,
+	thread_state_t in_state,
+	mach_msg_type_number_t in_stateCnt,
+	thread_state_t out_state,
+	mach_msg_type_number_t *out_stateCnt
+);
+
+/* Routine thread_get_exception_ports_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t thread_get_exception_ports_info
+(
+	mach_port_t port,
+	exception_mask_t exception_mask,
+	exception_mask_array_t masks,
+	mach_msg_type_number_t *masksCnt,
+	exception_handler_info_array_t old_handlers_info,
+	exception_behavior_array_t old_behaviors,
+	exception_flavor_array_t old_flavors
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__thread_act_subsystem__defined
+#define __Request__thread_act_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_terminate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int flavor;
+		mach_msg_type_number_t old_stateCnt;
+	} __Request__act_get_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int flavor;
+		mach_msg_type_number_t new_stateCnt;
+		natural_t new_state[1296];
+	} __Request__act_set_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		thread_state_flavor_t flavor;
+		mach_msg_type_number_t old_stateCnt;
+	} __Request__thread_get_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		thread_state_flavor_t flavor;
+		mach_msg_type_number_t new_stateCnt;
+		natural_t new_state[1296];
+	} __Request__thread_set_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_suspend_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_resume_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_abort_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_abort_safely_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_depress_abort_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int which_port;
+	} __Request__thread_get_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t special_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		int which_port;
+	} __Request__thread_set_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		thread_flavor_t flavor;
+		mach_msg_type_number_t thread_info_outCnt;
+	} __Request__thread_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+		exception_behavior_t behavior;
+		thread_state_flavor_t new_flavor;
+	} __Request__thread_set_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+	} __Request__thread_get_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_port;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+		exception_behavior_t behavior;
+		thread_state_flavor_t new_flavor;
+	} __Request__thread_swap_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		policy_t policy;
+		mach_msg_type_number_t baseCnt;
+		integer_t base[5];
+		boolean_t set_limit;
+	} __Request__thread_policy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		thread_policy_flavor_t flavor;
+		mach_msg_type_number_t policy_infoCnt;
+		integer_t policy_info[16];
+	} __Request__thread_policy_set_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		thread_policy_flavor_t flavor;
+		mach_msg_type_number_t policy_infoCnt;
+		boolean_t get_default;
+	} __Request__thread_policy_get_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t reply;
+		/* end of the kernel processed data */
+	} __Request__thread_sample_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		boolean_t trace_status;
+	} __Request__etap_trace_thread_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_set;
+		/* end of the kernel processed data */
+	} __Request__thread_assign_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_assign_default_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__thread_get_assignment_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t pset;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		policy_t policy;
+		mach_msg_type_number_t baseCnt;
+		integer_t base[5];
+		mach_msg_type_number_t limitCnt;
+		integer_t limit[1];
+	} __Request__thread_set_policy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		mach_voucher_selector_t which;
+	} __Request__thread_get_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t voucher;
+		/* end of the kernel processed data */
+	} __Request__thread_set_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t new_voucher;
+		mach_msg_port_descriptor_t old_voucher;
+		/* end of the kernel processed data */
+	} __Request__thread_swap_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		int direction;
+		thread_state_flavor_t flavor;
+		mach_msg_type_number_t in_stateCnt;
+		natural_t in_state[1296];
+		mach_msg_type_number_t out_stateCnt;
+	} __Request__thread_convert_thread_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		exception_mask_t exception_mask;
+	} __Request__thread_get_exception_ports_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__thread_act_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__thread_act_subsystem__defined
+#define __RequestUnion__thread_act_subsystem__defined
+union __RequestUnion__thread_act_subsystem {
+	__Request__thread_terminate_t Request_thread_terminate;
+	__Request__act_get_state_t Request_act_get_state;
+	__Request__act_set_state_t Request_act_set_state;
+	__Request__thread_get_state_t Request_thread_get_state;
+	__Request__thread_set_state_t Request_thread_set_state;
+	__Request__thread_suspend_t Request_thread_suspend;
+	__Request__thread_resume_t Request_thread_resume;
+	__Request__thread_abort_t Request_thread_abort;
+	__Request__thread_abort_safely_t Request_thread_abort_safely;
+	__Request__thread_depress_abort_t Request_thread_depress_abort;
+	__Request__thread_get_special_port_t Request_thread_get_special_port;
+	__Request__thread_set_special_port_t Request_thread_set_special_port;
+	__Request__thread_info_t Request_thread_info;
+	__Request__thread_set_exception_ports_t Request_thread_set_exception_ports;
+	__Request__thread_get_exception_ports_t Request_thread_get_exception_ports;
+	__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports;
+	__Request__thread_policy_t Request_thread_policy;
+	__Request__thread_policy_set_t Request_thread_policy_set;
+	__Request__thread_policy_get_t Request_thread_policy_get;
+	__Request__thread_sample_t Request_thread_sample;
+	__Request__etap_trace_thread_t Request_etap_trace_thread;
+	__Request__thread_assign_t Request_thread_assign;
+	__Request__thread_assign_default_t Request_thread_assign_default;
+	__Request__thread_get_assignment_t Request_thread_get_assignment;
+	__Request__thread_set_policy_t Request_thread_set_policy;
+	__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;
+	__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;
+	__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;
+	__Request__thread_convert_thread_state_t Request_thread_convert_thread_state;
+	__Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info;
+};
+#endif /* !__RequestUnion__thread_act_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__thread_act_subsystem__defined
+#define __Reply__thread_act_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_terminate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t old_stateCnt;
+		natural_t old_state[1296];
+	} __Reply__act_get_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__act_set_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t old_stateCnt;
+		natural_t old_state[1296];
+	} __Reply__thread_get_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_set_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_suspend_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_resume_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_abort_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_abort_safely_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_depress_abort_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t special_port;
+		/* end of the kernel processed data */
+	} __Reply__thread_get_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_set_special_port_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t thread_info_outCnt;
+		integer_t thread_info_out[32];
+	} __Reply__thread_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_set_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t old_handlers[32];
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t masksCnt;
+		exception_mask_t masks[32];
+		exception_behavior_t old_behaviors[32];
+		thread_state_flavor_t old_flavors[32];
+	} __Reply__thread_get_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t old_handlers[32];
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t masksCnt;
+		exception_mask_t masks[32];
+		exception_behavior_t old_behaviors[32];
+		thread_state_flavor_t old_flavors[32];
+	} __Reply__thread_swap_exception_ports_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_policy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_policy_set_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t policy_infoCnt;
+		integer_t policy_info[16];
+		boolean_t get_default;
+	} __Reply__thread_policy_get_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_sample_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__etap_trace_thread_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_assign_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_assign_default_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t assigned_set;
+		/* end of the kernel processed data */
+	} __Reply__thread_get_assignment_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_set_policy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t voucher;
+		/* end of the kernel processed data */
+	} __Reply__thread_get_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__thread_set_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t old_voucher;
+		/* end of the kernel processed data */
+	} __Reply__thread_swap_mach_voucher_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t out_stateCnt;
+		natural_t out_state[1296];
+	} __Reply__thread_convert_thread_state_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		mach_msg_type_number_t masksCnt;
+		exception_mask_t masks[32];
+		exception_handler_info_t old_handlers_info[32];
+		exception_behavior_t old_behaviors[32];
+		thread_state_flavor_t old_flavors[32];
+	} __Reply__thread_get_exception_ports_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__thread_act_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__thread_act_subsystem__defined
+#define __ReplyUnion__thread_act_subsystem__defined
+union __ReplyUnion__thread_act_subsystem {
+	__Reply__thread_terminate_t Reply_thread_terminate;
+	__Reply__act_get_state_t Reply_act_get_state;
+	__Reply__act_set_state_t Reply_act_set_state;
+	__Reply__thread_get_state_t Reply_thread_get_state;
+	__Reply__thread_set_state_t Reply_thread_set_state;
+	__Reply__thread_suspend_t Reply_thread_suspend;
+	__Reply__thread_resume_t Reply_thread_resume;
+	__Reply__thread_abort_t Reply_thread_abort;
+	__Reply__thread_abort_safely_t Reply_thread_abort_safely;
+	__Reply__thread_depress_abort_t Reply_thread_depress_abort;
+	__Reply__thread_get_special_port_t Reply_thread_get_special_port;
+	__Reply__thread_set_special_port_t Reply_thread_set_special_port;
+	__Reply__thread_info_t Reply_thread_info;
+	__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports;
+	__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports;
+	__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports;
+	__Reply__thread_policy_t Reply_thread_policy;
+	__Reply__thread_policy_set_t Reply_thread_policy_set;
+	__Reply__thread_policy_get_t Reply_thread_policy_get;
+	__Reply__thread_sample_t Reply_thread_sample;
+	__Reply__etap_trace_thread_t Reply_etap_trace_thread;
+	__Reply__thread_assign_t Reply_thread_assign;
+	__Reply__thread_assign_default_t Reply_thread_assign_default;
+	__Reply__thread_get_assignment_t Reply_thread_get_assignment;
+	__Reply__thread_set_policy_t Reply_thread_set_policy;
+	__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;
+	__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;
+	__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;
+	__Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state;
+	__Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info;
+};
+#endif /* !__RequestUnion__thread_act_subsystem__defined */
+
+#ifndef subsystem_to_name_map_thread_act
+#define subsystem_to_name_map_thread_act \
+    { "thread_terminate", 3600 },\
+    { "act_get_state", 3601 },\
+    { "act_set_state", 3602 },\
+    { "thread_get_state", 3603 },\
+    { "thread_set_state", 3604 },\
+    { "thread_suspend", 3605 },\
+    { "thread_resume", 3606 },\
+    { "thread_abort", 3607 },\
+    { "thread_abort_safely", 3608 },\
+    { "thread_depress_abort", 3609 },\
+    { "thread_get_special_port", 3610 },\
+    { "thread_set_special_port", 3611 },\
+    { "thread_info", 3612 },\
+    { "thread_set_exception_ports", 3613 },\
+    { "thread_get_exception_ports", 3614 },\
+    { "thread_swap_exception_ports", 3615 },\
+    { "thread_policy", 3616 },\
+    { "thread_policy_set", 3617 },\
+    { "thread_policy_get", 3618 },\
+    { "thread_sample", 3619 },\
+    { "etap_trace_thread", 3620 },\
+    { "thread_assign", 3621 },\
+    { "thread_assign_default", 3622 },\
+    { "thread_get_assignment", 3623 },\
+    { "thread_set_policy", 3624 },\
+    { "thread_get_mach_voucher", 3625 },\
+    { "thread_set_mach_voucher", 3626 },\
+    { "thread_swap_mach_voucher", 3627 },\
+    { "thread_convert_thread_state", 3628 },\
+    { "thread_get_exception_ports_info", 3630 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _thread_act_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/thread_policy.h
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MACH_THREAD_POLICY_H_
+#define _MACH_THREAD_POLICY_H_
+
+#include <mach/mach_types.h>
+
+/*
+ * These are the calls for accessing the policy parameters
+ * of a particular thread.
+ *
+ * The extra 'get_default' parameter to the second call is
+ * IN/OUT as follows:
+ * 1) if asserted on the way in it indicates that the default
+ * values should be returned, not the ones currently set, in
+ * this case 'get_default' will always be asserted on return;
+ * 2) if unasserted on the way in, the current settings are
+ * desired and if still unasserted on return, then the info
+ * returned reflects the current settings, otherwise if
+ * 'get_default' returns asserted, it means that there are no
+ * current settings due to other parameters taking precedence,
+ * and the default ones are being returned instead.
+ */
+
+typedef natural_t       thread_policy_flavor_t;
+typedef integer_t       *thread_policy_t;
+
+/*
+ *  kern_return_t	thread_policy_set(
+ *                                       thread_t					thread,
+ *                                       thread_policy_flavor_t		flavor,
+ *                                       thread_policy_t				policy_info,
+ *                                       mach_msg_type_number_t		count);
+ *
+ *  kern_return_t	thread_policy_get(
+ *                                       thread_t					thread,
+ *                                       thread_policy_flavor_t		flavor,
+ *                                       thread_policy_t				policy_info,
+ *                                       mach_msg_type_number_t		*count,
+ *                                       boolean_t					*get_default);
+ */
+
+/*
+ * Defined flavors.
+ */
+/*
+ * THREAD_STANDARD_POLICY:
+ *
+ * This is the standard (fair) scheduling mode, assigned to new
+ * threads.  The thread will be given processor time in a manner
+ * which apportions approximately equal share to long running
+ * computations.
+ *
+ * Parameters:
+ *	[none]
+ */
+
+#define THREAD_STANDARD_POLICY                  1
+
+struct thread_standard_policy {
+	natural_t               no_data;
+};
+
+typedef struct thread_standard_policy   thread_standard_policy_data_t;
+typedef struct thread_standard_policy   *thread_standard_policy_t;
+
+#define THREAD_STANDARD_POLICY_COUNT    0
+
+/*
+ * THREAD_EXTENDED_POLICY:
+ *
+ * Extended form of THREAD_STANDARD_POLICY, which supplies a
+ * hint indicating whether this is a long running computation.
+ *
+ * Parameters:
+ *
+ * timeshare: TRUE (the default) results in identical scheduling
+ * behavior as THREAD_STANDARD_POLICY.
+ */
+
+#define THREAD_EXTENDED_POLICY                  1
+
+struct thread_extended_policy {
+	boolean_t               timeshare;
+};
+
+typedef struct thread_extended_policy   thread_extended_policy_data_t;
+typedef struct thread_extended_policy   *thread_extended_policy_t;
+
+#define THREAD_EXTENDED_POLICY_COUNT    ((mach_msg_type_number_t) \
+	(sizeof (thread_extended_policy_data_t) / sizeof (integer_t)))
+
+/*
+ * THREAD_TIME_CONSTRAINT_POLICY:
+ *
+ * This scheduling mode is for threads which have real time
+ * constraints on their execution.
+ *
+ * Parameters:
+ *
+ * period: This is the nominal amount of time between separate
+ * processing arrivals, specified in absolute time units.  A
+ * value of 0 indicates that there is no inherent periodicity in
+ * the computation.
+ *
+ * computation: This is the nominal amount of computation
+ * time needed during a separate processing arrival, specified
+ * in absolute time units.
+ *
+ * constraint: This is the maximum amount of real time that
+ * may elapse from the start of a separate processing arrival
+ * to the end of computation for logically correct functioning,
+ * specified in absolute time units.  Must be (>= computation).
+ * Note that latency = (constraint - computation).
+ *
+ * preemptible: This indicates that the computation may be
+ * interrupted, subject to the constraint specified above.
+ */
+
+#define THREAD_TIME_CONSTRAINT_POLICY   2
+
+struct thread_time_constraint_policy {
+	uint32_t                period;
+	uint32_t                computation;
+	uint32_t                constraint;
+	boolean_t               preemptible;
+};
+
+typedef struct thread_time_constraint_policy    \
+        thread_time_constraint_policy_data_t;
+typedef struct thread_time_constraint_policy    \
+        *thread_time_constraint_policy_t;
+
+#define THREAD_TIME_CONSTRAINT_POLICY_COUNT     ((mach_msg_type_number_t) \
+	(sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t)))
+
+/*
+ * THREAD_PRECEDENCE_POLICY:
+ *
+ * This may be used to indicate the relative value of the
+ * computation compared to the other threads in the task.
+ *
+ * Parameters:
+ *
+ * importance: The importance is specified as a signed value.
+ */
+
+#define THREAD_PRECEDENCE_POLICY                3
+
+struct thread_precedence_policy {
+	integer_t               importance;
+};
+
+typedef struct thread_precedence_policy         thread_precedence_policy_data_t;
+typedef struct thread_precedence_policy         *thread_precedence_policy_t;
+
+#define THREAD_PRECEDENCE_POLICY_COUNT  ((mach_msg_type_number_t) \
+	(sizeof (thread_precedence_policy_data_t) / sizeof (integer_t)))
+
+/*
+ * THREAD_AFFINITY_POLICY:
+ *
+ * This policy is experimental.
+ * This may be used to express affinity relationships
+ * between threads in the task. Threads with the same affinity tag will
+ * be scheduled to share an L2 cache if possible. That is, affinity tags
+ * are a hint to the scheduler for thread placement.
+ *
+ * The namespace of affinity tags is generally local to one task. However,
+ * a child task created after the assignment of affinity tags by its parent
+ * will share that namespace. In particular, a family of forked processes
+ * may be created with a shared affinity namespace.
+ *
+ * Parameters:
+ * tag: The affinity set identifier.
+ */
+
+#define THREAD_AFFINITY_POLICY          4
+
+struct thread_affinity_policy {
+	integer_t       affinity_tag;
+};
+
+#define THREAD_AFFINITY_TAG_NULL                0
+
+typedef struct thread_affinity_policy           thread_affinity_policy_data_t;
+typedef struct thread_affinity_policy           *thread_affinity_policy_t;
+
+#define THREAD_AFFINITY_POLICY_COUNT    ((mach_msg_type_number_t) \
+	(sizeof (thread_affinity_policy_data_t) / sizeof (integer_t)))
+
+/*
+ * THREAD_BACKGROUND_POLICY:
+ */
+
+#define THREAD_BACKGROUND_POLICY        5
+
+struct thread_background_policy {
+	integer_t       priority;
+};
+
+#define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000
+
+typedef struct thread_background_policy         thread_background_policy_data_t;
+typedef struct thread_background_policy         *thread_background_policy_t;
+
+#define THREAD_BACKGROUND_POLICY_COUNT  ((mach_msg_type_number_t) \
+	(sizeof (thread_background_policy_data_t) / sizeof (integer_t)))
+
+
+#define THREAD_LATENCY_QOS_POLICY       7
+typedef integer_t       thread_latency_qos_t;
+
+struct thread_latency_qos_policy {
+	thread_latency_qos_t thread_latency_qos_tier;
+};
+
+typedef struct thread_latency_qos_policy        thread_latency_qos_policy_data_t;
+typedef struct thread_latency_qos_policy        *thread_latency_qos_policy_t;
+
+#define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t)       \
+	    (sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t)))
+
+#define THREAD_THROUGHPUT_QOS_POLICY    8
+typedef integer_t       thread_throughput_qos_t;
+
+struct thread_throughput_qos_policy {
+	thread_throughput_qos_t thread_throughput_qos_tier;
+};
+
+typedef struct thread_throughput_qos_policy     thread_throughput_qos_policy_data_t;
+typedef struct thread_throughput_qos_policy     *thread_throughput_qos_policy_t;
+
+#define THREAD_THROUGHPUT_QOS_POLICY_COUNT      ((mach_msg_type_number_t) \
+	    (sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t)))
+
+
+
+
+#endif  /* _MACH_THREAD_POLICY_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/thread_state.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MACH_THREAD_STATE_H_
+#define _MACH_THREAD_STATE_H_
+
+#include <Availability.h>
+#include <mach/mach.h>
+
+#ifndef KERNEL
+/*
+ * Gets all register values in the target thread with pointer-like contents.
+ *
+ * There is no guarantee that the returned values are valid pointers, but all
+ * valid pointers will be returned.  The order and count of the provided
+ * register values is unspecified and may change; registers with values that
+ * are not valid pointers may be omitted, so the number of pointers returned
+ * may vary from call to call.
+ *
+ * sp is an out parameter that will contain the stack pointer.
+ * length is an in/out parameter for the length of the values array.
+ * values is an array of pointers.
+ *
+ * This may only be called on threads in the current task.  If the current
+ * platform defines a stack red zone, the stack pointer returned will be
+ * adjusted to account for red zone.
+ *
+ * If length is insufficient, KERN_INSUFFICIENT_BUFFER_SIZE will be returned
+ * and length set to the amount of memory required.  Callers MUST NOT assume
+ * that any particular size of buffer will be sufficient and should retry with
+ * an appropriately sized buffer upon this error.
+ */
+__API_AVAILABLE(macosx(10.14), ios(12.0), tvos(9.0), watchos(5.0))
+kern_return_t thread_get_register_pointer_values(thread_t thread,
+    uintptr_t *sp, size_t *length, uintptr_t *values);
+#endif
+
+#endif /* _MACH_THREAD_STATE_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/vm_map.h
@@ -0,0 +1,1503 @@
+#ifndef	_vm_map_user_
+#define	_vm_map_user_
+
+/* Module vm_map */
+
+#include <string.h>
+#include <mach/ndr.h>
+#include <mach/boolean.h>
+#include <mach/kern_return.h>
+#include <mach/notify.h>
+#include <mach/mach_types.h>
+#include <mach/message.h>
+#include <mach/mig_errors.h>
+#include <mach/port.h>
+	
+/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
+
+#if defined(__has_include)
+#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
+#ifndef USING_MIG_STRNCPY_ZEROFILL
+#define USING_MIG_STRNCPY_ZEROFILL
+#endif
+#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
+#ifdef __cplusplus
+extern "C" {
+#endif
+	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
+#ifdef __cplusplus
+}
+#endif
+#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
+#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
+#endif /* __has_include */
+	
+/* END MIG_STRNCPY_ZEROFILL CODE */
+
+
+#ifdef AUTOTEST
+#ifndef FUNCTION_PTR_T
+#define FUNCTION_PTR_T
+typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
+typedef struct {
+        char            *name;
+        function_ptr_t  function;
+} function_table_entry;
+typedef function_table_entry   *function_table_t;
+#endif /* FUNCTION_PTR_T */
+#endif /* AUTOTEST */
+
+#ifndef	vm_map_MSG_COUNT
+#define	vm_map_MSG_COUNT	33
+#endif	/* vm_map_MSG_COUNT */
+
+#include <mach/std_types.h>
+#include <mach/mig.h>
+#include <mach/mig.h>
+#include <mach/mach_types.h>
+#include <mach_debug/mach_debug_types.h>
+
+#ifdef __BeforeMigUserHeader
+__BeforeMigUserHeader
+#endif /* __BeforeMigUserHeader */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+
+
+/* Routine vm_region */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_region
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t *size,
+	vm_region_flavor_t flavor,
+	vm_region_info_t info,
+	mach_msg_type_number_t *infoCnt,
+	mach_port_t *object_name
+);
+
+/* Routine vm_allocate */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_allocate
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t size,
+	int flags
+);
+
+/* Routine vm_deallocate */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_deallocate
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size
+);
+
+/* Routine vm_protect */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_protect
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	boolean_t set_maximum,
+	vm_prot_t new_protection
+);
+
+/* Routine vm_inherit */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_inherit
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_inherit_t new_inheritance
+);
+
+/* Routine vm_read */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_read
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_offset_t *data,
+	mach_msg_type_number_t *dataCnt
+);
+
+/* Routine vm_read_list */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_read_list
+(
+	vm_map_t target_task,
+	vm_read_entry_t data_list,
+	natural_t count
+);
+
+/* Routine vm_write */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_write
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_offset_t data,
+	mach_msg_type_number_t dataCnt
+);
+
+/* Routine vm_copy */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_copy
+(
+	vm_map_t target_task,
+	vm_address_t source_address,
+	vm_size_t size,
+	vm_address_t dest_address
+);
+
+/* Routine vm_read_overwrite */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_read_overwrite
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_address_t data,
+	vm_size_t *outsize
+);
+
+/* Routine vm_msync */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_msync
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_sync_t sync_flags
+);
+
+/* Routine vm_behavior_set */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_behavior_set
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_behavior_t new_behavior
+);
+
+/* Routine vm_map */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_map
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t size,
+	vm_address_t mask,
+	int flags,
+	mem_entry_name_port_t object,
+	vm_offset_t offset,
+	boolean_t copy,
+	vm_prot_t cur_protection,
+	vm_prot_t max_protection,
+	vm_inherit_t inheritance
+);
+
+/* Routine vm_machine_attribute */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_machine_attribute
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_size_t size,
+	vm_machine_attribute_t attribute,
+	vm_machine_attribute_val_t *value
+);
+
+/* Routine vm_remap */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_remap
+(
+	vm_map_t target_task,
+	vm_address_t *target_address,
+	vm_size_t size,
+	vm_address_t mask,
+	int flags,
+	vm_map_t src_task,
+	vm_address_t src_address,
+	boolean_t copy,
+	vm_prot_t *cur_protection,
+	vm_prot_t *max_protection,
+	vm_inherit_t inheritance
+);
+
+/* Routine task_wire */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+__WATCHOS_PROHIBITED
+__TVOS_PROHIBITED
+kern_return_t task_wire
+(
+	vm_map_t target_task,
+	boolean_t must_wire
+);
+
+/* Routine mach_make_memory_entry */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_make_memory_entry
+(
+	vm_map_t target_task,
+	vm_size_t *size,
+	vm_offset_t offset,
+	vm_prot_t permission,
+	mem_entry_name_port_t *object_handle,
+	mem_entry_name_port_t parent_entry
+);
+
+/* Routine vm_map_page_query */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_map_page_query
+(
+	vm_map_t target_map,
+	vm_offset_t offset,
+	integer_t *disposition,
+	integer_t *ref_count
+);
+
+/* Routine mach_vm_region_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_vm_region_info
+(
+	vm_map_t task,
+	vm_address_t address,
+	vm_info_region_t *region,
+	vm_info_object_array_t *objects,
+	mach_msg_type_number_t *objectsCnt
+);
+
+/* Routine vm_mapped_pages_info */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_mapped_pages_info
+(
+	vm_map_t task,
+	page_address_array_t *pages,
+	mach_msg_type_number_t *pagesCnt
+);
+
+/* Routine vm_region_recurse */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_region_recurse
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t *size,
+	natural_t *nesting_depth,
+	vm_region_recurse_info_t info,
+	mach_msg_type_number_t *infoCnt
+);
+
+/* Routine vm_region_recurse_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_region_recurse_64
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t *size,
+	natural_t *nesting_depth,
+	vm_region_recurse_info_t info,
+	mach_msg_type_number_t *infoCnt
+);
+
+/* Routine mach_vm_region_info_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_vm_region_info_64
+(
+	vm_map_t task,
+	vm_address_t address,
+	vm_info_region_64_t *region,
+	vm_info_object_array_t *objects,
+	mach_msg_type_number_t *objectsCnt
+);
+
+/* Routine vm_region_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_region_64
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t *size,
+	vm_region_flavor_t flavor,
+	vm_region_info_t info,
+	mach_msg_type_number_t *infoCnt,
+	mach_port_t *object_name
+);
+
+/* Routine mach_make_memory_entry_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t mach_make_memory_entry_64
+(
+	vm_map_t target_task,
+	memory_object_size_t *size,
+	memory_object_offset_t offset,
+	vm_prot_t permission,
+	mach_port_t *object_handle,
+	mem_entry_name_port_t parent_entry
+);
+
+/* Routine vm_map_64 */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_map_64
+(
+	vm_map_t target_task,
+	vm_address_t *address,
+	vm_size_t size,
+	vm_address_t mask,
+	int flags,
+	mem_entry_name_port_t object,
+	memory_object_offset_t offset,
+	boolean_t copy,
+	vm_prot_t cur_protection,
+	vm_prot_t max_protection,
+	vm_inherit_t inheritance
+);
+
+/* Routine vm_purgable_control */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_purgable_control
+(
+	vm_map_t target_task,
+	vm_address_t address,
+	vm_purgable_t control,
+	int *state
+);
+
+/* Routine vm_map_exec_lockdown */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_map_exec_lockdown
+(
+	vm_map_t target_task
+);
+
+/* Routine vm_remap_new */
+#ifdef	mig_external
+mig_external
+#else
+extern
+#endif	/* mig_external */
+kern_return_t vm_remap_new
+(
+	vm_map_t target_task,
+	vm_address_t *target_address,
+	vm_size_t size,
+	vm_address_t mask,
+	int flags,
+	vm_map_read_t src_task,
+	vm_address_t src_address,
+	boolean_t copy,
+	vm_prot_t *cur_protection,
+	vm_prot_t *max_protection,
+	vm_inherit_t inheritance
+);
+
+__END_DECLS
+
+/********************** Caution **************************/
+/* The following data types should be used to calculate  */
+/* maximum message sizes only. The actual message may be */
+/* smaller, and the position of the arguments within the */
+/* message layout may vary from what is presented here.  */
+/* For example, if any of the arguments are variable-    */
+/* sized, and less than the maximum is sent, the data    */
+/* will be packed tight in the actual message to reduce  */
+/* the presence of holes.                                */
+/********************** Caution **************************/
+
+/* typedefs for all requests */
+
+#ifndef __Request__vm_map_subsystem__defined
+#define __Request__vm_map_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_region_flavor_t flavor;
+		mach_msg_type_number_t infoCnt;
+	} __Request__vm_region_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		int flags;
+	} __Request__vm_allocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+	} __Request__vm_deallocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		boolean_t set_maximum;
+		vm_prot_t new_protection;
+	} __Request__vm_protect_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_inherit_t new_inheritance;
+	} __Request__vm_inherit_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+	} __Request__vm_read_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_read_entry_t data_list;
+		natural_t count;
+	} __Request__vm_read_list_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		mach_msg_type_number_t dataCnt;
+	} __Request__vm_write_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t source_address;
+		vm_size_t size;
+		vm_address_t dest_address;
+	} __Request__vm_copy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_address_t data;
+	} __Request__vm_read_overwrite_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_sync_t sync_flags;
+	} __Request__vm_msync_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_behavior_t new_behavior;
+	} __Request__vm_behavior_set_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_address_t mask;
+		int flags;
+		vm_offset_t offset;
+		boolean_t copy;
+		vm_prot_t cur_protection;
+		vm_prot_t max_protection;
+		vm_inherit_t inheritance;
+	} __Request__vm_map_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_machine_attribute_t attribute;
+		vm_machine_attribute_val_t value;
+	} __Request__vm_machine_attribute_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t src_task;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t target_address;
+		vm_size_t size;
+		vm_address_t mask;
+		int flags;
+		vm_address_t src_address;
+		boolean_t copy;
+		vm_inherit_t inheritance;
+	} __Request__vm_remap_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		boolean_t must_wire;
+	} __Request__task_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t parent_entry;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_size_t size;
+		vm_offset_t offset;
+		vm_prot_t permission;
+	} __Request__mach_make_memory_entry_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_offset_t offset;
+	} __Request__vm_map_page_query_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+	} __Request__mach_vm_region_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__vm_mapped_pages_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		natural_t nesting_depth;
+		mach_msg_type_number_t infoCnt;
+	} __Request__vm_region_recurse_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		natural_t nesting_depth;
+		mach_msg_type_number_t infoCnt;
+	} __Request__vm_region_recurse_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+	} __Request__mach_vm_region_info_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_region_flavor_t flavor;
+		mach_msg_type_number_t infoCnt;
+	} __Request__vm_region_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t parent_entry;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		memory_object_size_t size;
+		memory_object_offset_t offset;
+		vm_prot_t permission;
+	} __Request__mach_make_memory_entry_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		vm_address_t mask;
+		int flags;
+		memory_object_offset_t offset;
+		boolean_t copy;
+		vm_prot_t cur_protection;
+		vm_prot_t max_protection;
+		vm_inherit_t inheritance;
+	} __Request__vm_map_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_purgable_t control;
+		int state;
+	} __Request__vm_purgable_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+	} __Request__vm_map_exec_lockdown_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t src_task;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t target_address;
+		vm_size_t size;
+		vm_address_t mask;
+		int flags;
+		vm_address_t src_address;
+		boolean_t copy;
+		vm_prot_t cur_protection;
+		vm_prot_t max_protection;
+		vm_inherit_t inheritance;
+	} __Request__vm_remap_new_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Request__vm_map_subsystem__defined */
+
+/* union of all requests */
+
+#ifndef __RequestUnion__vm_map_subsystem__defined
+#define __RequestUnion__vm_map_subsystem__defined
+union __RequestUnion__vm_map_subsystem {
+	__Request__vm_region_t Request_vm_region;
+	__Request__vm_allocate_t Request_vm_allocate;
+	__Request__vm_deallocate_t Request_vm_deallocate;
+	__Request__vm_protect_t Request_vm_protect;
+	__Request__vm_inherit_t Request_vm_inherit;
+	__Request__vm_read_t Request_vm_read;
+	__Request__vm_read_list_t Request_vm_read_list;
+	__Request__vm_write_t Request_vm_write;
+	__Request__vm_copy_t Request_vm_copy;
+	__Request__vm_read_overwrite_t Request_vm_read_overwrite;
+	__Request__vm_msync_t Request_vm_msync;
+	__Request__vm_behavior_set_t Request_vm_behavior_set;
+	__Request__vm_map_t Request_vm_map;
+	__Request__vm_machine_attribute_t Request_vm_machine_attribute;
+	__Request__vm_remap_t Request_vm_remap;
+	__Request__task_wire_t Request_task_wire;
+	__Request__mach_make_memory_entry_t Request_mach_make_memory_entry;
+	__Request__vm_map_page_query_t Request_vm_map_page_query;
+	__Request__mach_vm_region_info_t Request_mach_vm_region_info;
+	__Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info;
+	__Request__vm_region_recurse_t Request_vm_region_recurse;
+	__Request__vm_region_recurse_64_t Request_vm_region_recurse_64;
+	__Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64;
+	__Request__vm_region_64_t Request_vm_region_64;
+	__Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64;
+	__Request__vm_map_64_t Request_vm_map_64;
+	__Request__vm_purgable_control_t Request_vm_purgable_control;
+	__Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown;
+	__Request__vm_remap_new_t Request_vm_remap_new;
+};
+#endif /* !__RequestUnion__vm_map_subsystem__defined */
+/* typedefs for all replies */
+
+#ifndef __Reply__vm_map_subsystem__defined
+#define __Reply__vm_map_subsystem__defined
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object_name;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		mach_msg_type_number_t infoCnt;
+		int info[10];
+	} __Reply__vm_region_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+	} __Reply__vm_allocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_deallocate_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_protect_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_inherit_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t data;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t dataCnt;
+	} __Reply__vm_read_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_read_entry_t data_list;
+	} __Reply__vm_read_list_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_write_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_copy_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_size_t outsize;
+	} __Reply__vm_read_overwrite_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_msync_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_behavior_set_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+	} __Reply__vm_map_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_machine_attribute_val_t value;
+	} __Reply__vm_machine_attribute_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t target_address;
+		vm_prot_t cur_protection;
+		vm_prot_t max_protection;
+	} __Reply__vm_remap_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__task_wire_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object_handle;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_size_t size;
+	} __Reply__mach_make_memory_entry_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		integer_t disposition;
+		integer_t ref_count;
+	} __Reply__vm_map_page_query_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t objects;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_info_region_t region;
+		mach_msg_type_number_t objectsCnt;
+	} __Reply__mach_vm_region_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t pages;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		mach_msg_type_number_t pagesCnt;
+	} __Reply__vm_mapped_pages_info_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+		vm_size_t size;
+		natural_t nesting_depth;
+		mach_msg_type_number_t infoCnt;
+		int info[19];
+	} __Reply__vm_region_recurse_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+		vm_size_t size;
+		natural_t nesting_depth;
+		mach_msg_type_number_t infoCnt;
+		int info[19];
+	} __Reply__vm_region_recurse_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_ool_descriptor_t objects;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_info_region_64_t region;
+		mach_msg_type_number_t objectsCnt;
+	} __Reply__mach_vm_region_info_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object_name;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		vm_address_t address;
+		vm_size_t size;
+		mach_msg_type_number_t infoCnt;
+		int info[10];
+	} __Reply__vm_region_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		/* start of the kernel processed data */
+		mach_msg_body_t msgh_body;
+		mach_msg_port_descriptor_t object_handle;
+		/* end of the kernel processed data */
+		NDR_record_t NDR;
+		memory_object_size_t size;
+	} __Reply__mach_make_memory_entry_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t address;
+	} __Reply__vm_map_64_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		int state;
+	} __Reply__vm_purgable_control_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+	} __Reply__vm_map_exec_lockdown_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+
+#ifdef  __MigPackStructs
+#pragma pack(push, 4)
+#endif
+	typedef struct {
+		mach_msg_header_t Head;
+		NDR_record_t NDR;
+		kern_return_t RetCode;
+		vm_address_t target_address;
+		vm_prot_t cur_protection;
+		vm_prot_t max_protection;
+	} __Reply__vm_remap_new_t __attribute__((unused));
+#ifdef  __MigPackStructs
+#pragma pack(pop)
+#endif
+#endif /* !__Reply__vm_map_subsystem__defined */
+
+/* union of all replies */
+
+#ifndef __ReplyUnion__vm_map_subsystem__defined
+#define __ReplyUnion__vm_map_subsystem__defined
+union __ReplyUnion__vm_map_subsystem {
+	__Reply__vm_region_t Reply_vm_region;
+	__Reply__vm_allocate_t Reply_vm_allocate;
+	__Reply__vm_deallocate_t Reply_vm_deallocate;
+	__Reply__vm_protect_t Reply_vm_protect;
+	__Reply__vm_inherit_t Reply_vm_inherit;
+	__Reply__vm_read_t Reply_vm_read;
+	__Reply__vm_read_list_t Reply_vm_read_list;
+	__Reply__vm_write_t Reply_vm_write;
+	__Reply__vm_copy_t Reply_vm_copy;
+	__Reply__vm_read_overwrite_t Reply_vm_read_overwrite;
+	__Reply__vm_msync_t Reply_vm_msync;
+	__Reply__vm_behavior_set_t Reply_vm_behavior_set;
+	__Reply__vm_map_t Reply_vm_map;
+	__Reply__vm_machine_attribute_t Reply_vm_machine_attribute;
+	__Reply__vm_remap_t Reply_vm_remap;
+	__Reply__task_wire_t Reply_task_wire;
+	__Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry;
+	__Reply__vm_map_page_query_t Reply_vm_map_page_query;
+	__Reply__mach_vm_region_info_t Reply_mach_vm_region_info;
+	__Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info;
+	__Reply__vm_region_recurse_t Reply_vm_region_recurse;
+	__Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64;
+	__Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64;
+	__Reply__vm_region_64_t Reply_vm_region_64;
+	__Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64;
+	__Reply__vm_map_64_t Reply_vm_map_64;
+	__Reply__vm_purgable_control_t Reply_vm_purgable_control;
+	__Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown;
+	__Reply__vm_remap_new_t Reply_vm_remap_new;
+};
+#endif /* !__RequestUnion__vm_map_subsystem__defined */
+
+#ifndef subsystem_to_name_map_vm_map
+#define subsystem_to_name_map_vm_map \
+    { "vm_region", 3800 },\
+    { "vm_allocate", 3801 },\
+    { "vm_deallocate", 3802 },\
+    { "vm_protect", 3803 },\
+    { "vm_inherit", 3804 },\
+    { "vm_read", 3805 },\
+    { "vm_read_list", 3806 },\
+    { "vm_write", 3807 },\
+    { "vm_copy", 3808 },\
+    { "vm_read_overwrite", 3809 },\
+    { "vm_msync", 3810 },\
+    { "vm_behavior_set", 3811 },\
+    { "vm_map", 3812 },\
+    { "vm_machine_attribute", 3813 },\
+    { "vm_remap", 3814 },\
+    { "task_wire", 3815 },\
+    { "mach_make_memory_entry", 3816 },\
+    { "vm_map_page_query", 3817 },\
+    { "mach_vm_region_info", 3818 },\
+    { "vm_mapped_pages_info", 3819 },\
+    { "vm_region_recurse", 3821 },\
+    { "vm_region_recurse_64", 3822 },\
+    { "mach_vm_region_info_64", 3823 },\
+    { "vm_region_64", 3824 },\
+    { "mach_make_memory_entry_64", 3825 },\
+    { "vm_map_64", 3826 },\
+    { "vm_purgable_control", 3830 },\
+    { "vm_map_exec_lockdown", 3831 },\
+    { "vm_remap_new", 3832 }
+#endif
+
+#ifdef __AfterMigUserHeader
+__AfterMigUserHeader
+#endif /* __AfterMigUserHeader */
+
+#endif	 /* _vm_map_user_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/vm_prot.h
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	File:	mach/vm_prot.h
+ *	Author:	Avadis Tevanian, Jr., Michael Wayne Young
+ *
+ *	Virtual memory protection definitions.
+ *
+ */
+
+#ifndef _MACH_VM_PROT_H_
+#define _MACH_VM_PROT_H_
+
+/*
+ *	Types defined:
+ *
+ *	vm_prot_t		VM protection values.
+ */
+
+typedef int             vm_prot_t;
+
+/*
+ *	Protection values, defined as bits within the vm_prot_t type
+ */
+
+#define VM_PROT_NONE    ((vm_prot_t) 0x00)
+
+#define VM_PROT_READ    ((vm_prot_t) 0x01)      /* read permission */
+#define VM_PROT_WRITE   ((vm_prot_t) 0x02)      /* write permission */
+#define VM_PROT_EXECUTE ((vm_prot_t) 0x04)      /* execute permission */
+
+/*
+ *	The default protection for newly-created virtual memory
+ */
+
+#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE)
+
+/*
+ *	The maximum privileges possible, for parameter checking.
+ */
+
+#define VM_PROT_ALL     (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
+
+/*
+ *	An invalid protection value.
+ *	Used only by memory_object_lock_request to indicate no change
+ *	to page locks.  Using -1 here is a bad idea because it
+ *	looks like VM_PROT_ALL and then some.
+ */
+
+#define VM_PROT_NO_CHANGE       ((vm_prot_t) 0x08)
+
+/*
+ *      When a caller finds that he cannot obtain write permission on a
+ *      mapped entry, the following flag can be used.  The entry will
+ *      be made "needs copy" effectively copying the object (using COW),
+ *      and write permission will be added to the maximum protections
+ *      for the associated entry.
+ */
+
+#define VM_PROT_COPY            ((vm_prot_t) 0x10)
+
+
+/*
+ *	Another invalid protection value.
+ *	Used only by memory_object_data_request upon an object
+ *	which has specified a copy_call copy strategy. It is used
+ *	when the kernel wants a page belonging to a copy of the
+ *	object, and is only asking the object as a result of
+ *	following a shadow chain. This solves the race between pages
+ *	being pushed up by the memory manager and the kernel
+ *	walking down the shadow chain.
+ */
+
+#define VM_PROT_WANTS_COPY      ((vm_prot_t) 0x10)
+
+
+/*
+ *      Another invalid protection value.
+ *	Indicates that the other protection bits are to be applied as a mask
+ *	against the actual protection bits of the map entry.
+ */
+#define VM_PROT_IS_MASK         ((vm_prot_t) 0x40)
+
+/*
+ * Another invalid protection value to support execute-only protection.
+ * VM_PROT_STRIP_READ is a special marker that tells mprotect to not
+ * set VM_PROT_READ. We have to do it this way because existing code
+ * expects the system to set VM_PROT_READ if VM_PROT_EXECUTE is set.
+ * VM_PROT_EXECUTE_ONLY is just a convenience value to indicate that
+ * the memory should be executable and explicitly not readable. It will
+ * be ignored on platforms that do not support this type of protection.
+ */
+#define VM_PROT_STRIP_READ              ((vm_prot_t) 0x80)
+#define VM_PROT_EXECUTE_ONLY    (VM_PROT_EXECUTE|VM_PROT_STRIP_READ)
+
+
+#endif  /* _MACH_VM_PROT_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/vm_statistics.h
@@ -0,0 +1,552 @@
+/*
+ * Copyright (c) 2000-2020 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	File:	mach/vm_statistics.h
+ *	Author:	Avadis Tevanian, Jr., Michael Wayne Young, David Golub
+ *
+ *	Virtual memory statistics structure.
+ *
+ */
+
+#ifndef _MACH_VM_STATISTICS_H_
+#define _MACH_VM_STATISTICS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <mach/machine/vm_types.h>
+#include <mach/machine/kern_return.h>
+
+/*
+ * vm_statistics
+ *
+ * History:
+ *	rev0 -  original structure.
+ *	rev1 -  added purgable info (purgable_count and purges).
+ *	rev2 -  added speculative_count.
+ *
+ * Note: you cannot add any new fields to this structure. Add them below in
+ *       vm_statistics64.
+ */
+
+struct vm_statistics {
+	natural_t       free_count;             /* # of pages free */
+	natural_t       active_count;           /* # of pages active */
+	natural_t       inactive_count;         /* # of pages inactive */
+	natural_t       wire_count;             /* # of pages wired down */
+	natural_t       zero_fill_count;        /* # of zero fill pages */
+	natural_t       reactivations;          /* # of pages reactivated */
+	natural_t       pageins;                /* # of pageins */
+	natural_t       pageouts;               /* # of pageouts */
+	natural_t       faults;                 /* # of faults */
+	natural_t       cow_faults;             /* # of copy-on-writes */
+	natural_t       lookups;                /* object cache lookups */
+	natural_t       hits;                   /* object cache hits */
+
+	/* added for rev1 */
+	natural_t       purgeable_count;        /* # of pages purgeable */
+	natural_t       purges;                 /* # of pages purged */
+
+	/* added for rev2 */
+	/*
+	 * NB: speculative pages are already accounted for in "free_count",
+	 * so "speculative_count" is the number of "free" pages that are
+	 * used to hold data that was read speculatively from disk but
+	 * haven't actually been used by anyone so far.
+	 */
+	natural_t       speculative_count;      /* # of pages speculative */
+};
+
+/* Used by all architectures */
+typedef struct vm_statistics    *vm_statistics_t;
+typedef struct vm_statistics    vm_statistics_data_t;
+
+/*
+ * vm_statistics64
+ *
+ * History:
+ *	rev0 -  original structure.
+ *	rev1 -  added purgable info (purgable_count and purges).
+ *	rev2 -  added speculative_count.
+ *	   ----
+ *	rev3 -  changed name to vm_statistics64.
+ *		changed some fields in structure to 64-bit on
+ *		arm, i386 and x86_64 architectures.
+ *	rev4 -  require 64-bit alignment for efficient access
+ *		in the kernel. No change to reported data.
+ *
+ */
+
+struct vm_statistics64 {
+	natural_t       free_count;             /* # of pages free */
+	natural_t       active_count;           /* # of pages active */
+	natural_t       inactive_count;         /* # of pages inactive */
+	natural_t       wire_count;             /* # of pages wired down */
+	uint64_t        zero_fill_count;        /* # of zero fill pages */
+	uint64_t        reactivations;          /* # of pages reactivated */
+	uint64_t        pageins;                /* # of pageins */
+	uint64_t        pageouts;               /* # of pageouts */
+	uint64_t        faults;                 /* # of faults */
+	uint64_t        cow_faults;             /* # of copy-on-writes */
+	uint64_t        lookups;                /* object cache lookups */
+	uint64_t        hits;                   /* object cache hits */
+	uint64_t        purges;                 /* # of pages purged */
+	natural_t       purgeable_count;        /* # of pages purgeable */
+	/*
+	 * NB: speculative pages are already accounted for in "free_count",
+	 * so "speculative_count" is the number of "free" pages that are
+	 * used to hold data that was read speculatively from disk but
+	 * haven't actually been used by anyone so far.
+	 */
+	natural_t       speculative_count;      /* # of pages speculative */
+
+	/* added for rev1 */
+	uint64_t        decompressions;         /* # of pages decompressed */
+	uint64_t        compressions;           /* # of pages compressed */
+	uint64_t        swapins;                /* # of pages swapped in (via compression segments) */
+	uint64_t        swapouts;               /* # of pages swapped out (via compression segments) */
+	natural_t       compressor_page_count;  /* # of pages used by the compressed pager to hold all the compressed data */
+	natural_t       throttled_count;        /* # of pages throttled */
+	natural_t       external_page_count;    /* # of pages that are file-backed (non-swap) */
+	natural_t       internal_page_count;    /* # of pages that are anonymous */
+	uint64_t        total_uncompressed_pages_in_compressor; /* # of pages (uncompressed) held within the compressor. */
+} __attribute__((aligned(8)));
+
+typedef struct vm_statistics64  *vm_statistics64_t;
+typedef struct vm_statistics64  vm_statistics64_data_t;
+
+kern_return_t vm_stats(void *info, unsigned int *count);
+
+/*
+ * VM_STATISTICS_TRUNCATE_TO_32_BIT
+ *
+ * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from
+ * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics).
+ */
+#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value)))
+
+/*
+ * vm_extmod_statistics
+ *
+ * Structure to record modifications to a task by an
+ * external agent.
+ *
+ * History:
+ *	rev0 -  original structure.
+ */
+
+struct vm_extmod_statistics {
+	int64_t task_for_pid_count;                     /* # of times task port was looked up */
+	int64_t task_for_pid_caller_count;      /* # of times this task called task_for_pid */
+	int64_t thread_creation_count;          /* # of threads created in task */
+	int64_t thread_creation_caller_count;   /* # of threads created by task */
+	int64_t thread_set_state_count;         /* # of register state sets in task */
+	int64_t thread_set_state_caller_count;  /* # of register state sets by task */
+} __attribute__((aligned(8)));
+
+typedef struct vm_extmod_statistics *vm_extmod_statistics_t;
+typedef struct vm_extmod_statistics vm_extmod_statistics_data_t;
+
+typedef struct vm_purgeable_stat {
+	uint64_t        count;
+	uint64_t        size;
+}vm_purgeable_stat_t;
+
+struct vm_purgeable_info {
+	vm_purgeable_stat_t fifo_data[8];
+	vm_purgeable_stat_t obsolete_data;
+	vm_purgeable_stat_t lifo_data[8];
+};
+
+typedef struct vm_purgeable_info        *vm_purgeable_info_t;
+
+/* included for the vm_map_page_query call */
+
+#define VM_PAGE_QUERY_PAGE_PRESENT      0x1
+#define VM_PAGE_QUERY_PAGE_FICTITIOUS   0x2
+#define VM_PAGE_QUERY_PAGE_REF          0x4
+#define VM_PAGE_QUERY_PAGE_DIRTY        0x8
+#define VM_PAGE_QUERY_PAGE_PAGED_OUT    0x10
+#define VM_PAGE_QUERY_PAGE_COPIED       0x20
+#define VM_PAGE_QUERY_PAGE_SPECULATIVE  0x40
+#define VM_PAGE_QUERY_PAGE_EXTERNAL     0x80
+#define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100
+#define VM_PAGE_QUERY_PAGE_CS_TAINTED   0x200
+#define VM_PAGE_QUERY_PAGE_CS_NX        0x400
+#define VM_PAGE_QUERY_PAGE_REUSABLE     0x800
+
+
+/*
+ * VM allocation flags:
+ *
+ * VM_FLAGS_FIXED
+ *      (really the absence of VM_FLAGS_ANYWHERE)
+ *	Allocate new VM region at the specified virtual address, if possible.
+ *
+ * VM_FLAGS_ANYWHERE
+ *	Allocate new VM region anywhere it would fit in the address space.
+ *
+ * VM_FLAGS_PURGABLE
+ *	Create a purgable VM object for that new VM region.
+ *
+ * VM_FLAGS_4GB_CHUNK
+ *	The new VM region will be chunked up into 4GB sized pieces.
+ *
+ * VM_FLAGS_NO_PMAP_CHECK
+ *	(for DEBUG kernel config only, ignored for other configs)
+ *	Do not check that there is no stale pmap mapping for the new VM region.
+ *	This is useful for kernel memory allocations at bootstrap when building
+ *	the initial kernel address space while some memory is already in use.
+ *
+ * VM_FLAGS_OVERWRITE
+ *	The new VM region can replace existing VM regions if necessary
+ *	(to be used in combination with VM_FLAGS_FIXED).
+ *
+ * VM_FLAGS_NO_CACHE
+ *	Pages brought in to this VM region are placed on the speculative
+ *	queue instead of the active queue.  In other words, they are not
+ *	cached so that they will be stolen first if memory runs low.
+ */
+
+#define VM_FLAGS_FIXED          0x0000
+#define VM_FLAGS_ANYWHERE       0x0001
+#define VM_FLAGS_PURGABLE       0x0002
+#define VM_FLAGS_4GB_CHUNK      0x0004
+#define VM_FLAGS_RANDOM_ADDR    0x0008
+#define VM_FLAGS_NO_CACHE       0x0010
+#define VM_FLAGS_RESILIENT_CODESIGN     0x0020
+#define VM_FLAGS_RESILIENT_MEDIA        0x0040
+#define VM_FLAGS_PERMANENT      0x0080
+#define VM_FLAGS_OVERWRITE      0x4000  /* delete any existing mappings first */
+/*
+ * VM_FLAGS_SUPERPAGE_MASK
+ *	3 bits that specify whether large pages should be used instead of
+ *	base pages (!=0), as well as the requested page size.
+ */
+#define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */
+#define VM_FLAGS_RETURN_DATA_ADDR       0x100000 /* Return address of target data, rather than base of page */
+#define VM_FLAGS_RETURN_4K_DATA_ADDR    0x800000 /* Return 4K aligned address of target data */
+#define VM_FLAGS_ALIAS_MASK     0xFF000000
+#define VM_GET_FLAGS_ALIAS(flags, alias)                        \
+	        (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24
+#define VM_SET_FLAGS_ALIAS(flags, alias)                        \
+	        (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) |   \
+	        (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24))
+
+/* These are the flags that we accept from user-space */
+#define VM_FLAGS_USER_ALLOCATE  (VM_FLAGS_FIXED |               \
+	                         VM_FLAGS_ANYWHERE |            \
+	                         VM_FLAGS_PURGABLE |            \
+	                         VM_FLAGS_4GB_CHUNK |           \
+	                         VM_FLAGS_RANDOM_ADDR |         \
+	                         VM_FLAGS_NO_CACHE |            \
+	                         VM_FLAGS_PERMANENT |           \
+	                         VM_FLAGS_OVERWRITE |           \
+	                         VM_FLAGS_SUPERPAGE_MASK |      \
+	                         VM_FLAGS_ALIAS_MASK)
+#define VM_FLAGS_USER_MAP       (VM_FLAGS_USER_ALLOCATE |       \
+	                         VM_FLAGS_RETURN_4K_DATA_ADDR | \
+	                         VM_FLAGS_RETURN_DATA_ADDR)
+#define VM_FLAGS_USER_REMAP     (VM_FLAGS_FIXED |               \
+	                         VM_FLAGS_ANYWHERE |            \
+	                         VM_FLAGS_RANDOM_ADDR |         \
+	                         VM_FLAGS_OVERWRITE|            \
+	                         VM_FLAGS_RETURN_DATA_ADDR |    \
+	                         VM_FLAGS_RESILIENT_CODESIGN |  \
+	                         VM_FLAGS_RESILIENT_MEDIA)
+
+#define VM_FLAGS_SUPERPAGE_SHIFT 16
+#define SUPERPAGE_NONE                  0       /* no superpages, if all bits are 0 */
+#define SUPERPAGE_SIZE_ANY              1
+#define VM_FLAGS_SUPERPAGE_NONE     (SUPERPAGE_NONE     << VM_FLAGS_SUPERPAGE_SHIFT)
+#define VM_FLAGS_SUPERPAGE_SIZE_ANY (SUPERPAGE_SIZE_ANY << VM_FLAGS_SUPERPAGE_SHIFT)
+#define SUPERPAGE_SIZE_2MB              2
+#define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT)
+
+/*
+ * EXC_GUARD definitions for virtual memory.
+ */
+#define GUARD_TYPE_VIRT_MEMORY  0x5
+
+/* Reasons for exception for virtual memory */
+enum virtual_memory_guard_exception_codes {
+	kGUARD_EXC_DEALLOC_GAP  = 1u << 0
+};
+
+
+/* current accounting postmark */
+#define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600
+
+/* discrete values: */
+#define VM_LEDGER_TAG_NONE      0x00000000
+#define VM_LEDGER_TAG_DEFAULT   0x00000001
+#define VM_LEDGER_TAG_NETWORK   0x00000002
+#define VM_LEDGER_TAG_MEDIA     0x00000003
+#define VM_LEDGER_TAG_GRAPHICS  0x00000004
+#define VM_LEDGER_TAG_NEURAL    0x00000005
+#define VM_LEDGER_TAG_MAX       0x00000005
+/* individual bits: */
+#define VM_LEDGER_FLAG_NO_FOOTPRINT     0x00000001
+#define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT)
+
+
+#define VM_MEMORY_MALLOC 1
+#define VM_MEMORY_MALLOC_SMALL 2
+#define VM_MEMORY_MALLOC_LARGE 3
+#define VM_MEMORY_MALLOC_HUGE 4
+#define VM_MEMORY_SBRK 5// uninteresting -- no one should call
+#define VM_MEMORY_REALLOC 6
+#define VM_MEMORY_MALLOC_TINY 7
+#define VM_MEMORY_MALLOC_LARGE_REUSABLE 8
+#define VM_MEMORY_MALLOC_LARGE_REUSED 9
+
+#define VM_MEMORY_ANALYSIS_TOOL 10
+
+#define VM_MEMORY_MALLOC_NANO 11
+#define VM_MEMORY_MALLOC_MEDIUM 12
+#define VM_MEMORY_MALLOC_PGUARD 13
+
+#define VM_MEMORY_MACH_MSG 20
+#define VM_MEMORY_IOKIT 21
+#define VM_MEMORY_STACK  30
+#define VM_MEMORY_GUARD  31
+#define VM_MEMORY_SHARED_PMAP 32
+/* memory containing a dylib */
+#define VM_MEMORY_DYLIB 33
+#define VM_MEMORY_OBJC_DISPATCHERS 34
+
+/* Was a nested pmap (VM_MEMORY_SHARED_PMAP) which has now been unnested */
+#define VM_MEMORY_UNSHARED_PMAP 35
+
+
+// Placeholders for now -- as we analyze the libraries and find how they
+// use memory, we can make these labels more specific.
+#define VM_MEMORY_APPKIT 40
+#define VM_MEMORY_FOUNDATION 41
+#define VM_MEMORY_COREGRAPHICS 42
+#define VM_MEMORY_CORESERVICES 43
+#define VM_MEMORY_CARBON VM_MEMORY_CORESERVICES
+#define VM_MEMORY_JAVA 44
+#define VM_MEMORY_COREDATA 45
+#define VM_MEMORY_COREDATA_OBJECTIDS 46
+#define VM_MEMORY_ATS 50
+#define VM_MEMORY_LAYERKIT 51
+#define VM_MEMORY_CGIMAGE 52
+#define VM_MEMORY_TCMALLOC 53
+
+/* private raster data (i.e. layers, some images, QGL allocator) */
+#define VM_MEMORY_COREGRAPHICS_DATA     54
+
+/* shared image and font caches */
+#define VM_MEMORY_COREGRAPHICS_SHARED   55
+
+/* Memory used for virtual framebuffers, shadowing buffers, etc... */
+#define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS     56
+
+/* Window backing stores, custom shadow data, and compressed backing stores */
+#define VM_MEMORY_COREGRAPHICS_BACKINGSTORES    57
+
+/* x-alloc'd memory */
+#define VM_MEMORY_COREGRAPHICS_XALLOC 58
+
+/* catch-all for other uses, such as the read-only shared data page */
+#define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS
+
+/* memory allocated by the dynamic loader for itself */
+#define VM_MEMORY_DYLD 60
+/* malloc'd memory created by dyld */
+#define VM_MEMORY_DYLD_MALLOC 61
+
+/* Used for sqlite page cache */
+#define VM_MEMORY_SQLITE 62
+
+/* JavaScriptCore heaps */
+#define VM_MEMORY_JAVASCRIPT_CORE 63
+#define VM_MEMORY_WEBASSEMBLY VM_MEMORY_JAVASCRIPT_CORE
+/* memory allocated for the JIT */
+#define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64
+#define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65
+
+/* memory allocated for GLSL */
+#define VM_MEMORY_GLSL  66
+
+/* memory allocated for OpenCL.framework */
+#define VM_MEMORY_OPENCL    67
+
+/* memory allocated for QuartzCore.framework */
+#define VM_MEMORY_COREIMAGE 68
+
+/* memory allocated for WebCore Purgeable Buffers */
+#define VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69
+
+/* ImageIO memory */
+#define VM_MEMORY_IMAGEIO       70
+
+/* CoreProfile memory */
+#define VM_MEMORY_COREPROFILE   71
+
+/* assetsd / MobileSlideShow memory */
+#define VM_MEMORY_ASSETSD       72
+
+/* libsystem_kernel os_once_alloc */
+#define VM_MEMORY_OS_ALLOC_ONCE 73
+
+/* libdispatch internal allocator */
+#define VM_MEMORY_LIBDISPATCH 74
+
+/* Accelerate.framework image backing stores */
+#define VM_MEMORY_ACCELERATE 75
+
+/* CoreUI image block data */
+#define VM_MEMORY_COREUI 76
+
+/* CoreUI image file */
+#define VM_MEMORY_COREUIFILE 77
+
+/* Genealogy buffers */
+#define VM_MEMORY_GENEALOGY 78
+
+/* RawCamera VM allocated memory */
+#define VM_MEMORY_RAWCAMERA 79
+
+/* corpse info for dead process */
+#define VM_MEMORY_CORPSEINFO 80
+
+/* Apple System Logger (ASL) messages */
+#define VM_MEMORY_ASL 81
+
+/* Swift runtime */
+#define VM_MEMORY_SWIFT_RUNTIME 82
+
+/* Swift metadata */
+#define VM_MEMORY_SWIFT_METADATA 83
+
+/* DHMM data */
+#define VM_MEMORY_DHMM 84
+
+
+/* memory allocated by SceneKit.framework */
+#define VM_MEMORY_SCENEKIT 86
+
+/* memory allocated by skywalk networking */
+#define VM_MEMORY_SKYWALK 87
+
+#define VM_MEMORY_IOSURFACE 88
+
+#define VM_MEMORY_LIBNETWORK 89
+
+#define VM_MEMORY_AUDIO 90
+
+#define VM_MEMORY_VIDEOBITSTREAM 91
+
+/* memory allocated by CoreMedia */
+#define VM_MEMORY_CM_XPC 92
+
+#define VM_MEMORY_CM_RPC 93
+
+#define VM_MEMORY_CM_MEMORYPOOL 94
+
+#define VM_MEMORY_CM_READCACHE 95
+
+#define VM_MEMORY_CM_CRABS 96
+
+/* memory allocated for QuickLookThumbnailing */
+#define VM_MEMORY_QUICKLOOK_THUMBNAILS 97
+
+/* memory allocated by Accounts framework */
+#define VM_MEMORY_ACCOUNTS 98
+
+/* memory allocated by Sanitizer runtime libraries */
+#define VM_MEMORY_SANITIZER 99
+
+/* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */
+#define VM_MEMORY_IOACCELERATOR 100
+
+/* memory allocated by CoreMedia for global image registration of frames */
+#define VM_MEMORY_CM_REGWARP 101
+
+/* memory allocated by EmbeddedAcousticRecognition for speech decoder */
+#define VM_MEMORY_EAR_DECODER 102
+
+/* CoreUI cached image data */
+#define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103
+
+/* Reserve 230-239 for Rosetta */
+#define VM_MEMORY_ROSETTA 230
+#define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231
+#define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232
+#define VM_MEMORY_ROSETTA_RETURN_STACK 233
+#define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234
+#define VM_MEMORY_ROSETTA_USER_LDT 235
+#define VM_MEMORY_ROSETTA_ARENA 236
+#define VM_MEMORY_ROSETTA_10 239
+
+/* Reserve 240-255 for application */
+#define VM_MEMORY_APPLICATION_SPECIFIC_1 240
+#define VM_MEMORY_APPLICATION_SPECIFIC_16 255
+
+#define VM_MAKE_TAG(tag) ((tag) << 24)
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* _MACH_VM_STATISTICS_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach/vm_types.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ *
+ */
+#ifndef _MACH_VM_TYPES_H_
+#define _MACH_VM_TYPES_H_
+
+#include <mach/port.h>
+#include <mach/machine/vm_types.h>
+
+#include <stdint.h>
+
+typedef vm_offset_t             pointer_t;
+typedef vm_offset_t             vm_address_t;
+
+/*
+ * We use addr64_t for 64-bit addresses that are used on both
+ * 32 and 64-bit machines.  On PPC, they are passed and returned as
+ * two adjacent 32-bit GPRs.  We use addr64_t in places where
+ * common code must be useable both on 32 and 64-bit machines.
+ */
+typedef uint64_t addr64_t;              /* Basic effective address */
+
+/*
+ * We use reg64_t for addresses that are 32 bits on a 32-bit
+ * machine, and 64 bits on a 64-bit machine, but are always
+ * passed and returned in a single GPR on PPC.  This type
+ * cannot be used in generic 32-bit c, since on a 64-bit
+ * machine the upper half of the register will be ignored
+ * by the c compiler in 32-bit mode.  In c, we can only use the
+ * type in prototypes of functions that are written in and called
+ * from assembly language.  This type is basically a comment.
+ */
+typedef uint32_t        reg64_t;
+
+/*
+ * To minimize the use of 64-bit fields, we keep some physical
+ * addresses (that are page aligned) as 32-bit page numbers.
+ * This limits the physical address space to 16TB of RAM.
+ */
+typedef uint32_t ppnum_t;               /* Physical page number */
+#define PPNUM_MAX UINT32_MAX
+
+
+
+typedef mach_port_t             vm_map_t, vm_map_read_t, vm_map_inspect_t;
+
+
+#define VM_MAP_NULL             ((vm_map_t) 0)
+#define VM_MAP_INSPECT_NULL     ((vm_map_inspect_t) 0)
+#define VM_MAP_READ_NULL        ((vm_map_read_t) 0)
+
+/*
+ * Evolving definitions, likely to change.
+ */
+
+typedef uint64_t                vm_object_offset_t;
+typedef uint64_t                vm_object_size_t;
+
+
+
+
+typedef mach_port_t             upl_t;
+typedef mach_port_t             vm_named_entry_t;
+
+
+#define UPL_NULL                ((upl_t) 0)
+#define VM_NAMED_ENTRY_NULL     ((vm_named_entry_t) 0)
+
+#endif  /* _MACH_VM_TYPES_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/mach-o/loader.h
@@ -1274,8 +1274,6 @@ struct build_tool_version {
 #define PLATFORM_WATCHOSSIMULATOR 9
 #define PLATFORM_DRIVERKIT 10
 
-
-
 /* Known values for the tool field above. */
 #define TOOL_CLANG 1
 #define TOOL_SWIFT 2
@@ -1458,8 +1456,6 @@ struct dyld_info_command {
 #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION			0x04
 #define EXPORT_SYMBOL_FLAGS_REEXPORT				0x08
 #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER			0x10
-#define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER			0x20
-
 
 /*
  * The linker_option_command contains linker options embedded in object files.
lib/libc/include/any-macos.11-any/mach_debug/mach_debug_types.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ *	Mach kernel debugging interface type declarations
+ */
+
+#ifndef _MACH_DEBUG_MACH_DEBUG_TYPES_H_
+#define _MACH_DEBUG_MACH_DEBUG_TYPES_H_
+
+#include <mach_debug/ipc_info.h>
+#include <mach_debug/vm_info.h>
+#include <mach_debug/zone_info.h>
+#include <mach_debug/page_info.h>
+#include <mach_debug/hash_info.h>
+#include <mach_debug/lockgroup_info.h>
+
+#define MACH_CORE_FILEHEADER_SIGNATURE  0x0063614d20646152ULL
+#define MACH_CORE_FILEHEADER_MAXFILES 16
+#define MACH_CORE_FILEHEADER_NAMELEN 16
+
+typedef char    symtab_name_t[32];
+
+struct mach_core_details {
+	uint64_t gzip_offset;
+	uint64_t gzip_length;
+	char core_name[MACH_CORE_FILEHEADER_NAMELEN];
+};
+
+struct mach_core_fileheader {
+	uint64_t signature;
+	uint64_t log_offset;
+	uint64_t log_length;
+	uint64_t num_files;
+	struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES];
+};
+
+#define KOBJECT_DESCRIPTION_LENGTH      512
+typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH];
+
+#endif  /* _MACH_DEBUG_MACH_DEBUG_TYPES_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/machine/_mcontext.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#if defined (__i386__) || defined (__x86_64__)
+#include "i386/_mcontext.h"
+#elif defined (__arm__) || defined (__arm64__)
+#include "arm/_mcontext.h"
+#else
+#error architecture not supported
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/machine/_param.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#if defined (__i386__) || defined (__x86_64__)
+#include <i386/_param.h>
+#elif defined (__arm__) || defined (__arm64__)
+#include <arm/_param.h>
+#else
+#error architecture not supported
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/machine/limits.h
@@ -0,0 +1,11 @@
+/* This is the `system' limits.h, independent of any particular
+ *  compiler.  GCC provides its own limits.h which can be found in
+ *  /usr/lib/gcc, although it is not very informative.
+ *  This file is public domain.  */
+#if defined (__i386__) || defined(__x86_64__)
+#include <i386/limits.h>
+#elif defined (__arm__) || defined (__arm64__)
+#include <arm/limits.h>
+#else
+#error architecture not supported
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/malloc/malloc.h
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MALLOC_MALLOC_H_
+#define _MALLOC_MALLOC_H_
+
+#include <stddef.h>
+#include <mach/mach_types.h>
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#if __has_feature(ptrauth_calls)
+#include <ptrauth.h>
+
+// Zone function pointer, type-diversified but not address-diversified (because
+// the zone can be copied). Process-independent because the zone structure may
+// be in the shared library cache.
+#define MALLOC_ZONE_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \
+		FALSE, ptrauth_string_discriminator("malloc_zone_fn." #fn)) fn
+
+// Introspection function pointer, address- and type-diversified.
+// Process-independent because the malloc_introspection_t structure that contains
+// these pointers may be in the shared library cache.
+#define MALLOC_INTROSPECT_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \
+		TRUE, ptrauth_string_discriminator("malloc_introspect_fn." #fn)) fn
+
+// Pointer to the introspection pointer table, type-diversified but not
+// address-diversified (because the zone can be copied).
+// Process-independent because the table pointer may be in the shared library cache.
+#define MALLOC_INTROSPECT_TBL_PTR(ptr) __ptrauth(ptrauth_key_process_independent_data,\
+		FALSE, ptrauth_string_discriminator("malloc_introspect_tbl")) ptr
+
+#endif	// __has_feature(ptrauth_calls)
+
+#ifndef MALLOC_ZONE_FN_PTR
+#define MALLOC_ZONE_FN_PTR(fn) fn
+#define MALLOC_INTROSPECT_FN_PTR(fn) fn
+#define MALLOC_INTROSPECT_TBL_PTR(ptr) ptr
+#endif // MALLOC_ZONE_FN_PTR
+
+__BEGIN_DECLS
+/*********	Type definitions	************/
+
+typedef struct _malloc_zone_t {
+    /* Only zone implementors should depend on the layout of this structure;
+    Regular callers should use the access functions below */
+    void	*reserved1;	/* RESERVED FOR CFAllocator DO NOT USE */
+    void	*reserved2;	/* RESERVED FOR CFAllocator DO NOT USE */
+    size_t 	(* MALLOC_ZONE_FN_PTR(size))(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */
+    void 	*(* MALLOC_ZONE_FN_PTR(malloc))(struct _malloc_zone_t *zone, size_t size);
+    void 	*(* MALLOC_ZONE_FN_PTR(calloc))(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */
+    void 	*(* MALLOC_ZONE_FN_PTR(valloc))(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */
+    void 	(* MALLOC_ZONE_FN_PTR(free))(struct _malloc_zone_t *zone, void *ptr);
+    void 	*(* MALLOC_ZONE_FN_PTR(realloc))(struct _malloc_zone_t *zone, void *ptr, size_t size);
+    void 	(* MALLOC_ZONE_FN_PTR(destroy))(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */
+    const char	*zone_name;
+
+    /* Optional batch callbacks; these may be NULL */
+    unsigned	(* MALLOC_ZONE_FN_PTR(batch_malloc))(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */
+    void	(* MALLOC_ZONE_FN_PTR(batch_free))(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */
+
+    struct malloc_introspection_t	* MALLOC_INTROSPECT_TBL_PTR(introspect);
+    unsigned	version;
+    	
+    /* aligned memory allocation. The callback may be NULL. Present in version >= 5. */
+    void *(* MALLOC_ZONE_FN_PTR(memalign))(struct _malloc_zone_t *zone, size_t alignment, size_t size);
+    
+    /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. Present in version >= 6.*/
+    void (* MALLOC_ZONE_FN_PTR(free_definite_size))(struct _malloc_zone_t *zone, void *ptr, size_t size);
+
+    /* Empty out caches in the face of memory pressure. The callback may be NULL. Present in version >= 8. */
+    size_t 	(* MALLOC_ZONE_FN_PTR(pressure_relief))(struct _malloc_zone_t *zone, size_t goal);
+
+	/*
+	 * Checks whether an address might belong to the zone. May be NULL. Present in version >= 10.
+	 * False positives are allowed (e.g. the pointer was freed, or it's in zone space that has
+	 * not yet been allocated. False negatives are not allowed.
+	 */
+    boolean_t (* MALLOC_ZONE_FN_PTR(claimed_address))(struct _malloc_zone_t *zone, void *ptr);
+} malloc_zone_t;
+
+/*********	Creation and destruction	************/
+
+extern malloc_zone_t *malloc_default_zone(void);
+    /* The initial zone */
+
+extern malloc_zone_t *malloc_create_zone(vm_size_t start_size, unsigned flags);
+    /* Creates a new zone with default behavior and registers it */
+
+extern void malloc_destroy_zone(malloc_zone_t *zone);
+    /* Destroys zone and everything it allocated */
+
+/*********	Block creation and manipulation	************/
+
+extern void *malloc_zone_malloc(malloc_zone_t *zone, size_t size) __alloc_size(2);
+    /* Allocates a new pointer of size size; zone must be non-NULL */
+
+extern void *malloc_zone_calloc(malloc_zone_t *zone, size_t num_items, size_t size) __alloc_size(2,3);
+    /* Allocates a new pointer of size num_items * size; block is cleared; zone must be non-NULL */
+
+extern void *malloc_zone_valloc(malloc_zone_t *zone, size_t size) __alloc_size(2);
+    /* Allocates a new pointer of size size; zone must be non-NULL; Pointer is guaranteed to be page-aligned and block is cleared */
+
+extern void malloc_zone_free(malloc_zone_t *zone, void *ptr);
+    /* Frees pointer in zone; zone must be non-NULL */
+
+extern void *malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size) __alloc_size(3);
+    /* Enlarges block if necessary; zone must be non-NULL */
+
+extern malloc_zone_t *malloc_zone_from_ptr(const void *ptr);
+    /* Returns the zone for a pointer, or NULL if not in any zone.
+    The ptr must have been returned from a malloc or realloc call. */
+
+extern size_t malloc_size(const void *ptr);
+    /* Returns size of given ptr */
+
+extern size_t malloc_good_size(size_t size);
+    /* Returns number of bytes greater than or equal to size that can be allocated without padding */
+
+extern void *malloc_zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size) __alloc_size(3) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+    /* 
+     * Allocates a new pointer of size size whose address is an exact multiple of alignment.
+     * alignment must be a power of two and at least as large as sizeof(void *).
+     * zone must be non-NULL.
+     */
+
+/*********	Batch methods	************/
+
+extern unsigned malloc_zone_batch_malloc(malloc_zone_t *zone, size_t size, void **results, unsigned num_requested);
+    /* Allocates num blocks of the same size; Returns the number truly allocated (may be 0) */
+
+extern void malloc_zone_batch_free(malloc_zone_t *zone, void **to_be_freed, unsigned num);
+    /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process; This function will always free even if the zone has no batch callback */
+
+/*********	Functions for libcache	************/
+
+extern malloc_zone_t *malloc_default_purgeable_zone(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+    /* Returns a pointer to the default purgeable_zone. */
+
+extern void malloc_make_purgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+    /* Make an allocation from the purgeable zone purgeable if possible.  */
+
+extern int malloc_make_nonpurgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+    /* Makes an allocation from the purgeable zone nonpurgeable.
+     * Returns zero if the contents were not purged since the last
+     * call to malloc_make_purgeable, else returns non-zero. */
+
+/*********	Functions for zone implementors	************/
+
+extern void malloc_zone_register(malloc_zone_t *zone);
+    /* Registers a custom malloc zone; Should typically be called after a 
+     * malloc_zone_t has been filled in with custom methods by a client.  See
+     * malloc_create_zone for creating additional malloc zones with the
+     * default allocation and free behavior. */
+
+extern void malloc_zone_unregister(malloc_zone_t *zone);
+    /* De-registers a zone
+    Should typically be called before calling the zone destruction routine */
+
+extern void malloc_set_zone_name(malloc_zone_t *zone, const char *name);
+    /* Sets the name of a zone */
+
+extern const char *malloc_get_zone_name(malloc_zone_t *zone);
+    /* Returns the name of a zone */
+
+size_t malloc_zone_pressure_relief(malloc_zone_t *zone, size_t goal) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+    /* malloc_zone_pressure_relief() advises the malloc subsystem that the process is under memory pressure and 
+     * that the subsystem should make its best effort towards releasing (i.e. munmap()-ing) "goal" bytes from "zone". 
+     * If "goal" is passed as zero, the malloc subsystem will attempt to achieve maximal pressure relief in "zone". 
+     * If "zone" is passed as NULL, all zones are examined for pressure relief opportunities. 
+     * malloc_zone_pressure_relief() returns the number of bytes released. 
+     */
+
+typedef struct {
+    vm_address_t	address;
+    vm_size_t		size;
+} vm_range_t;
+
+typedef struct malloc_statistics_t {
+    unsigned	blocks_in_use;
+    size_t	size_in_use;
+    size_t	max_size_in_use;	/* high water mark of touched memory */
+    size_t	size_allocated;		/* reserved in memory */
+} malloc_statistics_t;
+
+typedef kern_return_t memory_reader_t(task_t remote_task, vm_address_t remote_address, vm_size_t size, void **local_memory);
+    /* given a task, "reads" the memory at the given address and size
+local_memory: set to a contiguous chunk of memory; validity of local_memory is assumed to be limited (until next call) */
+
+#define MALLOC_PTR_IN_USE_RANGE_TYPE	1	/* for allocated pointers */
+#define MALLOC_PTR_REGION_RANGE_TYPE	2	/* for region containing pointers */
+#define MALLOC_ADMIN_REGION_RANGE_TYPE	4	/* for region used internally */
+#define MALLOC_ZONE_SPECIFIC_FLAGS	0xff00	/* bits reserved for zone-specific purposes */
+
+typedef void vm_range_recorder_t(task_t, void *, unsigned type, vm_range_t *, unsigned);
+    /* given a task and context, "records" the specified addresses */
+
+/* Print function for the print_task() operation. */
+typedef void print_task_printer_t(const char *fmt, ...) __printflike(1,2);
+
+typedef struct malloc_introspection_t {
+	kern_return_t (* MALLOC_INTROSPECT_FN_PTR(enumerator))(task_t task, void *, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder); /* enumerates all the malloc pointers in use */
+	size_t	(* MALLOC_INTROSPECT_FN_PTR(good_size))(malloc_zone_t *zone, size_t size);
+	boolean_t 	(* MALLOC_INTROSPECT_FN_PTR(check))(malloc_zone_t *zone); /* Consistency checker */
+	void 	(* MALLOC_INTROSPECT_FN_PTR(print))(malloc_zone_t *zone, boolean_t verbose); /* Prints zone  */
+	void	(* MALLOC_INTROSPECT_FN_PTR(log))(malloc_zone_t *zone, void *address); /* Enables logging of activity */
+	void	(* MALLOC_INTROSPECT_FN_PTR(force_lock))(malloc_zone_t *zone); /* Forces locking zone */
+	void	(* MALLOC_INTROSPECT_FN_PTR(force_unlock))(malloc_zone_t *zone); /* Forces unlocking zone */
+	void	(* MALLOC_INTROSPECT_FN_PTR(statistics))(malloc_zone_t *zone, malloc_statistics_t *stats); /* Fills statistics */
+	boolean_t   (* MALLOC_INTROSPECT_FN_PTR(zone_locked))(malloc_zone_t *zone); /* Are any zone locks held */
+
+    /* Discharge checking. Present in version >= 7. */
+	boolean_t	(* MALLOC_INTROSPECT_FN_PTR(enable_discharge_checking))(malloc_zone_t *zone);
+	void	(* MALLOC_INTROSPECT_FN_PTR(disable_discharge_checking))(malloc_zone_t *zone);
+	void	(* MALLOC_INTROSPECT_FN_PTR(discharge))(malloc_zone_t *zone, void *memory);
+#ifdef __BLOCKS__
+	void     (* MALLOC_INTROSPECT_FN_PTR(enumerate_discharged_pointers))(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info));
+	#else
+    void	*enumerate_unavailable_without_blocks;   
+#endif /* __BLOCKS__ */
+	void	(* MALLOC_INTROSPECT_FN_PTR(reinit_lock))(malloc_zone_t *zone); /* Reinitialize zone locks, called only from atfork_child handler. Present in version >= 9. */
+	void	(* MALLOC_INTROSPECT_FN_PTR(print_task))(task_t task, unsigned level, vm_address_t zone_address, memory_reader_t reader, print_task_printer_t printer); /* debug print for another process. Present in version >= 11. */
+	void (* MALLOC_INTROSPECT_FN_PTR(task_statistics))(task_t task, vm_address_t zone_address, memory_reader_t reader, malloc_statistics_t *stats); /* Present in version >= 12 */
+} malloc_introspection_t;
+
+// The value of "level" when passed to print_task() that corresponds to
+// verbose passed to print()
+#define MALLOC_VERBOSE_PRINT_LEVEL	2
+
+extern void malloc_printf(const char *format, ...);
+    /* Convenience for logging errors and warnings;
+    No allocation is performed during execution of this function;
+    Only understands usual %p %d %s formats, and %y that expresses a number of bytes (5b,10KB,1MB...)
+    */
+
+/*********	Functions for performance tools	************/
+
+extern kern_return_t malloc_get_all_zones(task_t task, memory_reader_t reader, vm_address_t **addresses, unsigned *count);
+    /* Fills addresses and count with the addresses of the zones in task;
+    Note that the validity of the addresses returned correspond to the validity of the memory returned by reader */
+
+/*********	Debug helpers	************/
+
+extern void malloc_zone_print_ptr_info(void *ptr);
+    /* print to stdout if this pointer is in the malloc heap, free status, and size */
+
+extern boolean_t malloc_zone_check(malloc_zone_t *zone);
+    /* Checks zone is well formed; if !zone, checks all zones */
+
+extern void malloc_zone_print(malloc_zone_t *zone, boolean_t verbose);
+    /* Prints summary on zone; if !zone, prints all zones */
+
+extern void malloc_zone_statistics(malloc_zone_t *zone, malloc_statistics_t *stats);
+    /* Fills statistics for zone; if !zone, sums up all zones */
+
+extern void malloc_zone_log(malloc_zone_t *zone, void *address);
+    /* Controls logging of all activity; if !zone, for all zones;
+    If address==0 nothing is logged;
+    If address==-1 all activity is logged;
+    Else only the activity regarding address is logged */
+
+struct mstats {
+    size_t	bytes_total;
+    size_t	chunks_used;
+    size_t	bytes_used;
+    size_t	chunks_free;
+    size_t	bytes_free;
+};
+
+extern struct mstats mstats(void);
+
+extern boolean_t malloc_zone_enable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+/* Increment the discharge checking enabled counter for a zone. Returns true if the zone supports checking, false if it does not. */
+
+extern void malloc_zone_disable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+/* Decrement the discharge checking enabled counter for a zone. */
+
+extern void malloc_zone_discharge(malloc_zone_t *zone, void *memory) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+/* Register memory that the programmer expects to be freed soon. 
+   zone may be NULL in which case the zone is determined using malloc_zone_from_ptr(). 
+   If discharge checking is off for the zone this function is a no-op. */
+ 
+#ifdef __BLOCKS__
+extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+/* Calls report_discharged for each block that was registered using malloc_zone_discharge() but has not yet been freed. 
+   info is used to provide zone defined information about the memory block. 
+   If zone is NULL then the enumeration covers all zones. */
+#else
+extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+#endif /* __BLOCKS__ */
+
+__END_DECLS
+
+#endif /* _MALLOC_MALLOC_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/net/if.h
@@ -63,24 +63,21 @@
 #ifndef _NET_IF_H_
 #define _NET_IF_H_
 
+#include <sys/cdefs.h>
+#include <net/net_kev.h>
+
 #define IF_NAMESIZE     16
 
 #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
-#include <sys/cdefs.h>
 #include <sys/appleapiopts.h>
 #ifdef __APPLE__
 
 #include <net/if_var.h>
-#include <net/net_kev.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 
 #endif
 
-#ifndef IFNAMSIZ
-#define IFNAMSIZ        IF_NAMESIZE
-#endif
-
 struct if_clonereq {
 	int     ifcr_total;             /* total cloners (out) */
 	int     ifcr_count;             /* room for this many in user buffer */
@@ -288,6 +285,9 @@ struct ifkpi {
  * remainder may be interface specific.
  */
 struct  ifreq {
+#ifndef IFNAMSIZ
+#define IFNAMSIZ        IF_NAMESIZE
+#endif
 	char    ifr_name[IFNAMSIZ];             /* if name, e.g. "en0" */
 	union {
 		struct  sockaddr ifru_addr;
@@ -371,6 +371,7 @@ struct ifmediareq {
 #pragma pack()
 
 
+
 #pragma pack(4)
 struct  ifdrv {
 	char            ifd_name[IFNAMSIZ];     /* if name, e.g. "en0" */
lib/libc/include/any-macos.11-any/net/if_var.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2021 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2020 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
@@ -222,124 +222,6 @@ struct if_data64 {
 };
 
 
-#if defined (PRIVATE) || defined (DRIVERKIT_PRIVATE)
-/*
- * This structure is used to define the parameters for advisory notifications
- * on an interface.
- */
-#pragma pack(push, 1)
-struct ifnet_interface_advisory {
-	/* The current structure version */
-	uint8_t     version;
-#define IF_INTERFACE_ADVISORY_VERSION_1    0x1
-#define IF_INTERFACE_ADVISORY_VERSION_CURRENT  IF_INTERFACE_ADVISORY_VERSION_1
-	/*  Specifies if the advisory is for transmit or receive path */
-	uint8_t     direction;
-#define IF_INTERFACE_ADVISORY_DIRECTION_TX    0x1
-#define IF_INTERFACE_ADVISORY_DIRECTION_RX    0x2
-	/* reserved for future use */
-	uint16_t    _reserved;
-	/*
-	 * suggestion for data rate change to keep the latency low.
-	 * unit: bits per second (bps)
-	 * NOTE: if the interface cannot provide suggestions in terms of bps,
-	 * it should use the following values:
-	 * INT32_MAX : ramp up
-	 * INT32_MIN : ramp down
-	 * 0         : neutral
-	 */
-#define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_UP         INT32_MAX
-#define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_DOWN       INT32_MIN
-#define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_NEUTRAL    0
-	int32_t     rate_trend_suggestion;
-	/*
-	 * Time of the issue of advisory.
-	 * Timestamp should be in the host domain.
-	 * unit: mach absolute time
-	 */
-	uint64_t    timestamp;
-	/*
-	 * Maximum theoretical bandwidth of the interface.
-	 * unit: bits per second (bps)
-	 */
-	uint64_t    max_bandwidth;
-	/*
-	 * Total bytes sent or received on the interface.
-	 * wrap around possible and the application should account for that.
-	 * unit: byte
-	 */
-	uint64_t    total_byte_count;
-	/*
-	 * average throughput observed at the driver stack.
-	 * unit: bits per second (bps)
-	 */
-	uint64_t    average_throughput;
-	/*
-	 * flushable queue size at the driver.
-	 * should be set to UINT32_MAX if not available.
-	 * unit: byte
-	 */
-	uint32_t    flushable_queue_size;
-	/*
-	 * non flushable queue size at the driver.
-	 * should be set to UINT32_MAX if not available.
-	 * unit: byte
-	 */
-	uint32_t    non_flushable_queue_size;
-	/*
-	 * average delay observed at the interface.
-	 * unit: milliseconds (ms)
-	 */
-	uint32_t    average_delay;
-	/*
-	 * Current frequency band (enumeration).
-	 */
-#define IF_INTERFACE_ADVISORY_FREQ_BAND_NOT_AVAIL     0
-#define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_24GHZ    1
-#define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_5GHZ     2
-#define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_6GHZ     3
-	uint8_t    frequency_band;
-	/*
-	 * Intermittent WiFi state [true(1)/false(0)]
-	 */
-	uint8_t     intermittent_state;
-	/*
-	 * Estimated period for which intermittent state is expected to last.
-	 * 1 tick -> 1 ms UNDEF => UINT16_MAX
-	 */
-	uint16_t    estimated_intermittent_period;
-	/*
-	 * Expected wifi outage period during intermittent state
-	 * 1 tick -> 1 ms UNDEF => UINT16_MAX
-	 */
-	uint16_t    single_outage_period;
-
-	/*
-	 * WiFi-BT coexistence, 1-ON, 0-OFF
-	 */
-	uint8_t     bt_coex;
-	/*
-	 * on scale of 1 to 5
-	 */
-	uint8_t     quality_score_delay;
-	/*
-	 * on scale of 1 to 5
-	 */
-	uint8_t     quality_score_loss;
-	/*
-	 * on scale of 1 to 5
-	 */
-	uint8_t     quality_score_channel;
-} __attribute__((aligned(sizeof(uint64_t))));
-#pragma pack(pop)
-
-#else
-
-struct ifnet_interface_advisory;
-
-#endif /* defined (PRIVATE) || defined (DRIVERKIT_PRIVATE) */
-
-
 #pragma pack()
 
 /*
lib/libc/include/any-macos.11-any/net/net_kev.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2016-2018 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _NET_NETKEV_H_
+#define _NET_NETKEV_H_
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+
+/* Kernel event subclass identifiers for KEV_NETWORK_CLASS */
+#define KEV_INET_SUBCLASS       1       /* inet subclass */
+/* KEV_INET_SUBCLASS event codes */
+#define KEV_INET_NEW_ADDR               1 /* Userland configured IP address */
+#define KEV_INET_CHANGED_ADDR           2 /* Address changed event */
+#define KEV_INET_ADDR_DELETED           3 /* IPv6 address was deleted */
+#define KEV_INET_SIFDSTADDR             4 /* Dest. address was set */
+#define KEV_INET_SIFBRDADDR             5 /* Broadcast address was set */
+#define KEV_INET_SIFNETMASK             6 /* Netmask was set */
+#define KEV_INET_ARPCOLLISION           7 /* ARP collision detected */
+#ifdef __APPLE_API_PRIVATE
+#define KEV_INET_PORTINUSE              8 /* use ken_in_portinuse */
+#endif
+#define KEV_INET_ARPRTRFAILURE          9 /* ARP resolution failed for router */
+#define KEV_INET_ARPRTRALIVE            10 /* ARP resolution succeeded for router */
+
+#define KEV_DL_SUBCLASS 2               /* Data Link subclass */
+/*
+ * Define Data-Link event subclass, and associated
+ * events.
+ */
+#define KEV_DL_SIFFLAGS                         1
+#define KEV_DL_SIFMETRICS                       2
+#define KEV_DL_SIFMTU                           3
+#define KEV_DL_SIFPHYS                          4
+#define KEV_DL_SIFMEDIA                         5
+#define KEV_DL_SIFGENERIC                       6
+#define KEV_DL_ADDMULTI                         7
+#define KEV_DL_DELMULTI                         8
+#define KEV_DL_IF_ATTACHED                      9
+#define KEV_DL_IF_DETACHING                     10
+#define KEV_DL_IF_DETACHED                      11
+#define KEV_DL_LINK_OFF                         12
+#define KEV_DL_LINK_ON                          13
+#define KEV_DL_PROTO_ATTACHED                   14
+#define KEV_DL_PROTO_DETACHED                   15
+#define KEV_DL_LINK_ADDRESS_CHANGED             16
+#define KEV_DL_WAKEFLAGS_CHANGED                17
+#define KEV_DL_IF_IDLE_ROUTE_REFCNT             18
+#define KEV_DL_IFCAP_CHANGED                    19
+#define KEV_DL_LINK_QUALITY_METRIC_CHANGED      20
+#define KEV_DL_NODE_PRESENCE                    21
+#define KEV_DL_NODE_ABSENCE                     22
+#define KEV_DL_MASTER_ELECTED                   23
+#define KEV_DL_ISSUES                           24
+#define KEV_DL_IFDELEGATE_CHANGED               25
+#define KEV_DL_AWDL_RESTRICTED                  26
+#define KEV_DL_AWDL_UNRESTRICTED                27
+#define KEV_DL_RRC_STATE_CHANGED                28
+#define KEV_DL_QOS_MODE_CHANGED                 29
+#define KEV_DL_LOW_POWER_MODE_CHANGED           30
+
+
+#define KEV_INET6_SUBCLASS      6       /* inet6 subclass */
+/* KEV_INET6_SUBCLASS event codes */
+#define KEV_INET6_NEW_USER_ADDR         1 /* Userland configured IPv6 address */
+#define KEV_INET6_CHANGED_ADDR          2 /* Address changed event (future) */
+#define KEV_INET6_ADDR_DELETED          3 /* IPv6 address was deleted */
+#define KEV_INET6_NEW_LL_ADDR           4 /* Autoconf LL address appeared */
+#define KEV_INET6_NEW_RTADV_ADDR        5 /* Autoconf address has appeared */
+#define KEV_INET6_DEFROUTER             6 /* Default router detected */
+#define KEV_INET6_REQUEST_NAT64_PREFIX  7 /* Asking for the NAT64-prefix */
+
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#endif /* _NET_NETKEV_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/netinet6/in6.h
@@ -0,0 +1,681 @@
+/*
+ * Copyright (c) 2008-2020 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in.h	8.3 (Berkeley) 1/3/94
+ */
+
+#ifndef __KAME_NETINET_IN_H_INCLUDED_
+#error "do not include netinet6/in6.h directly, include netinet/in.h. " \
+        " see RFC2553"
+#endif
+
+#ifndef _NETINET6_IN6_H_
+#define _NETINET6_IN6_H_
+#include <sys/appleapiopts.h>
+
+#include <sys/_types.h>
+#include <sys/_types/_sa_family_t.h>
+
+/*
+ * Identification of the network protocol stack
+ * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE
+ * has the table of implementation/integration differences.
+ */
+#define __KAME__
+#define __KAME_VERSION          "2009/apple-darwin"
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * Local port number conventions:
+ *
+ * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
+ * unless a kernel is compiled with IPNOPRIVPORTS defined.
+ *
+ * When a user does a bind(2) or connect(2) with a port number of zero,
+ * a non-conflicting local port address is chosen.
+ *
+ * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
+ * that is settable by sysctl(3); net.inet.ip.anonportmin and
+ * net.inet.ip.anonportmax respectively.
+ *
+ * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
+ * default assignment range.
+ *
+ * The value IP_PORTRANGE_DEFAULT causes the default behavior.
+ *
+ * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
+ * and exists only for FreeBSD compatibility purposes.
+ *
+ * The value IP_PORTRANGE_LOW changes the range to the "low" are
+ * that is (by convention) restricted to privileged processes.
+ * This convention is based on "vouchsafe" principles only.
+ * It is only secure if you trust the remote host to restrict these ports.
+ * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
+ */
+
+#define IPV6PORT_RESERVED       1024
+#define IPV6PORT_ANONMIN        49152
+#define IPV6PORT_ANONMAX        65535
+#define IPV6PORT_RESERVEDMIN    600
+#define IPV6PORT_RESERVEDMAX    (IPV6PORT_RESERVED-1)
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+/*
+ * IPv6 address
+ */
+typedef struct in6_addr {
+	union {
+		__uint8_t   __u6_addr8[16];
+		__uint16_t  __u6_addr16[8];
+		__uint32_t  __u6_addr32[4];
+	} __u6_addr;                    /* 128-bit IP6 address */
+} in6_addr_t;
+
+#define s6_addr   __u6_addr.__u6_addr8
+
+#define INET6_ADDRSTRLEN        46
+
+/*
+ * Socket address for IPv6
+ */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SIN6_LEN
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+struct sockaddr_in6 {
+	__uint8_t       sin6_len;       /* length of this struct(sa_family_t) */
+	sa_family_t     sin6_family;    /* AF_INET6 (sa_family_t) */
+	in_port_t       sin6_port;      /* Transport layer port # (in_port_t) */
+	__uint32_t      sin6_flowinfo;  /* IP6 flow information */
+	struct in6_addr sin6_addr;      /* IP6 address */
+	__uint32_t      sin6_scope_id;  /* scope zone index */
+};
+
+
+
+
+
+/*
+ * Definition of some useful macros to handle IP6 addresses
+ */
+#define IN6ADDR_ANY_INIT \
+	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
+#define IN6ADDR_LOOPBACK_INIT \
+	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define IN6ADDR_NODELOCAL_ALLNODES_INIT \
+	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \
+	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
+	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
+	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}}
+#define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \
+	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}}
+#define IN6ADDR_V4MAPPED_INIT \
+	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+	    0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
+#define IN6ADDR_MULTICAST_PREFIX        IN6MASK8
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+extern const struct in6_addr in6addr_any;
+extern const struct in6_addr in6addr_loopback;
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+extern const struct in6_addr in6addr_nodelocal_allnodes;
+extern const struct in6_addr in6addr_linklocal_allnodes;
+extern const struct in6_addr in6addr_linklocal_allrouters;
+extern const struct in6_addr in6addr_linklocal_allv2routers;
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+/*
+ * Equality
+ * NOTE: Some of kernel programming environment (for example, openbsd/sparc)
+ * does not supply memcmp().  For userland memcmp() is preferred as it is
+ * in ANSI standard.
+ */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define IN6_ARE_ADDR_EQUAL(a, b) \
+	(memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof (struct in6_addr)) \
+	== 0)
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+
+/*
+ * Unspecified
+ */
+#define IN6_IS_ADDR_UNSPECIFIED(a)      \
+	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+
+/*
+ * Loopback
+ */
+#define IN6_IS_ADDR_LOOPBACK(a)         \
+	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
+
+/*
+ * IPv4 compatible
+ */
+#define IN6_IS_ADDR_V4COMPAT(a)         \
+	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
+
+/*
+ * Mapped
+ */
+#define IN6_IS_ADDR_V4MAPPED(a)               \
+	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == \
+	ntohl(0x0000ffff)))
+
+/*
+ * 6to4
+ */
+#define IN6_IS_ADDR_6TO4(x)     (ntohs((x)->s6_addr16[0]) == 0x2002)
+
+/*
+ * KAME Scope Values
+ */
+
+#define __IPV6_ADDR_SCOPE_NODELOCAL     0x01
+#define __IPV6_ADDR_SCOPE_INTFACELOCAL  0x01
+#define __IPV6_ADDR_SCOPE_LINKLOCAL     0x02
+#define __IPV6_ADDR_SCOPE_SITELOCAL     0x05
+#define __IPV6_ADDR_SCOPE_ORGLOCAL      0x08    /* just used in this file */
+#define __IPV6_ADDR_SCOPE_GLOBAL        0x0e
+
+/*
+ * Unicast Scope
+ * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
+ */
+#define IN6_IS_ADDR_LINKLOCAL(a)        \
+	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+#define IN6_IS_ADDR_SITELOCAL(a)        \
+	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+
+/*
+ * Multicast
+ */
+#define IN6_IS_ADDR_MULTICAST(a)        ((a)->s6_addr[0] == 0xff)
+
+#define IPV6_ADDR_MC_FLAGS(a)           ((a)->s6_addr[1] & 0xf0)
+
+#define IPV6_ADDR_MC_FLAGS_TRANSIENT            0x10
+#define IPV6_ADDR_MC_FLAGS_PREFIX               0x20
+#define IPV6_ADDR_MC_FLAGS_UNICAST_BASED        (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX)
+
+#define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a)  \
+	(IN6_IS_ADDR_MULTICAST(a) &&            \
+	(IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED))
+
+/*
+ * Unique Local IPv6 Unicast Addresses (per RFC 4193)
+ */
+#define IN6_IS_ADDR_UNIQUE_LOCAL(a) \
+	(((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd))
+
+#define __IPV6_ADDR_MC_SCOPE(a)         ((a)->s6_addr[1] & 0x0f)
+
+/*
+ * Multicast Scope
+ */
+#define IN6_IS_ADDR_MC_NODELOCAL(a)     \
+	(IN6_IS_ADDR_MULTICAST(a) &&    \
+	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a)                                             \
+	(IN6_IS_ADDR_MULTICAST(a) &&                                            \
+	(IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) &&          \
+	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
+#define IN6_IS_ADDR_MC_SITELOCAL(a)     \
+	(IN6_IS_ADDR_MULTICAST(a) &&    \
+	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
+#define IN6_IS_ADDR_MC_ORGLOCAL(a)      \
+	(IN6_IS_ADDR_MULTICAST(a) &&    \
+	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
+#define IN6_IS_ADDR_MC_GLOBAL(a)        \
+	(IN6_IS_ADDR_MULTICAST(a) &&    \
+	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL))
+
+
+
+
+/*
+ * Options for use with [gs]etsockopt at the IPV6 level.
+ * First word of comment is data type; bool is stored in int.
+ */
+/* no hdrincl */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * RFC 3542 define the following socket options in a manner incompatible
+ * with RFC 2292:
+ *   IPV6_PKTINFO
+ *   IPV6_HOPLIMIT
+ *   IPV6_NEXTHOP
+ *   IPV6_HOPOPTS
+ *   IPV6_DSTOPTS
+ *   IPV6_RTHDR
+ *
+ * To use the new IPv6 Sockets options introduced by RFC 3542
+ * the constant __APPLE_USE_RFC_3542 must be defined before
+ * including <netinet/in.h>
+ *
+ * To use the old IPv6 Sockets options from RFC 2292
+ * the constant __APPLE_USE_RFC_2292 must be defined before
+ * including <netinet/in.h>
+ *
+ * Note that eventually RFC 3542 is going to be the
+ * default and RFC 2292 will be obsolete.
+ */
+
+#if defined(__APPLE_USE_RFC_3542) && defined(__APPLE_USE_RFC_2292)
+#error "__APPLE_USE_RFC_3542 and __APPLE_USE_RFC_2292 cannot be both defined"
+#endif
+
+#if 0 /* the followings are relic in IPv4 and hence are disabled */
+#define IPV6_OPTIONS            1  /* buf/ip6_opts; set/get IP6 options */
+#define IPV6_RECVOPTS           5  /* bool; receive all IP6 opts w/dgram */
+#define IPV6_RECVRETOPTS        6  /* bool; receive IP6 opts for response */
+#define IPV6_RECVDSTADDR        7  /* bool; receive IP6 dst addr w/dgram */
+#define IPV6_RETOPTS            8  /* ip6_opts; set/get IP6 options */
+#endif /* 0 */
+#define IPV6_SOCKOPT_RESERVED1  3  /* reserved for future use */
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+#define IPV6_UNICAST_HOPS       4  /* int; IP6 hops */
+#define IPV6_MULTICAST_IF       9  /* u_int; set/get IP6 multicast i/f  */
+#define IPV6_MULTICAST_HOPS     10 /* int; set/get IP6 multicast hops */
+#define IPV6_MULTICAST_LOOP     11 /* u_int; set/get IP6 mcast loopback */
+#define IPV6_JOIN_GROUP         12 /* ip6_mreq; join a group membership */
+#define IPV6_LEAVE_GROUP        13 /* ip6_mreq; leave a group membership */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define IPV6_PORTRANGE          14 /* int; range to choose for unspec port */
+#define ICMP6_FILTER            18 /* icmp6_filter; icmp6 filter */
+#define IPV6_2292PKTINFO        19 /* bool; send/recv if, src/dst addr */
+#define IPV6_2292HOPLIMIT       20 /* bool; hop limit */
+#define IPV6_2292NEXTHOP        21 /* bool; next hop addr */
+#define IPV6_2292HOPOPTS        22 /* bool; hop-by-hop option */
+#define IPV6_2292DSTOPTS        23 /* bool; destinaion option */
+#define IPV6_2292RTHDR          24 /* ip6_rthdr: routing header */
+
+/* buf/cmsghdr; set/get IPv6 options [obsoleted by RFC3542] */
+#define IPV6_2292PKTOPTIONS     25
+
+#ifdef __APPLE_USE_RFC_2292
+#define IPV6_PKTINFO    IPV6_2292PKTINFO
+#define IPV6_HOPLIMIT   IPV6_2292HOPLIMIT
+#define IPV6_NEXTHOP    IPV6_2292NEXTHOP
+#define IPV6_HOPOPTS    IPV6_2292HOPOPTS
+#define IPV6_DSTOPTS    IPV6_2292DSTOPTS
+#define IPV6_RTHDR      IPV6_2292RTHDR
+#define IPV6_PKTOPTIONS IPV6_2292PKTOPTIONS
+#endif /* __APPLE_USE_RFC_2292 */
+
+#define IPV6_CHECKSUM           26 /* int; checksum offset for raw socket */
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+#define IPV6_V6ONLY             27 /* bool; only bind INET6 at wildcard bind */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define IPV6_BINDV6ONLY         IPV6_V6ONLY
+
+
+#if 1 /* IPSEC */
+#define IPV6_IPSEC_POLICY       28 /* struct; get/set security policy */
+#endif /* 1 */
+#define IPV6_FAITH              29 /* deprecated */
+
+#if 1 /* IPV6FIREWALL */
+#define IPV6_FW_ADD             30 /* add a firewall rule to chain */
+#define IPV6_FW_DEL             31 /* delete a firewall rule from chain */
+#define IPV6_FW_FLUSH           32 /* flush firewall rule chain */
+#define IPV6_FW_ZERO            33 /* clear single/all firewall counter(s) */
+#define IPV6_FW_GET             34 /* get entire firewall rule chain */
+#endif /* 1 */
+
+/*
+ * APPLE: NOTE the value of those 2 options is kept unchanged from
+ *   previous version of darwin/OS X for binary compatibility reasons
+ *   and differ from FreeBSD (values 57 and 61). See below.
+ */
+#define IPV6_RECVTCLASS         35 /* bool; recv traffic class values */
+#define IPV6_TCLASS             36 /* int; send traffic class value */
+
+#ifdef __APPLE_USE_RFC_3542
+/* new socket options introduced in RFC3542 */
+/*
+ * ip6_dest; send dst option before rthdr
+ * APPLE: Value purposely different than FreeBSD (35) to avoid
+ * collision with definition of IPV6_RECVTCLASS in previous
+ * darwin implementations
+ */
+#define IPV6_RTHDRDSTOPTS       57
+
+/*
+ * bool; recv if, dst addr
+ * APPLE: Value purposely different than FreeBSD(36) to avoid
+ * collision with definition of IPV6_TCLASS in previous
+ * darwin implementations
+ */
+#define IPV6_RECVPKTINFO        61
+
+#define IPV6_RECVHOPLIMIT       37 /* bool; recv hop limit */
+#define IPV6_RECVRTHDR          38 /* bool; recv routing header */
+#define IPV6_RECVHOPOPTS        39 /* bool; recv hop-by-hop option */
+#define IPV6_RECVDSTOPTS        40 /* bool; recv dst option after rthdr */
+
+#define IPV6_USE_MIN_MTU        42 /* bool; send packets at the minimum MTU */
+#define IPV6_RECVPATHMTU        43 /* bool; notify an according MTU */
+
+/*
+ * mtuinfo; get the current path MTU (sopt), 4 bytes int;
+ * MTU notification (cmsg)
+ */
+#define IPV6_PATHMTU            44
+
+#if 0 /* obsoleted during 2292bis -> 3542 */
+/* no data; ND reachability confirm (cmsg only/not in of RFC3542) */
+#define IPV6_REACHCONF          45
+#endif
+/* more new socket options introduced in RFC3542 */
+#define IPV6_3542PKTINFO        46 /* in6_pktinfo; send if, src addr */
+#define IPV6_3542HOPLIMIT       47 /* int; send hop limit */
+#define IPV6_3542NEXTHOP        48 /* sockaddr; next hop addr */
+#define IPV6_3542HOPOPTS        49 /* ip6_hbh; send hop-by-hop option */
+#define IPV6_3542DSTOPTS        50 /* ip6_dest; send dst option befor rthdr */
+#define IPV6_3542RTHDR          51 /* ip6_rthdr; send routing header */
+
+#define IPV6_PKTINFO    IPV6_3542PKTINFO
+#define IPV6_HOPLIMIT   IPV6_3542HOPLIMIT
+#define IPV6_NEXTHOP    IPV6_3542NEXTHOP
+#define IPV6_HOPOPTS    IPV6_3542HOPOPTS
+#define IPV6_DSTOPTS    IPV6_3542DSTOPTS
+#define IPV6_RTHDR      IPV6_3542RTHDR
+
+#define IPV6_AUTOFLOWLABEL      59 /* bool; attach flowlabel automagically */
+
+#define IPV6_DONTFRAG           62 /* bool; disable IPv6 fragmentation */
+
+/* int; prefer temporary addresses as the source address. */
+#define IPV6_PREFER_TEMPADDR    63
+
+/*
+ * The following option is private; do not use it from user applications.
+ * It is deliberately defined to the same value as IP_MSFILTER.
+ */
+#define IPV6_MSFILTER           74 /* struct __msfilterreq; */
+#endif /* __APPLE_USE_RFC_3542 */
+
+#define IPV6_BOUND_IF           125 /* int; set/get bound interface */
+
+
+/* to define items, should talk with KAME guys first, for *BSD compatibility */
+
+#define IPV6_RTHDR_LOOSE        0 /* this hop need not be a neighbor. */
+#define IPV6_RTHDR_STRICT       1 /* this hop must be a neighbor. */
+#define IPV6_RTHDR_TYPE_0       0 /* IPv6 routing header type 0 */
+
+/*
+ * Defaults and limits for options
+ */
+#define IPV6_DEFAULT_MULTICAST_HOPS 1   /* normally limit m'casts to 1 hop  */
+#define IPV6_DEFAULT_MULTICAST_LOOP 1   /* normally hear sends if a member  */
+
+/*
+ * The im6o_membership vector for each socket is now dynamically allocated at
+ * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized
+ * according to a power-of-two increment.
+ */
+#define IPV6_MIN_MEMBERSHIPS    31
+#define IPV6_MAX_MEMBERSHIPS    4095
+
+/*
+ * Default resource limits for IPv6 multicast source filtering.
+ * These may be modified by sysctl.
+ */
+#define IPV6_MAX_GROUP_SRC_FILTER       512     /* sources per group */
+#define IPV6_MAX_SOCK_SRC_FILTER        128     /* sources per socket/group */
+
+/*
+ * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP.
+ */
+struct ipv6_mreq {
+	struct in6_addr ipv6mr_multiaddr;
+	unsigned int    ipv6mr_interface;
+};
+
+/*
+ * IPV6_2292PKTINFO: Packet information(RFC2292 sec 5)
+ */
+struct in6_pktinfo {
+	struct in6_addr ipi6_addr;      /* src/dst IPv6 address */
+	unsigned int    ipi6_ifindex;   /* send/recv interface index */
+};
+
+/*
+ * Control structure for IPV6_RECVPATHMTU socket option.
+ */
+struct ip6_mtuinfo {
+	struct sockaddr_in6 ip6m_addr;  /* or sockaddr_storage? */
+	uint32_t ip6m_mtu;
+};
+
+/*
+ * Argument for IPV6_PORTRANGE:
+ * - which range to search when port is unspecified at bind() or connect()
+ */
+#define IPV6_PORTRANGE_DEFAULT  0       /* default range */
+#define IPV6_PORTRANGE_HIGH     1       /* "high" - request firewall bypass */
+#define IPV6_PORTRANGE_LOW      2       /* "low" - vouchsafe security */
+
+/*
+ * Definitions for inet6 sysctl operations.
+ *
+ * Third level is protocol number.
+ * Fourth level is desired variable within that protocol.
+ */
+#define IPV6PROTO_MAXID (IPPROTO_PIM + 1)  /* don't list to IPV6PROTO_MAX */
+
+/*
+ * Names for IP sysctl objects
+ */
+#define IPV6CTL_FORWARDING      1       /* act as router */
+#define IPV6CTL_SENDREDIRECTS   2       /* may send redirects when forwarding */
+#define IPV6CTL_DEFHLIM         3       /* default Hop-Limit */
+#ifdef notyet
+#define IPV6CTL_DEFMTU          4       /* default MTU */
+#endif
+#define IPV6CTL_FORWSRCRT       5       /* forward source-routed dgrams */
+#define IPV6CTL_STATS           6       /* stats */
+#define IPV6CTL_MRTSTATS        7       /* multicast forwarding stats */
+#define IPV6CTL_MRTPROTO        8       /* multicast routing protocol */
+#define IPV6CTL_MAXFRAGPACKETS  9       /* max packets reassembly queue */
+#define IPV6CTL_SOURCECHECK     10      /* verify source route and intf */
+#define IPV6CTL_SOURCECHECK_LOGINT 11   /* minimume logging interval */
+#define IPV6CTL_ACCEPT_RTADV    12
+#define IPV6CTL_KEEPFAITH       13      /* deprecated */
+#define IPV6CTL_LOG_INTERVAL    14
+#define IPV6CTL_HDRNESTLIMIT    15
+#define IPV6CTL_DAD_COUNT       16
+#define IPV6CTL_AUTO_FLOWLABEL  17
+#define IPV6CTL_DEFMCASTHLIM    18
+#define IPV6CTL_GIF_HLIM        19      /* default HLIM for gif encap packet */
+#define IPV6CTL_KAME_VERSION    20
+#define IPV6CTL_USE_DEPRECATED  21      /* use deprec addr (RFC2462 5.5.4) */
+#define IPV6CTL_RR_PRUNE        22      /* walk timer for router renumbering */
+#if 0   /* obsolete */
+#define IPV6CTL_MAPPED_ADDR     23
+#endif
+#define IPV6CTL_V6ONLY          24
+#define IPV6CTL_RTEXPIRE        25      /* cloned route expiration time */
+#define IPV6CTL_RTMINEXPIRE     26      /* min value for expiration time */
+#define IPV6CTL_RTMAXCACHE      27      /* trigger level for dynamic expire */
+
+#define IPV6CTL_USETEMPADDR     32      /* use temporary addresses [RFC 4941] */
+#define IPV6CTL_TEMPPLTIME      33      /* preferred lifetime for tmpaddrs */
+#define IPV6CTL_TEMPVLTIME      34      /* valid lifetime for tmpaddrs */
+#define IPV6CTL_AUTO_LINKLOCAL  35      /* automatic link-local addr assign */
+#define IPV6CTL_RIP6STATS       36      /* raw_ip6 stats */
+#define IPV6CTL_PREFER_TEMPADDR 37      /* prefer temporary addr as src */
+#define IPV6CTL_ADDRCTLPOLICY   38      /* get/set address selection policy */
+#define IPV6CTL_USE_DEFAULTZONE 39      /* use default scope zone */
+
+#define IPV6CTL_MAXFRAGS        41      /* max fragments */
+#define IPV6CTL_MCAST_PMTU      44      /* enable pMTU discovery for mcast? */
+
+#define IPV6CTL_NEIGHBORGCTHRESH 46
+#define IPV6CTL_MAXIFPREFIXES   47
+#define IPV6CTL_MAXIFDEFROUTERS 48
+#define IPV6CTL_MAXDYNROUTES    49
+#define ICMPV6CTL_ND6_ONLINKNSRFC4861   50
+
+/* New entries should be added here from current IPV6CTL_MAXID value. */
+/* to define items, should talk with KAME guys first, for *BSD compatibility */
+#define IPV6CTL_MAXID           51
+
+
+
+
+
+__BEGIN_DECLS
+struct cmsghdr;
+
+extern int inet6_option_space(int);
+extern int inet6_option_init(void *, struct cmsghdr **, int);
+extern int inet6_option_append(struct cmsghdr *, const __uint8_t *, int, int);
+extern __uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int);
+extern int inet6_option_next(const struct cmsghdr *, __uint8_t **);
+extern int inet6_option_find(const struct cmsghdr *, __uint8_t **, int);
+
+extern size_t inet6_rthdr_space(int, int);
+extern struct cmsghdr *inet6_rthdr_init(void *, int);
+extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *,
+    unsigned int);
+extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int);
+#if 0 /* not implemented yet */
+extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *);
+#endif
+extern int inet6_rthdr_segments(const struct cmsghdr *);
+extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int);
+extern int inet6_rthdr_getflags(const struct cmsghdr *, int);
+
+extern int inet6_opt_init(void *, socklen_t);
+extern int inet6_opt_append(void *, socklen_t, int, __uint8_t, socklen_t,
+    __uint8_t, void **);
+extern int inet6_opt_finish(void *, socklen_t, int);
+extern int inet6_opt_set_val(void *, int, void *, socklen_t);
+
+extern int inet6_opt_next(void *, socklen_t, int, __uint8_t *, socklen_t *,
+    void **);
+extern int inet6_opt_find(void *, socklen_t, int, __uint8_t, socklen_t *,
+    void **);
+extern int inet6_opt_get_val(void *, int, void *, socklen_t);
+extern socklen_t inet6_rth_space(int, int);
+extern void *inet6_rth_init(void *, socklen_t, int, int);
+extern int inet6_rth_add(void *, const struct in6_addr *);
+extern int inet6_rth_reverse(const void *, void *);
+extern int inet6_rth_segments(const void *);
+extern struct in6_addr *inet6_rth_getaddr(const void *, int);
+
+__END_DECLS
+#endif /* PLATFORM_DriverKit */
+#endif /* !_NETINET6_IN6_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/objc/message.h
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 1999-2007 Apple Inc.  All Rights Reserved.
+ * 
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _OBJC_MESSAGE_H
+#define _OBJC_MESSAGE_H
+
+#include <objc/objc.h>
+#include <objc/runtime.h>
+
+#ifndef OBJC_SUPER
+#define OBJC_SUPER
+
+/// Specifies the superclass of an instance. 
+struct objc_super {
+    /// Specifies an instance of a class.
+    __unsafe_unretained _Nonnull id receiver;
+
+    /// Specifies the particular superclass of the instance to message. 
+#if !defined(__cplusplus)  &&  !__OBJC2__
+    /* For compatibility with old objc-runtime.h header */
+    __unsafe_unretained _Nonnull Class class;
+#else
+    __unsafe_unretained _Nonnull Class super_class;
+#endif
+    /* super_class is the first class to search */
+};
+#endif
+
+
+/* Basic Messaging Primitives
+ *
+ * On some architectures, use objc_msgSend_stret for some struct return types.
+ * On some architectures, use objc_msgSend_fpret for some float return types.
+ * On some architectures, use objc_msgSend_fp2ret for some float return types.
+ *
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called. 
+ */
+#if !OBJC_OLD_DISPATCH_PROTOTYPES
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+OBJC_EXPORT void
+objc_msgSend(void /* id self, SEL op, ... */ )
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+objc_msgSendSuper(void /* struct objc_super *super, SEL op, ... */ )
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+#pragma clang diagnostic pop
+#else
+/** 
+ * Sends a message with a simple return value to an instance of a class.
+ * 
+ * @param self A pointer to the instance of the class that is to receive the message.
+ * @param op The selector of the method that handles the message.
+ * @param ... 
+ *   A variable argument list containing the arguments to the method.
+ * 
+ * @return The return value of the method.
+ * 
+ * @note When it encounters a method call, the compiler generates a call to one of the
+ *  functions \c objc_msgSend, \c objc_msgSend_stret, \c objc_msgSendSuper, or \c objc_msgSendSuper_stret.
+ *  Messages sent to an objectโ€™s superclass (using the \c super keyword) are sent using \c objc_msgSendSuper; 
+ *  other messages are sent using \c objc_msgSend. Methods that have data structures as return values
+ *  are sent using \c objc_msgSendSuper_stret and \c objc_msgSend_stret.
+ */
+OBJC_EXPORT id _Nullable
+objc_msgSend(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+/** 
+ * Sends a message with a simple return value to the superclass of an instance of a class.
+ * 
+ * @param super A pointer to an \c objc_super data structure. Pass values identifying the
+ *  context the message was sent to, including the instance of the class that is to receive the
+ *  message and the superclass at which to start searching for the method implementation.
+ * @param op A pointer of type SEL. Pass the selector of the method that will handle the message.
+ * @param ...
+ *   A variable argument list containing the arguments to the method.
+ * 
+ * @return The return value of the method identified by \e op.
+ * 
+ * @see objc_msgSend
+ */
+OBJC_EXPORT id _Nullable
+objc_msgSendSuper(struct objc_super * _Nonnull super, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+#endif
+
+
+/* Struct-returning Messaging Primitives
+ *
+ * Use these functions to call methods that return structs on the stack. 
+ * On some architectures, some structures are returned in registers. 
+ * Consult your local function call ABI documentation for details.
+ * 
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called. 
+ */
+#if !OBJC_OLD_DISPATCH_PROTOTYPES
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+OBJC_EXPORT void
+objc_msgSend_stret(void /* id self, SEL op, ... */ )
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+
+OBJC_EXPORT void
+objc_msgSendSuper_stret(void /* struct objc_super *super, SEL op, ... */ )
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#pragma clang diagnostic pop
+#else
+/** 
+ * Sends a message with a data-structure return value to an instance of a class.
+ * 
+ * @see objc_msgSend
+ */
+OBJC_EXPORT void
+objc_msgSend_stret(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+
+/** 
+ * Sends a message with a data-structure return value to the superclass of an instance of a class.
+ * 
+ * @see objc_msgSendSuper
+ */
+OBJC_EXPORT void
+objc_msgSendSuper_stret(struct objc_super * _Nonnull super,
+                        SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#endif
+
+
+/* Floating-point-returning Messaging Primitives
+ * 
+ * Use these functions to call methods that return floating-point values 
+ * on the stack. 
+ * Consult your local function call ABI documentation for details.
+ * 
+ * arm:    objc_msgSend_fpret not used
+ * i386:   objc_msgSend_fpret used for `float`, `double`, `long double`.
+ * x86-64: objc_msgSend_fpret used for `long double`.
+ *
+ * arm:    objc_msgSend_fp2ret not used
+ * i386:   objc_msgSend_fp2ret not used
+ * x86-64: objc_msgSend_fp2ret used for `_Complex long double`.
+ *
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called. 
+ */
+#if !OBJC_OLD_DISPATCH_PROTOTYPES
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+
+# if defined(__i386__)
+
+OBJC_EXPORT void
+objc_msgSend_fpret(void /* id self, SEL op, ... */ )
+    OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0);
+
+# elif defined(__x86_64__)
+
+OBJC_EXPORT void
+objc_msgSend_fpret(void /* id self, SEL op, ... */ )
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+objc_msgSend_fp2ret(void /* id self, SEL op, ... */ )
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+
+#pragma clang diagnostic pop
+# endif
+
+// !OBJC_OLD_DISPATCH_PROTOTYPES
+#else
+// OBJC_OLD_DISPATCH_PROTOTYPES
+# if defined(__i386__)
+
+/** 
+ * Sends a message with a floating-point return value to an instance of a class.
+ * 
+ * @see objc_msgSend
+ * @note On the i386 platform, the ABI for functions returning a floating-point value is
+ *  incompatible with that for functions returning an integral type. On the i386 platform, therefore, 
+ *  you must use \c objc_msgSend_fpret for functions returning non-integral type. For \c float or 
+ *  \c long \c double return types, cast the function to an appropriate function pointer type first.
+ */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+OBJC_EXPORT double
+objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0);
+#pragma clang diagnostic pop
+
+/* Use objc_msgSendSuper() for fp-returning messages to super. */
+/* See also objc_msgSendv_fpret() below. */
+
+# elif defined(__x86_64__)
+/** 
+ * Sends a message with a floating-point return value to an instance of a class.
+ * 
+ * @see objc_msgSend
+ */
+OBJC_EXPORT long double
+objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+
+#  if __STDC_VERSION__ >= 199901L
+OBJC_EXPORT _Complex long double
+objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+#  else
+OBJC_EXPORT void objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...)
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+#  endif
+
+/* Use objc_msgSendSuper() for fp-returning messages to super. */
+/* See also objc_msgSendv_fpret() below. */
+
+# endif
+
+// OBJC_OLD_DISPATCH_PROTOTYPES
+#endif
+
+
+/* Direct Method Invocation Primitives
+ * Use these functions to call the implementation of a given Method.
+ * This is faster than calling method_getImplementation() and method_getName().
+ *
+ * The receiver must not be nil.
+ *
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called. 
+ */
+#if !OBJC_OLD_DISPATCH_PROTOTYPES
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+OBJC_EXPORT void
+method_invoke(void /* id receiver, Method m, ... */ ) 
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+method_invoke_stret(void /* id receiver, Method m, ... */ ) 
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#pragma clang diagnostic pop
+#else
+OBJC_EXPORT id _Nullable
+method_invoke(id _Nullable receiver, Method _Nonnull m, ...) 
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+method_invoke_stret(id _Nullable receiver, Method _Nonnull m, ...) 
+    OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#endif
+
+
+/* Message Forwarding Primitives
+ * Use these functions to forward a message as if the receiver did not 
+ * respond to it. 
+ *
+ * The receiver must not be nil.
+ * 
+ * class_getMethodImplementation() may return (IMP)_objc_msgForward.
+ * class_getMethodImplementation_stret() may return (IMP)_objc_msgForward_stret
+ * 
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called. 
+ *
+ * Before Mac OS X 10.6, _objc_msgForward must not be called directly 
+ * but may be compared to other IMP values.
+ */
+#if !OBJC_OLD_DISPATCH_PROTOTYPES
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration"
+OBJC_EXPORT void
+_objc_msgForward(void /* id receiver, SEL sel, ... */ ) 
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+_objc_msgForward_stret(void /* id receiver, SEL sel, ... */ ) 
+    OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#pragma clang diagnostic pop
+#else
+OBJC_EXPORT id _Nullable
+_objc_msgForward(id _Nonnull receiver, SEL _Nonnull sel, ...) 
+    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
+
+OBJC_EXPORT void
+_objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) 
+    OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0)
+    OBJC_ARM64_UNAVAILABLE;
+#endif
+
+
+/* Variable-argument Messaging Primitives
+ *
+ * Use these functions to call methods with a list of arguments, such 
+ * as the one passed to forward:: .
+ *
+ * The contents of the argument list are architecture-specific. 
+ * Consult your local function call ABI documentation for details.
+ * 
+ * These functions must be cast to an appropriate function pointer type 
+ * before being called, except for objc_msgSendv_stret() which must not 
+ * be cast to a struct-returning type.
+ */
+
+typedef void* marg_list;
+
+OBJC_EXPORT id _Nullable
+objc_msgSendv(id _Nullable self, SEL _Nonnull op, size_t arg_size,
+              marg_list _Nonnull arg_frame)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+objc_msgSendv_stret(void * _Nonnull stretAddr, id _Nullable self,
+                    SEL _Nonnull op, size_t arg_size,
+                    marg_list _Nullable arg_frame)
+    OBJC2_UNAVAILABLE;
+/* Note that objc_msgSendv_stret() does not return a structure type, 
+ * and should not be cast to do so. This is unlike objc_msgSend_stret() 
+ * and objc_msgSendSuper_stret().
+ */
+#if defined(__i386__)
+OBJC_EXPORT double
+objc_msgSendv_fpret(id _Nullable self, SEL _Nonnull op,
+                    unsigned arg_size, marg_list _Nullable arg_frame)
+    OBJC2_UNAVAILABLE;
+#endif
+
+
+/* The following marg_list macros are of marginal utility. They
+ * are included for compatibility with the old objc-class.h header. */
+
+#if !__OBJC2__
+
+#define marg_prearg_size	0
+
+#define marg_malloc(margs, method) \
+	do { \
+		margs = (marg_list *)malloc (marg_prearg_size + ((7 + method_getSizeOfArguments(method)) & ~7)); \
+	} while (0)
+
+#define marg_free(margs) \
+	do { \
+		free(margs); \
+	} while (0)
+	
+#define marg_adjustedOffset(method, offset) \
+	(marg_prearg_size + offset)
+
+#define marg_getRef(margs, offset, type) \
+	( (type *)((char *)margs + marg_adjustedOffset(method,offset) ) )
+
+#define marg_getValue(margs, offset, type) \
+	( *marg_getRef(margs, offset, type) )
+
+#define marg_setValue(margs, offset, type, value) \
+	( marg_getValue(margs, offset, type) = (value) )
+
+#endif
+
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/objc/NSObjCRuntime.h
@@ -0,0 +1,33 @@
+/*	NSObjCRuntime.h
+	Copyright (c) 1994-2012, Apple Inc. All rights reserved.
+*/
+
+#ifndef _OBJC_NSOBJCRUNTIME_H_
+#define _OBJC_NSOBJCRUNTIME_H_
+
+#include <TargetConditionals.h>
+#include <objc/objc.h>
+
+#if __LP64__ || 0 || NS_BUILD_32_LIKE_64
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+
+#define NSIntegerMax    LONG_MAX
+#define NSIntegerMin    LONG_MIN
+#define NSUIntegerMax   ULONG_MAX
+
+#define NSINTEGER_DEFINED 1
+
+#ifndef NS_DESIGNATED_INITIALIZER
+#if __has_attribute(objc_designated_initializer)
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+#else
+#define NS_DESIGNATED_INITIALIZER
+#endif
+#endif
+
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/objc/objc-api.h
@@ -0,0 +1,304 @@
+/*
+ * Copyright (c) 1999-2006 Apple Inc.  All Rights Reserved.
+ * 
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+// Copyright 1988-1996 NeXT Software, Inc.
+
+#ifndef _OBJC_OBJC_API_H_
+#define _OBJC_OBJC_API_H_
+
+#include <Availability.h>
+#include <AvailabilityMacros.h>
+#include <TargetConditionals.h>
+#include <sys/types.h>
+
+#ifndef __has_feature
+#   define __has_feature(x) 0
+#endif
+
+#ifndef __has_extension
+#   define __has_extension __has_feature
+#endif
+
+#ifndef __has_attribute
+#   define __has_attribute(x) 0
+#endif
+
+#if !__has_feature(nullability)
+#   ifndef _Nullable
+#       define _Nullable
+#   endif
+#   ifndef _Nonnull
+#       define _Nonnull
+#   endif
+#   ifndef _Null_unspecified
+#       define _Null_unspecified
+#   endif
+#endif
+
+
+
+/*
+ * OBJC_API_VERSION 0 or undef: Tiger and earlier API only
+ * OBJC_API_VERSION 2: Leopard and later API available
+ */
+#if !defined(OBJC_API_VERSION)
+#   if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)  &&  __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5
+#       define OBJC_API_VERSION 0
+#   else
+#       define OBJC_API_VERSION 2
+#   endif
+#endif
+
+
+/*
+ * OBJC_NO_GC 1: GC is not supported
+ * OBJC_NO_GC undef: GC is supported. This SDK no longer supports this mode.
+ *
+ * OBJC_NO_GC_API undef: Libraries must export any symbols that 
+ *                       dual-mode code may links to.
+ * OBJC_NO_GC_API 1: Libraries need not export GC-related symbols.
+ */
+#if defined(__OBJC_GC__)
+#   error Objective-C garbage collection is not supported.
+#elif TARGET_OS_OSX
+    /* GC is unsupported. GC API symbols are exported. */
+#   define OBJC_NO_GC 1
+#   undef  OBJC_NO_GC_API
+#else
+    /* GC is unsupported. GC API symbols are not exported. */
+#   define OBJC_NO_GC 1
+#   define OBJC_NO_GC_API 1
+#endif
+
+
+/* NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER == 1 
+ * marks -[NSObject init] as a designated initializer. */
+#if !defined(NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER)
+#   define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1
+#endif
+
+/* The arm64 ABI requires proper casting to ensure arguments are passed
+ *  * correctly.  */
+#if defined(__arm64__) && !__swift__
+#   undef OBJC_OLD_DISPATCH_PROTOTYPES
+#   define OBJC_OLD_DISPATCH_PROTOTYPES 0
+#endif
+
+/* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch 
+ * functions must be cast to an appropriate function pointer type. */
+#if !defined(OBJC_OLD_DISPATCH_PROTOTYPES)
+#   if __swift__
+        // Existing Swift code expects IMP to be Comparable.
+        // Variadic IMP is comparable via OpaquePointer; non-variadic IMP isn't.
+#       define OBJC_OLD_DISPATCH_PROTOTYPES 1
+#   else
+#       define OBJC_OLD_DISPATCH_PROTOTYPES 0
+#   endif
+#endif
+
+
+/* OBJC_AVAILABLE: shorthand for all-OS availability */
+
+#   if !defined(OBJC_AVAILABLE)
+#       define OBJC_AVAILABLE(x, i, t, w, b)                            \
+            __OSX_AVAILABLE(x)  __IOS_AVAILABLE(i)  __TVOS_AVAILABLE(t) \
+            __WATCHOS_AVAILABLE(w)
+#   endif
+
+
+
+/* OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE: Deprecated on OS X,
+ * unavailable everywhere else. */
+
+#   if !defined(OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE)
+#       define OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(_start, _dep, _msg) \
+            __OSX_DEPRECATED(_start, _dep, _msg)                          \
+            __IOS_UNAVAILABLE __TVOS_UNAVAILABLE                          \
+            __WATCHOS_UNAVAILABLE
+#   endif
+
+
+
+/* OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE: Available on OS X,
+ * unavailable everywhere else. */
+
+#   if !defined(OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE)
+#       define OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE(vers) \
+            __OSX_AVAILABLE(vers)                          \
+            __IOS_UNAVAILABLE __TVOS_UNAVAILABLE           \
+            __WATCHOS_UNAVAILABLE
+#    endif
+
+
+
+/* OBJC_ISA_AVAILABILITY: `isa` will be deprecated or unavailable 
+ * in the future */
+#if !defined(OBJC_ISA_AVAILABILITY)
+#   if __OBJC2__
+#       define OBJC_ISA_AVAILABILITY  __attribute__((deprecated))
+#   else
+#       define OBJC_ISA_AVAILABILITY  /* still available */
+#   endif
+#endif
+
+
+/* OBJC2_UNAVAILABLE: unavailable in objc 2.0, deprecated in Leopard */
+#if !defined(OBJC2_UNAVAILABLE)
+#   if __OBJC2__
+#       define OBJC2_UNAVAILABLE UNAVAILABLE_ATTRIBUTE
+#   else
+        /* plain C code also falls here, but this is close enough */
+#       define OBJC2_UNAVAILABLE                                       \
+            __OSX_DEPRECATED(10.5, 10.5, "not available in __OBJC2__") \
+            __IOS_DEPRECATED(2.0, 2.0, "not available in __OBJC2__")   \
+            __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE 
+#   endif
+#endif
+
+/* OBJC_UNAVAILABLE: unavailable, with a message where supported */
+#if !defined(OBJC_UNAVAILABLE)
+#   if __has_extension(attribute_unavailable_with_message)
+#       define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable(_msg)))
+#   else
+#       define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable))
+#   endif
+#endif
+
+/* OBJC_DEPRECATED: deprecated, with a message where supported */
+#if !defined(OBJC_DEPRECATED)
+#   if __has_extension(attribute_deprecated_with_message)
+#       define OBJC_DEPRECATED(_msg) __attribute__((deprecated(_msg)))
+#   else
+#       define OBJC_DEPRECATED(_msg) __attribute__((deprecated))
+#   endif
+#endif
+
+/* OBJC_ARC_UNAVAILABLE: unavailable with -fobjc-arc */
+#if !defined(OBJC_ARC_UNAVAILABLE)
+#   if __has_feature(objc_arc)
+#       define OBJC_ARC_UNAVAILABLE OBJC_UNAVAILABLE("not available in automatic reference counting mode")
+#   else
+#       define OBJC_ARC_UNAVAILABLE
+#   endif
+#endif
+
+/* OBJC_SWIFT_UNAVAILABLE: unavailable in Swift */
+#if !defined(OBJC_SWIFT_UNAVAILABLE)
+#   if __has_feature(attribute_availability_swift)
+#       define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
+#   else
+#       define OBJC_SWIFT_UNAVAILABLE(_msg)
+#   endif
+#endif
+
+/* OBJC_ARM64_UNAVAILABLE: unavailable on arm64 (i.e. stret dispatch) */
+#if !defined(OBJC_ARM64_UNAVAILABLE)
+#   if defined(__arm64__)
+#       define OBJC_ARM64_UNAVAILABLE OBJC_UNAVAILABLE("not available in arm64")
+#   else
+#       define OBJC_ARM64_UNAVAILABLE 
+#   endif
+#endif
+
+/* OBJC_GC_UNAVAILABLE: unavailable with -fobjc-gc or -fobjc-gc-only */
+#if !defined(OBJC_GC_UNAVAILABLE)
+#   define OBJC_GC_UNAVAILABLE
+#endif
+
+#if !defined(OBJC_EXTERN)
+#   if defined(__cplusplus)
+#       define OBJC_EXTERN extern "C" 
+#   else
+#       define OBJC_EXTERN extern
+#   endif
+#endif
+
+#if !defined(OBJC_VISIBLE)
+
+#       define OBJC_VISIBLE  __attribute__((visibility("default")))
+
+#endif
+
+#if !defined(OBJC_EXPORT)
+#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
+#endif
+
+#if !defined(OBJC_IMPORT)
+#   define OBJC_IMPORT extern
+#endif
+
+#if !defined(OBJC_ROOT_CLASS)
+#   if __has_attribute(objc_root_class)
+#       define OBJC_ROOT_CLASS __attribute__((objc_root_class))
+#   else
+#       define OBJC_ROOT_CLASS
+#   endif
+#endif
+
+#ifndef __DARWIN_NULL
+#define __DARWIN_NULL NULL
+#endif
+
+#if !defined(OBJC_INLINE)
+#   define OBJC_INLINE __inline
+#endif
+
+// Declares an enum type or option bits type as appropriate for each language.
+#if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum))
+#define OBJC_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
+#if (__cplusplus)
+#define OBJC_OPTIONS(_type, _name) _type _name; enum : _type
+#else
+#define OBJC_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
+#endif
+#else
+#define OBJC_ENUM(_type, _name) _type _name; enum
+#define OBJC_OPTIONS(_type, _name) _type _name; enum
+#endif
+
+#if !defined(OBJC_RETURNS_RETAINED)
+#   if __OBJC__ && __has_attribute(ns_returns_retained)
+#       define OBJC_RETURNS_RETAINED __attribute__((ns_returns_retained))
+#   else
+#       define OBJC_RETURNS_RETAINED
+#   endif
+#endif
+
+/* OBJC_COLD: very rarely called, e.g. on error path */
+#if !defined(OBJC_COLD)
+#   if __OBJC__ && __has_attribute(cold)
+#       define OBJC_COLD __attribute__((cold))
+#   else
+#       define OBJC_COLD
+#   endif
+#endif
+
+/* OBJC_NORETURN: does not return normally, but may throw */
+#if !defined(OBJC_NORETURN)
+#   if __OBJC__ && __has_attribute(noreturn)
+#       define OBJC_NORETURN __attribute__((noreturn))
+#   else
+#       define OBJC_NORETURN
+#   endif
+#endif
+
+#endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/objc/runtime.h
@@ -52,6 +52,24 @@ typedef struct objc_category *Category;
 /// An opaque type that represents an Objective-C declared property.
 typedef struct objc_property *objc_property_t;
 
+struct objc_class {
+    Class _Nonnull isa  OBJC_ISA_AVAILABILITY;
+
+#if !__OBJC2__
+    Class _Nullable super_class                              OBJC2_UNAVAILABLE;
+    const char * _Nonnull name                               OBJC2_UNAVAILABLE;
+    long version                                             OBJC2_UNAVAILABLE;
+    long info                                                OBJC2_UNAVAILABLE;
+    long instance_size                                       OBJC2_UNAVAILABLE;
+    struct objc_ivar_list * _Nullable ivars                  OBJC2_UNAVAILABLE;
+    struct objc_method_list * _Nullable * _Nullable methodLists                    OBJC2_UNAVAILABLE;
+    struct objc_cache * _Nonnull cache                       OBJC2_UNAVAILABLE;
+    struct objc_protocol_list * _Nullable protocols          OBJC2_UNAVAILABLE;
+#endif
+
+} OBJC2_UNAVAILABLE;
+/* Use `Class` instead of `struct objc_class *` */
+
 #endif
 
 #ifdef __OBJC__
@@ -1859,8 +1877,154 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously)
 #define _C_VECTOR   '!'
 #define _C_CONST    'r'
 
+
+/* Obsolete types */
+
+#if !__OBJC2__
+
+#define CLS_GETINFO(cls,infomask)        ((cls)->info & (infomask))
+#define CLS_SETINFO(cls,infomask)        ((cls)->info |= (infomask))
+
+// class is not a metaclass
+#define CLS_CLASS               0x1
+// class is a metaclass
+#define CLS_META                0x2
+// class's +initialize method has completed
+#define CLS_INITIALIZED         0x4
+// class is posing
+#define CLS_POSING              0x8
+// unused
+#define CLS_MAPPED              0x10
+// class and subclasses need cache flush during image loading
+#define CLS_FLUSH_CACHE         0x20
+// method cache should grow when full
+#define CLS_GROW_CACHE          0x40
+// unused
+#define CLS_NEED_BIND           0x80
+// methodLists is array of method lists
+#define CLS_METHOD_ARRAY        0x100
+// the JavaBridge constructs classes with these markers
+#define CLS_JAVA_HYBRID         0x200
+#define CLS_JAVA_CLASS          0x400
+// thread-safe +initialize
+#define CLS_INITIALIZING        0x800
+// bundle unloading
+#define CLS_FROM_BUNDLE         0x1000
+// C++ ivar support
+#define CLS_HAS_CXX_STRUCTORS   0x2000
+// Lazy method list arrays
+#define CLS_NO_METHOD_ARRAY     0x4000
+// +load implementation
+#define CLS_HAS_LOAD_METHOD     0x8000
+// objc_allocateClassPair API
+#define CLS_CONSTRUCTING        0x10000
+// class compiled with bigger class structure
+#define CLS_EXT                 0x20000
+
+
+struct objc_method_description_list {
+    int count;
+    struct objc_method_description list[1];
+};
+
+
+struct objc_protocol_list {
+    struct objc_protocol_list * _Nullable next;
+    long count;
+    __unsafe_unretained Protocol * _Nullable list[1];
+};
+
+
+struct objc_category {
+    char * _Nonnull category_name                            OBJC2_UNAVAILABLE;
+    char * _Nonnull class_name                               OBJC2_UNAVAILABLE;
+    struct objc_method_list * _Nullable instance_methods     OBJC2_UNAVAILABLE;
+    struct objc_method_list * _Nullable class_methods        OBJC2_UNAVAILABLE;
+    struct objc_protocol_list * _Nullable protocols          OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+
+struct objc_ivar {
+    char * _Nullable ivar_name                               OBJC2_UNAVAILABLE;
+    char * _Nullable ivar_type                               OBJC2_UNAVAILABLE;
+    int ivar_offset                                          OBJC2_UNAVAILABLE;
+#ifdef __LP64__
+    int space                                                OBJC2_UNAVAILABLE;
+#endif
+}                                                            OBJC2_UNAVAILABLE;
+
+struct objc_ivar_list {
+    int ivar_count                                           OBJC2_UNAVAILABLE;
+#ifdef __LP64__
+    int space                                                OBJC2_UNAVAILABLE;
+#endif
+    /* variable length structure */
+    struct objc_ivar ivar_list[1]                            OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+
+struct objc_method {
+    SEL _Nonnull method_name                                 OBJC2_UNAVAILABLE;
+    char * _Nullable method_types                            OBJC2_UNAVAILABLE;
+    IMP _Nonnull method_imp                                  OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+struct objc_method_list {
+    struct objc_method_list * _Nullable obsolete             OBJC2_UNAVAILABLE;
+
+    int method_count                                         OBJC2_UNAVAILABLE;
+#ifdef __LP64__
+    int space                                                OBJC2_UNAVAILABLE;
+#endif
+    /* variable length structure */
+    struct objc_method method_list[1]                        OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+
+typedef struct objc_symtab *Symtab                           OBJC2_UNAVAILABLE;
+
+struct objc_symtab {
+    unsigned long sel_ref_cnt                                OBJC2_UNAVAILABLE;
+    SEL _Nonnull * _Nullable refs                            OBJC2_UNAVAILABLE;
+    unsigned short cls_def_cnt                               OBJC2_UNAVAILABLE;
+    unsigned short cat_def_cnt                               OBJC2_UNAVAILABLE;
+    void * _Nullable defs[1] /* variable size */             OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+
+typedef struct objc_cache *Cache                             OBJC2_UNAVAILABLE;
+
+#define CACHE_BUCKET_NAME(B)  ((B)->method_name)
+#define CACHE_BUCKET_IMP(B)   ((B)->method_imp)
+#define CACHE_BUCKET_VALID(B) (B)
+#ifndef __LP64__
+#define CACHE_HASH(sel, mask) (((uintptr_t)(sel)>>2) & (mask))
+#else
+#define CACHE_HASH(sel, mask) (((unsigned int)((uintptr_t)(sel)>>3)) & (mask))
+#endif
+struct objc_cache {
+    unsigned int mask /* total = mask + 1 */                 OBJC2_UNAVAILABLE;
+    unsigned int occupied                                    OBJC2_UNAVAILABLE;
+    Method _Nullable buckets[1]                              OBJC2_UNAVAILABLE;
+};
+
+
+typedef struct objc_module *Module                           OBJC2_UNAVAILABLE;
+
+struct objc_module {
+    unsigned long version                                    OBJC2_UNAVAILABLE;
+    unsigned long size                                       OBJC2_UNAVAILABLE;
+    const char * _Nullable name                              OBJC2_UNAVAILABLE;
+    Symtab _Nullable symtab                                  OBJC2_UNAVAILABLE;
+}                                                            OBJC2_UNAVAILABLE;
+
+#else
+
 struct objc_method_list;
 
+#endif
+
+
 /* Obsolete functions */
 
 OBJC_EXPORT IMP _Nullable
@@ -1893,9 +2057,108 @@ OBJC_EXPORT id _Nullable
 object_copyFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z) 
     OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use object_copy instead");
 
+OBJC_EXPORT id _Nullable
+object_realloc(id _Nullable anObject, size_t nBytes)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT id _Nullable
+object_reallocFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z)
+    OBJC2_UNAVAILABLE;
+
+#define OBSOLETE_OBJC_GETCLASSES 1
+OBJC_EXPORT void * _Nonnull
+objc_getClasses(void)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+objc_addClass(Class _Nonnull myClass)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+objc_setClassHandler(int (* _Nullable )(const char * _Nonnull))
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+objc_setMultithreaded(BOOL flag)
+    OBJC2_UNAVAILABLE;
+
 OBJC_EXPORT id _Nullable
 class_createInstanceFromZone(Class _Nullable, size_t idxIvars,
                              void * _Nullable z)
     OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use class_createInstance instead");
 
+OBJC_EXPORT void
+class_addMethods(Class _Nullable, struct objc_method_list * _Nonnull)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+class_removeMethods(Class _Nullable, struct objc_method_list * _Nonnull)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT void
+_objc_resolve_categories_for_class(Class _Nonnull cls)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT Class _Nonnull
+class_poseAs(Class _Nonnull imposter, Class _Nonnull original)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT unsigned int
+method_getSizeOfArguments(Method _Nonnull m)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT unsigned
+method_getArgumentInfo(struct objc_method * _Nonnull m, int arg,
+                       const char * _Nullable * _Nonnull type,
+                       int * _Nonnull offset)
+    UNAVAILABLE_ATTRIBUTE  // This function was accidentally deleted in 10.9.
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT Class _Nullable
+objc_getOrigClass(const char * _Nonnull name)
+    OBJC2_UNAVAILABLE;
+
+#define OBJC_NEXT_METHOD_LIST 1
+OBJC_EXPORT struct objc_method_list * _Nullable
+class_nextMethodList(Class _Nullable, void * _Nullable * _Nullable)
+    OBJC2_UNAVAILABLE;
+// usage for nextMethodList
+//
+// void *iterator = 0;
+// struct objc_method_list *mlist;
+// while ( mlist = class_nextMethodList( cls, &iterator ) )
+//    ;
+ 
+OBJC_EXPORT id _Nullable
+(* _Nonnull _alloc)(Class _Nullable, size_t)
+    OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT id _Nullable
+(* _Nonnull _copy)(id _Nullable, size_t)
+     OBJC2_UNAVAILABLE;
+     
+OBJC_EXPORT id _Nullable
+(* _Nonnull _realloc)(id _Nullable, size_t)
+     OBJC2_UNAVAILABLE;
+
+OBJC_EXPORT id _Nullable
+(* _Nonnull _dealloc)(id _Nullable)
+     OBJC2_UNAVAILABLE;
+     
+OBJC_EXPORT id _Nullable
+(* _Nonnull _zoneAlloc)(Class _Nullable, size_t, void * _Nullable)
+     OBJC2_UNAVAILABLE;
+     
+OBJC_EXPORT id _Nullable
+(* _Nonnull _zoneRealloc)(id _Nullable, size_t, void * _Nullable)
+     OBJC2_UNAVAILABLE;
+     
+OBJC_EXPORT id _Nullable
+(* _Nonnull _zoneCopy)(id _Nullable, size_t, void * _Nullable)
+     OBJC2_UNAVAILABLE;
+     
+OBJC_EXPORT void
+(* _Nonnull _error)(id _Nullable, const char * _Nonnull, va_list)
+     OBJC2_UNAVAILABLE;
+
 #endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/os/base.h
@@ -0,0 +1,322 @@
+/*
+ * Copyright (c) 2008-2020 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+#ifndef __OS_BASE__
+#define __OS_BASE__
+
+#include <sys/cdefs.h>
+
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+#ifndef __has_include
+#define __has_include(x) 0
+#endif
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+#ifndef __has_extension
+#define __has_extension(x) 0
+#endif
+
+#undef OS_INLINE // <sys/_types/_os_inline.h>
+#if __GNUC__
+#define OS_NORETURN __attribute__((__noreturn__))
+#define OS_NOTHROW __attribute__((__nothrow__))
+#define OS_NONNULL1 __attribute__((__nonnull__(1)))
+#define OS_NONNULL2 __attribute__((__nonnull__(2)))
+#define OS_NONNULL3 __attribute__((__nonnull__(3)))
+#define OS_NONNULL4 __attribute__((__nonnull__(4)))
+#define OS_NONNULL5 __attribute__((__nonnull__(5)))
+#define OS_NONNULL6 __attribute__((__nonnull__(6)))
+#define OS_NONNULL7 __attribute__((__nonnull__(7)))
+#define OS_NONNULL8 __attribute__((__nonnull__(8)))
+#define OS_NONNULL9 __attribute__((__nonnull__(9)))
+#define OS_NONNULL10 __attribute__((__nonnull__(10)))
+#define OS_NONNULL11 __attribute__((__nonnull__(11)))
+#define OS_NONNULL12 __attribute__((__nonnull__(12)))
+#define OS_NONNULL13 __attribute__((__nonnull__(13)))
+#define OS_NONNULL14 __attribute__((__nonnull__(14)))
+#define OS_NONNULL15 __attribute__((__nonnull__(15)))
+#define OS_NONNULL_ALL __attribute__((__nonnull__))
+#define OS_SENTINEL __attribute__((__sentinel__))
+#define OS_PURE __attribute__((__pure__))
+#define OS_CONST __attribute__((__const__))
+#define OS_WARN_RESULT __attribute__((__warn_unused_result__))
+#define OS_MALLOC __attribute__((__malloc__))
+#define OS_USED __attribute__((__used__))
+#define OS_UNUSED __attribute__((__unused__))
+#define OS_COLD __attribute__((__cold__))
+#define OS_WEAK __attribute__((__weak__))
+#define OS_WEAK_IMPORT __attribute__((__weak_import__))
+#define OS_NOINLINE __attribute__((__noinline__))
+#define OS_ALWAYS_INLINE __attribute__((__always_inline__))
+#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))
+#define OS_ALIGNED(n) __attribute__((__aligned__((n))))
+#define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y)))
+#define OS_EXPORT extern __attribute__((__visibility__("default")))
+#define OS_INLINE static __inline__
+#define OS_EXPECT(x, v) __builtin_expect((x), (v))
+#else
+#define OS_NORETURN
+#define OS_NOTHROW
+#define OS_NONNULL1
+#define OS_NONNULL2
+#define OS_NONNULL3
+#define OS_NONNULL4
+#define OS_NONNULL5
+#define OS_NONNULL6
+#define OS_NONNULL7
+#define OS_NONNULL8
+#define OS_NONNULL9
+#define OS_NONNULL10
+#define OS_NONNULL11
+#define OS_NONNULL12
+#define OS_NONNULL13
+#define OS_NONNULL14
+#define OS_NONNULL15
+#define OS_NONNULL_ALL
+#define OS_SENTINEL
+#define OS_PURE
+#define OS_CONST
+#define OS_WARN_RESULT
+#define OS_MALLOC
+#define OS_USED
+#define OS_UNUSED
+#define OS_COLD
+#define OS_WEAK
+#define OS_WEAK_IMPORT
+#define OS_NOINLINE
+#define OS_ALWAYS_INLINE
+#define OS_TRANSPARENT_UNION
+#define OS_ALIGNED(n)
+#define OS_FORMAT_PRINTF(x, y)
+#define OS_EXPORT extern
+#define OS_INLINE static inline
+#define OS_EXPECT(x, v) (x)
+#endif
+
+#if __has_attribute(noescape)
+#define OS_NOESCAPE __attribute__((__noescape__))
+#else
+#define OS_NOESCAPE
+#endif
+
+#if defined(__cplusplus) && defined(__clang__)
+#define OS_FALLTHROUGH [[clang::fallthrough]]
+#elif __has_attribute(fallthrough)
+#define OS_FALLTHROUGH __attribute__((__fallthrough__))
+#else
+#define OS_FALLTHROUGH
+#endif
+
+#if __has_feature(assume_nonnull)
+#define OS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
+#define OS_ASSUME_NONNULL_END   _Pragma("clang assume_nonnull end")
+#else
+#define OS_ASSUME_NONNULL_BEGIN
+#define OS_ASSUME_NONNULL_END
+#endif
+
+#if __has_builtin(__builtin_assume)
+#define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr)
+#else
+#define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr))
+#endif
+
+#if __has_extension(attribute_overloadable)
+#define OS_OVERLOADABLE __attribute__((__overloadable__))
+#else
+#define OS_OVERLOADABLE
+#endif
+
+#if __has_attribute(enum_extensibility)
+#define __OS_ENUM_ATTR __attribute__((enum_extensibility(open)))
+#define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed)))
+#else
+#define __OS_ENUM_ATTR
+#define __OS_ENUM_ATTR_CLOSED
+#endif // __has_attribute(enum_extensibility)
+
+#if __has_attribute(flag_enum)
+/*!
+ * Compile with -Wflag-enum and -Wassign-enum to enforce at definition and
+ * assignment, respectively, i.e. -Wflag-enum prevents you from creating new
+ * enumeration values from illegal values within the enum definition, and
+ * -Wassign-enum prevents you from assigning illegal values to a variable of the
+ * enum type.
+ */
+#define __OS_OPTIONS_ATTR __attribute__((flag_enum))
+#else
+#define __OS_OPTIONS_ATTR
+#endif // __has_attribute(flag_enum)
+
+#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \
+        __has_extension(cxx_strong_enums)
+#define OS_ENUM(_name, _type, ...) \
+	typedef enum : _type { __VA_ARGS__ } _name##_t
+#define OS_CLOSED_ENUM(_name, _type, ...) \
+	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t
+#define OS_OPTIONS(_name, _type, ...) \
+	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t
+#define OS_CLOSED_OPTIONS(_name, _type, ...) \
+	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t
+#else
+/*!
+ * There is unfortunately no good way in plain C to have both fixed-type enums
+ * and enforcement for clang's enum_extensibility extensions. The primary goal
+ * of these macros is to allow you to define an enum and specify its width in a
+ * single statement, and for plain C that is accomplished by defining an
+ * anonymous enum and then separately typedef'ing the requested type name to the
+ * requested underlying integer type. So the type emitted actually has no
+ * relationship at all to the enum, and therefore while the compiler could
+ * enforce enum extensibility if you used the enum type, it cannot do so if you
+ * use the "_t" type resulting from this expression.
+ *
+ * But we still define a named enum type and decorate it appropriately for you,
+ * so if you really want the enum extensibility enforcement, you can use the
+ * enum type yourself, i.e. when compiling with a C compiler:
+ *
+ *     OS_CLOSED_ENUM(my_type, uint64_t,
+ *         FOO,
+ *         BAR,
+ *         BAZ,
+ *     );
+ *
+ *     my_type_t mt = 98; // legal
+ *     enum my_type emt = 98; // illegal
+ *
+ * But be aware that the underlying enum type's width is subject only to the C
+ * language's guarantees -- namely that it will be compatible with int, char,
+ * and unsigned char. It is not safe to rely on the size of this type.
+ *
+ * When compiling in ObjC or C++, both of the above assignments are illegal.
+ */
+#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \
+	typedef _type _name##_t; enum _name { __VA_ARGS__ }
+
+#define OS_ENUM(_name, _type, ...) \
+	typedef _type _name##_t; enum { __VA_ARGS__ }
+#define OS_CLOSED_ENUM(_name, _type, ...) \
+	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
+	__OS_ENUM_ATTR_CLOSED
+#define OS_OPTIONS(_name, _type, ...) \
+	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
+	__OS_ENUM_ATTR __OS_OPTIONS_ATTR
+#define OS_CLOSED_OPTIONS(_name, _type, ...) \
+	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
+	__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR
+#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
+
+#if __has_feature(attribute_availability_swift)
+// equivalent to __SWIFT_UNAVAILABLE from Availability.h
+#define OS_SWIFT_UNAVAILABLE(_msg) \
+	__attribute__((__availability__(swift, unavailable, message=_msg)))
+#else
+#define OS_SWIFT_UNAVAILABLE(_msg)
+#endif
+
+#if __has_attribute(swift_private)
+# define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__))
+#else
+# define OS_REFINED_FOR_SWIFT
+#endif
+
+#if __has_attribute(swift_name)
+# define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name)))
+#else
+# define OS_SWIFT_NAME(_name)
+#endif
+
+#define __OS_STRINGIFY(s) #s
+#define OS_STRINGIFY(s) __OS_STRINGIFY(s)
+#define __OS_CONCAT(x, y) x ## y
+#define OS_CONCAT(x, y) __OS_CONCAT(x, y)
+
+#ifdef __GNUC__
+#define os_prevent_tail_call_optimization()  __asm__("")
+#define os_is_compile_time_constant(expr)    __builtin_constant_p(expr)
+#define os_compiler_barrier()                __asm__ __volatile__("" ::: "memory")
+#else
+#define os_prevent_tail_call_optimization()  do { } while (0)
+#define os_is_compile_time_constant(expr)    0
+#define os_compiler_barrier()                do { } while (0)
+#endif
+
+#if __has_attribute(not_tail_called)
+#define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__))
+#else
+#define OS_NOT_TAIL_CALLED
+#endif
+
+
+typedef void (*os_function_t)(void *_Nullable);
+
+#ifdef __BLOCKS__
+/*!
+ * @typedef os_block_t
+ *
+ * @abstract
+ * Generic type for a block taking no arguments and returning no value.
+ *
+ * @discussion
+ * When not building with Objective-C ARC, a block object allocated on or
+ * copied to the heap must be released with a -[release] message or the
+ * Block_release() function.
+ *
+ * The declaration of a block literal allocates storage on the stack.
+ * Therefore, this is an invalid construct:
+ * <code>
+ * os_block_t block;
+ * if (x) {
+ *     block = ^{ printf("true\n"); };
+ * } else {
+ *     block = ^{ printf("false\n"); };
+ * }
+ * block(); // unsafe!!!
+ * </code>
+ *
+ * What is happening behind the scenes:
+ * <code>
+ * if (x) {
+ *     struct Block __tmp_1 = ...; // setup details
+ *     block = &__tmp_1;
+ * } else {
+ *     struct Block __tmp_2 = ...; // setup details
+ *     block = &__tmp_2;
+ * }
+ * </code>
+ *
+ * As the example demonstrates, the address of a stack variable is escaping the
+ * scope in which it is allocated. That is a classic C bug.
+ *
+ * Instead, the block literal must be copied to the heap with the Block_copy()
+ * function or by sending it a -[copy] message.
+ */
+typedef void (^os_block_t)(void);
+#endif
+
+
+
+#endif // __OS_BASE__
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/base.h
@@ -0,0 +1,122 @@
+/*! @header
+ *  This header defines macros used in the implementation of <simd/simd.h>
+ *  types and functions. Even though they are exposed in a public header,
+ *  the macros defined in this header are implementation details, and you
+ *  should not use or rely on them. They may be changed or removed entirely
+ *  in a future release.
+ *
+ *  @copyright 2016-2017 Apple, Inc. All rights reserved.
+ *  @unsorted                                                                 */
+
+#ifndef SIMD_BASE
+#define SIMD_BASE
+
+/*  Define __has_attribute and __has_include if they aren't available         */
+# ifndef __has_attribute
+#  define __has_attribute(__x) 0
+# endif
+# ifndef __has_include
+#  define __has_include(__x) 0
+# endif
+# ifndef __has_feature
+#  define __has_feature(__x) 0
+# endif
+
+# if __has_attribute(__ext_vector_type__) && __has_attribute(__overloadable__)
+#  define SIMD_COMPILER_HAS_REQUIRED_FEATURES 1
+# else
+/*  Your compiler is missing one or more features that are hard requirements
+ *  for any <simd/simd.h> support. None of the types or functions defined by
+ *  the simd headers will be available.                                       */
+#  define SIMD_COMPILER_HAS_REQUIRED_FEATURES 0
+# endif
+
+# if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#  if __has_include(<Availability.h>)
+#   include <Availability.h>
+/*  A number of new features are added in newer releases; most of these are
+ *  inline in the header, which makes them available even when targeting older
+ *  OS versions. Those that make external calls, however, are only available
+ *  when targeting the release in which they became available. Because of the
+ *  way in which simd functions are overloaded, the usual weak-linking tricks
+ *  do not work; these functions are simply unavailable when targeting older
+ *  versions of the library.                                                  */
+#   if   __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13   || \
+        __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \
+         __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \
+            __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0   || \
+        __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0
+#    define SIMD_LIBRARY_VERSION 3
+#   elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12   || \
+        __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0 || \
+         __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_3_0 || \
+            __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0
+#    define SIMD_LIBRARY_VERSION 2
+#   elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10   || \
+        __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
+#    define SIMD_LIBRARY_VERSION 1
+#   else
+#    define SIMD_LIBRARY_VERSION 0
+#   endif
+#  else /* !__has_include(<Availability.h>) */
+#   define SIMD_LIBRARY_VERSION 3
+#   define __API_AVAILABLE(...) /* Nothing */
+#  endif
+
+/*  The simd types interoperate with the native simd intrinsic types for each
+ *  architecture; the headers that define those types and operations are
+ *  automatically included with simd.h                                        */
+#  if defined __ARM_NEON__
+#   include <arm_neon.h>
+#  elif defined __i386__ || defined __x86_64__
+#   include <immintrin.h>
+#  endif
+
+/*  Define a number of function attributes used by the simd functions.        */
+#  if __has_attribute(__always_inline__)
+#   define SIMD_INLINE  __attribute__((__always_inline__))
+#  else
+#   define SIMD_INLINE  inline
+#  endif
+
+#  if __has_attribute(__const__)
+#   define SIMD_CONST   __attribute__((__const__))
+#  else
+#   define SIMD_CONST   /* nothing */
+#  endif
+
+#  if __has_attribute(__nodebug__)
+#   define SIMD_NODEBUG __attribute__((__nodebug__))
+#  else
+#   define SIMD_NODEBUG /* nothing */
+#  endif
+
+#  if __has_attribute(__deprecated__)
+#   define SIMD_DEPRECATED(message) __attribute__((__deprecated__(message)))
+#  else
+#   define SIMD_DEPRECATED(message) /* nothing */
+#  endif
+
+#define SIMD_OVERLOAD __attribute__((__overloadable__))
+#define SIMD_CPPFUNC  SIMD_INLINE SIMD_CONST SIMD_NODEBUG
+#define SIMD_CFUNC    SIMD_CPPFUNC SIMD_OVERLOAD
+#define SIMD_NOINLINE SIMD_CONST SIMD_NODEBUG SIMD_OVERLOAD
+#define SIMD_NONCONST SIMD_INLINE SIMD_NODEBUG SIMD_OVERLOAD
+#define __SIMD_INLINE__     SIMD_CPPFUNC
+#define __SIMD_ATTRIBUTES__ SIMD_CFUNC
+#define __SIMD_OVERLOAD__   SIMD_OVERLOAD
+
+#if defined __cplusplus
+/*! @abstract A boolean scalar.                                               */
+typedef  bool simd_bool;
+#else
+/*! @abstract A boolean scalar.                                               */
+typedef _Bool simd_bool;
+#endif
+/*! @abstract A boolean scalar.
+ *  @discussion This type is deprecated; In C or Objective-C sources, use
+ *  `_Bool` instead. In C++ sources, use `bool`.                              */
+typedef simd_bool __SIMD_BOOLEAN_TYPE__;
+
+# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* defined SIMD_BASE */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/common.h
@@ -0,0 +1,4458 @@
+/*! @header
+ *  The interfaces declared in this header provide "common" elementwise
+ *  operations that are neither math nor logic functions.  These are available
+ *  only for floating-point vectors and scalars, except for min, max, abs,
+ *  clamp, and the reduce operations, which also support integer vectors.
+ *
+ *      simd_abs(x)             Absolute value of x.  Also available as fabs
+ *                              for floating-point vectors.  If x is the
+ *                              smallest signed integer, x is returned.
+ *
+ *      simd_max(x,y)           Returns the maximum of x and y.  Also available
+ *                              as fmax for floating-point vectors.
+ *
+ *      simd_min(x,y)           Returns the minimum of x and y.  Also available
+ *                              as fmin for floating-point vectors.
+ *
+ *      simd_clamp(x,min,max)   x clamped to the range [min, max].
+ *
+ *      simd_sign(x)            -1 if x is less than zero, 0 if x is zero or
+ *                              NaN, and +1 if x is greater than zero.
+ *
+ *      simd_mix(x,y,t)         If t is not in the range [0,1], the result is
+ *                              undefined.  Otherwise the result is x+(y-x)*t,
+ *                              which linearly interpolates between x and y.
+ *
+ *      simd_recip(x)           An approximation to 1/x.  If x is very near the
+ *                              limits of representable values, or is infinity
+ *                              or NaN, the result is undefined.  There are
+ *                              two variants of this function:
+ *
+ *                                  simd_precise_recip(x)
+ *
+ *                              and
+ *
+ *                                  simd_fast_recip(x).
+ *
+ *                              The "precise" variant is accurate to a few ULPs,
+ *                              whereas the "fast" variant may have as little
+ *                              as 11 bits of accuracy in float and about 22
+ *                              bits in double.
+ *
+ *                              The function simd_recip(x) resolves to
+ *                              simd_precise_recip(x) ordinarily, but to
+ *                              simd_fast_recip(x) when used in a translation
+ *                              unit compiled with -ffast-math (when
+ *                              -ffast-math is in effect, you may still use the
+ *                              precise version of this function by calling it
+ *                              explicitly by name).
+ *
+ *      simd_rsqrt(x)           An approximation to 1/sqrt(x).  If x is
+ *                              infinity or NaN, the result is undefined.
+ *                              There are two variants of this function:
+ *
+ *                                  simd_precise_rsqrt(x)
+ *
+ *                              and
+ *
+ *                                  simd_fast_rsqrt(x).
+ *
+ *                              The "precise" variant is accurate to a few ULPs,
+ *                              whereas the "fast" variant may have as little
+ *                              as 11 bits of accuracy in float and about 22
+ *                              bits in double.
+ *
+ *                              The function simd_rsqrt(x) resolves to
+ *                              simd_precise_rsqrt(x) ordinarily, but to
+ *                              simd_fast_rsqrt(x) when used in a translation
+ *                              unit compiled with -ffast-math (when
+ *                              -ffast-math is in effect, you may still use the
+ *                              precise version of this function by calling it
+ *                              explicitly by name).
+ *
+ *      simd_fract(x)           The "fractional part" of x, which lies strictly
+ *                              in the range [0, 0x1.fffffep-1].
+ *
+ *      simd_step(edge,x)       0 if x < edge, and 1 otherwise.
+ *
+ *      simd_smoothstep(edge0,edge1,x) 0 if x <= edge0, 1 if x >= edge1, and
+ *                              a Hermite interpolation between 0 and 1 if
+ *                              edge0 < x < edge1.
+ *
+ *      simd_reduce_add(x)      Sum of the elements of x.
+ *
+ *      simd_reduce_min(x)      Minimum of the elements of x.
+ *
+ *      simd_reduce_max(x)      Maximum of the elements of x.
+ *
+ *      simd_equal(x,y)         True if and only if every lane of x is equal
+ *                              to the corresponding lane of y.
+ *
+ *  The following common functions are available in the simd:: namespace:
+ *
+ *      C++ Function                    Equivalent C Function
+ *      --------------------------------------------------------------------
+ *      simd::abs(x)                    simd_abs(x)
+ *      simd::max(x,y)                  simd_max(x,y)
+ *      simd::min(x,y)                  simd_min(x,y)
+ *      simd::clamp(x,min,max)          simd_clamp(x,min,max)
+ *      simd::sign(x)                   simd_sign(x)
+ *      simd::mix(x,y,t)                simd_mix(x,y,t)
+ *      simd::recip(x)                  simd_recip(x)
+ *      simd::rsqrt(x)                  simd_rsqrt(x)
+ *      simd::fract(x)                  simd_fract(x)
+ *      simd::step(edge,x)              simd_step(edge,x)
+ *      simd::smoothstep(e0,e1,x)       simd_smoothstep(e0,e1,x)
+ *      simd::reduce_add(x)             simd_reduce_add(x)
+ *      simd::reduce_max(x)             simd_reduce_max(x)
+ *      simd::reduce_min(x)             simd_reduce_min(x)
+ *      simd::equal(x,y)                simd_equal(x,y)
+ *
+ *      simd::precise::recip(x)         simd_precise_recip(x)
+ *      simd::precise::rsqrt(x)         simd_precise_rsqrt(x)
+ *
+ *      simd::fast::recip(x)            simd_fast_recip(x)
+ *      simd::fast::rsqrt(x)            simd_fast_rsqrt(x)
+ *
+ *  @copyright 2014-2017 Apple, Inc. All rights reserved.
+ *  @unsorted                                                                 */
+
+#ifndef SIMD_COMMON_HEADER
+#define SIMD_COMMON_HEADER
+
+#include <simd/base.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#include <simd/vector_make.h>
+#include <simd/logic.h>
+#include <simd/math.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x);
+/*! @abstract The elementwise absolute value of x.                            */
+static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x);
+/*! @abstract The elementwise absolute value of x.
+ *  @discussion Deprecated. Use simd_abs(x) instead.                          */
+#define vector_abs simd_abs
+  
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC float simd_max(float x, float y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC double simd_max(double x, double y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y);
+/*! @abstract The elementwise maximum of x and y.                             */
+static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y);
+/*! @abstract The elementwise maximum of x and y.
+ *  @discussion Deprecated. Use simd_max(x,y) instead.                        */
+#define vector_max simd_max
+
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC float simd_min(float x, float y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC double simd_min(double x, double y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y);
+/*! @abstract The elementwise minimum of x and y.                             */
+static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y);
+/*! @abstract The elementwise minimum of x and y.
+ *  @discussion Deprecated. Use simd_min(x,y) instead.                        */
+#define vector_min simd_min
+
+  
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC float simd_clamp(float x, float min, float max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC double simd_clamp(double x, double min, double max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Note that if you want to clamp all lanes to the same range,
+ *  you can use a scalar value for min and max.                               */
+static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max);
+/*! @abstract x clamped to the range [min, max].
+ *  @discussion Deprecated. Use simd_clamp(x,min,max) instead.                */
+#define vector_clamp simd_clamp
+  
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC float simd_sign(float x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC double simd_sign(double x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.      */
+static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x);
+/*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise.
+ *  @discussion Deprecated. Use simd_sign(x) instead.                         */
+#define vector_sign simd_sign
+
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC float simd_mix(float x, float y, float t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC double simd_mix(double x, double y, double t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1                                                        */
+static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t);
+/*! @abstract Linearly interpolates between x and y, taking the value x when
+ *  t=0 and y when t=1
+ *  @discussion Deprecated. Use simd_mix(x, y, t) instead.                    */
+#define vector_mix simd_mix
+
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC float simd_precise_recip(float x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC double simd_precise_recip(double x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  a few units in the last place (ULPs).                                     */
+static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x);
+/*! @abstract A good approximation to 1/x.
+ *  @discussion Deprecated. Use simd_precise_recip(x) instead.                */
+#define vector_precise_recip simd_precise_recip
+
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC float simd_fast_recip(float x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC double simd_fast_recip(double x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow; otherwise this function is accurate to
+ *  at least 11 bits for float and 22 bits for double.                        */
+static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x);
+/*! @abstract A fast approximation to 1/x.
+ *  @discussion Deprecated. Use simd_fast_recip(x) instead.                   */
+#define vector_fast_recip simd_fast_recip
+
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC float simd_recip(float x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC double simd_recip(double x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion If x is very close to the limits of representation, the
+ *  result may overflow or underflow. This function maps to
+ *  simd_fast_recip(x) if -ffast-math is specified, and to
+ *  simd_precise_recip(x) otherwise.                                          */
+static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x);
+/*! @abstract An approximation to 1/x.
+ *  @discussion Deprecated. Use simd_recip(x) instead.                        */
+#define vector_recip simd_recip
+
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC float simd_precise_rsqrt(float x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC double simd_precise_rsqrt(double x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to a few units in the last place
+ *  (ULPs).                                                                   */
+static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x);
+/*! @abstract A good approximation to 1/sqrt(x).
+ *  @discussion Deprecated. Use simd_precise_rsqrt(x) instead.                */
+#define vector_precise_rsqrt simd_precise_rsqrt
+
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC float simd_fast_rsqrt(float x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC double simd_fast_rsqrt(double x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion This function is accurate to at least 11 bits for float and
+ *  22 bits for double.                                                       */
+static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x);
+/*! @abstract A fast approximation to 1/sqrt(x).
+ *  @discussion Deprecated. Use simd_fast_rsqrt(x) instead.                   */
+#define vector_fast_rsqrt simd_fast_rsqrt
+
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC float simd_rsqrt(float x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC double simd_rsqrt(double x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion This function maps to simd_fast_recip(x) if -ffast-math is
+ *  specified, and to simd_precise_recip(x) otherwise.                        */
+static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x);
+/*! @abstract An approximation to 1/sqrt(x).
+ *  @discussion Deprecated. Use simd_rsqrt(x) instead.                        */
+#define vector_rsqrt simd_rsqrt
+
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC float simd_fract(float x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC double simd_fract(double x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion floor(x) + fract(x) is *approximately* equal to x. If x is
+ *  positive and finite, then the two values are exactly equal.               */
+static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x);
+/*! @abstract The "fractional part" of x, lying in the range [0, 1).
+ *  @discussion Deprecated. Use simd_fract(x) instead.                        */
+#define vector_fract simd_fract
+
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC float simd_step(float edge, float x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC double simd_step(double edge, double x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Use a scalar value for edge if you want to apply the same
+ *  threshold to all lanes.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x);
+/*! @abstract 0 if x < edge, and 1 otherwise.
+ *  @discussion Deprecated. Use simd_step(edge, x) instead.                   */
+#define vector_step simd_step
+
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion You can use a scalar value for edge0 and edge1 if you want
+ *  to clamp all lanes at the same points.                                    */
+static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x);
+/*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1
+ *  @discussion Deprecated. Use simd_smoothstep(edge0, edge1, x) instead.     */
+#define vector_smoothstep simd_smoothstep
+
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion This computation may overflow; especial for 8-bit types you
+ *  may need to convert to a wider type before reducing.                      */
+static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x);
+/*! @abstract Sum of elements in x.
+ *  @discussion Deprecated. Use simd_add(x) instead.                          */
+#define vector_reduce_add simd_reduce_add
+  
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x);
+/*! @abstract Minimum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x);
+/*! @abstract Minimum of elements in x.
+ *  @discussion Deprecated. Use simd_min(x) instead.                          */
+#define vector_reduce_min simd_reduce_min
+  
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x);
+/*! @abstract Maximum of elements in x.                                       */
+static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x);
+/*! @abstract Maximum of elements in x.
+ *  @discussion Deprecated. Use simd_max(x) instead.                          */
+#define vector_reduce_max simd_reduce_max
+  
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char2 x, simd_char2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char3 x, simd_char3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char4 x, simd_char4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char8 x, simd_char8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char16 x, simd_char16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char32 x, simd_char32 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_char64 x, simd_char64 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar2 x, simd_uchar2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar3 x, simd_uchar3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar4 x, simd_uchar4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar8 x, simd_uchar8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar16 x, simd_uchar16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar32 x, simd_uchar32 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar64 x, simd_uchar64 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short2 x, simd_short2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short3 x, simd_short3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short4 x, simd_short4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short8 x, simd_short8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short16 x, simd_short16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_short32 x, simd_short32 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort2 x, simd_ushort2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort3 x, simd_ushort3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort4 x, simd_ushort4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort8 x, simd_ushort8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort16 x, simd_ushort16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort32 x, simd_ushort32 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_int2 x, simd_int2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_int3 x, simd_int3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_int4 x, simd_int4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_int8 x, simd_int8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_int16 x, simd_int16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uint2 x, simd_uint2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uint3 x, simd_uint3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uint4 x, simd_uint4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uint8 x, simd_uint8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_uint16 x, simd_uint16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_float2 x, simd_float2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_float3 x, simd_float3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_float4 x, simd_float4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_float8 x, simd_float8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_float16 x, simd_float16 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_long2 x, simd_long2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_long3 x, simd_long3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_long4 x, simd_long4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_long8 x, simd_long8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong2 x, simd_ulong2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong3 x, simd_ulong3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong4 x, simd_ulong4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong8 x, simd_ulong8 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_double2 x, simd_double2 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_double3 x, simd_double3 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_double4 x, simd_double4 y) {
+  return simd_all(x == y);
+}
+/*! @abstract True if and only if each lane of x is equal to the
+ *  corresponding lane of y.                                                  */
+static inline SIMD_CFUNC simd_bool simd_equal(simd_double8 x, simd_double8 y) {
+  return simd_all(x == y);
+}
+  
+#ifdef __cplusplus
+} /* extern "C" */
+
+namespace simd {
+  /*! @abstract The lanewise absolute value of x.                             */
+  template <typename typeN> static SIMD_CPPFUNC typeN abs(const typeN x) { return ::simd_abs(x); }
+  /*! @abstract The lanewise maximum of x and y.                              */
+  template <typename typeN> static SIMD_CPPFUNC typeN max(const typeN x, const typeN y) { return ::simd_max(x,y); }
+  /*! @abstract The lanewise minimum of x and y.                              */
+  template <typename typeN> static SIMD_CPPFUNC typeN min(const typeN x, const typeN y) { return ::simd_min(x,y); }
+  /*! @abstract x clamped to the interval [min, max].                         */
+  template <typename typeN> static SIMD_CPPFUNC typeN clamp(const typeN x, const typeN min, const typeN max) { return ::simd_clamp(x,min,max); }
+  /*! @abstract -1 if x < 0, +1 if x > 0, and 0 otherwise.                    */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN sign(const fptypeN x) { return ::simd_sign(x); }
+  /*! @abstract Linearly interpolates between x and y, taking the value x when t=0 and y when t=1 */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN mix(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); }
+  /*! @abstract An approximation to 1/x.                                      */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return simd_recip(x); }
+  /*! @abstract An approximation to 1/sqrt(x).                                */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return simd_rsqrt(x); }
+  /*! @abstract The "fracional part" of x, in the range [0,1).                */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN fract(const fptypeN x) { return ::simd_fract(x); }
+  /*! @abstract 0 if x < edge, 1 otherwise.                                   */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN step(const fptypeN edge, const fptypeN x) { return ::simd_step(edge,x); }
+  /*! @abstract smoothly interpolates from 0 at edge0 to 1 at edge1.          */
+  template <typename fptypeN> static SIMD_CPPFUNC fptypeN smoothstep(const fptypeN edge0, const fptypeN edge1, const fptypeN x) { return ::simd_smoothstep(edge0,edge1,x); }
+  /*! @abstract True if and only if each lane of x is equal to the
+   *  corresponding lane of y.
+   *
+   *  @discussion This isn't operator== because that's already defined by
+   *  the compiler to return a lane mask.                                     */
+  template <typename fptypeN> static SIMD_CPPFUNC simd_bool equal(const fptypeN x, const fptypeN y) { return ::simd_equal(x, y); }
+#if __cpp_decltype_auto
+  /*  If you are targeting an earlier version of the C++ standard that lacks
+   decltype_auto support, you may use the C-style simd_reduce_* functions
+   instead.                                                                   */
+  /*! @abstract The sum of the elements in x. May overflow.                   */
+  template <typename typeN> static SIMD_CPPFUNC auto reduce_add(typeN x) { return ::simd_reduce_add(x); }
+  /*! @abstract The least element in x.                                       */
+  template <typename typeN> static SIMD_CPPFUNC auto reduce_min(typeN x) { return ::simd_reduce_min(x); }
+  /*! @abstract The greatest element in x.                                    */
+  template <typename typeN> static SIMD_CPPFUNC auto reduce_max(typeN x) { return ::simd_reduce_max(x); }
+#endif
+  namespace precise {
+    /*! @abstract An approximation to 1/x.                                      */
+    template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_precise_recip(x); }
+    /*! @abstract An approximation to 1/sqrt(x).                                */
+    template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_precise_rsqrt(x); }
+  }
+  namespace fast {
+    /*! @abstract An approximation to 1/x.                                      */
+    template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_fast_recip(x); }
+    /*! @abstract An approximation to 1/sqrt(x).                                */
+    template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_fast_rsqrt(x); }
+  }
+}
+
+extern "C" {
+#endif /* __cplusplus */
+
+#pragma mark - Implementation
+
+static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x) {
+  return simd_make_char2(simd_abs(simd_make_char8_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x) {
+  return simd_make_char3(simd_abs(simd_make_char8_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x) {
+  return simd_make_char4(simd_abs(simd_make_char8_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x) {
+#if defined __arm__ || defined __arm64__
+  return vabs_s8(x);
+#else
+  return simd_make_char8(simd_abs(simd_make_char16_undef(x)));
+#endif
+}
+
+static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) {
+#if defined __arm__ || defined __arm64__
+  return vabsq_s8(x);
+#elif defined __SSE4_1__
+  return (simd_char16) _mm_abs_epi8((__m128i)x);
+#else
+  simd_char16 mask = x >> 7; return (x ^ mask) - mask;
+#endif
+}
+
+static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x) {
+#if defined __AVX2__
+  return _mm256_abs_epi8(x);
+#else
+  return simd_make_char32(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x) {
+#if defined __AVX512BW__
+  return _mm512_abs_epi8(x);
+#else
+  return simd_make_char64(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x) {
+  return simd_make_short2(simd_abs(simd_make_short4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x) {
+  return simd_make_short3(simd_abs(simd_make_short4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x) {
+#if defined __arm__ || defined __arm64__
+  return vabs_s16(x);
+#else
+  return simd_make_short4(simd_abs(simd_make_short8_undef(x)));
+#endif
+}
+
+static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) {
+#if defined __arm__ || defined __arm64__
+  return vabsq_s16(x);
+#elif defined __SSE4_1__
+  return (simd_short8) _mm_abs_epi16((__m128i)x);
+#else
+  simd_short8 mask = x >> 15; return (x ^ mask) - mask;
+#endif
+}
+
+static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x) {
+#if defined __AVX2__
+  return _mm256_abs_epi16(x);
+#else
+  return simd_make_short16(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x) {
+#if defined __AVX512BW__
+  return _mm512_abs_epi16(x);
+#else
+  return simd_make_short32(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x) {
+#if defined __arm__ || defined __arm64__
+  return vabs_s32(x);
+#else
+  return simd_make_int2(simd_abs(simd_make_int4_undef(x)));
+#endif
+}
+
+static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x) {
+  return simd_make_int3(simd_abs(simd_make_int4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) {
+#if defined __arm__ || defined __arm64__
+  return vabsq_s32(x);
+#elif defined __SSE4_1__
+  return (simd_int4) _mm_abs_epi32((__m128i)x);
+#else
+  simd_int4 mask = x >> 31; return (x ^ mask) - mask;
+#endif
+}
+
+static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x) {
+#if defined __AVX2__
+  return _mm256_abs_epi32(x);
+#else
+  return simd_make_int8(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x) {
+#if defined __AVX512F__
+  return _mm512_abs_epi32(x);
+#else
+  return simd_make_int16(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) {
+#if defined __arm64__
+  return vabsq_s64(x);
+#elif defined __SSE4_1__
+  return (simd_long2) _mm_abs_epi64((__m128i)x);
+#else
+  simd_long2 mask = x >> 63; return (x ^ mask) - mask;
+#endif
+}
+
+static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x) {
+  return simd_make_long3(simd_abs(simd_make_long4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x) {
+#if defined __AVX2__
+  return _mm256_abs_epi64(x);
+#else
+  return simd_make_long4(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x) {
+#if defined __AVX512F__
+  return _mm512_abs_epi64(x);
+#else
+  return simd_make_long8(simd_abs(x.lo), simd_abs(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x) {
+  return __tg_fabs(x);
+}
+
+static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y) {
+  return simd_make_char2(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y) {
+  return simd_make_char3(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y) {
+  return simd_make_char4(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_s8(x, y);
+#else
+  return simd_make_char8(simd_min(simd_make_char16_undef(x), simd_make_char16_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_s8(x, y);
+#elif defined __SSE4_1__
+  return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y) {
+#if defined __AVX2__
+  return _mm256_min_epi8(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y) {
+#if defined __AVX512BW__
+  return _mm512_min_epi8(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y) {
+  return simd_make_uchar2(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y) {
+  return simd_make_uchar3(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y) {
+  return simd_make_uchar4(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_u8(x, y);
+#else
+  return simd_make_uchar8(simd_min(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_u8(x, y);
+#elif defined __SSE4_1__
+  return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y) {
+#if defined __AVX2__
+  return _mm256_min_epu8(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y) {
+#if defined __AVX512BW__
+  return _mm512_min_epu8(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y) {
+  return simd_make_short2(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y) {
+  return simd_make_short3(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_s16(x, y);
+#else
+  return simd_make_short4(simd_min(simd_make_short8_undef(x), simd_make_short8_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_s16(x, y);
+#elif defined __SSE4_1__
+  return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y) {
+#if defined __AVX2__
+  return _mm256_min_epi16(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y) {
+#if defined __AVX512BW__
+  return _mm512_min_epi16(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y) {
+  return simd_make_ushort2(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y) {
+  return simd_make_ushort3(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_u16(x, y);
+#else
+  return simd_make_ushort4(simd_min(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_u16(x, y);
+#elif defined __SSE4_1__
+  return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y) {
+#if defined __AVX2__
+  return _mm256_min_epu16(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y) {
+#if defined __AVX512BW__
+  return _mm512_min_epu16(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_s32(x, y);
+#else
+  return simd_make_int2(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y) {
+  return simd_make_int3(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_s32(x, y);
+#elif defined __SSE4_1__
+  return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y) {
+#if defined __AVX2__
+  return _mm256_min_epi32(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y) {
+#if defined __AVX512F__
+  return _mm512_min_epi32(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y) {
+#if defined __arm__ || defined __arm64__
+  return vmin_u32(x, y);
+#else
+  return simd_make_uint2(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y) {
+  return simd_make_uint3(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) {
+#if defined __arm__ || defined __arm64__
+  return vminq_u32(x, y);
+#elif defined __SSE4_1__
+  return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y) {
+#if defined __AVX2__
+  return _mm256_min_epu32(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y) {
+#if defined __AVX512F__
+  return _mm512_min_epu32(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC float simd_min(float x, float y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y) {
+#if defined __AVX512VL__
+  return _mm_min_epi64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y) {
+  return simd_make_long3(simd_min(simd_make_long4_undef(x), simd_make_long4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y) {
+#if defined __AVX512VL__
+  return _mm256_min_epi64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y) {
+#if defined __AVX512F__
+  return _mm512_min_epi64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y) {
+#if defined __AVX512VL__
+  return _mm_min_epu64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y) {
+  return simd_make_ulong3(simd_min(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y) {
+#if defined __AVX512VL__
+  return _mm256_min_epu64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y) {
+#if defined __AVX512F__
+  return _mm512_min_epu64(x, y);
+#else
+  return simd_bitselect(x, y, y < x);
+#endif
+}
+
+static inline SIMD_CFUNC double simd_min(double x, double y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y) {
+  return __tg_fmin(x,y);
+}
+
+static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y) {
+  return simd_make_char2(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y) {
+  return simd_make_char3(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y) {
+  return simd_make_char4(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_s8(x, y);
+#else
+  return simd_make_char8(simd_max(simd_make_char16_undef(x), simd_make_char16_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_s8(x, y);
+#elif defined __SSE4_1__
+  return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y) {
+#if defined __AVX2__
+  return _mm256_max_epi8(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y) {
+#if defined __AVX512BW__
+  return _mm512_max_epi8(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y) {
+  return simd_make_uchar2(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y) {
+  return simd_make_uchar3(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y) {
+  return simd_make_uchar4(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_u8(x, y);
+#else
+  return simd_make_uchar8(simd_max(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_u8(x, y);
+#elif defined __SSE4_1__
+  return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y) {
+#if defined __AVX2__
+  return _mm256_max_epu8(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y) {
+#if defined __AVX512BW__
+  return _mm512_max_epu8(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y) {
+  return simd_make_short2(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y) {
+  return simd_make_short3(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_s16(x, y);
+#else
+  return simd_make_short4(simd_max(simd_make_short8_undef(x), simd_make_short8_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_s16(x, y);
+#elif defined __SSE4_1__
+  return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y) {
+#if defined __AVX2__
+  return _mm256_max_epi16(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y) {
+#if defined __AVX512BW__
+  return _mm512_max_epi16(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y) {
+  return simd_make_ushort2(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y) {
+  return simd_make_ushort3(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_u16(x, y);
+#else
+  return simd_make_ushort4(simd_max(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_u16(x, y);
+#elif defined __SSE4_1__
+  return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y) {
+#if defined __AVX2__
+  return _mm256_max_epu16(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y) {
+#if defined __AVX512BW__
+  return _mm512_max_epu16(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_s32(x, y);
+#else
+  return simd_make_int2(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y) {
+  return simd_make_int3(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_s32(x, y);
+#elif defined __SSE4_1__
+  return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y) {
+#if defined __AVX2__
+  return _mm256_max_epi32(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y) {
+#if defined __AVX512F__
+  return _mm512_max_epi32(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y) {
+#if defined __arm__ || defined __arm64__
+  return vmax_u32(x, y);
+#else
+  return simd_make_uint2(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y)));
+#endif
+
+}
+
+static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y) {
+  return simd_make_uint3(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) {
+#if defined __arm__ || defined __arm64__
+  return vmaxq_u32(x, y);
+#elif defined __SSE4_1__
+  return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y) {
+#if defined __AVX2__
+  return _mm256_max_epu32(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y) {
+#if defined __AVX512F__
+  return _mm512_max_epu32(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC float simd_max(float x, float y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y) {
+#if defined __AVX512VL__
+  return _mm_max_epi64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y) {
+  return simd_make_long3(simd_max(simd_make_long4_undef(x), simd_make_long4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y) {
+#if defined __AVX512VL__
+  return _mm256_max_epi64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y) {
+#if defined __AVX512F__
+  return _mm512_max_epi64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y) {
+#if defined __AVX512VL__
+  return _mm_max_epu64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y) {
+  return simd_make_ulong3(simd_max(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y)));
+}
+
+static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y) {
+#if defined __AVX512VL__
+  return _mm256_max_epu64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y) {
+#if defined __AVX512F__
+  return _mm512_max_epu64(x, y);
+#else
+  return simd_bitselect(x, y, x < y);
+#endif
+}
+
+static inline SIMD_CFUNC double simd_max(double x, double y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y) {
+  return __tg_fmax(x,y);
+}
+
+static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC float simd_clamp(float x, float min, float max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC double simd_clamp(double x, double min, double max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max) {
+  return simd_min(simd_max(x, min), max);
+}
+
+  
+static inline SIMD_CFUNC float simd_sign(float x) {
+  return (x == 0 | x != x) ? 0 : copysign(1,x);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC double simd_sign(double x) {
+  return (x == 0 | x != x) ? 0 : copysign(1,x);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x) {
+  return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x);
+}
+
+static inline SIMD_CFUNC float simd_mix(float x, float y, float t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC double simd_mix(double x, double y, double t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t) {
+  return x + t*(y - x);
+}
+  
+static inline SIMD_CFUNC float simd_recip(float x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC double simd_recip(double x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x) {
+#if __FAST_MATH__
+  return simd_fast_recip(x);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC float simd_fast_recip(float x) {
+#if defined __AVX512VL__
+  simd_float4 x4 = simd_make_float4(x);
+  return ((simd_float4)_mm_rcp14_ss(x4, x4)).x;
+#elif defined __SSE__
+  return ((simd_float4)_mm_rcp_ss(simd_make_float4(x))).x;
+#elif defined __ARM_NEON__
+  return simd_fast_recip(simd_make_float2_undef(x)).x;
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x) {
+#if defined __SSE__
+  return simd_make_float2(simd_fast_recip(simd_make_float4_undef(x)));
+#elif defined __ARM_NEON__
+  simd_float2 r = vrecpe_f32(x);
+  return r * vrecps_f32(x, r);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x) {
+  return simd_make_float3(simd_fast_recip(simd_make_float4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x) {
+#if defined __AVX512VL__
+  return _mm_rcp14_ps(x);
+#elif defined __SSE__
+  return _mm_rcp_ps(x);
+#elif defined __ARM_NEON__
+  simd_float4 r = vrecpeq_f32(x);
+  return r * vrecpsq_f32(x, r);
+#else
+  return simd_precise_recip(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x) {
+#if defined __AVX512VL__
+  return _mm256_rcp14_ps(x);
+#elif defined __AVX__
+  return _mm256_rcp_ps(x);
+#else
+  return simd_make_float8(simd_fast_recip(x.lo), simd_fast_recip(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x) {
+#if defined __AVX512F__
+  return _mm512_rcp14_ps(x);
+#else
+  return simd_make_float16(simd_fast_recip(x.lo), simd_fast_recip(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC double simd_fast_recip(double x) {
+  return simd_precise_recip(x);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x) {
+  return simd_precise_recip(x);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x) {
+  return simd_precise_recip(x);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x) {
+  return simd_precise_recip(x);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x) {
+  return simd_precise_recip(x);
+}
+
+static inline SIMD_CFUNC float simd_precise_recip(float x) {
+#if defined __SSE__
+  float r = simd_fast_recip(x);
+  return r*(2 - (x == 0 ? -INFINITY : x)*r);
+#elif defined __ARM_NEON__
+  return simd_precise_recip(simd_make_float2_undef(x)).x;
+#else
+  return 1/x;
+#endif
+}
+
+static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x) {
+#if defined __SSE__
+  return simd_make_float2(simd_precise_recip(simd_make_float4_undef(x)));
+#elif defined __ARM_NEON__
+  simd_float2 r = simd_fast_recip(x);
+  return r*vrecps_f32(x, r);
+#else
+  return 1/x;
+#endif
+}
+
+static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x) {
+  return simd_make_float3(simd_precise_recip(simd_make_float4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x) {
+#if defined __SSE__
+  simd_float4 r = simd_fast_recip(x);
+  return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r);
+#elif defined __ARM_NEON__
+  simd_float4 r = simd_fast_recip(x);
+  return r*vrecpsq_f32(x, r);
+#else
+  return 1/x;
+#endif
+}
+
+static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x) {
+#if defined __AVX__
+  simd_float8 r = simd_fast_recip(x);
+  return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r);
+#else
+  return simd_make_float8(simd_precise_recip(x.lo), simd_precise_recip(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x) {
+#if defined __AVX512F__
+  simd_float16 r = simd_fast_recip(x);
+  return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r);
+#else
+  return simd_make_float16(simd_precise_recip(x.lo), simd_precise_recip(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC double simd_precise_recip(double x) {
+  return 1/x;
+}
+
+static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x) {
+  return 1/x;
+}
+
+static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x) {
+  return 1/x;
+}
+
+static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x) {
+  return 1/x;
+}
+
+static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x) {
+  return 1/x;
+}
+
+static inline SIMD_CFUNC float simd_rsqrt(float x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC double simd_rsqrt(double x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x) {
+#if __FAST_MATH__
+  return simd_fast_rsqrt(x);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC float simd_fast_rsqrt(float x) {
+#if defined __AVX512VL__
+  simd_float4 x4 = simd_make_float4(x);
+  return ((simd_float4)_mm_rsqrt14_ss(x4, x4)).x;
+#elif defined __SSE__
+  return ((simd_float4)_mm_rsqrt_ss(simd_make_float4(x))).x;
+#elif defined __ARM_NEON__
+  return simd_fast_rsqrt(simd_make_float2_undef(x)).x;
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x) {
+#if defined __SSE__
+  return simd_make_float2(simd_fast_rsqrt(simd_make_float4_undef(x)));
+#elif defined __ARM_NEON__
+  simd_float2 r = vrsqrte_f32(x);
+  return r * vrsqrts_f32(x, r*r);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x) {
+  return simd_make_float3(simd_fast_rsqrt(simd_make_float4_undef(x)));
+}
+
+static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x) {
+#if defined __AVX512VL__
+  return _mm_rsqrt14_ps(x);
+#elif defined __SSE__
+  return _mm_rsqrt_ps(x);
+#elif defined __ARM_NEON__
+  simd_float4 r = vrsqrteq_f32(x);
+  return r * vrsqrtsq_f32(x, r*r);
+#else
+  return simd_precise_rsqrt(x);
+#endif
+}
+
+static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x) {
+#if defined __AVX512VL__
+  return _mm256_rsqrt14_ps(x);
+#elif defined __AVX__
+  return _mm256_rsqrt_ps(x);
+#else
+  return simd_make_float8(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x) {
+#if defined __AVX512F__
+  return _mm512_rsqrt14_ps(x);
+#else
+  return simd_make_float16(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi));
+#endif
+}
+
+static inline SIMD_CFUNC double simd_fast_rsqrt(double x) {
+  return simd_precise_rsqrt(x);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x) {
+  return simd_precise_rsqrt(x);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x) {
+  return simd_precise_rsqrt(x);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x) {
+  return simd_precise_rsqrt(x);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x) {
+  return simd_precise_rsqrt(x);
+}
+
+static inline SIMD_CFUNC float simd_precise_rsqrt(float x) {
+#if defined __SSE__
+  float r = simd_fast_rsqrt(x);
+  return r*(1.5f - 0.5f*(r == INFINITY ? -INFINITY : x)*r*r);
+#elif defined __ARM_NEON__
+  return simd_precise_rsqrt(simd_make_float2_undef(x)).x;
+#else
+  return 1/sqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x) {
+#if defined __SSE__
+  return simd_make_float2(simd_precise_rsqrt(simd_make_float4_undef(x)));
+#elif defined __ARM_NEON__
+  simd_float2 r = simd_fast_rsqrt(x);
+  return r*vrsqrts_f32(x, r*r);
+#else
+  return 1/__tg_sqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x) {
+  return simd_make_float3(simd_precise_rsqrt(simd_make_float4_undef(x)));
+}
+  
+static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x) {
+#if defined __SSE__
+  simd_float4 r = simd_fast_rsqrt(x);
+  return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r);
+#elif defined __ARM_NEON__
+  simd_float4 r = simd_fast_rsqrt(x);
+  return r*vrsqrtsq_f32(x, r*r);
+#else
+  return 1/__tg_sqrt(x);
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x) {
+#if defined __AVX__
+  simd_float8 r = simd_fast_rsqrt(x);
+  return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r);
+#else
+  return simd_make_float8(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi));
+#endif
+}
+  
+static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x) {
+#if defined __AVX512F__
+  simd_float16 r = simd_fast_rsqrt(x);
+  return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r);
+#else
+  return simd_make_float16(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi));
+#endif
+}
+  
+static inline SIMD_CFUNC double simd_precise_rsqrt(double x) {
+  return 1/sqrt(x);
+}
+  
+static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x) {
+  return 1/__tg_sqrt(x);
+}
+  
+static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x) {
+  return 1/__tg_sqrt(x);
+}
+  
+static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x) {
+  return 1/__tg_sqrt(x);
+}
+  
+static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x) {
+  return 1/__tg_sqrt(x);
+}
+  
+static inline SIMD_CFUNC float simd_fract(float x) {
+  return fmin(x - floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f);
+}
+
+static inline SIMD_CFUNC double simd_fract(double x) {
+  return fmin(x - floor(x), 0x1.fffffffffffffp-1);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x) {
+  return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1);
+}
+
+static inline SIMD_CFUNC float simd_step(float edge, float x) {
+  return !(x < edge);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x) {
+  return simd_bitselect((simd_float2)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x) {
+  return simd_bitselect((simd_float3)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x) {
+  return simd_bitselect((simd_float4)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x) {
+  return simd_bitselect((simd_float8)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x) {
+  return simd_bitselect((simd_float16)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC double simd_step(double edge, double x) {
+  return !(x < edge);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x) {
+  return simd_bitselect((simd_double2)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x) {
+  return simd_bitselect((simd_double3)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x) {
+  return simd_bitselect((simd_double4)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x) {
+  return simd_bitselect((simd_double8)1, 0, x < edge);
+}
+
+static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x) {
+  float t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x) {
+  simd_float2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x) {
+  simd_float3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x) {
+  simd_float4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x) {
+  simd_float8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x) {
+  simd_float16 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x) {
+  double t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x) {
+  simd_double2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x) {
+  simd_double3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x) {
+  simd_double4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x) {
+  simd_double8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1);
+  return t*t*(3 - 2*t);
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x) {
+  return x.x + x.y;
+}
+
+static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x) {
+  return x.x + x.y + x.z;
+}
+
+static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x) {
+  return simd_reduce_add(x.lo + x.hi);
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x) {
+  char t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x) {
+  unsigned char t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x) {
+  short t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x) {
+  unsigned short t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x) {
+  int t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x) {
+  unsigned int t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x) {
+  return fmin(x.x, x.y);
+}
+
+static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x) {
+  return fmin(fmin(x.x, x.z), x.y);
+}
+
+static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x) {
+  simd_long1 t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x) {
+  return x.y < x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x) {
+  simd_ulong1 t = x.z < x.x ? x.z : x.x;
+  return x.y < t ? x.y : t;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x) {
+  return fmin(x.x, x.y);
+}
+
+static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x) {
+  return fmin(fmin(x.x, x.z), x.y);
+}
+
+static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x) {
+  return simd_reduce_min(simd_min(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x) {
+  char t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x) {
+  unsigned char t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x) {
+  short t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x) {
+  unsigned short t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x) {
+  int t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x) {
+  unsigned int t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x) {
+  return fmax(x.x, x.y);
+}
+
+static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x) {
+  return fmax(fmax(x.x, x.z), x.y);
+}
+
+static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x) {
+  simd_long1 t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x) {
+  return x.y > x.x ? x.y : x.x;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x) {
+  simd_ulong1 t = x.z > x.x ? x.z : x.x;
+  return x.y > t ? x.y : t;
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x) {
+  return fmax(x.x, x.y);
+}
+
+static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x) {
+  return fmax(fmax(x.x, x.z), x.y);
+}
+
+static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x) {
+  return simd_reduce_max(simd_max(x.lo, x.hi));
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* SIMD_COMMON_HEADER */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/conversion.h
@@ -0,0 +1,1966 @@
+/*  Copyright (c) 2014-2017 Apple, Inc. All rights reserved.
+ *
+ *  The interfaces declared in this header provide conversions between vector
+ *  types. The following functions are available:
+ *
+ *      simd_char(x)      simd_uchar(x)
+ *      simd_short(x)     simd_ushort(x)
+ *      simd_int(x)       simd_uint(x)
+ *      simd_long(x)      simd_ulong(x)
+ *      simd_float(x)
+ *      simd_double(x)
+ *
+ *  Each of these functions converts x to a vector whose elements have the
+ *  type named by the function, with the same number of elements as x. Unlike
+ *  a vector cast, these functions convert the elements to the new element
+ *  type. These conversions behave exactly as C scalar conversions, except
+ *  that conversions from integer vector types to signed integer vector types
+ *  are guaranteed to wrap modulo 2^N (where N is the number of bits in an
+ *  element of the result type).
+ *
+ *  For integer vector types, saturating conversions are also available:
+ *
+ *      simd_char_sat(x)      simd_uchar_sat(x)
+ *      simd_short_sat(x)     simd_ushort_sat(x)
+ *      simd_int_sat(x)       simd_uint_sat(x)
+ *      simd_long_sat(x)      simd_ulong_sat(x)
+ *
+ *  These conversions clamp x to the representable range of the result type
+ *  before converting.
+ *
+ *  Unlike most vector operations in <simd/>, there are no abbreviated C++
+ *  names for these functions in the simd:: namespace.
+ */
+
+#ifndef __SIMD_CONVERSION_HEADER__
+#define __SIMD_CONVERSION_HEADER__
+
+#include <simd/base.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#include <simd/vector_types.h>
+#include <simd/common.h>
+#include <simd/logic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static simd_char2  SIMD_CFUNC simd_char(simd_char2    __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_char3    __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_char4    __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_char8    __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_char16   __x);
+static simd_char32 SIMD_CFUNC simd_char(simd_char32   __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_uchar2   __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_uchar3   __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_uchar4   __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_uchar8   __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_uchar16  __x);
+static simd_char32 SIMD_CFUNC simd_char(simd_uchar32  __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_short2   __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_short3   __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_short4   __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_short8   __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_short16  __x);
+static simd_char32 SIMD_CFUNC simd_char(simd_short32  __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_ushort2  __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_ushort3  __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_ushort4  __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_ushort8  __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x);
+static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_int2     __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_int3     __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_int4     __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_int8     __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_int16    __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_uint2    __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_uint3    __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_uint4    __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_uint8    __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_uint16   __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_float2   __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_float3   __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_float4   __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_float8   __x);
+static simd_char16 SIMD_CFUNC simd_char(simd_float16  __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_long2    __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_long3    __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_long4    __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_long8    __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_ulong2   __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_ulong3   __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_ulong4   __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_ulong8   __x);
+static simd_char2  SIMD_CFUNC simd_char(simd_double2  __x);
+static simd_char3  SIMD_CFUNC simd_char(simd_double3  __x);
+static simd_char4  SIMD_CFUNC simd_char(simd_double4  __x);
+static simd_char8  SIMD_CFUNC simd_char(simd_double8  __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_char2    __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_char3    __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_char4    __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_char8    __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16   __x);
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32   __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_short2   __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_short3   __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_short4   __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_short8   __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16  __x);
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32  __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_int2     __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_int3     __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_int4     __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_int8     __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16    __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_float2   __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_float3   __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_float4   __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_float8   __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16  __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_long2    __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_long3    __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_long4    __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_long8    __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_double2  __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_double3  __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_double4  __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_double8  __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_uchar2   __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_uchar3   __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_uchar4   __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_uchar8   __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16  __x);
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32  __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_ushort2  __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_ushort3  __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_ushort4  __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_ushort8  __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x);
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_uint2    __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_uint3    __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_uint4    __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_uint8    __x);
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16   __x);
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_ulong2   __x);
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_ulong3   __x);
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_ulong4   __x);
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_ulong8   __x);
+#define vector_char simd_char
+#define vector_char_sat simd_char_sat
+
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_char2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_char3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_char4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_char8    __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16   __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32   __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_uchar2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_uchar3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_uchar4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_uchar8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16  __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_short2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_short3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_short4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_short8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16  __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_ushort2  __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_ushort3  __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_ushort4  __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_ushort8  __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_int2     __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_int3     __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_int4     __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_int8     __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16    __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_uint2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_uint3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_uint4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_uint8    __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16   __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_float2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_float3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_float4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_float8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_long2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_long3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_long4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_long8    __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_ulong2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_ulong3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_ulong4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_ulong8   __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_double2  __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_double3  __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_double4  __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_double8  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_char2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_char3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_char4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_char8    __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16   __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32   __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_short2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_short3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_short4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_short8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16  __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_int2     __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_int3     __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_int4     __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_int8     __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16    __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_float2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_float3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_float4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_float8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_long2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_long3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_long4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_long8    __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_double2  __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_double3  __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_double4  __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_double8  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_uchar2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_uchar3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_uchar4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_uchar8   __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16  __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32  __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_ushort2  __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_ushort3  __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_ushort4  __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_ushort8  __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x);
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_uint2    __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_uint3    __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_uint4    __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_uint8    __x);
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16   __x);
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_ulong2   __x);
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_ulong3   __x);
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_ulong4   __x);
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_ulong8   __x);
+#define vector_uchar simd_uchar
+#define vector_uchar_sat simd_uchar_sat
+
+static simd_short2  SIMD_CFUNC simd_short(simd_char2    __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_char3    __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_char4    __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_char8    __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_char16   __x);
+static simd_short32 SIMD_CFUNC simd_short(simd_char32   __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_uchar2   __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_uchar3   __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_uchar4   __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_uchar8   __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_uchar16  __x);
+static simd_short32 SIMD_CFUNC simd_short(simd_uchar32  __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_short2   __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_short3   __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_short4   __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_short8   __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_short16  __x);
+static simd_short32 SIMD_CFUNC simd_short(simd_short32  __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_ushort2  __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_ushort3  __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_ushort4  __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_ushort8  __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x);
+static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_int2     __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_int3     __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_int4     __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_int8     __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_int16    __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_uint2    __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_uint3    __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_uint4    __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_uint8    __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_uint16   __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_float2   __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_float3   __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_float4   __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_float8   __x);
+static simd_short16 SIMD_CFUNC simd_short(simd_float16  __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_long2    __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_long3    __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_long4    __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_long8    __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_ulong2   __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_ulong3   __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_ulong4   __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_ulong8   __x);
+static simd_short2  SIMD_CFUNC simd_short(simd_double2  __x);
+static simd_short3  SIMD_CFUNC simd_short(simd_double3  __x);
+static simd_short4  SIMD_CFUNC simd_short(simd_double4  __x);
+static simd_short8  SIMD_CFUNC simd_short(simd_double8  __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_char2    __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_char3    __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_char4    __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_char8    __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16   __x);
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32   __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_short2   __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_short3   __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_short4   __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_short8   __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16  __x);
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32  __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_int2     __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_int3     __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_int4     __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_int8     __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16    __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_float2   __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_float3   __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_float4   __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_float8   __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16  __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_long2    __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_long3    __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_long4    __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_long8    __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_double2  __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_double3  __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_double4  __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_double8  __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_uchar2   __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_uchar3   __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_uchar4   __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_uchar8   __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16  __x);
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32  __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_ushort2  __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_ushort3  __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_ushort4  __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_ushort8  __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x);
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_uint2    __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_uint3    __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_uint4    __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_uint8    __x);
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16   __x);
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_ulong2   __x);
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_ulong3   __x);
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_ulong4   __x);
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_ulong8   __x);
+#define vector_short simd_short
+#define vector_short_sat simd_short_sat
+
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_char2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_char3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_char4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_char8    __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16   __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32   __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_uchar2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_uchar3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_uchar4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_uchar8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16  __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_short2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_short3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_short4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_short8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16  __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_ushort2  __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_ushort3  __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_ushort4  __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_ushort8  __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_int2     __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_int3     __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_int4     __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_int8     __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16    __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_uint2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_uint3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_uint4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_uint8    __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16   __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_float2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_float3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_float4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_float8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_long2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_long3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_long4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_long8    __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_ulong2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_ulong3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_ulong4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_ulong8   __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_double2  __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_double3  __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_double4  __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_double8  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_char2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_char3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_char4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_char8    __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16   __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32   __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_short2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_short3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_short4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_short8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16  __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_int2     __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_int3     __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_int4     __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_int8     __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16    __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_float2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_float3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_float4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_float8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_long2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_long3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_long4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_long8    __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_double2  __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_double3  __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_double4  __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_double8  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_uchar2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_uchar3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_uchar4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_uchar8   __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16  __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32  __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_ushort2  __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_ushort3  __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_ushort4  __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_ushort8  __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x);
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_uint2    __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_uint3    __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_uint4    __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_uint8    __x);
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16   __x);
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_ulong2   __x);
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_ulong3   __x);
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_ulong4   __x);
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_ulong8   __x);
+#define vector_ushort simd_ushort
+#define vector_ushort_sat simd_ushort_sat
+
+static simd_int2  SIMD_CFUNC simd_int(simd_char2    __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_char3    __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_char4    __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_char8    __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_char16   __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_uchar2   __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_uchar3   __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_uchar4   __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_uchar8   __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_uchar16  __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_short2   __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_short3   __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_short4   __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_short8   __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_short16  __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_ushort2  __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_ushort3  __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_ushort4  __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_ushort8  __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_int2     __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_int3     __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_int4     __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_int8     __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_int16    __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_uint2    __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_uint3    __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_uint4    __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_uint8    __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_uint16   __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_float2   __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_float3   __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_float4   __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_float8   __x);
+static simd_int16 SIMD_CFUNC simd_int(simd_float16  __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_long2    __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_long3    __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_long4    __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_long8    __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_ulong2   __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_ulong3   __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_ulong4   __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_ulong8   __x);
+static simd_int2  SIMD_CFUNC simd_int(simd_double2  __x);
+static simd_int3  SIMD_CFUNC simd_int(simd_double3  __x);
+static simd_int4  SIMD_CFUNC simd_int(simd_double4  __x);
+static simd_int8  SIMD_CFUNC simd_int(simd_double8  __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_char2    __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_char3    __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_char4    __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_char8    __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16   __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_short2   __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_short3   __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_short4   __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_short8   __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16  __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_int2     __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_int3     __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_int4     __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_int8     __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16    __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_float2   __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_float3   __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_float4   __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_float8   __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16  __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_long2    __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_long3    __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_long4    __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_long8    __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_double2  __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_double3  __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_double4  __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_double8  __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_uchar2   __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_uchar3   __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_uchar4   __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_uchar8   __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16  __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_ushort2  __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_ushort3  __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_ushort4  __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_ushort8  __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_uint2    __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_uint3    __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_uint4    __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_uint8    __x);
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16   __x);
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_ulong2   __x);
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_ulong3   __x);
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_ulong4   __x);
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_ulong8   __x);
+static simd_int2  SIMD_CFUNC simd_int_rte(simd_float2   __x);
+static simd_int3  SIMD_CFUNC simd_int_rte(simd_float3   __x);
+static simd_int4  SIMD_CFUNC simd_int_rte(simd_float4   __x);
+static simd_int8  SIMD_CFUNC simd_int_rte(simd_float8   __x);
+static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16  __x);
+#define vector_int simd_int
+#define vector_int_sat simd_int_sat
+
+static simd_uint2  SIMD_CFUNC simd_uint(simd_char2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_char3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_char4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_char8    __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_char16   __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_uchar2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_uchar3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_uchar4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_uchar8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_short2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_short3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_short4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_short8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_short16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_ushort2  __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_ushort3  __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_ushort4  __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_ushort8  __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_int2     __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_int3     __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_int4     __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_int8     __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_int16    __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_uint2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_uint3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_uint4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_uint8    __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16   __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_float2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_float3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_float4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_float8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint(simd_float16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_long2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_long3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_long4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_long8    __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_ulong2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_ulong3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_ulong4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_ulong8   __x);
+static simd_uint2  SIMD_CFUNC simd_uint(simd_double2  __x);
+static simd_uint3  SIMD_CFUNC simd_uint(simd_double3  __x);
+static simd_uint4  SIMD_CFUNC simd_uint(simd_double4  __x);
+static simd_uint8  SIMD_CFUNC simd_uint(simd_double8  __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_char2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_char3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_char4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_char8    __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16   __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_short2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_short3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_short4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_short8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_int2     __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_int3     __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_int4     __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_int8     __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16    __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_float2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_float3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_float4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_float8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_long2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_long3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_long4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_long8    __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_double2  __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_double3  __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_double4  __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_double8  __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_uchar2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_uchar3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_uchar4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_uchar8   __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16  __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_ushort2  __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_ushort3  __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_ushort4  __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_ushort8  __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_uint2    __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_uint3    __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_uint4    __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_uint8    __x);
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16   __x);
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_ulong2   __x);
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_ulong3   __x);
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_ulong4   __x);
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_ulong8   __x);
+#define vector_uint simd_uint
+#define vector_uint_sat simd_uint_sat
+
+static simd_float2  SIMD_CFUNC simd_float(simd_char2    __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_char3    __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_char4    __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_char8    __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_char16   __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_uchar2   __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_uchar3   __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_uchar4   __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_uchar8   __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_uchar16  __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_short2   __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_short3   __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_short4   __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_short8   __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_short16  __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_ushort2  __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_ushort3  __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_ushort4  __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_ushort8  __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_int2     __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_int3     __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_int4     __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_int8     __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_int16    __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_uint2    __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_uint3    __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_uint4    __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_uint8    __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_uint16   __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_float2   __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_float3   __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_float4   __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_float8   __x);
+static simd_float16 SIMD_CFUNC simd_float(simd_float16  __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_long2    __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_long3    __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_long4    __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_long8    __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_ulong2   __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_ulong3   __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_ulong4   __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_ulong8   __x);
+static simd_float2  SIMD_CFUNC simd_float(simd_double2  __x);
+static simd_float3  SIMD_CFUNC simd_float(simd_double3  __x);
+static simd_float4  SIMD_CFUNC simd_float(simd_double4  __x);
+static simd_float8  SIMD_CFUNC simd_float(simd_double8  __x);
+#define vector_float simd_float
+
+static simd_long2  SIMD_CFUNC simd_long(simd_char2    __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_char3    __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_char4    __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_char8    __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_uchar2   __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_uchar3   __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_uchar4   __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_uchar8   __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_short2   __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_short3   __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_short4   __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_short8   __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_ushort2  __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_ushort3  __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_ushort4  __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_ushort8  __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_int2     __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_int3     __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_int4     __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_int8     __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_uint2    __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_uint3    __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_uint4    __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_uint8    __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_float2   __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_float3   __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_float4   __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_float8   __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_long2    __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_long3    __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_long4    __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_long8    __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_ulong2   __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_ulong3   __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_ulong4   __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_ulong8   __x);
+static simd_long2  SIMD_CFUNC simd_long(simd_double2  __x);
+static simd_long3  SIMD_CFUNC simd_long(simd_double3  __x);
+static simd_long4  SIMD_CFUNC simd_long(simd_double4  __x);
+static simd_long8  SIMD_CFUNC simd_long(simd_double8  __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_char2    __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_char3    __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_char4    __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_char8    __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_short2   __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_short3   __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_short4   __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_short8   __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_int2     __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_int3     __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_int4     __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_int8     __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_float2   __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_float3   __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_float4   __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_float8   __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_long2    __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_long3    __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_long4    __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_long8    __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_double2  __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_double3  __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_double4  __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_double8  __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_uchar2   __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_uchar3   __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_uchar4   __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_uchar8   __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_ushort2  __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_ushort3  __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_ushort4  __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_ushort8  __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_uint2    __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_uint3    __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_uint4    __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_uint8    __x);
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_ulong2   __x);
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_ulong3   __x);
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_ulong4   __x);
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_ulong8   __x);
+static simd_long2  SIMD_CFUNC simd_long_rte(simd_double2  __x);
+static simd_long3  SIMD_CFUNC simd_long_rte(simd_double3  __x);
+static simd_long4  SIMD_CFUNC simd_long_rte(simd_double4  __x);
+static simd_long8  SIMD_CFUNC simd_long_rte(simd_double8  __x);
+#define vector_long simd_long
+#define vector_long_sat simd_long_sat
+
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_char2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_char3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_char4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_char8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_uchar2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_uchar3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_uchar4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_uchar8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_short2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_short3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_short4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_short8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_ushort2  __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_ushort3  __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_ushort4  __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_ushort8  __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_int2     __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_int3     __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_int4     __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_int8     __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_uint2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_uint3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_uint4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_uint8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_float2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_float3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_float4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_float8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_long2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_long3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_long4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_long8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_ulong2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_ulong3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_ulong4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_ulong8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_double2  __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_double3  __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_double4  __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_double8  __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_char2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_char3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_char4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_char8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_short2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_short3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_short4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_short8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_int2     __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_int3     __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_int4     __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_int8     __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_float2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_float3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_float4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_float8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_long2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_long3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_long4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_long8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_double2  __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_double3  __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_double4  __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_double8  __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_uchar2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_uchar3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_uchar4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_uchar8   __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_ushort2  __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_ushort3  __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_ushort4  __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_ushort8  __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_uint2    __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_uint3    __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_uint4    __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_uint8    __x);
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_ulong2   __x);
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_ulong3   __x);
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_ulong4   __x);
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_ulong8   __x);
+#define vector_ulong simd_ulong
+#define vector_ulong_sat simd_ulong_sat
+
+static simd_double2  SIMD_CFUNC simd_double(simd_char2    __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_char3    __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_char4    __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_char8    __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_uchar2   __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_uchar3   __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_uchar4   __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_uchar8   __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_short2   __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_short3   __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_short4   __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_short8   __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_ushort2  __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_ushort3  __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_ushort4  __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_ushort8  __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_int2     __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_int3     __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_int4     __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_int8     __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_uint2    __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_uint3    __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_uint4    __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_uint8    __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_float2   __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_float3   __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_float4   __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_float8   __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_long2    __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_long3    __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_long4    __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_long8    __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_ulong2   __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_ulong3   __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_ulong4   __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_ulong8   __x);
+static simd_double2  SIMD_CFUNC simd_double(simd_double2  __x);
+static simd_double3  SIMD_CFUNC simd_double(simd_double3  __x);
+static simd_double4  SIMD_CFUNC simd_double(simd_double4  __x);
+static simd_double8  SIMD_CFUNC simd_double(simd_double8  __x);
+#define vector_double simd_double
+
+static simd_char2   SIMD_CFUNC vector2(char           __x, char           __y) { return (  simd_char2){__x, __y}; }
+static simd_uchar2  SIMD_CFUNC vector2(unsigned char  __x, unsigned char  __y) { return ( simd_uchar2){__x, __y}; }
+static simd_short2  SIMD_CFUNC vector2(short          __x, short          __y) { return ( simd_short2){__x, __y}; }
+static simd_ushort2 SIMD_CFUNC vector2(unsigned short __x, unsigned short __y) { return (simd_ushort2){__x, __y}; }
+static simd_int2    SIMD_CFUNC vector2(int            __x, int            __y) { return (   simd_int2){__x, __y}; }
+static simd_uint2   SIMD_CFUNC vector2(unsigned int   __x, unsigned int   __y) { return (  simd_uint2){__x, __y}; }
+static simd_float2  SIMD_CFUNC vector2(float          __x, float          __y) { return ( simd_float2){__x, __y}; }
+static simd_long2   SIMD_CFUNC vector2(simd_long1   __x, simd_long1   __y) { return (  simd_long2){__x, __y}; }
+static simd_ulong2  SIMD_CFUNC vector2(simd_ulong1  __x, simd_ulong1  __y) { return ( simd_ulong2){__x, __y}; }
+static simd_double2 SIMD_CFUNC vector2(double         __x, double         __y) { return (simd_double2){__x, __y}; }
+
+static simd_char3   SIMD_CFUNC vector3(char           __x, char           __y, char           __z) { return (  simd_char3){__x, __y, __z}; }
+static simd_uchar3  SIMD_CFUNC vector3(unsigned char  __x, unsigned char  __y, unsigned char  __z) { return ( simd_uchar3){__x, __y, __z}; }
+static simd_short3  SIMD_CFUNC vector3(short          __x, short          __y, short          __z) { return ( simd_short3){__x, __y, __z}; }
+static simd_ushort3 SIMD_CFUNC vector3(unsigned short __x, unsigned short __y, unsigned short __z) { return (simd_ushort3){__x, __y, __z}; }
+static simd_int3    SIMD_CFUNC vector3(int            __x, int            __y, int            __z) { return (   simd_int3){__x, __y, __z}; }
+static simd_uint3   SIMD_CFUNC vector3(unsigned int   __x, unsigned int   __y, unsigned int   __z) { return (  simd_uint3){__x, __y, __z}; }
+static simd_float3  SIMD_CFUNC vector3(float          __x, float          __y, float          __z) { return ( simd_float3){__x, __y, __z}; }
+static simd_long3   SIMD_CFUNC vector3(simd_long1   __x, simd_long1   __y, simd_long1   __z) { return (  simd_long3){__x, __y, __z}; }
+static simd_ulong3  SIMD_CFUNC vector3(simd_ulong1  __x, simd_ulong1  __y, simd_ulong1  __z) { return ( simd_ulong3){__x, __y, __z}; }
+static simd_double3 SIMD_CFUNC vector3(double         __x, double         __y, double         __z) { return (simd_double3){__x, __y, __z}; }
+
+static simd_char3   SIMD_CFUNC vector3(simd_char2   __xy, char           __z) { simd_char3   __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_uchar3  SIMD_CFUNC vector3(simd_uchar2  __xy, unsigned char  __z) { simd_uchar3  __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_short3  SIMD_CFUNC vector3(simd_short2  __xy, short          __z) { simd_short3  __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_ushort3 SIMD_CFUNC vector3(simd_ushort2 __xy, unsigned short __z) { simd_ushort3 __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_int3    SIMD_CFUNC vector3(simd_int2    __xy, int            __z) { simd_int3    __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_uint3   SIMD_CFUNC vector3(simd_uint2   __xy, unsigned int   __z) { simd_uint3   __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_float3  SIMD_CFUNC vector3(simd_float2  __xy, float          __z) { simd_float3  __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_long3   SIMD_CFUNC vector3(simd_long2   __xy, simd_long1   __z) { simd_long3   __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_ulong3  SIMD_CFUNC vector3(simd_ulong2  __xy, simd_ulong1  __z) { simd_ulong3  __r; __r.xy = __xy; __r.z = __z; return __r; }
+static simd_double3 SIMD_CFUNC vector3(simd_double2 __xy, double         __z) { simd_double3 __r; __r.xy = __xy; __r.z = __z; return __r; }
+
+static simd_char4   SIMD_CFUNC vector4(char           __x, char           __y, char           __z, char           __w) { return (  simd_char4){__x, __y, __z, __w}; }
+static simd_uchar4  SIMD_CFUNC vector4(unsigned char  __x, unsigned char  __y, unsigned char  __z, unsigned char  __w) { return ( simd_uchar4){__x, __y, __z, __w}; }
+static simd_short4  SIMD_CFUNC vector4(short          __x, short          __y, short          __z, short          __w) { return ( simd_short4){__x, __y, __z, __w}; }
+static simd_ushort4 SIMD_CFUNC vector4(unsigned short __x, unsigned short __y, unsigned short __z, unsigned short __w) { return (simd_ushort4){__x, __y, __z, __w}; }
+static simd_int4    SIMD_CFUNC vector4(int            __x, int            __y, int            __z, int            __w) { return (   simd_int4){__x, __y, __z, __w}; }
+static simd_uint4   SIMD_CFUNC vector4(unsigned int   __x, unsigned int   __y, unsigned int   __z, unsigned int   __w) { return (  simd_uint4){__x, __y, __z, __w}; }
+static simd_float4  SIMD_CFUNC vector4(float          __x, float          __y, float          __z, float          __w) { return ( simd_float4){__x, __y, __z, __w}; }
+static simd_long4   SIMD_CFUNC vector4(simd_long1   __x, simd_long1   __y, simd_long1   __z, simd_long1   __w) { return (  simd_long4){__x, __y, __z, __w}; }
+static simd_ulong4  SIMD_CFUNC vector4(simd_ulong1  __x, simd_ulong1  __y, simd_ulong1  __z, simd_ulong1  __w) { return ( simd_ulong4){__x, __y, __z, __w}; }
+static simd_double4 SIMD_CFUNC vector4(double         __x, double         __y, double         __z, double         __w) { return (simd_double4){__x, __y, __z, __w}; }
+
+static simd_char4   SIMD_CFUNC vector4(simd_char2   __xy, simd_char2   __zw) { simd_char4   __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_uchar4  SIMD_CFUNC vector4(simd_uchar2  __xy, simd_uchar2  __zw) { simd_uchar4  __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_short4  SIMD_CFUNC vector4(simd_short2  __xy, simd_short2  __zw) { simd_short4  __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_ushort4 SIMD_CFUNC vector4(simd_ushort2 __xy, simd_ushort2 __zw) { simd_ushort4 __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_int4    SIMD_CFUNC vector4(simd_int2    __xy, simd_int2    __zw) { simd_int4    __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_uint4   SIMD_CFUNC vector4(simd_uint2   __xy, simd_uint2   __zw) { simd_uint4   __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_float4  SIMD_CFUNC vector4(simd_float2  __xy, simd_float2  __zw) { simd_float4  __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_long4   SIMD_CFUNC vector4(simd_long2   __xy, simd_long2   __zw) { simd_long4   __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_ulong4  SIMD_CFUNC vector4(simd_ulong2  __xy, simd_ulong2  __zw) { simd_ulong4  __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+static simd_double4 SIMD_CFUNC vector4(simd_double2 __xy, simd_double2 __zw) { simd_double4 __r; __r.xy = __xy; __r.zw = __zw; return __r; }
+
+static simd_char4   SIMD_CFUNC vector4(simd_char3   __xyz, char           __w) { simd_char4   __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_uchar4  SIMD_CFUNC vector4(simd_uchar3  __xyz, unsigned char  __w) { simd_uchar4  __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_short4  SIMD_CFUNC vector4(simd_short3  __xyz, short          __w) { simd_short4  __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_ushort4 SIMD_CFUNC vector4(simd_ushort3 __xyz, unsigned short __w) { simd_ushort4 __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_int4    SIMD_CFUNC vector4(simd_int3    __xyz, int            __w) { simd_int4    __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_uint4   SIMD_CFUNC vector4(simd_uint3   __xyz, unsigned int   __w) { simd_uint4   __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_float4  SIMD_CFUNC vector4(simd_float3  __xyz, float          __w) { simd_float4  __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_long4   SIMD_CFUNC vector4(simd_long3   __xyz, simd_long1   __w) { simd_long4   __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_ulong4  SIMD_CFUNC vector4(simd_ulong3  __xyz, simd_ulong1  __w) { simd_ulong4  __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+static simd_double4 SIMD_CFUNC vector4(simd_double3 __xyz, double         __w) { simd_double4 __r; __r.xyz = __xyz; __r.w = __w; return __r; }
+
+static simd_char8   SIMD_CFUNC vector8(simd_char4   __lo, simd_char4   __hi) { simd_char8   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_uchar8  SIMD_CFUNC vector8(simd_uchar4  __lo, simd_uchar4  __hi) { simd_uchar8  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_short8  SIMD_CFUNC vector8(simd_short4  __lo, simd_short4  __hi) { simd_short8  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_ushort8 SIMD_CFUNC vector8(simd_ushort4 __lo, simd_ushort4 __hi) { simd_ushort8 __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_int8    SIMD_CFUNC vector8(simd_int4    __lo, simd_int4    __hi) { simd_int8    __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_uint8   SIMD_CFUNC vector8(simd_uint4   __lo, simd_uint4   __hi) { simd_uint8   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_float8  SIMD_CFUNC vector8(simd_float4  __lo, simd_float4  __hi) { simd_float8  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_long8   SIMD_CFUNC vector8(simd_long4   __lo, simd_long4   __hi) { simd_long8   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_ulong8  SIMD_CFUNC vector8(simd_ulong4  __lo, simd_ulong4  __hi) { simd_ulong8  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_double8 SIMD_CFUNC vector8(simd_double4 __lo, simd_double4 __hi) { simd_double8 __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+
+static simd_char16   SIMD_CFUNC vector16(simd_char8   __lo, simd_char8   __hi) { simd_char16   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_uchar16  SIMD_CFUNC vector16(simd_uchar8  __lo, simd_uchar8  __hi) { simd_uchar16  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_short16  SIMD_CFUNC vector16(simd_short8  __lo, simd_short8  __hi) { simd_short16  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_ushort16 SIMD_CFUNC vector16(simd_ushort8 __lo, simd_ushort8 __hi) { simd_ushort16 __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_int16    SIMD_CFUNC vector16(simd_int8    __lo, simd_int8    __hi) { simd_int16    __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_uint16   SIMD_CFUNC vector16(simd_uint8   __lo, simd_uint8   __hi) { simd_uint16   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_float16  SIMD_CFUNC vector16(simd_float8  __lo, simd_float8  __hi) { simd_float16  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+
+static simd_char32   SIMD_CFUNC vector32(simd_char16   __lo, simd_char16   __hi) { simd_char32   __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_uchar32  SIMD_CFUNC vector32(simd_uchar16  __lo, simd_uchar16  __hi) { simd_uchar32  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_short32  SIMD_CFUNC vector32(simd_short16  __lo, simd_short16  __hi) { simd_short32  __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+static simd_ushort32 SIMD_CFUNC vector32(simd_ushort16 __lo, simd_ushort16 __hi) { simd_ushort32 __r; __r.lo = __lo; __r.hi = __hi; return __r; }
+
+#pragma mark - Implementation
+
+static simd_char2  SIMD_CFUNC simd_char(simd_char2    __x) { return __x; }
+static simd_char3  SIMD_CFUNC simd_char(simd_char3    __x) { return __x; }
+static simd_char4  SIMD_CFUNC simd_char(simd_char4    __x) { return __x; }
+static simd_char8  SIMD_CFUNC simd_char(simd_char8    __x) { return __x; }
+static simd_char16 SIMD_CFUNC simd_char(simd_char16   __x) { return __x; }
+static simd_char32 SIMD_CFUNC simd_char(simd_char32   __x) { return __x; }
+static simd_char2  SIMD_CFUNC simd_char(simd_uchar2   __x) { return (simd_char2)__x; }
+static simd_char3  SIMD_CFUNC simd_char(simd_uchar3   __x) { return (simd_char3)__x; }
+static simd_char4  SIMD_CFUNC simd_char(simd_uchar4   __x) { return (simd_char4)__x; }
+static simd_char8  SIMD_CFUNC simd_char(simd_uchar8   __x) { return (simd_char8)__x; }
+static simd_char16 SIMD_CFUNC simd_char(simd_uchar16  __x) { return (simd_char16)__x; }
+static simd_char32 SIMD_CFUNC simd_char(simd_uchar32  __x) { return (simd_char32)__x; }
+static simd_char2  SIMD_CFUNC simd_char(simd_short2   __x) { return __builtin_convertvector(__x & 0xff, simd_char2); }
+static simd_char3  SIMD_CFUNC simd_char(simd_short3   __x) { return __builtin_convertvector(__x & 0xff, simd_char3); }
+static simd_char4  SIMD_CFUNC simd_char(simd_short4   __x) { return __builtin_convertvector(__x & 0xff, simd_char4); }
+static simd_char8  SIMD_CFUNC simd_char(simd_short8   __x) { return __builtin_convertvector(__x & 0xff, simd_char8); }
+static simd_char16 SIMD_CFUNC simd_char(simd_short16  __x) { return __builtin_convertvector(__x & 0xff, simd_char16); }
+static simd_char32 SIMD_CFUNC simd_char(simd_short32  __x) { return __builtin_convertvector(__x & 0xff, simd_char32); }
+static simd_char2  SIMD_CFUNC simd_char(simd_ushort2  __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_ushort3  __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_ushort4  __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_ushort8  __x) { return simd_char(simd_short(__x)); }
+static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x) { return simd_char(simd_short(__x)); }
+static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_int2     __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_int3     __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_int4     __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_int8     __x) { return simd_char(simd_short(__x)); }
+static simd_char16 SIMD_CFUNC simd_char(simd_int16    __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_uint2    __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_uint3    __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_uint4    __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_uint8    __x) { return simd_char(simd_short(__x)); }
+static simd_char16 SIMD_CFUNC simd_char(simd_uint16   __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_float2   __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_float3   __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_float4   __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_float8   __x) { return simd_char(simd_short(__x)); }
+static simd_char16 SIMD_CFUNC simd_char(simd_float16  __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_long2    __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_long3    __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_long4    __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_long8    __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_ulong2   __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_ulong3   __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_ulong4   __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_ulong8   __x) { return simd_char(simd_short(__x)); }
+static simd_char2  SIMD_CFUNC simd_char(simd_double2  __x) { return simd_char(simd_short(__x)); }
+static simd_char3  SIMD_CFUNC simd_char(simd_double3  __x) { return simd_char(simd_short(__x)); }
+static simd_char4  SIMD_CFUNC simd_char(simd_double4  __x) { return simd_char(simd_short(__x)); }
+static simd_char8  SIMD_CFUNC simd_char(simd_double8  __x) { return simd_char(simd_short(__x)); }
+    
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_char2    __x) { return __x; }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_char3    __x) { return __x; }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_char4    __x) { return __x; }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_char8    __x) { return __x; }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16   __x) { return __x; }
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32   __x) { return __x; }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_short2   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_short3   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_short4   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_short8   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_int2     __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_int3     __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_int4     __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_int8     __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16    __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_float2   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_float3   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_float4   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_float8   __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_long2    __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_long3    __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_long4    __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_long8    __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_double2  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_double3  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_double4  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_double8  __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_uchar2   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_uchar3   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_uchar4   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_uchar8   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_ushort2  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_ushort3  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_ushort4  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_ushort8  __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_uint2    __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_uint3    __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_uint4    __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_uint8    __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char2  SIMD_CFUNC simd_char_sat(simd_ulong2   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char3  SIMD_CFUNC simd_char_sat(simd_ulong3   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char4  SIMD_CFUNC simd_char_sat(simd_ulong4   __x) { return simd_char(simd_min(__x,0x7f)); }
+static simd_char8  SIMD_CFUNC simd_char_sat(simd_ulong8   __x) { return simd_char(simd_min(__x,0x7f)); }
+    
+
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_char2    __x) { return (simd_uchar2)__x; }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_char3    __x) { return (simd_uchar3)__x; }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_char4    __x) { return (simd_uchar4)__x; }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_char8    __x) { return (simd_uchar8)__x; }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16   __x) { return (simd_uchar16)__x; }
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32   __x) { return (simd_uchar32)__x; }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_uchar2   __x) { return __x; }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_uchar3   __x) { return __x; }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_uchar4   __x) { return __x; }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_uchar8   __x) { return __x; }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16  __x) { return __x; }
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32  __x) { return __x; }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_short2   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_short3   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_short4   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_short8   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_ushort2  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_ushort3  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_ushort4  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_ushort8  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_int2     __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_int3     __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_int4     __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_int8     __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_uint2    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_uint3    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_uint4    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_uint8    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_float2   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_float3   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_float4   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_float8   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_long2    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_long3    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_long4    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_long8    __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_ulong2   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_ulong3   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_ulong4   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_ulong8   __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar(simd_double2  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar(simd_double3  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar(simd_double4  __x) { return simd_uchar(simd_char(__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar(simd_double8  __x) { return simd_uchar(simd_char(__x)); }
+    
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_char2    __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_char3    __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_char4    __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_char8    __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16   __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32   __x) { return simd_uchar(simd_max(0,__x)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_short2   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_short3   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_short4   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_short8   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_int2     __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_int3     __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_int4     __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_int8     __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16    __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_float2   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_float3   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_float4   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_float8   __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_long2    __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_long3    __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_long4    __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_long8    __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_double2  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_double3  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_double4  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_double8  __x) { return simd_uchar(simd_clamp(__x,0,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_uchar2   __x) { return __x; }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_uchar3   __x) { return __x; }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_uchar4   __x) { return __x; }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_uchar8   __x) { return __x; }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16  __x) { return __x; }
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32  __x) { return __x; }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_ushort2  __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_ushort3  __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_ushort4  __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_ushort8  __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_uint2    __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_uint3    __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_uint4    __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_uint8    __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16   __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar2  SIMD_CFUNC simd_uchar_sat(simd_ulong2   __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar3  SIMD_CFUNC simd_uchar_sat(simd_ulong3   __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar4  SIMD_CFUNC simd_uchar_sat(simd_ulong4   __x) { return simd_uchar(simd_min(__x,0xff)); }
+static simd_uchar8  SIMD_CFUNC simd_uchar_sat(simd_ulong8   __x) { return simd_uchar(simd_min(__x,0xff)); }
+    
+
+static simd_short2  SIMD_CFUNC simd_short(simd_char2    __x) { return __builtin_convertvector(__x, simd_short2); }
+static simd_short3  SIMD_CFUNC simd_short(simd_char3    __x) { return __builtin_convertvector(__x, simd_short3); }
+static simd_short4  SIMD_CFUNC simd_short(simd_char4    __x) { return __builtin_convertvector(__x, simd_short4); }
+static simd_short8  SIMD_CFUNC simd_short(simd_char8    __x) { return __builtin_convertvector(__x, simd_short8); }
+static simd_short16 SIMD_CFUNC simd_short(simd_char16   __x) { return __builtin_convertvector(__x, simd_short16); }
+static simd_short32 SIMD_CFUNC simd_short(simd_char32   __x) { return __builtin_convertvector(__x, simd_short32); }
+static simd_short2  SIMD_CFUNC simd_short(simd_uchar2   __x) { return __builtin_convertvector(__x, simd_short2); }
+static simd_short3  SIMD_CFUNC simd_short(simd_uchar3   __x) { return __builtin_convertvector(__x, simd_short3); }
+static simd_short4  SIMD_CFUNC simd_short(simd_uchar4   __x) { return __builtin_convertvector(__x, simd_short4); }
+static simd_short8  SIMD_CFUNC simd_short(simd_uchar8   __x) { return __builtin_convertvector(__x, simd_short8); }
+static simd_short16 SIMD_CFUNC simd_short(simd_uchar16  __x) { return __builtin_convertvector(__x, simd_short16); }
+static simd_short32 SIMD_CFUNC simd_short(simd_uchar32  __x) { return __builtin_convertvector(__x, simd_short32); }
+static simd_short2  SIMD_CFUNC simd_short(simd_short2   __x) { return __x; }
+static simd_short3  SIMD_CFUNC simd_short(simd_short3   __x) { return __x; }
+static simd_short4  SIMD_CFUNC simd_short(simd_short4   __x) { return __x; }
+static simd_short8  SIMD_CFUNC simd_short(simd_short8   __x) { return __x; }
+static simd_short16 SIMD_CFUNC simd_short(simd_short16  __x) { return __x; }
+static simd_short32 SIMD_CFUNC simd_short(simd_short32  __x) { return __x; }
+static simd_short2  SIMD_CFUNC simd_short(simd_ushort2  __x) { return (simd_short2)__x; }
+static simd_short3  SIMD_CFUNC simd_short(simd_ushort3  __x) { return (simd_short3)__x; }
+static simd_short4  SIMD_CFUNC simd_short(simd_ushort4  __x) { return (simd_short4)__x; }
+static simd_short8  SIMD_CFUNC simd_short(simd_ushort8  __x) { return (simd_short8)__x; }
+static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x) { return (simd_short16)__x; }
+static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x) { return (simd_short32)__x; }
+static simd_short2  SIMD_CFUNC simd_short(simd_int2     __x) { return __builtin_convertvector(__x & 0xffff, simd_short2); }
+static simd_short3  SIMD_CFUNC simd_short(simd_int3     __x) { return __builtin_convertvector(__x & 0xffff, simd_short3); }
+static simd_short4  SIMD_CFUNC simd_short(simd_int4     __x) { return __builtin_convertvector(__x & 0xffff, simd_short4); }
+static simd_short8  SIMD_CFUNC simd_short(simd_int8     __x) { return __builtin_convertvector(__x & 0xffff, simd_short8); }
+static simd_short16 SIMD_CFUNC simd_short(simd_int16    __x) { return __builtin_convertvector(__x & 0xffff, simd_short16); }
+static simd_short2  SIMD_CFUNC simd_short(simd_uint2    __x) { return simd_short(simd_int(__x)); }
+static simd_short3  SIMD_CFUNC simd_short(simd_uint3    __x) { return simd_short(simd_int(__x)); }
+static simd_short4  SIMD_CFUNC simd_short(simd_uint4    __x) { return simd_short(simd_int(__x)); }
+static simd_short8  SIMD_CFUNC simd_short(simd_uint8    __x) { return simd_short(simd_int(__x)); }
+static simd_short16 SIMD_CFUNC simd_short(simd_uint16   __x) { return simd_short(simd_int(__x)); }
+static simd_short2  SIMD_CFUNC simd_short(simd_float2   __x) { return simd_short(simd_int(__x)); }
+static simd_short3  SIMD_CFUNC simd_short(simd_float3   __x) { return simd_short(simd_int(__x)); }
+static simd_short4  SIMD_CFUNC simd_short(simd_float4   __x) { return simd_short(simd_int(__x)); }
+static simd_short8  SIMD_CFUNC simd_short(simd_float8   __x) { return simd_short(simd_int(__x)); }
+static simd_short16 SIMD_CFUNC simd_short(simd_float16  __x) { return simd_short(simd_int(__x)); }
+static simd_short2  SIMD_CFUNC simd_short(simd_long2    __x) { return simd_short(simd_int(__x)); }
+static simd_short3  SIMD_CFUNC simd_short(simd_long3    __x) { return simd_short(simd_int(__x)); }
+static simd_short4  SIMD_CFUNC simd_short(simd_long4    __x) { return simd_short(simd_int(__x)); }
+static simd_short8  SIMD_CFUNC simd_short(simd_long8    __x) { return simd_short(simd_int(__x)); }
+static simd_short2  SIMD_CFUNC simd_short(simd_ulong2   __x) { return simd_short(simd_int(__x)); }
+static simd_short3  SIMD_CFUNC simd_short(simd_ulong3   __x) { return simd_short(simd_int(__x)); }
+static simd_short4  SIMD_CFUNC simd_short(simd_ulong4   __x) { return simd_short(simd_int(__x)); }
+static simd_short8  SIMD_CFUNC simd_short(simd_ulong8   __x) { return simd_short(simd_int(__x)); }
+static simd_short2  SIMD_CFUNC simd_short(simd_double2  __x) { return simd_short(simd_int(__x)); }
+static simd_short3  SIMD_CFUNC simd_short(simd_double3  __x) { return simd_short(simd_int(__x)); }
+static simd_short4  SIMD_CFUNC simd_short(simd_double4  __x) { return simd_short(simd_int(__x)); }
+static simd_short8  SIMD_CFUNC simd_short(simd_double8  __x) { return simd_short(simd_int(__x)); }
+    
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_char2    __x) { return simd_short(__x); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_char3    __x) { return simd_short(__x); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_char4    __x) { return simd_short(__x); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_char8    __x) { return simd_short(__x); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16   __x) { return simd_short(__x); }
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32   __x) { return simd_short(__x); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_short2   __x) { return __x; }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_short3   __x) { return __x; }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_short4   __x) { return __x; }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_short8   __x) { return __x; }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16  __x) { return __x; }
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32  __x) { return __x; }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_int2     __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_int3     __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_int4     __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_int8     __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16    __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_float2   __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_float3   __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_float4   __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_float8   __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16  __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_long2    __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_long3    __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_long4    __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_long8    __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_double2  __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_double3  __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_double4  __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_double8  __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_uchar2   __x) { return simd_short(__x); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_uchar3   __x) { return simd_short(__x); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_uchar4   __x) { return simd_short(__x); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_uchar8   __x) { return simd_short(__x); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16  __x) { return simd_short(__x); }
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32  __x) { return simd_short(__x); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_ushort2  __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_ushort3  __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_ushort4  __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_ushort8  __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_uint2    __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_uint3    __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_uint4    __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_uint8    __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16   __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short2  SIMD_CFUNC simd_short_sat(simd_ulong2   __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short3  SIMD_CFUNC simd_short_sat(simd_ulong3   __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short4  SIMD_CFUNC simd_short_sat(simd_ulong4   __x) { return simd_short(simd_min(__x,0x7fff)); }
+static simd_short8  SIMD_CFUNC simd_short_sat(simd_ulong8   __x) { return simd_short(simd_min(__x,0x7fff)); }
+    
+
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_char2    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_char3    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_char4    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_char8    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_uchar2   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_uchar3   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_uchar4   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_uchar8   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_short2   __x) { return (simd_ushort2)__x; }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_short3   __x) { return (simd_ushort3)__x; }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_short4   __x) { return (simd_ushort4)__x; }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_short8   __x) { return (simd_ushort8)__x; }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16  __x) { return (simd_ushort16)__x; }
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32  __x) { return (simd_ushort32)__x; }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_ushort2  __x) { return __x; }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_ushort3  __x) { return __x; }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_ushort4  __x) { return __x; }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_ushort8  __x) { return __x; }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x) { return __x; }
+static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x) { return __x; }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_int2     __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_int3     __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_int4     __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_int8     __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_uint2    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_uint3    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_uint4    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_uint8    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_float2   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_float3   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_float4   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_float8   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_long2    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_long3    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_long4    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_long8    __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_ulong2   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_ulong3   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_ulong4   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_ulong8   __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort(simd_double2  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort(simd_double3  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort(simd_double4  __x) { return simd_ushort(simd_short(__x)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort(simd_double8  __x) { return simd_ushort(simd_short(__x)); }
+    
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_char2    __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_char3    __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_char4    __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_char8    __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_short2   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_short3   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_short4   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_short8   __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16  __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32  __x) { return simd_ushort(simd_max(__x, 0)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_int2     __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_int3     __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_int4     __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_int8     __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16    __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_float2   __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_float3   __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_float4   __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_float8   __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16  __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_long2    __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_long3    __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_long4    __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_long8    __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_double2  __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_double3  __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_double4  __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_double8  __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_uchar2   __x) { return simd_ushort(__x); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_uchar3   __x) { return simd_ushort(__x); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_uchar4   __x) { return simd_ushort(__x); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_uchar8   __x) { return simd_ushort(__x); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16  __x) { return simd_ushort(__x); }
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32  __x) { return simd_ushort(__x); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_ushort2  __x) { return __x; }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_ushort3  __x) { return __x; }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_ushort4  __x) { return __x; }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_ushort8  __x) { return __x; }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x) { return __x; }
+static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x) { return __x; }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_uint2    __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_uint3    __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_uint4    __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_uint8    __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16   __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort2  SIMD_CFUNC simd_ushort_sat(simd_ulong2   __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort3  SIMD_CFUNC simd_ushort_sat(simd_ulong3   __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort4  SIMD_CFUNC simd_ushort_sat(simd_ulong4   __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+static simd_ushort8  SIMD_CFUNC simd_ushort_sat(simd_ulong8   __x) { return simd_ushort(simd_min(__x, 0xffff)); }
+    
+
+static simd_int2  SIMD_CFUNC simd_int(simd_char2    __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_char3    __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_char4    __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_char8    __x) { return __builtin_convertvector(__x, simd_int8); }
+static simd_int16 SIMD_CFUNC simd_int(simd_char16   __x) { return __builtin_convertvector(__x, simd_int16); }
+static simd_int2  SIMD_CFUNC simd_int(simd_uchar2   __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_uchar3   __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_uchar4   __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_uchar8   __x) { return __builtin_convertvector(__x, simd_int8); }
+static simd_int16 SIMD_CFUNC simd_int(simd_uchar16  __x) { return __builtin_convertvector(__x, simd_int16); }
+static simd_int2  SIMD_CFUNC simd_int(simd_short2   __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_short3   __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_short4   __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_short8   __x) { return __builtin_convertvector(__x, simd_int8); }
+static simd_int16 SIMD_CFUNC simd_int(simd_short16  __x) { return __builtin_convertvector(__x, simd_int16); }
+static simd_int2  SIMD_CFUNC simd_int(simd_ushort2  __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_ushort3  __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_ushort4  __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_ushort8  __x) { return __builtin_convertvector(__x, simd_int8); }
+static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x) { return __builtin_convertvector(__x, simd_int16); }
+static simd_int2  SIMD_CFUNC simd_int(simd_int2     __x) { return __x; }
+static simd_int3  SIMD_CFUNC simd_int(simd_int3     __x) { return __x; }
+static simd_int4  SIMD_CFUNC simd_int(simd_int4     __x) { return __x; }
+static simd_int8  SIMD_CFUNC simd_int(simd_int8     __x) { return __x; }
+static simd_int16 SIMD_CFUNC simd_int(simd_int16    __x) { return __x; }
+static simd_int2  SIMD_CFUNC simd_int(simd_uint2    __x) { return (simd_int2)__x; }
+static simd_int3  SIMD_CFUNC simd_int(simd_uint3    __x) { return (simd_int3)__x; }
+static simd_int4  SIMD_CFUNC simd_int(simd_uint4    __x) { return (simd_int4)__x; }
+static simd_int8  SIMD_CFUNC simd_int(simd_uint8    __x) { return (simd_int8)__x; }
+static simd_int16 SIMD_CFUNC simd_int(simd_uint16   __x) { return (simd_int16)__x; }
+static simd_int2  SIMD_CFUNC simd_int(simd_float2   __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_float3   __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_float4   __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_float8   __x) { return __builtin_convertvector(__x, simd_int8); }
+static simd_int16 SIMD_CFUNC simd_int(simd_float16  __x) { return __builtin_convertvector(__x, simd_int16); }
+static simd_int2  SIMD_CFUNC simd_int(simd_long2    __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_long3    __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_long4    __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_long8    __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int8); }
+static simd_int2  SIMD_CFUNC simd_int(simd_ulong2   __x) { return simd_int(simd_long(__x)); }
+static simd_int3  SIMD_CFUNC simd_int(simd_ulong3   __x) { return simd_int(simd_long(__x)); }
+static simd_int4  SIMD_CFUNC simd_int(simd_ulong4   __x) { return simd_int(simd_long(__x)); }
+static simd_int8  SIMD_CFUNC simd_int(simd_ulong8   __x) { return simd_int(simd_long(__x)); }
+static simd_int2  SIMD_CFUNC simd_int(simd_double2  __x) { return __builtin_convertvector(__x, simd_int2); }
+static simd_int3  SIMD_CFUNC simd_int(simd_double3  __x) { return __builtin_convertvector(__x, simd_int3); }
+static simd_int4  SIMD_CFUNC simd_int(simd_double4  __x) { return __builtin_convertvector(__x, simd_int4); }
+static simd_int8  SIMD_CFUNC simd_int(simd_double8  __x) { return __builtin_convertvector(__x, simd_int8); }
+    
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_char2    __x) { return simd_int(__x); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_char3    __x) { return simd_int(__x); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_char4    __x) { return simd_int(__x); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_char8    __x) { return simd_int(__x); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16   __x) { return simd_int(__x); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_short2   __x) { return simd_int(__x); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_short3   __x) { return simd_int(__x); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_short4   __x) { return simd_int(__x); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_short8   __x) { return simd_int(__x); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16  __x) { return simd_int(__x); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_int2     __x) { return __x; }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_int3     __x) { return __x; }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_int4     __x) { return __x; }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_int8     __x) { return __x; }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16    __x) { return __x; }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_float2   __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_float3   __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_float4   __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_float8   __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16  __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_long2    __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_long3    __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_long4    __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_long8    __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_double2  __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_double3  __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_double4  __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_double8  __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_uchar2   __x) { return simd_int(__x); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_uchar3   __x) { return simd_int(__x); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_uchar4   __x) { return simd_int(__x); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_uchar8   __x) { return simd_int(__x); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16  __x) { return simd_int(__x); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_ushort2  __x) { return simd_int(__x); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_ushort3  __x) { return simd_int(__x); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_ushort4  __x) { return simd_int(__x); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_ushort8  __x) { return simd_int(__x); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x) { return simd_int(__x); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_uint2    __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_uint3    __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_uint4    __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_uint8    __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16   __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int2  SIMD_CFUNC simd_int_sat(simd_ulong2   __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int3  SIMD_CFUNC simd_int_sat(simd_ulong3   __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int4  SIMD_CFUNC simd_int_sat(simd_ulong4   __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+static simd_int8  SIMD_CFUNC simd_int_sat(simd_ulong8   __x) { return simd_int(simd_min(__x,0x7fffffff)); }
+    
+static simd_int2  SIMD_CFUNC simd_int_rte(simd_float2   __x) {
+#if defined __arm64__
+  return vcvtn_s32_f32(__x);
+#else
+  return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x)));
+#endif
+}
+
+static simd_int3  SIMD_CFUNC simd_int_rte(simd_float3   __x) {
+  return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x)));
+}
+
+static simd_int4  SIMD_CFUNC simd_int_rte(simd_float4   __x) {
+#if defined __SSE2__
+  return _mm_cvtps_epi32(__x);
+#elif defined __arm64__
+  return vcvtnq_s32_f32(__x);
+#else
+  simd_float4 magic = __tg_copysign(0x1.0p23, __x);
+  simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23;
+  return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4);
+#endif
+}
+
+static simd_int8  SIMD_CFUNC simd_int_rte(simd_float8   __x) {
+#if defined __AVX__
+  return _mm256_cvtps_epi32(__x);
+#else
+  return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
+#endif
+}
+
+static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16  __x) {
+#if defined __AVX512F__
+  return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT);
+#else
+  return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
+#endif
+}
+
+static simd_uint2  SIMD_CFUNC simd_uint(simd_char2    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_char3    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_char4    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_char8    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_char16   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_uchar2   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_uchar3   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_uchar4   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_uchar8   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_short2   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_short3   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_short4   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_short8   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_short16  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_ushort2  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_ushort3  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_ushort4  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_ushort8  __x) { return simd_uint(simd_int(__x)); }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_int2     __x) { return (simd_uint2)__x; }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_int3     __x) { return (simd_uint3)__x; }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_int4     __x) { return (simd_uint4)__x; }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_int8     __x) { return (simd_uint8)__x; }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_int16    __x) { return (simd_uint16)__x; }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_uint2    __x) { return __x; }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_uint3    __x) { return __x; }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_uint4    __x) { return __x; }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_uint8    __x) { return __x; }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16   __x) { return __x; }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_float2   __x) { simd_int2  __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float2)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint2)0,0x80000000,__big); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_float3   __x) { simd_int3  __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float3)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint3)0,0x80000000,__big); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_float4   __x) { simd_int4  __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float4)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint4)0,0x80000000,__big); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_float8   __x) { simd_int8  __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float8)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint8)0,0x80000000,__big); }
+static simd_uint16 SIMD_CFUNC simd_uint(simd_float16  __x) { simd_int16 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float16)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint16)0,0x80000000,__big); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_long2    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_long3    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_long4    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_long8    __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_ulong2   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_ulong3   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_ulong4   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_ulong8   __x) { return simd_uint(simd_int(__x)); }
+static simd_uint2  SIMD_CFUNC simd_uint(simd_double2  __x) { simd_long2 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double2)0,0x1.0p31,__big))) + simd_bitselect((simd_uint2)0,0x80000000,simd_int(__big)); }
+static simd_uint3  SIMD_CFUNC simd_uint(simd_double3  __x) { simd_long3 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double3)0,0x1.0p31,__big))) + simd_bitselect((simd_uint3)0,0x80000000,simd_int(__big)); }
+static simd_uint4  SIMD_CFUNC simd_uint(simd_double4  __x) { simd_long4 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double4)0,0x1.0p31,__big))) + simd_bitselect((simd_uint4)0,0x80000000,simd_int(__big)); }
+static simd_uint8  SIMD_CFUNC simd_uint(simd_double8  __x) { simd_long8 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double8)0,0x1.0p31,__big))) + simd_bitselect((simd_uint8)0,0x80000000,simd_int(__big)); }
+    
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_char2    __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_char3    __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_char4    __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_char8    __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16   __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_short2   __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_short3   __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_short4   __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_short8   __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16  __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_int2     __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_int3     __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_int4     __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_int8     __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16    __x) { return simd_uint(simd_max(__x,0)); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_float2   __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_float3   __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_float4   __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_float8   __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16  __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_long2    __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_long3    __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_long4    __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_long8    __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_double2  __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_double3  __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_double4  __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_double8  __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_uchar2   __x) { return simd_uint(__x); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_uchar3   __x) { return simd_uint(__x); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_uchar4   __x) { return simd_uint(__x); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_uchar8   __x) { return simd_uint(__x); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16  __x) { return simd_uint(__x); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_ushort2  __x) { return simd_uint(__x); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_ushort3  __x) { return simd_uint(__x); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_ushort4  __x) { return simd_uint(__x); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_ushort8  __x) { return simd_uint(__x); }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x) { return simd_uint(__x); }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_uint2    __x) { return __x; }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_uint3    __x) { return __x; }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_uint4    __x) { return __x; }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_uint8    __x) { return __x; }
+static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16   __x) { return __x; }
+static simd_uint2  SIMD_CFUNC simd_uint_sat(simd_ulong2   __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint3  SIMD_CFUNC simd_uint_sat(simd_ulong3   __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint4  SIMD_CFUNC simd_uint_sat(simd_ulong4   __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+static simd_uint8  SIMD_CFUNC simd_uint_sat(simd_ulong8   __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
+    
+
+static simd_float2  SIMD_CFUNC simd_float(simd_char2    __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float3  SIMD_CFUNC simd_float(simd_char3    __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float4  SIMD_CFUNC simd_float(simd_char4    __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float8  SIMD_CFUNC simd_float(simd_char8    __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float16 SIMD_CFUNC simd_float(simd_char16   __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float2  SIMD_CFUNC simd_float(simd_uchar2   __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float3  SIMD_CFUNC simd_float(simd_uchar3   __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float4  SIMD_CFUNC simd_float(simd_uchar4   __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float8  SIMD_CFUNC simd_float(simd_uchar8   __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float16 SIMD_CFUNC simd_float(simd_uchar16  __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float2  SIMD_CFUNC simd_float(simd_short2   __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float3  SIMD_CFUNC simd_float(simd_short3   __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float4  SIMD_CFUNC simd_float(simd_short4   __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float8  SIMD_CFUNC simd_float(simd_short8   __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float16 SIMD_CFUNC simd_float(simd_short16  __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float2  SIMD_CFUNC simd_float(simd_ushort2  __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float3  SIMD_CFUNC simd_float(simd_ushort3  __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float4  SIMD_CFUNC simd_float(simd_ushort4  __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float8  SIMD_CFUNC simd_float(simd_ushort8  __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
+static simd_float2  SIMD_CFUNC simd_float(simd_int2     __x) { return __builtin_convertvector(__x,simd_float2); }
+static simd_float3  SIMD_CFUNC simd_float(simd_int3     __x) { return __builtin_convertvector(__x,simd_float3); }
+static simd_float4  SIMD_CFUNC simd_float(simd_int4     __x) { return __builtin_convertvector(__x,simd_float4); }
+static simd_float8  SIMD_CFUNC simd_float(simd_int8     __x) { return __builtin_convertvector(__x,simd_float8); }
+static simd_float16 SIMD_CFUNC simd_float(simd_int16    __x) { return __builtin_convertvector(__x,simd_float16); }
+static simd_float2  SIMD_CFUNC simd_float(simd_uint2    __x) { return __builtin_convertvector(__x,simd_float2); }
+static simd_float3  SIMD_CFUNC simd_float(simd_uint3    __x) { return __builtin_convertvector(__x,simd_float3); }
+static simd_float4  SIMD_CFUNC simd_float(simd_uint4    __x) { return __builtin_convertvector(__x,simd_float4); }
+static simd_float8  SIMD_CFUNC simd_float(simd_uint8    __x) { return __builtin_convertvector(__x,simd_float8); }
+static simd_float16 SIMD_CFUNC simd_float(simd_uint16   __x) { return __builtin_convertvector(__x,simd_float16); }
+static simd_float2  SIMD_CFUNC simd_float(simd_float2   __x) { return __x; }
+static simd_float3  SIMD_CFUNC simd_float(simd_float3   __x) { return __x; }
+static simd_float4  SIMD_CFUNC simd_float(simd_float4   __x) { return __x; }
+static simd_float8  SIMD_CFUNC simd_float(simd_float8   __x) { return __x; }
+static simd_float16 SIMD_CFUNC simd_float(simd_float16  __x) { return __x; }
+static simd_float2  SIMD_CFUNC simd_float(simd_long2    __x) { return __builtin_convertvector(__x,simd_float2); }
+static simd_float3  SIMD_CFUNC simd_float(simd_long3    __x) { return __builtin_convertvector(__x,simd_float3); }
+static simd_float4  SIMD_CFUNC simd_float(simd_long4    __x) { return __builtin_convertvector(__x,simd_float4); }
+static simd_float8  SIMD_CFUNC simd_float(simd_long8    __x) { return __builtin_convertvector(__x,simd_float8); }
+static simd_float2  SIMD_CFUNC simd_float(simd_ulong2   __x) { return __builtin_convertvector(__x,simd_float2); }
+static simd_float3  SIMD_CFUNC simd_float(simd_ulong3   __x) { return __builtin_convertvector(__x,simd_float3); }
+static simd_float4  SIMD_CFUNC simd_float(simd_ulong4   __x) { return __builtin_convertvector(__x,simd_float4); }
+static simd_float8  SIMD_CFUNC simd_float(simd_ulong8   __x) { return __builtin_convertvector(__x,simd_float8); }
+static simd_float2  SIMD_CFUNC simd_float(simd_double2  __x) { return __builtin_convertvector(__x,simd_float2); }
+static simd_float3  SIMD_CFUNC simd_float(simd_double3  __x) { return __builtin_convertvector(__x,simd_float3); }
+static simd_float4  SIMD_CFUNC simd_float(simd_double4  __x) { return __builtin_convertvector(__x,simd_float4); }
+static simd_float8  SIMD_CFUNC simd_float(simd_double8  __x) { return __builtin_convertvector(__x,simd_float8); }
+    
+
+static simd_long2  SIMD_CFUNC simd_long(simd_char2    __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_char3    __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_char4    __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_char8    __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_uchar2   __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_uchar3   __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_uchar4   __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_uchar8   __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_short2   __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_short3   __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_short4   __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_short8   __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_ushort2  __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_ushort3  __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_ushort4  __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_ushort8  __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_int2     __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_int3     __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_int4     __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_int8     __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_uint2    __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_uint3    __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_uint4    __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_uint8    __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_float2   __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_float3   __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_float4   __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_float8   __x) { return __builtin_convertvector(__x,simd_long8); }
+static simd_long2  SIMD_CFUNC simd_long(simd_long2    __x) { return __x; }
+static simd_long3  SIMD_CFUNC simd_long(simd_long3    __x) { return __x; }
+static simd_long4  SIMD_CFUNC simd_long(simd_long4    __x) { return __x; }
+static simd_long8  SIMD_CFUNC simd_long(simd_long8    __x) { return __x; }
+static simd_long2  SIMD_CFUNC simd_long(simd_ulong2   __x) { return (simd_long2)__x; }
+static simd_long3  SIMD_CFUNC simd_long(simd_ulong3   __x) { return (simd_long3)__x; }
+static simd_long4  SIMD_CFUNC simd_long(simd_ulong4   __x) { return (simd_long4)__x; }
+static simd_long8  SIMD_CFUNC simd_long(simd_ulong8   __x) { return (simd_long8)__x; }
+static simd_long2  SIMD_CFUNC simd_long(simd_double2  __x) { return __builtin_convertvector(__x,simd_long2); }
+static simd_long3  SIMD_CFUNC simd_long(simd_double3  __x) { return __builtin_convertvector(__x,simd_long3); }
+static simd_long4  SIMD_CFUNC simd_long(simd_double4  __x) { return __builtin_convertvector(__x,simd_long4); }
+static simd_long8  SIMD_CFUNC simd_long(simd_double8  __x) { return __builtin_convertvector(__x,simd_long8); }
+    
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_char2    __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_char3    __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_char4    __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_char8    __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_short2   __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_short3   __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_short4   __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_short8   __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_int2     __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_int3     __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_int4     __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_int8     __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_float2   __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_float3   __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_float4   __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_float8   __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_long2    __x) { return __x; }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_long3    __x) { return __x; }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_long4    __x) { return __x; }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_long8    __x) { return __x; }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_double2  __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_double3  __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_double4  __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_double8  __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_uchar2   __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_uchar3   __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_uchar4   __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_uchar8   __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_ushort2  __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_ushort3  __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_ushort4  __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_ushort8  __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_uint2    __x) { return simd_long(__x); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_uint3    __x) { return simd_long(__x); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_uint4    __x) { return simd_long(__x); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_uint8    __x) { return simd_long(__x); }
+static simd_long2  SIMD_CFUNC simd_long_sat(simd_ulong2   __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
+static simd_long3  SIMD_CFUNC simd_long_sat(simd_ulong3   __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
+static simd_long4  SIMD_CFUNC simd_long_sat(simd_ulong4   __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
+static simd_long8  SIMD_CFUNC simd_long_sat(simd_ulong8   __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
+    
+static simd_long2  SIMD_CFUNC simd_long_rte(simd_double2  __x) {
+#if defined __AVX512F__
+  return _mm_cvtpd_epi64(__x);
+#elif defined __arm64__
+  return vcvtnq_s64_f64(__x);
+#else
+  simd_double2 magic = __tg_copysign(0x1.0p52, __x);
+  simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52;
+  return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2);
+#endif
+}
+
+static simd_long3  SIMD_CFUNC simd_long_rte(simd_double3  __x) {
+  return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x)));
+}
+
+static simd_long4  SIMD_CFUNC simd_long_rte(simd_double4  __x) {
+#if defined __AVX512F__
+  return _mm256_cvtpd_epi64(__x);
+#else
+  return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
+#endif
+}
+
+static simd_long8  SIMD_CFUNC simd_long_rte(simd_double8  __x) {
+#if defined __AVX512F__
+  return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT);
+#else
+  return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
+#endif
+}
+
+
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_char2    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_char3    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_char4    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_char8    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_uchar2   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_uchar3   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_uchar4   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_uchar8   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_short2   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_short3   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_short4   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_short8   __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_ushort2  __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_ushort3  __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_ushort4  __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_ushort8  __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_int2     __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_int3     __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_int4     __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_int8     __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_uint2    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_uint3    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_uint4    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_uint8    __x) { return simd_ulong(simd_long(__x)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_float2   __x) { simd_int2 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float2)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,simd_long(__big)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_float3   __x) { simd_int3 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float3)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,simd_long(__big)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_float4   __x) { simd_int4 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float4)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,simd_long(__big)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_float8   __x) { simd_int8 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float8)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,simd_long(__big)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_long2    __x) { return (simd_ulong2)__x; }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_long3    __x) { return (simd_ulong3)__x; }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_long4    __x) { return (simd_ulong4)__x; }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_long8    __x) { return (simd_ulong8)__x; }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_ulong2   __x) { return __x; }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_ulong3   __x) { return __x; }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_ulong4   __x) { return __x; }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_ulong8   __x) { return __x; }
+static simd_ulong2  SIMD_CFUNC simd_ulong(simd_double2  __x) { simd_long2 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double2)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,__big); }
+static simd_ulong3  SIMD_CFUNC simd_ulong(simd_double3  __x) { simd_long3 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double3)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,__big); }
+static simd_ulong4  SIMD_CFUNC simd_ulong(simd_double4  __x) { simd_long4 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double4)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,__big); }
+static simd_ulong8  SIMD_CFUNC simd_ulong(simd_double8  __x) { simd_long8 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double8)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,__big); }
+    
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_char2    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_char3    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_char4    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_char8    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_short2   __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_short3   __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_short4   __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_short8   __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_int2     __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_int3     __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_int4     __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_int8     __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_float2   __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_float3   __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_float4   __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_float8   __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_long2    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_long3    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_long4    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_long8    __x) { return simd_ulong(simd_max(__x,0)); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_double2  __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_double3  __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_double4  __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_double8  __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_uchar2   __x) { return simd_ulong(__x); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_uchar3   __x) { return simd_ulong(__x); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_uchar4   __x) { return simd_ulong(__x); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_uchar8   __x) { return simd_ulong(__x); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_ushort2  __x) { return simd_ulong(__x); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_ushort3  __x) { return simd_ulong(__x); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_ushort4  __x) { return simd_ulong(__x); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_ushort8  __x) { return simd_ulong(__x); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_uint2    __x) { return simd_ulong(__x); }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_uint3    __x) { return simd_ulong(__x); }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_uint4    __x) { return simd_ulong(__x); }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_uint8    __x) { return simd_ulong(__x); }
+static simd_ulong2  SIMD_CFUNC simd_ulong_sat(simd_ulong2   __x) { return __x; }
+static simd_ulong3  SIMD_CFUNC simd_ulong_sat(simd_ulong3   __x) { return __x; }
+static simd_ulong4  SIMD_CFUNC simd_ulong_sat(simd_ulong4   __x) { return __x; }
+static simd_ulong8  SIMD_CFUNC simd_ulong_sat(simd_ulong8   __x) { return __x; }
+    
+
+static simd_double2  SIMD_CFUNC simd_double(simd_char2    __x) { return simd_double(simd_int(__x)); }
+static simd_double3  SIMD_CFUNC simd_double(simd_char3    __x) { return simd_double(simd_int(__x)); }
+static simd_double4  SIMD_CFUNC simd_double(simd_char4    __x) { return simd_double(simd_int(__x)); }
+static simd_double8  SIMD_CFUNC simd_double(simd_char8    __x) { return simd_double(simd_int(__x)); }
+static simd_double2  SIMD_CFUNC simd_double(simd_uchar2   __x) { return simd_double(simd_int(__x)); }
+static simd_double3  SIMD_CFUNC simd_double(simd_uchar3   __x) { return simd_double(simd_int(__x)); }
+static simd_double4  SIMD_CFUNC simd_double(simd_uchar4   __x) { return simd_double(simd_int(__x)); }
+static simd_double8  SIMD_CFUNC simd_double(simd_uchar8   __x) { return simd_double(simd_int(__x)); }
+static simd_double2  SIMD_CFUNC simd_double(simd_short2   __x) { return simd_double(simd_int(__x)); }
+static simd_double3  SIMD_CFUNC simd_double(simd_short3   __x) { return simd_double(simd_int(__x)); }
+static simd_double4  SIMD_CFUNC simd_double(simd_short4   __x) { return simd_double(simd_int(__x)); }
+static simd_double8  SIMD_CFUNC simd_double(simd_short8   __x) { return simd_double(simd_int(__x)); }
+static simd_double2  SIMD_CFUNC simd_double(simd_ushort2  __x) { return simd_double(simd_int(__x)); }
+static simd_double3  SIMD_CFUNC simd_double(simd_ushort3  __x) { return simd_double(simd_int(__x)); }
+static simd_double4  SIMD_CFUNC simd_double(simd_ushort4  __x) { return simd_double(simd_int(__x)); }
+static simd_double8  SIMD_CFUNC simd_double(simd_ushort8  __x) { return simd_double(simd_int(__x)); }
+static simd_double2  SIMD_CFUNC simd_double(simd_int2     __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_int3     __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_int4     __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_int8     __x) { return __builtin_convertvector(__x, simd_double8); }
+static simd_double2  SIMD_CFUNC simd_double(simd_uint2    __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_uint3    __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_uint4    __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_uint8    __x) { return __builtin_convertvector(__x, simd_double8); }
+static simd_double2  SIMD_CFUNC simd_double(simd_float2   __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_float3   __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_float4   __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_float8   __x) { return __builtin_convertvector(__x, simd_double8); }
+static simd_double2  SIMD_CFUNC simd_double(simd_long2    __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_long3    __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_long4    __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_long8    __x) { return __builtin_convertvector(__x, simd_double8); }
+static simd_double2  SIMD_CFUNC simd_double(simd_ulong2   __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_ulong3   __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_ulong4   __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_ulong8   __x) { return __builtin_convertvector(__x, simd_double8); }
+static simd_double2  SIMD_CFUNC simd_double(simd_double2  __x) { return __builtin_convertvector(__x, simd_double2); }
+static simd_double3  SIMD_CFUNC simd_double(simd_double3  __x) { return __builtin_convertvector(__x, simd_double3); }
+static simd_double4  SIMD_CFUNC simd_double(simd_double4  __x) { return __builtin_convertvector(__x, simd_double4); }
+static simd_double8  SIMD_CFUNC simd_double(simd_double8  __x) { return __builtin_convertvector(__x, simd_double8); }
+    
+
+#ifdef __cplusplus
+}
+#endif
+#endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#endif // __SIMD_CONVERSION_HEADER__
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/math.h
@@ -0,0 +1,5380 @@
+/*! @header
+ *  The interfaces declared in this header provide elementwise math operations
+ *  on vectors; each lane of the result vector depends only on the data in the
+ *  corresponding lane of the argument(s) to the function.
+ *
+ *  You should not use the C functions declared in this header directly (these
+ *  are functions with names like `__tg_cos(x)`). These are merely
+ *  implementation details of <tgmath.h> overloading; instead of calling
+ *  `__tg_cos(x)`, call `cos(x)`. If you are writing C++, use `simd::cos(x)`.
+ *
+ *  Note that while these vector functions are relatively recent additions,
+ *  scalar fallback is provided for all of them, so they are available even
+ *  when targeting older OS versions.
+ *
+ *  The following functions are available:
+ *
+ *    C name        C++ name          Notes
+ *    ----------------------------------------------------------------------
+ *    acos(x)       simd::acos(x)     
+ *    asin(x)       simd::asin(x)
+ *    atan(x)       simd::atan(x)
+ *    atan2(y,x)    simd::atan2(y,x)  The argument order matches the scalar
+ *                                    atan2 function, which gives the angle
+ *                                    of a line with slope y/x.
+ *    cos(x)        simd::cos(x)
+ *    sin(x)        simd::sin(x)
+ *    tan(x)        simd::tan(x)
+ *    
+ *    cospi(x)      simd::cospi(x)    Returns cos(pi*x), sin(pi*x), tan(pi*x)
+ *    sinpi(x)      simd::sinpi(x)    more efficiently and accurately than
+ *    tanpi(x)      simd::tanpi(x)    would otherwise be possible
+ *
+ *    acosh(x)      simd::acosh(x)
+ *    asinh(x)      simd::asinh(x)
+ *    atanh(x)      simd::atanh(x)
+ *
+ *    cosh(x)       simd::cosh(x)
+ *    sinh(x)       simd::sinh(x)
+ *    tanh(x)       simd::tanh(x)
+ *
+ *    exp(x)        simd::exp(x)
+ *    exp2(x)       simd::exp2(x)
+ *    exp10(x)      simd::exp10(x)    More efficient that pow(10,x).
+ *    expm1(x)      simd::expm1(x)    exp(x)-1, accurate even for tiny x.
+ *
+ *    log(x)        simd::log(x)
+ *    log2(x)       simd::log2(x)
+ *    log10(x)      simd::log10(x)
+ *    log1p(x)      simd::log1p(x)    log(1+x), accurate even for tiny x.
+ *
+ *    fabs(x)       simd::fabs(x)
+ *    cbrt(x)       simd::cbrt(x)
+ *    sqrt(x)       simd::sqrt(x)
+ *    pow(x,y)      simd::pow(x,y)
+ *    copysign(x,y) simd::copysign(x,y)
+ *    hypot(x,y)    simd::hypot(x,y)  sqrt(x*x + y*y), computed without
+ *                                    overflow.1
+ *    erf(x)        simd::erf(x)
+ *    erfc(x)       simd::erfc(x)
+ *    tgamma(x)     simd::tgamma(x)
+ *
+ *    fmod(x,y)      simd::fmod(x,y)
+ *    remainder(x,y) simd::remainder(x,y)
+ *
+ *    ceil(x)       simd::ceil(x)
+ *    floor(x)      simd::floor(x)
+ *    rint(x)       simd::rint(x)
+ *    round(x)      simd::round(x)
+ *    trunc(x)      simd::trunc(x)
+ *
+ *    fdim(x,y)     simd::fdim(x,y)
+ *    fmax(x,y)     simd::fmax(x,y)   When one argument to fmin or fmax is
+ *    fmin(x,y)     simd::fmin(x,y)   constant, use it as the *second* (y)
+ *                                    argument to get better codegen on some
+ *                                    architectures. E.g., write fmin(x,2)
+ *                                    instead of fmin(2,x).
+ *    fma(x,y,z)    simd::fma(x,y,z)  Fast on arm64 and when targeting AVX2
+ *                                    and later; may be quite expensive on
+ *                                    older hardware.
+ *    simd_muladd(x,y,z) simd::muladd(x,y,z)
+ *
+ *  @copyright 2014-2017 Apple, Inc. All rights reserved.
+ *  @unsorted                                                                 */
+
+#ifndef SIMD_MATH_HEADER
+#define SIMD_MATH_HEADER
+
+#include <simd/base.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#include <simd/vector_make.h>
+#include <simd/logic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x);
+/*! @abstract Do not call this function; instead use `acos` in C and
+ *  Objective-C, and `simd::acos` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x);
+/*! @abstract Do not call this function; instead use `asin` in C and
+ *  Objective-C, and `simd::asin` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x);
+/*! @abstract Do not call this function; instead use `atan` in C and
+ *  Objective-C, and `simd::atan` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x);
+/*! @abstract Do not call this function; instead use `cos` in C and
+ *  Objective-C, and `simd::cos` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x);
+/*! @abstract Do not call this function; instead use `sin` in C and
+ *  Objective-C, and `simd::sin` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x);
+/*! @abstract Do not call this function; instead use `tan` in C and
+ *  Objective-C, and `simd::tan` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x);
+
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x);
+/*! @abstract Do not call this function; instead use `cospi` in C and
+ *  Objective-C, and `simd::cospi` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x);
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x);
+/*! @abstract Do not call this function; instead use `sinpi` in C and
+ *  Objective-C, and `simd::sinpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x);
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x);
+/*! @abstract Do not call this function; instead use `tanpi` in C and
+ *  Objective-C, and `simd::tanpi` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x);
+#endif
+
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `acosh` in C and
+ *  Objective-C, and `simd::acosh` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `asinh` in C and
+ *  Objective-C, and `simd::asinh` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `atanh` in C and
+ *  Objective-C, and `simd::atanh` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `cosh` in C and
+ *  Objective-C, and `simd::cosh` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `sinh` in C and
+ *  Objective-C, and `simd::sinh` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x);
+/*! @abstract Do not call this function; instead use `tanh` in C and
+ *  Objective-C, and `simd::tanh` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x);
+/*! @abstract Do not call this function; instead use `exp` in C and
+ *  Objective-C, and `simd::exp` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x);
+/*! @abstract Do not call this function; instead use `exp2` in C and
+ *  Objective-C, and `simd::exp2` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x);
+
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x);
+/*! @abstract Do not call this function; instead use `exp10` in C and
+ *  Objective-C, and `simd::exp10` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x);
+#endif
+
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x);
+/*! @abstract Do not call this function; instead use `expm1` in C and
+ *  Objective-C, and `simd::expm1` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x);
+/*! @abstract Do not call this function; instead use `log` in C and
+ *  Objective-C, and `simd::log` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x);
+/*! @abstract Do not call this function; instead use `log2` in C and
+ *  Objective-C, and `simd::log2` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x);
+/*! @abstract Do not call this function; instead use `log10` in C and
+ *  Objective-C, and `simd::log10` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x);
+/*! @abstract Do not call this function; instead use `log1p` in C and
+ *  Objective-C, and `simd::log1p` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x);
+/*! @abstract Do not call this function; instead use `fabs` in C and
+ *  Objective-C, and `simd::fabs` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x);
+/*! @abstract Do not call this function; instead use `cbrt` in C and
+ *  Objective-C, and `simd::cbrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x);
+/*! @abstract Do not call this function; instead use `sqrt` in C and
+ *  Objective-C, and `simd::sqrt` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x);
+/*! @abstract Do not call this function; instead use `erf` in C and
+ *  Objective-C, and `simd::erf` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x);
+/*! @abstract Do not call this function; instead use `erfc` in C and
+ *  Objective-C, and `simd::erfc` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x);
+/*! @abstract Do not call this function; instead use `tgamma` in C and
+ *  Objective-C, and `simd::tgamma` in C++.                                   */
+static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x);
+/*! @abstract Do not call this function; instead use `ceil` in C and
+ *  Objective-C, and `simd::ceil` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x);
+/*! @abstract Do not call this function; instead use `floor` in C and
+ *  Objective-C, and `simd::floor` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x);
+/*! @abstract Do not call this function; instead use `rint` in C and
+ *  Objective-C, and `simd::rint` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x);
+/*! @abstract Do not call this function; instead use `round` in C and
+ *  Objective-C, and `simd::round` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x);
+/*! @abstract Do not call this function; instead use `trunc` in C and
+ *  Objective-C, and `simd::trunc` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x);
+
+    
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x);
+/*! @abstract Do not call this function; instead use `atan2` in C and
+ *  Objective-C, and `simd::atan2` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x);
+
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `hypot` in C and
+ *  Objective-C, and `simd::hypot` in C++.                                    */
+static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `pow` in C and
+ *  Objective-C, and `simd::pow` in C++.                                      */
+static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `fmod` in C and
+ *  Objective-C, and `simd::fmod` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `remainder` in C and
+ *  Objective-C, and `simd::remainder` in C++.                                */
+static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `copysign` in C and
+ *  Objective-C, and `simd::copysign` in C++.                                 */
+static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `nextafter` in C and
+ *  Objective-C, and `simd::nextafter` in C++.                                */
+static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `fdim` in C and
+ *  Objective-C, and `simd::fdim` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `fmax` in C and
+ *  Objective-C, and `simd::fmax` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y);
+
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y);
+/*! @abstract Do not call this function; instead use `fmin` in C and
+ *  Objective-C, and `simd::fmin` in C++.                                     */
+static inline SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y);
+
+
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z);
+/*! @abstract Do not call this function; instead use `fma` in C and Objective-C,
+ *  and `simd::fma` in C++.                                                   */
+static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z);
+    
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC float simd_muladd(float x, float y, float z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC double simd_muladd(double x, double y, double z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z);
+/*! @abstract Computes accum + x*y by the most efficient means available;
+ *  either a fused multiply add or separate multiply and add instructions.    */
+static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z);
+    
+#ifdef __cplusplus
+} /* extern "C" */
+
+#include <cmath>
+/*! @abstract Do not call this function directly; use simd::acos instead.     */
+static SIMD_CPPFUNC float __tg_acos(float x) { return ::acos(x); }
+/*! @abstract Do not call this function directly; use simd::acos instead.     */
+static SIMD_CPPFUNC double __tg_acos(double x) { return ::acos(x); }
+/*! @abstract Do not call this function directly; use simd::asin instead.     */
+static SIMD_CPPFUNC float __tg_asin(float x) { return ::asin(x); }
+/*! @abstract Do not call this function directly; use simd::asin instead.     */
+static SIMD_CPPFUNC double __tg_asin(double x) { return ::asin(x); }
+/*! @abstract Do not call this function directly; use simd::atan instead.     */
+static SIMD_CPPFUNC float __tg_atan(float x) { return ::atan(x); }
+/*! @abstract Do not call this function directly; use simd::atan instead.     */
+static SIMD_CPPFUNC double __tg_atan(double x) { return ::atan(x); }
+/*! @abstract Do not call this function directly; use simd::cos instead.      */
+static SIMD_CPPFUNC float __tg_cos(float x) { return ::cos(x); }
+/*! @abstract Do not call this function directly; use simd::cos instead.      */
+static SIMD_CPPFUNC double __tg_cos(double x) { return ::cos(x); }
+/*! @abstract Do not call this function directly; use simd::sin instead.      */
+static SIMD_CPPFUNC float __tg_sin(float x) { return ::sin(x); }
+/*! @abstract Do not call this function directly; use simd::sin instead.      */
+static SIMD_CPPFUNC double __tg_sin(double x) { return ::sin(x); }
+/*! @abstract Do not call this function directly; use simd::tan instead.      */
+static SIMD_CPPFUNC float __tg_tan(float x) { return ::tan(x); }
+/*! @abstract Do not call this function directly; use simd::tan instead.      */
+static SIMD_CPPFUNC double __tg_tan(double x) { return ::tan(x); }
+/*! @abstract Do not call this function directly; use simd::cospi instead.    */
+static SIMD_CPPFUNC float __tg_cospi(float x) { return ::__cospi(x); }
+/*! @abstract Do not call this function directly; use simd::cospi instead.    */
+static SIMD_CPPFUNC double __tg_cospi(double x) { return ::__cospi(x); }
+/*! @abstract Do not call this function directly; use simd::sinpi instead.    */
+static SIMD_CPPFUNC float __tg_sinpi(float x) { return ::__sinpi(x); }
+/*! @abstract Do not call this function directly; use simd::sinpi instead.    */
+static SIMD_CPPFUNC double __tg_sinpi(double x) { return ::__sinpi(x); }
+/*! @abstract Do not call this function directly; use simd::tanpi instead.    */
+static SIMD_CPPFUNC float __tg_tanpi(float x) { return ::__tanpi(x); }
+/*! @abstract Do not call this function directly; use simd::tanpi instead.    */
+static SIMD_CPPFUNC double __tg_tanpi(double x) { return ::__tanpi(x); }
+/*! @abstract Do not call this function directly; use simd::acosh instead.    */
+static SIMD_CPPFUNC float __tg_acosh(float x) { return ::acosh(x); }
+/*! @abstract Do not call this function directly; use simd::acosh instead.    */
+static SIMD_CPPFUNC double __tg_acosh(double x) { return ::acosh(x); }
+/*! @abstract Do not call this function directly; use simd::asinh instead.    */
+static SIMD_CPPFUNC float __tg_asinh(float x) { return ::asinh(x); }
+/*! @abstract Do not call this function directly; use simd::asinh instead.    */
+static SIMD_CPPFUNC double __tg_asinh(double x) { return ::asinh(x); }
+/*! @abstract Do not call this function directly; use simd::atanh instead.    */
+static SIMD_CPPFUNC float __tg_atanh(float x) { return ::atanh(x); }
+/*! @abstract Do not call this function directly; use simd::atanh instead.    */
+static SIMD_CPPFUNC double __tg_atanh(double x) { return ::atanh(x); }
+/*! @abstract Do not call this function directly; use simd::cosh instead.     */
+static SIMD_CPPFUNC float __tg_cosh(float x) { return ::cosh(x); }
+/*! @abstract Do not call this function directly; use simd::cosh instead.     */
+static SIMD_CPPFUNC double __tg_cosh(double x) { return ::cosh(x); }
+/*! @abstract Do not call this function directly; use simd::sinh instead.     */
+static SIMD_CPPFUNC float __tg_sinh(float x) { return ::sinh(x); }
+/*! @abstract Do not call this function directly; use simd::sinh instead.     */
+static SIMD_CPPFUNC double __tg_sinh(double x) { return ::sinh(x); }
+/*! @abstract Do not call this function directly; use simd::tanh instead.     */
+static SIMD_CPPFUNC float __tg_tanh(float x) { return ::tanh(x); }
+/*! @abstract Do not call this function directly; use simd::tanh instead.     */
+static SIMD_CPPFUNC double __tg_tanh(double x) { return ::tanh(x); }
+/*! @abstract Do not call this function directly; use simd::exp instead.      */
+static SIMD_CPPFUNC float __tg_exp(float x) { return ::exp(x); }
+/*! @abstract Do not call this function directly; use simd::exp instead.      */
+static SIMD_CPPFUNC double __tg_exp(double x) { return ::exp(x); }
+/*! @abstract Do not call this function directly; use simd::exp2 instead.     */
+static SIMD_CPPFUNC float __tg_exp2(float x) { return ::exp2(x); }
+/*! @abstract Do not call this function directly; use simd::exp2 instead.     */
+static SIMD_CPPFUNC double __tg_exp2(double x) { return ::exp2(x); }
+/*! @abstract Do not call this function directly; use simd::exp10 instead.    */
+static SIMD_CPPFUNC float __tg_exp10(float x) { return ::__exp10(x); }
+/*! @abstract Do not call this function directly; use simd::exp10 instead.    */
+static SIMD_CPPFUNC double __tg_exp10(double x) { return ::__exp10(x); }
+/*! @abstract Do not call this function directly; use simd::expm1 instead.    */
+static SIMD_CPPFUNC float __tg_expm1(float x) { return ::expm1(x); }
+/*! @abstract Do not call this function directly; use simd::expm1 instead.    */
+static SIMD_CPPFUNC double __tg_expm1(double x) { return ::expm1(x); }
+/*! @abstract Do not call this function directly; use simd::log instead.      */
+static SIMD_CPPFUNC float __tg_log(float x) { return ::log(x); }
+/*! @abstract Do not call this function directly; use simd::log instead.      */
+static SIMD_CPPFUNC double __tg_log(double x) { return ::log(x); }
+/*! @abstract Do not call this function directly; use simd::log2 instead.     */
+static SIMD_CPPFUNC float __tg_log2(float x) { return ::log2(x); }
+/*! @abstract Do not call this function directly; use simd::log2 instead.     */
+static SIMD_CPPFUNC double __tg_log2(double x) { return ::log2(x); }
+/*! @abstract Do not call this function directly; use simd::log10 instead.    */
+static SIMD_CPPFUNC float __tg_log10(float x) { return ::log10(x); }
+/*! @abstract Do not call this function directly; use simd::log10 instead.    */
+static SIMD_CPPFUNC double __tg_log10(double x) { return ::log10(x); }
+/*! @abstract Do not call this function directly; use simd::log1p instead.    */
+static SIMD_CPPFUNC float __tg_log1p(float x) { return ::log1p(x); }
+/*! @abstract Do not call this function directly; use simd::log1p instead.    */
+static SIMD_CPPFUNC double __tg_log1p(double x) { return ::log1p(x); }
+/*! @abstract Do not call this function directly; use simd::fabs instead.     */
+static SIMD_CPPFUNC float __tg_fabs(float x) { return ::fabs(x); }
+/*! @abstract Do not call this function directly; use simd::fabs instead.     */
+static SIMD_CPPFUNC double __tg_fabs(double x) { return ::fabs(x); }
+/*! @abstract Do not call this function directly; use simd::cbrt instead.     */
+static SIMD_CPPFUNC float __tg_cbrt(float x) { return ::cbrt(x); }
+/*! @abstract Do not call this function directly; use simd::cbrt instead.     */
+static SIMD_CPPFUNC double __tg_cbrt(double x) { return ::cbrt(x); }
+/*! @abstract Do not call this function directly; use simd::sqrt instead.     */
+static SIMD_CPPFUNC float __tg_sqrt(float x) { return ::sqrt(x); }
+/*! @abstract Do not call this function directly; use simd::sqrt instead.     */
+static SIMD_CPPFUNC double __tg_sqrt(double x) { return ::sqrt(x); }
+/*! @abstract Do not call this function directly; use simd::erf instead.      */
+static SIMD_CPPFUNC float __tg_erf(float x) { return ::erf(x); }
+/*! @abstract Do not call this function directly; use simd::erf instead.      */
+static SIMD_CPPFUNC double __tg_erf(double x) { return ::erf(x); }
+/*! @abstract Do not call this function directly; use simd::erfc instead.     */
+static SIMD_CPPFUNC float __tg_erfc(float x) { return ::erfc(x); }
+/*! @abstract Do not call this function directly; use simd::erfc instead.     */
+static SIMD_CPPFUNC double __tg_erfc(double x) { return ::erfc(x); }
+/*! @abstract Do not call this function directly; use simd::tgamma instead.   */
+static SIMD_CPPFUNC float __tg_tgamma(float x) { return ::tgamma(x); }
+/*! @abstract Do not call this function directly; use simd::tgamma instead.   */
+static SIMD_CPPFUNC double __tg_tgamma(double x) { return ::tgamma(x); }
+/*! @abstract Do not call this function directly; use simd::ceil instead.     */
+static SIMD_CPPFUNC float __tg_ceil(float x) { return ::ceil(x); }
+/*! @abstract Do not call this function directly; use simd::ceil instead.     */
+static SIMD_CPPFUNC double __tg_ceil(double x) { return ::ceil(x); }
+/*! @abstract Do not call this function directly; use simd::floor instead.    */
+static SIMD_CPPFUNC float __tg_floor(float x) { return ::floor(x); }
+/*! @abstract Do not call this function directly; use simd::floor instead.    */
+static SIMD_CPPFUNC double __tg_floor(double x) { return ::floor(x); }
+/*! @abstract Do not call this function directly; use simd::rint instead.     */
+static SIMD_CPPFUNC float __tg_rint(float x) { return ::rint(x); }
+/*! @abstract Do not call this function directly; use simd::rint instead.     */
+static SIMD_CPPFUNC double __tg_rint(double x) { return ::rint(x); }
+/*! @abstract Do not call this function directly; use simd::round instead.    */
+static SIMD_CPPFUNC float __tg_round(float x) { return ::round(x); }
+/*! @abstract Do not call this function directly; use simd::round instead.    */
+static SIMD_CPPFUNC double __tg_round(double x) { return ::round(x); }
+/*! @abstract Do not call this function directly; use simd::trunc instead.    */
+static SIMD_CPPFUNC float __tg_trunc(float x) { return ::trunc(x); }
+/*! @abstract Do not call this function directly; use simd::trunc instead.    */
+static SIMD_CPPFUNC double __tg_trunc(double x) { return ::trunc(x); }
+/*! @abstract Do not call this function directly; use simd::atan2 instead.    */
+static SIMD_CPPFUNC float __tg_atan2(float x, float y) { return ::atan2(x, y); }
+/*! @abstract Do not call this function directly; use simd::atan2 instead.    */
+static SIMD_CPPFUNC double __tg_atan2(double x, float y) { return ::atan2(x, y); }
+/*! @abstract Do not call this function directly; use simd::hypot instead.    */
+static SIMD_CPPFUNC float __tg_hypot(float x, float y) { return ::hypot(x, y); }
+/*! @abstract Do not call this function directly; use simd::hypot instead.    */
+static SIMD_CPPFUNC double __tg_hypot(double x, float y) { return ::hypot(x, y); }
+/*! @abstract Do not call this function directly; use simd::pow instead.      */
+static SIMD_CPPFUNC float __tg_pow(float x, float y) { return ::pow(x, y); }
+/*! @abstract Do not call this function directly; use simd::pow instead.      */
+static SIMD_CPPFUNC double __tg_pow(double x, float y) { return ::pow(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmod instead.     */
+static SIMD_CPPFUNC float __tg_fmod(float x, float y) { return ::fmod(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmod instead.     */
+static SIMD_CPPFUNC double __tg_fmod(double x, float y) { return ::fmod(x, y); }
+/*! @abstract Do not call this function directly; use simd::remainder
+ *  instead.                                                                  */
+static SIMD_CPPFUNC float __tg_remainder(float x, float y) { return ::remainder(x, y); }
+/*! @abstract Do not call this function directly; use simd::remainder
+ *  instead.                                                                  */
+static SIMD_CPPFUNC double __tg_remainder(double x, float y) { return ::remainder(x, y); }
+/*! @abstract Do not call this function directly; use simd::copysign
+ *  instead.                                                                  */
+static SIMD_CPPFUNC float __tg_copysign(float x, float y) { return ::copysign(x, y); }
+/*! @abstract Do not call this function directly; use simd::copysign
+ *  instead.                                                                  */
+static SIMD_CPPFUNC double __tg_copysign(double x, float y) { return ::copysign(x, y); }
+/*! @abstract Do not call this function directly; use simd::nextafter
+ *  instead.                                                                  */
+static SIMD_CPPFUNC float __tg_nextafter(float x, float y) { return ::nextafter(x, y); }
+/*! @abstract Do not call this function directly; use simd::nextafter
+ *  instead.                                                                  */
+static SIMD_CPPFUNC double __tg_nextafter(double x, float y) { return ::nextafter(x, y); }
+/*! @abstract Do not call this function directly; use simd::fdim instead.     */
+static SIMD_CPPFUNC float __tg_fdim(float x, float y) { return ::fdim(x, y); }
+/*! @abstract Do not call this function directly; use simd::fdim instead.     */
+static SIMD_CPPFUNC double __tg_fdim(double x, float y) { return ::fdim(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmax instead.     */
+static SIMD_CPPFUNC float __tg_fmax(float x, float y) { return ::fmax(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmax instead.     */
+static SIMD_CPPFUNC double __tg_fmax(double x, float y) { return ::fmax(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmin instead.     */
+static SIMD_CPPFUNC float __tg_fmin(float x, float y) { return ::fmin(x, y); }
+/*! @abstract Do not call this function directly; use simd::fmin instead.     */
+static SIMD_CPPFUNC double __tg_fmin(double x, float y) { return ::fmin(x, y); }
+/*! @abstract Do not call this function directly; use simd::fma instead.      */
+static SIMD_CPPFUNC float __tg_fma(float x, float y, float z) { return ::fma(x, y, z); }
+/*! @abstract Do not call this function directly; use simd::fma instead.      */
+static SIMD_CPPFUNC double __tg_fma(double x, double y, double z) { return ::fma(x, y, z); }
+  
+namespace simd {
+/*! @abstract Generalizes the <cmath> function acos to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN acos(fptypeN x) { return ::__tg_acos(x); }
+  
+/*! @abstract Generalizes the <cmath> function asin to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN asin(fptypeN x) { return ::__tg_asin(x); }
+  
+/*! @abstract Generalizes the <cmath> function atan to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN atan(fptypeN x) { return ::__tg_atan(x); }
+  
+/*! @abstract Generalizes the <cmath> function cos to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN cos(fptypeN x) { return ::__tg_cos(x); }
+  
+/*! @abstract Generalizes the <cmath> function sin to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN sin(fptypeN x) { return ::__tg_sin(x); }
+  
+/*! @abstract Generalizes the <cmath> function tan to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN tan(fptypeN x) { return ::__tg_tan(x); }
+  
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Generalizes the <cmath> function cospi to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN cospi(fptypeN x) { return ::__tg_cospi(x); }
+#endif
+  
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Generalizes the <cmath> function sinpi to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN sinpi(fptypeN x) { return ::__tg_sinpi(x); }
+#endif
+  
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Generalizes the <cmath> function tanpi to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN tanpi(fptypeN x) { return ::__tg_tanpi(x); }
+#endif
+  
+/*! @abstract Generalizes the <cmath> function acosh to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN acosh(fptypeN x) { return ::__tg_acosh(x); }
+  
+/*! @abstract Generalizes the <cmath> function asinh to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN asinh(fptypeN x) { return ::__tg_asinh(x); }
+  
+/*! @abstract Generalizes the <cmath> function atanh to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN atanh(fptypeN x) { return ::__tg_atanh(x); }
+  
+/*! @abstract Generalizes the <cmath> function cosh to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN cosh(fptypeN x) { return ::__tg_cosh(x); }
+  
+/*! @abstract Generalizes the <cmath> function sinh to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN sinh(fptypeN x) { return ::__tg_sinh(x); }
+  
+/*! @abstract Generalizes the <cmath> function tanh to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN tanh(fptypeN x) { return ::__tg_tanh(x); }
+  
+/*! @abstract Generalizes the <cmath> function exp to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN exp(fptypeN x) { return ::__tg_exp(x); }
+  
+/*! @abstract Generalizes the <cmath> function exp2 to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN exp2(fptypeN x) { return ::__tg_exp2(x); }
+  
+#if SIMD_LIBRARY_VERSION >= 1
+/*! @abstract Generalizes the <cmath> function exp10 to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN exp10(fptypeN x) { return ::__tg_exp10(x); }
+#endif
+  
+/*! @abstract Generalizes the <cmath> function expm1 to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN expm1(fptypeN x) { return ::__tg_expm1(x); }
+  
+/*! @abstract Generalizes the <cmath> function log to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN log(fptypeN x) { return ::__tg_log(x); }
+  
+/*! @abstract Generalizes the <cmath> function log2 to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN log2(fptypeN x) { return ::__tg_log2(x); }
+  
+/*! @abstract Generalizes the <cmath> function log10 to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN log10(fptypeN x) { return ::__tg_log10(x); }
+  
+/*! @abstract Generalizes the <cmath> function log1p to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN log1p(fptypeN x) { return ::__tg_log1p(x); }
+  
+/*! @abstract Generalizes the <cmath> function fabs to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fabs(fptypeN x) { return ::__tg_fabs(x); }
+  
+/*! @abstract Generalizes the <cmath> function cbrt to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN cbrt(fptypeN x) { return ::__tg_cbrt(x); }
+  
+/*! @abstract Generalizes the <cmath> function sqrt to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN sqrt(fptypeN x) { return ::__tg_sqrt(x); }
+  
+/*! @abstract Generalizes the <cmath> function erf to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN erf(fptypeN x) { return ::__tg_erf(x); }
+  
+/*! @abstract Generalizes the <cmath> function erfc to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN erfc(fptypeN x) { return ::__tg_erfc(x); }
+  
+/*! @abstract Generalizes the <cmath> function tgamma to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN tgamma(fptypeN x) { return ::__tg_tgamma(x); }
+  
+/*! @abstract Generalizes the <cmath> function ceil to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN ceil(fptypeN x) { return ::__tg_ceil(x); }
+  
+/*! @abstract Generalizes the <cmath> function floor to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN floor(fptypeN x) { return ::__tg_floor(x); }
+  
+/*! @abstract Generalizes the <cmath> function rint to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN rint(fptypeN x) { return ::__tg_rint(x); }
+  
+/*! @abstract Generalizes the <cmath> function round to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN round(fptypeN x) { return ::__tg_round(x); }
+  
+/*! @abstract Generalizes the <cmath> function trunc to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN trunc(fptypeN x) { return ::__tg_trunc(x); }
+  
+/*! @abstract Generalizes the <cmath> function atan2 to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN atan2(fptypeN y, fptypeN x) { return ::__tg_atan2(y, x); }
+    
+/*! @abstract Generalizes the <cmath> function hypot to operate on vectors
+ *  of floats and doubles.                                                    */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN hypot(fptypeN x, fptypeN y) { return ::__tg_hypot(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function pow to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN pow(fptypeN x, fptypeN y) { return ::__tg_pow(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function fmod to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fmod(fptypeN x, fptypeN y) { return ::__tg_fmod(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function remainder to operate on
+ *  vectors of floats and doubles.                                            */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN remainder(fptypeN x, fptypeN y) { return ::__tg_remainder(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function copysign to operate on
+ *  vectors of floats and doubles.                                            */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN copysign(fptypeN x, fptypeN y) { return ::__tg_copysign(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function nextafter to operate on
+ *  vectors of floats and doubles.                                            */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN nextafter(fptypeN x, fptypeN y) { return ::__tg_nextafter(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function fdim to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fdim(fptypeN x, fptypeN y) { return ::__tg_fdim(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function fmax to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fmax(fptypeN x, fptypeN y) { return ::__tg_fmax(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function fmin to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fmin(fptypeN x, fptypeN y) { return ::__tg_fmin(x, y); }
+    
+/*! @abstract Generalizes the <cmath> function fma to operate on vectors of
+ *  floats and doubles.                                                       */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN fma(fptypeN x, fptypeN y, fptypeN z) { return ::__tg_fma(x, y, z); }
+        
+/*! @abstract Computes x*y + z by the most efficient means available; either
+ *  a fused multiply add or separate multiply and add.                        */
+  template <typename fptypeN>
+  static SIMD_CPPFUNC fptypeN muladd(fptypeN x, fptypeN y, fptypeN z) { return ::simd_muladd(x, y, z); }
+};
+
+extern "C" {
+#else
+#include <tgmath.h>
+/* C and Objective-C, we need some infrastructure to piggyback on tgmath.h    */
+static SIMD_OVERLOAD simd_float2 __tg_promote(simd_float2);
+static SIMD_OVERLOAD simd_float3 __tg_promote(simd_float3);
+static SIMD_OVERLOAD simd_float4 __tg_promote(simd_float4);
+static SIMD_OVERLOAD simd_float8 __tg_promote(simd_float8);
+static SIMD_OVERLOAD simd_float16 __tg_promote(simd_float16);
+static SIMD_OVERLOAD simd_double2 __tg_promote(simd_double2);
+static SIMD_OVERLOAD simd_double3 __tg_promote(simd_double3);
+static SIMD_OVERLOAD simd_double4 __tg_promote(simd_double4);
+static SIMD_OVERLOAD simd_double8 __tg_promote(simd_double8);
+
+/*  Apple extensions to <math.h>, added in macOS 10.9 and iOS 7.0             */
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9   || \
+    __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || \
+    __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0
+static inline SIMD_CFUNC float __tg_cospi(float x) { return __cospif(x); }
+static inline SIMD_CFUNC double __tg_cospi(double x) { return __cospi(x); }
+#undef cospi
+/*! @abstract `cospi(x)` computes `cos(pi * x)` without intermediate rounding.
+ *
+ *  @discussion Both faster and more accurate than multiplying by `pi` and then
+ *  calling `cos`. Defined for `float` and `double` as well as vectors of
+ *  floats and doubles as provided by `<simd/simd.h>`.                        */
+#define cospi(__x) __tg_cospi(__tg_promote1((__x))(__x))
+
+static inline SIMD_CFUNC float __tg_sinpi(float x) { return __sinpif(x); }
+static inline SIMD_CFUNC double __tg_sinpi(double x) { return __sinpi(x); }
+#undef sinpi
+/*! @abstract `sinpi(x)` computes `sin(pi * x)` without intermediate rounding.
+ *
+ *  @discussion Both faster and more accurate than multiplying by `pi` and then
+ *  calling `sin`. Defined for `float` and `double` as well as vectors
+ *  of floats and doubles as provided by `<simd/simd.h>`.                     */
+#define sinpi(__x) __tg_sinpi(__tg_promote1((__x))(__x))
+
+static inline SIMD_CFUNC float __tg_tanpi(float x) { return __tanpif(x); }
+static inline SIMD_CFUNC double __tg_tanpi(double x) { return __tanpi(x); }
+#undef tanpi
+/*! @abstract `tanpi(x)` computes `tan(pi * x)` without intermediate rounding.
+ *
+ *  @discussion Both faster and more accurate than multiplying by `pi` and then
+ *  calling `tan`. Defined for `float` and `double` as well as vectors of
+ *  floats and doubles as provided by `<simd/simd.h>`.                        */
+#define tanpi(__x) __tg_tanpi(__tg_promote1((__x))(__x))
+
+static inline SIMD_CFUNC float __tg_exp10(float x) { return __exp10f(x); }
+static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); }
+#undef exp10
+/*! @abstract `exp10(x)` computes `10**x` more efficiently and accurately
+ *  than `pow(10, x)`.
+ *
+ *  @discussion Defined for `float` and `double` as well as vectors of floats
+ *  and doubles as provided by `<simd/simd.h>`.                               */
+#define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x))
+#endif
+
+  
+#endif /* !__cplusplus */
+  
+#pragma mark - fabs implementation
+static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x) { return simd_bitselect(0.0, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x) { return simd_bitselect(0.0, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x) { return simd_bitselect(0.0, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x) { return simd_bitselect(0.0, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x) { return simd_bitselect(0.0, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); }
+  
+#pragma mark - fmin, fmax implementation
+static SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y) {
+#if defined __SSE2__
+  return simd_make_float2(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y)));
+#elif defined __arm64__
+  return vminnm_f32(x, y);
+#elif defined __arm__ && __FINITE_MATH_ONLY__
+  return vmin_f32(x, y);
+#else
+  return simd_bitselect(y, x, (x <= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y)));
+}
+  
+static SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__
+  return _mm_range_ps(x, y, 4);
+#elif defined __SSE2__ && __FINITE_MATH_ONLY__
+  return _mm_min_ps(x, y);
+#elif defined __SSE2__
+  return simd_bitselect(_mm_min_ps(x, y), x, y != y);
+#elif defined __arm64__
+  return vminnmq_f32(x, y);
+#elif defined __arm__ && __FINITE_MATH_ONLY__
+  return vminq_f32(x, y);
+#else
+  return simd_bitselect(y, x, (x <= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__
+  return _mm256_range_ps(x, y, 4);
+#elif defined __AVX__ && __FINITE_MATH_ONLY__
+  return _mm256_min_ps(x, y);
+#elif defined __AVX__
+  return simd_bitselect(_mm256_min_ps(x, y), x, y != y);
+#else
+  return simd_make_float8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) {
+#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
+  return _mm512_range_ps(x, y, 4);
+#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
+  return _mm512_min_ps(x, y);
+#elif defined __x86_64__ && defined __AVX512F__
+  return simd_bitselect(_mm512_min_ps(x, y), x, y != y);
+#else
+  return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__
+  return _mm_range_pd(x, y, 4);
+#elif defined __SSE2__ && __FINITE_MATH_ONLY__
+  return _mm_min_pd(x, y);
+#elif defined __SSE2__
+  return simd_bitselect(_mm_min_pd(x, y), x, y != y);
+#elif defined __arm64__
+  return vminnmq_f64(x, y);
+#else
+  return simd_bitselect(y, x, (x <= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_fmin(simd_make_double4_undef(x), simd_make_double4_undef(y)));
+}
+  
+static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__
+  return _mm256_range_pd(x, y, 4);
+#elif defined __AVX__ && __FINITE_MATH_ONLY__
+  return _mm256_min_pd(x, y);
+#elif defined __AVX__
+  return simd_bitselect(_mm256_min_pd(x, y), x, y != y);
+#else
+  return simd_make_double4(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) {
+#if defined __x86_64__ && defined __AVX512DQ__
+  return _mm512_range_pd(x, y, 4);
+#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
+  return _mm512_min_pd(x, y);
+#elif defined __x86_64__ && defined __AVX512F__
+  return simd_bitselect(_mm512_min_pd(x, y), x, y != y);
+#else
+  return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y) {
+#if defined __SSE2__
+  return simd_make_float2(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y)));
+#elif defined __arm64__
+  return vmaxnm_f32(x, y);
+#elif defined __arm__ && __FINITE_MATH_ONLY__
+  return vmax_f32(x, y);
+#else
+  return simd_bitselect(y, x, (x >= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y)));
+}
+  
+static SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__
+  return _mm_range_ps(x, y, 5);
+#elif defined __SSE2__ && __FINITE_MATH_ONLY__
+  return _mm_max_ps(x, y);
+#elif defined __SSE2__
+  return simd_bitselect(_mm_max_ps(x, y), x, y != y);
+#elif defined __arm64__
+  return vmaxnmq_f32(x, y);
+#elif defined __arm__ && __FINITE_MATH_ONLY__
+  return vmaxq_f32(x, y);
+#else
+  return simd_bitselect(y, x, (x >= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__
+  return _mm256_range_ps(x, y, 5);
+#elif defined __AVX__ && __FINITE_MATH_ONLY__
+  return _mm256_max_ps(x, y);
+#elif defined __AVX__
+  return simd_bitselect(_mm256_max_ps(x, y), x, y != y);
+#else
+  return simd_make_float8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) {
+#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
+  return _mm512_range_ps(x, y, 5);
+#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
+  return _mm512_max_ps(x, y);
+#elif defined __x86_64__ && defined __AVX512F__
+  return simd_bitselect(_mm512_max_ps(x, y), x, y != y);
+#else
+  return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__
+  return _mm_range_pd(x, y, 5);
+#elif defined __SSE2__ && __FINITE_MATH_ONLY__
+  return _mm_max_pd(x, y);
+#elif defined __SSE2__
+  return simd_bitselect(_mm_max_pd(x, y), x, y != y);
+#elif defined __arm64__
+  return vmaxnmq_f64(x, y);
+#else
+  return simd_bitselect(y, x, (x >= y) | (y != y));
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_fmax(simd_make_double4_undef(x), simd_make_double4_undef(y)));
+}
+  
+static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) {
+#if defined __AVX512DQ__ && defined __AVX512VL__
+  return _mm256_range_pd(x, y, 5);
+#elif defined __AVX__ && __FINITE_MATH_ONLY__
+  return _mm256_max_pd(x, y);
+#elif defined __AVX__
+  return simd_bitselect(_mm256_max_pd(x, y), x, y != y);
+#else
+  return simd_make_double4(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) {
+#if defined __x86_64__ && defined __AVX512DQ__
+  return _mm512_range_pd(x, y, 5);
+#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
+  return _mm512_max_pd(x, y);
+#elif defined __x86_64__ && defined __AVX512F__
+  return simd_bitselect(_mm512_max_pd(x, y), x, y != y);
+#else
+  return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
+#endif
+}
+
+#pragma mark - copysign implementation
+static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y) { return simd_bitselect(y, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y) { return simd_bitselect(y, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y) { return simd_bitselect(y, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y) { return simd_bitselect(y, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y) { return simd_bitselect(y, x, 0x7fffffff); }
+static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); }
+static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); }
+  
+#pragma mark - sqrt implementation
+static SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x) {
+#if defined __SSE2__
+  return simd_make_float2(__tg_sqrt(simd_make_float4_undef(x)));
+#elif defined __arm64__
+  return vsqrt_f32(x);
+#else
+  return simd_make_float2(sqrt(x.x), sqrt(x.y));
+#endif
+}
+
+static SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x) {
+  return simd_make_float3(__tg_sqrt(simd_make_float4_undef(x)));
+}
+
+static SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x) {
+#if defined __SSE2__
+  return _mm_sqrt_ps(x);
+#elif defined __arm64__
+  return vsqrtq_f32(x);
+#else
+  return simd_make_float4(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) {
+#if defined __AVX__
+  return _mm256_sqrt_ps(x);
+#else
+  return simd_make_float8(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_sqrt_ps(x);
+#else
+  return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x) {
+#if defined __SSE2__
+  return _mm_sqrt_pd(x);
+#elif defined __arm64__
+  return vsqrtq_f64(x);
+#else
+  return simd_make_double2(sqrt(x.x), sqrt(x.y));
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x) {
+  return simd_make_double3(__tg_sqrt(simd_make_double4_undef(x)));
+}
+
+static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) {
+#if defined __AVX__
+  return _mm256_sqrt_pd(x);
+#else
+  return simd_make_double4(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
+#endif
+}
+  
+static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_sqrt_pd(x);
+#else
+  return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
+#endif
+}
+  
+#pragma mark - ceil, floor, rint, trunc implementation
+static SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x) {
+#if defined __arm64__
+  return vrndp_f32(x);
+#else
+  return simd_make_float2(__tg_ceil(simd_make_float4_undef(x)));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x) {
+  return simd_make_float3(__tg_ceil(simd_make_float4_undef(x)));
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_ceil_f4(simd_float4 x);
+#endif
+
+static SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x) {
+#if defined __SSE4_1__
+  return _mm_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndpq_f32(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_ceil_f4(x);
+#else
+  simd_float4 truncated = __tg_trunc(x);
+  simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated < x);
+  return __tg_copysign(truncated + adjust, x);
+#endif
+}
+ 
+static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) {
+#if defined __AVX__
+  return _mm256_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float8(__tg_ceil(x.lo), __tg_ceil(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi));
+#endif
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_ceil_d2(simd_double2 x);
+#endif
+  
+static SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x) {
+#if defined __SSE4_1__
+  return _mm_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndpq_f64(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_ceil_d2(x);
+#else
+  simd_double2 truncated = __tg_trunc(x);
+  simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated < x);
+  return __tg_copysign(truncated + adjust, x);
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x) {
+  return simd_make_double3(__tg_ceil(simd_make_double4_undef(x)));
+}
+ 
+static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) {
+#if defined __AVX__
+  return _mm256_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double4(__tg_ceil(x.lo), __tg_ceil(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x) {
+#if defined __arm64__
+  return vrndm_f32(x);
+#else
+  return simd_make_float2(__tg_floor(simd_make_float4_undef(x)));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x) {
+  return simd_make_float3(__tg_floor(simd_make_float4_undef(x)));
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_floor_f4(simd_float4 x);
+#endif
+
+static SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x) {
+#if defined __SSE4_1__
+  return _mm_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndmq_f32(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_floor_f4(x);
+#else
+  simd_float4 truncated = __tg_trunc(x);
+  simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated > x);
+  return truncated - adjust;
+#endif
+}
+ 
+static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) {
+#if defined __AVX__
+  return _mm256_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float8(__tg_floor(x.lo), __tg_floor(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi));
+#endif
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_floor_d2(simd_double2 x);
+#endif
+  
+static SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x) {
+#if defined __SSE4_1__
+  return _mm_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndmq_f64(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_floor_d2(x);
+#else
+  simd_double2 truncated = __tg_trunc(x);
+  simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated > x);
+  return truncated - adjust;
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x) {
+  return simd_make_double3(__tg_floor(simd_make_double4_undef(x)));
+}
+ 
+static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) {
+#if defined __AVX__
+  return _mm256_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double4(__tg_floor(x.lo), __tg_floor(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x) {
+#if defined __arm64__
+  return vrndx_f32(x);
+#else
+  return simd_make_float2(__tg_rint(simd_make_float4_undef(x)));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x) {
+  return simd_make_float3(__tg_rint(simd_make_float4_undef(x)));
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_rint_f4(simd_float4 x);
+#endif
+
+static SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x) {
+#if defined __SSE4_1__
+  return _mm_round_ps(x, _MM_FROUND_RINT);
+#elif defined __arm64__
+  return vrndxq_f32(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_rint_f4(x);
+#else
+  simd_float4 magic = __tg_copysign(0x1.0p23, x);
+  simd_int4 x_is_small = __tg_fabs(x) < 0x1.0p23;
+  return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffff);
+#endif
+}
+ 
+static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) {
+#if defined __AVX__
+  return _mm256_round_ps(x, _MM_FROUND_RINT);
+#else
+  return simd_make_float8(__tg_rint(x.lo), __tg_rint(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_ps(x, _MM_FROUND_RINT);
+#else
+  return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi));
+#endif
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_rint_d2(simd_double2 x);
+#endif
+  
+static SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x) {
+#if defined __SSE4_1__
+  return _mm_round_pd(x, _MM_FROUND_RINT);
+#elif defined __arm64__
+  return vrndxq_f64(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_rint_d2(x);
+#else
+  simd_double2 magic = __tg_copysign(0x1.0p52, x);
+  simd_long2 x_is_small = __tg_fabs(x) < 0x1.0p52;
+  return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffffffffffff);
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x) {
+  return simd_make_double3(__tg_rint(simd_make_double4_undef(x)));
+}
+ 
+static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) {
+#if defined __AVX__
+  return _mm256_round_pd(x, _MM_FROUND_RINT);
+#else
+  return simd_make_double4(__tg_rint(x.lo), __tg_rint(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_pd(x, _MM_FROUND_RINT);
+#else
+  return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi));
+#endif
+}
+
+static SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x) {
+#if defined __arm64__
+  return vrnd_f32(x);
+#else
+  return simd_make_float2(__tg_trunc(simd_make_float4_undef(x)));
+#endif
+}
+  
+static SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x) {
+  return simd_make_float3(__tg_trunc(simd_make_float4_undef(x)));
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_trunc_f4(simd_float4 x);
+#endif
+
+static SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x) {
+#if defined __SSE4_1__
+  return _mm_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndq_f32(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_trunc_f4(x);
+#else
+  simd_float4 binade = simd_bitselect(0, x, 0x7f800000);
+  simd_int4 mask = (simd_int4)__tg_fmin(-2*binade + 1, -0);
+  simd_float4 result = simd_bitselect(0, x, mask);
+  return simd_bitselect(x, result, binade < 0x1.0p23);
+#endif
+}
+ 
+static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) {
+#if defined __AVX__
+  return _mm256_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float8(__tg_trunc(x.lo), __tg_trunc(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi));
+#endif
+}
+  
+#if defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_trunc_d2(simd_double2 x);
+#endif
+  
+static SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x) {
+#if defined __SSE4_1__
+  return _mm_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#elif defined __arm64__
+  return vrndq_f64(x);
+#elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3
+  return _simd_trunc_d2(x);
+#else
+  simd_double2 binade = simd_bitselect(0, x, 0x7ff0000000000000);
+  simd_long2 mask = (simd_long2)__tg_fmin(-2*binade + 1, -0);
+  simd_double2 result = simd_bitselect(0, x, mask);
+  return simd_bitselect(x, result, binade < 0x1.0p52);
+#endif
+}
+  
+static SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x) {
+  return simd_make_double3(__tg_trunc(simd_make_double4_undef(x)));
+}
+ 
+static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) {
+#if defined __AVX__
+  return _mm256_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double4(__tg_trunc(x.lo), __tg_trunc(x.hi));
+#endif
+}
+ 
+static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+#else
+  return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi));
+#endif
+}
+
+#pragma mark - sine, cosine implementation
+static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x) {
+  return simd_make_float2(__tg_sin(simd_make_float4(x)));
+}
+  
+static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x) {
+  return simd_make_float3(__tg_sin(simd_make_float4(x)));
+}
+  
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_sin_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {
+  return _simd_sin_f4(x);
+}
+#elif SIMD_LIBRARY_VERSION == 1
+extern simd_float4 __sin_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {
+  return __sin_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {
+  return simd_make_float4(sin(x.x), sin(x.y), sin(x.z), sin(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_sin_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
+  return _simd_sin_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
+  return simd_make_float8(__tg_sin(x.lo), __tg_sin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_sin_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) {
+  return _simd_sin_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) {
+  return simd_make_float16(__tg_sin(x.lo), __tg_sin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_sin_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) {
+  return _simd_sin_d2(x);
+}
+#elif SIMD_LIBRARY_VERSION == 1
+extern simd_double2 __sin_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) {
+  return __sin_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) {
+  return simd_make_double2(sin(x.x), sin(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) {
+  return simd_make_double3(__tg_sin(simd_make_double4(x)));
+}
+  
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_sin_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
+  return _simd_sin_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
+  return simd_make_double4(__tg_sin(x.lo), __tg_sin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_sin_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) {
+  return _simd_sin_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) {
+  return simd_make_double8(__tg_sin(x.lo), __tg_sin(x.hi));
+}
+#endif
+
+static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x) {
+  return simd_make_float2(__tg_cos(simd_make_float4(x)));
+}
+  
+static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x) {
+  return simd_make_float3(__tg_cos(simd_make_float4(x)));
+}
+  
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_cos_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {
+  return _simd_cos_f4(x);
+}
+#elif SIMD_LIBRARY_VERSION == 1
+extern simd_float4 __cos_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {
+  return __cos_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {
+  return simd_make_float4(cos(x.x), cos(x.y), cos(x.z), cos(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_cos_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
+  return _simd_cos_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
+  return simd_make_float8(__tg_cos(x.lo), __tg_cos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_cos_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) {
+  return _simd_cos_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) {
+  return simd_make_float16(__tg_cos(x.lo), __tg_cos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_cos_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) {
+  return _simd_cos_d2(x);
+}
+#elif SIMD_LIBRARY_VERSION == 1
+extern simd_double2 __cos_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) {
+  return __cos_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) {
+  return simd_make_double2(cos(x.x), cos(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) {
+  return simd_make_double3(__tg_cos(simd_make_double4(x)));
+}
+  
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_cos_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
+  return _simd_cos_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
+  return simd_make_double4(__tg_cos(x.lo), __tg_cos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_cos_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) {
+  return _simd_cos_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) {
+  return simd_make_double8(__tg_cos(x.lo), __tg_cos(x.hi));
+}
+#endif
+
+  
+#pragma mark - acos implementation
+static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x) {
+  return simd_make_float2(__tg_acos(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x) {
+  return simd_make_float3(__tg_acos(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_acos_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) {
+  return _simd_acos_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) {
+  return simd_make_float4(acos(x.x), acos(x.y), acos(x.z), acos(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_acos_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
+  return _simd_acos_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
+  return simd_make_float8(__tg_acos(x.lo), __tg_acos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_acos_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) {
+  return _simd_acos_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) {
+  return simd_make_float16(__tg_acos(x.lo), __tg_acos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_acos_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) {
+  return _simd_acos_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) {
+  return simd_make_double2(acos(x.x), acos(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) {
+  return simd_make_double3(__tg_acos(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_acos_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
+  return _simd_acos_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
+  return simd_make_double4(__tg_acos(x.lo), __tg_acos(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_acos_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) {
+  return _simd_acos_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) {
+  return simd_make_double8(__tg_acos(x.lo), __tg_acos(x.hi));
+}
+#endif
+
+#pragma mark - asin implementation
+static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x) {
+  return simd_make_float2(__tg_asin(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x) {
+  return simd_make_float3(__tg_asin(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_asin_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) {
+  return _simd_asin_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) {
+  return simd_make_float4(asin(x.x), asin(x.y), asin(x.z), asin(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_asin_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
+  return _simd_asin_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
+  return simd_make_float8(__tg_asin(x.lo), __tg_asin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_asin_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) {
+  return _simd_asin_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) {
+  return simd_make_float16(__tg_asin(x.lo), __tg_asin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_asin_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) {
+  return _simd_asin_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) {
+  return simd_make_double2(asin(x.x), asin(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) {
+  return simd_make_double3(__tg_asin(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_asin_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
+  return _simd_asin_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
+  return simd_make_double4(__tg_asin(x.lo), __tg_asin(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_asin_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) {
+  return _simd_asin_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) {
+  return simd_make_double8(__tg_asin(x.lo), __tg_asin(x.hi));
+}
+#endif
+
+#pragma mark - atan implementation
+static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x) {
+  return simd_make_float2(__tg_atan(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x) {
+  return simd_make_float3(__tg_atan(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_atan_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) {
+  return _simd_atan_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) {
+  return simd_make_float4(atan(x.x), atan(x.y), atan(x.z), atan(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_atan_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
+  return _simd_atan_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
+  return simd_make_float8(__tg_atan(x.lo), __tg_atan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_atan_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) {
+  return _simd_atan_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) {
+  return simd_make_float16(__tg_atan(x.lo), __tg_atan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_atan_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) {
+  return _simd_atan_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) {
+  return simd_make_double2(atan(x.x), atan(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) {
+  return simd_make_double3(__tg_atan(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_atan_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
+  return _simd_atan_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
+  return simd_make_double4(__tg_atan(x.lo), __tg_atan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_atan_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) {
+  return _simd_atan_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) {
+  return simd_make_double8(__tg_atan(x.lo), __tg_atan(x.hi));
+}
+#endif
+
+#pragma mark - tan implementation
+static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x) {
+  return simd_make_float2(__tg_tan(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x) {
+  return simd_make_float3(__tg_tan(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_tan_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) {
+  return _simd_tan_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) {
+  return simd_make_float4(tan(x.x), tan(x.y), tan(x.z), tan(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_tan_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
+  return _simd_tan_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
+  return simd_make_float8(__tg_tan(x.lo), __tg_tan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_tan_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) {
+  return _simd_tan_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) {
+  return simd_make_float16(__tg_tan(x.lo), __tg_tan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_tan_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) {
+  return _simd_tan_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) {
+  return simd_make_double2(tan(x.x), tan(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) {
+  return simd_make_double3(__tg_tan(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_tan_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
+  return _simd_tan_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
+  return simd_make_double4(__tg_tan(x.lo), __tg_tan(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_tan_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) {
+  return _simd_tan_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) {
+  return simd_make_double8(__tg_tan(x.lo), __tg_tan(x.hi));
+}
+#endif
+
+#pragma mark - cospi implementation
+#if SIMD_LIBRARY_VERSION >= 1
+static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x) {
+  return simd_make_float2(__tg_cospi(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x) {
+  return simd_make_float3(__tg_cospi(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_cospi_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) {
+  return _simd_cospi_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) {
+  return simd_make_float4(__cospi(x.x), __cospi(x.y), __cospi(x.z), __cospi(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_cospi_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
+  return _simd_cospi_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
+  return simd_make_float8(__tg_cospi(x.lo), __tg_cospi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_cospi_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) {
+  return _simd_cospi_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) {
+  return simd_make_float16(__tg_cospi(x.lo), __tg_cospi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_cospi_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) {
+  return _simd_cospi_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) {
+  return simd_make_double2(__cospi(x.x), __cospi(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) {
+  return simd_make_double3(__tg_cospi(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_cospi_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
+  return _simd_cospi_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
+  return simd_make_double4(__tg_cospi(x.lo), __tg_cospi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_cospi_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) {
+  return _simd_cospi_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) {
+  return simd_make_double8(__tg_cospi(x.lo), __tg_cospi(x.hi));
+}
+#endif
+
+#endif /* SIMD_LIBRARY_VERSION */
+#pragma mark - sinpi implementation
+#if SIMD_LIBRARY_VERSION >= 1
+static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x) {
+  return simd_make_float2(__tg_sinpi(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x) {
+  return simd_make_float3(__tg_sinpi(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_sinpi_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) {
+  return _simd_sinpi_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) {
+  return simd_make_float4(__sinpi(x.x), __sinpi(x.y), __sinpi(x.z), __sinpi(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_sinpi_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
+  return _simd_sinpi_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
+  return simd_make_float8(__tg_sinpi(x.lo), __tg_sinpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_sinpi_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) {
+  return _simd_sinpi_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) {
+  return simd_make_float16(__tg_sinpi(x.lo), __tg_sinpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_sinpi_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) {
+  return _simd_sinpi_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) {
+  return simd_make_double2(__sinpi(x.x), __sinpi(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) {
+  return simd_make_double3(__tg_sinpi(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_sinpi_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
+  return _simd_sinpi_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
+  return simd_make_double4(__tg_sinpi(x.lo), __tg_sinpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_sinpi_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) {
+  return _simd_sinpi_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) {
+  return simd_make_double8(__tg_sinpi(x.lo), __tg_sinpi(x.hi));
+}
+#endif
+
+#endif /* SIMD_LIBRARY_VERSION */
+#pragma mark - tanpi implementation
+#if SIMD_LIBRARY_VERSION >= 1
+static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x) {
+  return simd_make_float2(__tg_tanpi(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x) {
+  return simd_make_float3(__tg_tanpi(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_tanpi_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) {
+  return _simd_tanpi_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) {
+  return simd_make_float4(__tanpi(x.x), __tanpi(x.y), __tanpi(x.z), __tanpi(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_tanpi_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
+  return _simd_tanpi_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
+  return simd_make_float8(__tg_tanpi(x.lo), __tg_tanpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_tanpi_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) {
+  return _simd_tanpi_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) {
+  return simd_make_float16(__tg_tanpi(x.lo), __tg_tanpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_tanpi_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) {
+  return _simd_tanpi_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) {
+  return simd_make_double2(__tanpi(x.x), __tanpi(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) {
+  return simd_make_double3(__tg_tanpi(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_tanpi_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
+  return _simd_tanpi_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
+  return simd_make_double4(__tg_tanpi(x.lo), __tg_tanpi(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_tanpi_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) {
+  return _simd_tanpi_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) {
+  return simd_make_double8(__tg_tanpi(x.lo), __tg_tanpi(x.hi));
+}
+#endif
+
+#endif /* SIMD_LIBRARY_VERSION */
+#pragma mark - acosh implementation
+static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x) {
+  return simd_make_float2(__tg_acosh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x) {
+  return simd_make_float3(__tg_acosh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_acosh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) {
+  return _simd_acosh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) {
+  return simd_make_float4(acosh(x.x), acosh(x.y), acosh(x.z), acosh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_acosh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
+  return _simd_acosh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
+  return simd_make_float8(__tg_acosh(x.lo), __tg_acosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_acosh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) {
+  return _simd_acosh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) {
+  return simd_make_float16(__tg_acosh(x.lo), __tg_acosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_acosh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) {
+  return _simd_acosh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) {
+  return simd_make_double2(acosh(x.x), acosh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) {
+  return simd_make_double3(__tg_acosh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_acosh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
+  return _simd_acosh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
+  return simd_make_double4(__tg_acosh(x.lo), __tg_acosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_acosh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) {
+  return _simd_acosh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) {
+  return simd_make_double8(__tg_acosh(x.lo), __tg_acosh(x.hi));
+}
+#endif
+
+#pragma mark - asinh implementation
+static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x) {
+  return simd_make_float2(__tg_asinh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x) {
+  return simd_make_float3(__tg_asinh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_asinh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) {
+  return _simd_asinh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) {
+  return simd_make_float4(asinh(x.x), asinh(x.y), asinh(x.z), asinh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_asinh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
+  return _simd_asinh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
+  return simd_make_float8(__tg_asinh(x.lo), __tg_asinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_asinh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) {
+  return _simd_asinh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) {
+  return simd_make_float16(__tg_asinh(x.lo), __tg_asinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_asinh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) {
+  return _simd_asinh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) {
+  return simd_make_double2(asinh(x.x), asinh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) {
+  return simd_make_double3(__tg_asinh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_asinh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
+  return _simd_asinh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
+  return simd_make_double4(__tg_asinh(x.lo), __tg_asinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_asinh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) {
+  return _simd_asinh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) {
+  return simd_make_double8(__tg_asinh(x.lo), __tg_asinh(x.hi));
+}
+#endif
+
+#pragma mark - atanh implementation
+static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x) {
+  return simd_make_float2(__tg_atanh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x) {
+  return simd_make_float3(__tg_atanh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_atanh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) {
+  return _simd_atanh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) {
+  return simd_make_float4(atanh(x.x), atanh(x.y), atanh(x.z), atanh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_atanh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
+  return _simd_atanh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
+  return simd_make_float8(__tg_atanh(x.lo), __tg_atanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_atanh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) {
+  return _simd_atanh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) {
+  return simd_make_float16(__tg_atanh(x.lo), __tg_atanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_atanh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) {
+  return _simd_atanh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) {
+  return simd_make_double2(atanh(x.x), atanh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) {
+  return simd_make_double3(__tg_atanh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_atanh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
+  return _simd_atanh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
+  return simd_make_double4(__tg_atanh(x.lo), __tg_atanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_atanh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) {
+  return _simd_atanh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) {
+  return simd_make_double8(__tg_atanh(x.lo), __tg_atanh(x.hi));
+}
+#endif
+
+#pragma mark - cosh implementation
+static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x) {
+  return simd_make_float2(__tg_cosh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x) {
+  return simd_make_float3(__tg_cosh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_cosh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) {
+  return _simd_cosh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) {
+  return simd_make_float4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_cosh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
+  return _simd_cosh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
+  return simd_make_float8(__tg_cosh(x.lo), __tg_cosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_cosh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) {
+  return _simd_cosh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) {
+  return simd_make_float16(__tg_cosh(x.lo), __tg_cosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_cosh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) {
+  return _simd_cosh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) {
+  return simd_make_double2(cosh(x.x), cosh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) {
+  return simd_make_double3(__tg_cosh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_cosh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
+  return _simd_cosh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
+  return simd_make_double4(__tg_cosh(x.lo), __tg_cosh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_cosh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) {
+  return _simd_cosh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) {
+  return simd_make_double8(__tg_cosh(x.lo), __tg_cosh(x.hi));
+}
+#endif
+
+#pragma mark - sinh implementation
+static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x) {
+  return simd_make_float2(__tg_sinh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x) {
+  return simd_make_float3(__tg_sinh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_sinh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) {
+  return _simd_sinh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) {
+  return simd_make_float4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_sinh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
+  return _simd_sinh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
+  return simd_make_float8(__tg_sinh(x.lo), __tg_sinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_sinh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) {
+  return _simd_sinh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) {
+  return simd_make_float16(__tg_sinh(x.lo), __tg_sinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_sinh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) {
+  return _simd_sinh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) {
+  return simd_make_double2(sinh(x.x), sinh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) {
+  return simd_make_double3(__tg_sinh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_sinh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
+  return _simd_sinh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
+  return simd_make_double4(__tg_sinh(x.lo), __tg_sinh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_sinh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) {
+  return _simd_sinh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) {
+  return simd_make_double8(__tg_sinh(x.lo), __tg_sinh(x.hi));
+}
+#endif
+
+#pragma mark - tanh implementation
+static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x) {
+  return simd_make_float2(__tg_tanh(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x) {
+  return simd_make_float3(__tg_tanh(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_tanh_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) {
+  return _simd_tanh_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) {
+  return simd_make_float4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_tanh_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
+  return _simd_tanh_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
+  return simd_make_float8(__tg_tanh(x.lo), __tg_tanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_tanh_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) {
+  return _simd_tanh_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) {
+  return simd_make_float16(__tg_tanh(x.lo), __tg_tanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_tanh_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) {
+  return _simd_tanh_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) {
+  return simd_make_double2(tanh(x.x), tanh(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) {
+  return simd_make_double3(__tg_tanh(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_tanh_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
+  return _simd_tanh_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
+  return simd_make_double4(__tg_tanh(x.lo), __tg_tanh(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_tanh_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) {
+  return _simd_tanh_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) {
+  return simd_make_double8(__tg_tanh(x.lo), __tg_tanh(x.hi));
+}
+#endif
+
+#pragma mark - exp implementation
+static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x) {
+  return simd_make_float2(__tg_exp(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x) {
+  return simd_make_float3(__tg_exp(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_exp_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) {
+  return _simd_exp_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) {
+  return simd_make_float4(exp(x.x), exp(x.y), exp(x.z), exp(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_exp_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
+  return _simd_exp_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
+  return simd_make_float8(__tg_exp(x.lo), __tg_exp(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_exp_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) {
+  return _simd_exp_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) {
+  return simd_make_float16(__tg_exp(x.lo), __tg_exp(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_exp_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) {
+  return _simd_exp_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) {
+  return simd_make_double2(exp(x.x), exp(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) {
+  return simd_make_double3(__tg_exp(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_exp_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
+  return _simd_exp_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
+  return simd_make_double4(__tg_exp(x.lo), __tg_exp(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_exp_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) {
+  return _simd_exp_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) {
+  return simd_make_double8(__tg_exp(x.lo), __tg_exp(x.hi));
+}
+#endif
+
+#pragma mark - exp2 implementation
+static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x) {
+  return simd_make_float2(__tg_exp2(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x) {
+  return simd_make_float3(__tg_exp2(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_exp2_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) {
+  return _simd_exp2_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) {
+  return simd_make_float4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_exp2_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
+  return _simd_exp2_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
+  return simd_make_float8(__tg_exp2(x.lo), __tg_exp2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_exp2_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) {
+  return _simd_exp2_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) {
+  return simd_make_float16(__tg_exp2(x.lo), __tg_exp2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_exp2_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) {
+  return _simd_exp2_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) {
+  return simd_make_double2(exp2(x.x), exp2(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) {
+  return simd_make_double3(__tg_exp2(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_exp2_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
+  return _simd_exp2_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
+  return simd_make_double4(__tg_exp2(x.lo), __tg_exp2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_exp2_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) {
+  return _simd_exp2_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) {
+  return simd_make_double8(__tg_exp2(x.lo), __tg_exp2(x.hi));
+}
+#endif
+
+#pragma mark - exp10 implementation
+#if SIMD_LIBRARY_VERSION >= 1
+static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x) {
+  return simd_make_float2(__tg_exp10(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x) {
+  return simd_make_float3(__tg_exp10(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_exp10_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) {
+  return _simd_exp10_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) {
+  return simd_make_float4(__exp10(x.x), __exp10(x.y), __exp10(x.z), __exp10(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_exp10_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
+  return _simd_exp10_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
+  return simd_make_float8(__tg_exp10(x.lo), __tg_exp10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_exp10_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) {
+  return _simd_exp10_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) {
+  return simd_make_float16(__tg_exp10(x.lo), __tg_exp10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_exp10_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) {
+  return _simd_exp10_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) {
+  return simd_make_double2(__exp10(x.x), __exp10(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) {
+  return simd_make_double3(__tg_exp10(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_exp10_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
+  return _simd_exp10_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
+  return simd_make_double4(__tg_exp10(x.lo), __tg_exp10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_exp10_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) {
+  return _simd_exp10_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) {
+  return simd_make_double8(__tg_exp10(x.lo), __tg_exp10(x.hi));
+}
+#endif
+
+#endif /* SIMD_LIBRARY_VERSION */
+#pragma mark - expm1 implementation
+static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x) {
+  return simd_make_float2(__tg_expm1(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x) {
+  return simd_make_float3(__tg_expm1(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_expm1_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) {
+  return _simd_expm1_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) {
+  return simd_make_float4(expm1(x.x), expm1(x.y), expm1(x.z), expm1(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_expm1_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
+  return _simd_expm1_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
+  return simd_make_float8(__tg_expm1(x.lo), __tg_expm1(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_expm1_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) {
+  return _simd_expm1_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) {
+  return simd_make_float16(__tg_expm1(x.lo), __tg_expm1(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_expm1_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) {
+  return _simd_expm1_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) {
+  return simd_make_double2(expm1(x.x), expm1(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) {
+  return simd_make_double3(__tg_expm1(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_expm1_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
+  return _simd_expm1_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
+  return simd_make_double4(__tg_expm1(x.lo), __tg_expm1(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_expm1_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) {
+  return _simd_expm1_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) {
+  return simd_make_double8(__tg_expm1(x.lo), __tg_expm1(x.hi));
+}
+#endif
+
+#pragma mark - log implementation
+static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x) {
+  return simd_make_float2(__tg_log(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x) {
+  return simd_make_float3(__tg_log(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_log_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) {
+  return _simd_log_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) {
+  return simd_make_float4(log(x.x), log(x.y), log(x.z), log(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_log_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
+  return _simd_log_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
+  return simd_make_float8(__tg_log(x.lo), __tg_log(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_log_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) {
+  return _simd_log_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) {
+  return simd_make_float16(__tg_log(x.lo), __tg_log(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_log_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) {
+  return _simd_log_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) {
+  return simd_make_double2(log(x.x), log(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) {
+  return simd_make_double3(__tg_log(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_log_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
+  return _simd_log_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
+  return simd_make_double4(__tg_log(x.lo), __tg_log(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_log_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) {
+  return _simd_log_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) {
+  return simd_make_double8(__tg_log(x.lo), __tg_log(x.hi));
+}
+#endif
+
+#pragma mark - log2 implementation
+static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x) {
+  return simd_make_float2(__tg_log2(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x) {
+  return simd_make_float3(__tg_log2(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_log2_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) {
+  return _simd_log2_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) {
+  return simd_make_float4(log2(x.x), log2(x.y), log2(x.z), log2(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_log2_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
+  return _simd_log2_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
+  return simd_make_float8(__tg_log2(x.lo), __tg_log2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_log2_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) {
+  return _simd_log2_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) {
+  return simd_make_float16(__tg_log2(x.lo), __tg_log2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_log2_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) {
+  return _simd_log2_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) {
+  return simd_make_double2(log2(x.x), log2(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) {
+  return simd_make_double3(__tg_log2(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_log2_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
+  return _simd_log2_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
+  return simd_make_double4(__tg_log2(x.lo), __tg_log2(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_log2_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) {
+  return _simd_log2_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) {
+  return simd_make_double8(__tg_log2(x.lo), __tg_log2(x.hi));
+}
+#endif
+
+#pragma mark - log10 implementation
+static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x) {
+  return simd_make_float2(__tg_log10(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x) {
+  return simd_make_float3(__tg_log10(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_log10_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) {
+  return _simd_log10_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) {
+  return simd_make_float4(log10(x.x), log10(x.y), log10(x.z), log10(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_log10_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
+  return _simd_log10_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
+  return simd_make_float8(__tg_log10(x.lo), __tg_log10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_log10_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) {
+  return _simd_log10_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) {
+  return simd_make_float16(__tg_log10(x.lo), __tg_log10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_log10_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) {
+  return _simd_log10_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) {
+  return simd_make_double2(log10(x.x), log10(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) {
+  return simd_make_double3(__tg_log10(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_log10_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
+  return _simd_log10_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
+  return simd_make_double4(__tg_log10(x.lo), __tg_log10(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_log10_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) {
+  return _simd_log10_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) {
+  return simd_make_double8(__tg_log10(x.lo), __tg_log10(x.hi));
+}
+#endif
+
+#pragma mark - log1p implementation
+static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x) {
+  return simd_make_float2(__tg_log1p(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x) {
+  return simd_make_float3(__tg_log1p(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_log1p_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) {
+  return _simd_log1p_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) {
+  return simd_make_float4(log1p(x.x), log1p(x.y), log1p(x.z), log1p(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_log1p_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
+  return _simd_log1p_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
+  return simd_make_float8(__tg_log1p(x.lo), __tg_log1p(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_log1p_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) {
+  return _simd_log1p_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) {
+  return simd_make_float16(__tg_log1p(x.lo), __tg_log1p(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_log1p_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) {
+  return _simd_log1p_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) {
+  return simd_make_double2(log1p(x.x), log1p(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) {
+  return simd_make_double3(__tg_log1p(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_log1p_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
+  return _simd_log1p_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
+  return simd_make_double4(__tg_log1p(x.lo), __tg_log1p(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_log1p_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) {
+  return _simd_log1p_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) {
+  return simd_make_double8(__tg_log1p(x.lo), __tg_log1p(x.hi));
+}
+#endif
+
+#pragma mark - cbrt implementation
+static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x) {
+  return simd_make_float2(__tg_cbrt(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x) {
+  return simd_make_float3(__tg_cbrt(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_cbrt_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) {
+  return _simd_cbrt_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) {
+  return simd_make_float4(cbrt(x.x), cbrt(x.y), cbrt(x.z), cbrt(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_cbrt_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
+  return _simd_cbrt_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
+  return simd_make_float8(__tg_cbrt(x.lo), __tg_cbrt(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_cbrt_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) {
+  return _simd_cbrt_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) {
+  return simd_make_float16(__tg_cbrt(x.lo), __tg_cbrt(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_cbrt_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) {
+  return _simd_cbrt_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) {
+  return simd_make_double2(cbrt(x.x), cbrt(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) {
+  return simd_make_double3(__tg_cbrt(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_cbrt_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
+  return _simd_cbrt_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
+  return simd_make_double4(__tg_cbrt(x.lo), __tg_cbrt(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_cbrt_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) {
+  return _simd_cbrt_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) {
+  return simd_make_double8(__tg_cbrt(x.lo), __tg_cbrt(x.hi));
+}
+#endif
+
+#pragma mark - erf implementation
+static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x) {
+  return simd_make_float2(__tg_erf(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x) {
+  return simd_make_float3(__tg_erf(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_erf_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) {
+  return _simd_erf_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) {
+  return simd_make_float4(erf(x.x), erf(x.y), erf(x.z), erf(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_erf_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
+  return _simd_erf_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
+  return simd_make_float8(__tg_erf(x.lo), __tg_erf(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_erf_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) {
+  return _simd_erf_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) {
+  return simd_make_float16(__tg_erf(x.lo), __tg_erf(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_erf_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) {
+  return _simd_erf_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) {
+  return simd_make_double2(erf(x.x), erf(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) {
+  return simd_make_double3(__tg_erf(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_erf_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
+  return _simd_erf_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
+  return simd_make_double4(__tg_erf(x.lo), __tg_erf(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_erf_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) {
+  return _simd_erf_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) {
+  return simd_make_double8(__tg_erf(x.lo), __tg_erf(x.hi));
+}
+#endif
+
+#pragma mark - erfc implementation
+static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x) {
+  return simd_make_float2(__tg_erfc(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x) {
+  return simd_make_float3(__tg_erfc(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_erfc_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) {
+  return _simd_erfc_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) {
+  return simd_make_float4(erfc(x.x), erfc(x.y), erfc(x.z), erfc(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_erfc_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
+  return _simd_erfc_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
+  return simd_make_float8(__tg_erfc(x.lo), __tg_erfc(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_erfc_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) {
+  return _simd_erfc_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) {
+  return simd_make_float16(__tg_erfc(x.lo), __tg_erfc(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_erfc_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) {
+  return _simd_erfc_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) {
+  return simd_make_double2(erfc(x.x), erfc(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) {
+  return simd_make_double3(__tg_erfc(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_erfc_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
+  return _simd_erfc_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
+  return simd_make_double4(__tg_erfc(x.lo), __tg_erfc(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_erfc_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) {
+  return _simd_erfc_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) {
+  return simd_make_double8(__tg_erfc(x.lo), __tg_erfc(x.hi));
+}
+#endif
+
+#pragma mark - tgamma implementation
+static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x) {
+  return simd_make_float2(__tg_tgamma(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x) {
+  return simd_make_float3(__tg_tgamma(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_tgamma_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) {
+  return _simd_tgamma_f4(x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) {
+  return simd_make_float4(tgamma(x.x), tgamma(x.y), tgamma(x.z), tgamma(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_tgamma_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
+  return _simd_tgamma_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
+  return simd_make_float8(__tg_tgamma(x.lo), __tg_tgamma(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_tgamma_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) {
+  return _simd_tgamma_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) {
+  return simd_make_float16(__tg_tgamma(x.lo), __tg_tgamma(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_tgamma_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) {
+  return _simd_tgamma_d2(x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) {
+  return simd_make_double2(tgamma(x.x), tgamma(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) {
+  return simd_make_double3(__tg_tgamma(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_tgamma_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
+  return _simd_tgamma_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
+  return simd_make_double4(__tg_tgamma(x.lo), __tg_tgamma(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_tgamma_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) {
+  return _simd_tgamma_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) {
+  return simd_make_double8(__tg_tgamma(x.lo), __tg_tgamma(x.hi));
+}
+#endif
+
+#pragma mark - round implementation
+static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x) {
+  return simd_make_float2(__tg_round(simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x) {
+  return simd_make_float3(__tg_round(simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_round_f4(simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) {
+#if defined __arm64__
+  return vrndaq_f32(x);
+#else
+  return _simd_round_f4(x);
+#endif
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) {
+  return simd_make_float4(round(x.x), round(x.y), round(x.z), round(x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_round_f8(simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
+  return _simd_round_f8(x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
+  return simd_make_float8(__tg_round(x.lo), __tg_round(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_round_f16(simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) {
+  return _simd_round_f16(x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) {
+  return simd_make_float16(__tg_round(x.lo), __tg_round(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_round_d2(simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) {
+#if defined __arm64__
+  return vrndaq_f64(x);
+#else
+  return _simd_round_d2(x);
+#endif
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) {
+  return simd_make_double2(round(x.x), round(x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) {
+  return simd_make_double3(__tg_round(simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_round_d4(simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
+  return _simd_round_d4(x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
+  return simd_make_double4(__tg_round(x.lo), __tg_round(x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_round_d8(simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) {
+  return _simd_round_d8(x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) {
+  return simd_make_double8(__tg_round(x.lo), __tg_round(x.hi));
+}
+#endif
+
+#pragma mark - atan2 implementation
+static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x) {
+  return simd_make_float2(__tg_atan2(simd_make_float4(y), simd_make_float4(x)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x) {
+  return simd_make_float3(__tg_atan2(simd_make_float4(y), simd_make_float4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_atan2_f4(simd_float4 y, simd_float4 x);
+static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) {
+  return _simd_atan2_f4(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) {
+  return simd_make_float4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x);
+static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
+  return _simd_atan2_f8(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
+  return simd_make_float8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x);
+static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) {
+  return _simd_atan2_f16(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) {
+  return simd_make_float16(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_atan2_d2(simd_double2 y, simd_double2 x);
+static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) {
+  return _simd_atan2_d2(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) {
+  return simd_make_double2(atan2(y.x, x.x), atan2(y.y, x.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x) {
+  return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x);
+static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) {
+  return _simd_atan2_d4(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) {
+  return simd_make_double4(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x);
+static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) {
+  return _simd_atan2_d8(y, x);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) {
+  return simd_make_double8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi));
+}
+#endif
+
+#pragma mark - hypot implementation
+static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y) {
+  return simd_make_float2(__tg_hypot(simd_make_float4(x), simd_make_float4(y)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_hypot(simd_make_float4(x), simd_make_float4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_hypot_f4(simd_float4 x, simd_float4 y);
+static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) {
+  return _simd_hypot_f4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) {
+  return simd_make_float4(hypot(x.x, y.x), hypot(x.y, y.y), hypot(x.z, y.z), hypot(x.w, y.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y);
+static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
+  return _simd_hypot_f8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
+  return simd_make_float8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y);
+static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) {
+  return _simd_hypot_f16(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) {
+  return simd_make_float16(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_hypot_d2(simd_double2 x, simd_double2 y);
+static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) {
+  return _simd_hypot_d2(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) {
+  return simd_make_double2(hypot(x.x, y.x), hypot(x.y, y.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y);
+static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) {
+  return _simd_hypot_d4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) {
+  return simd_make_double4(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y);
+static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) {
+  return _simd_hypot_d8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) {
+  return simd_make_double8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi));
+}
+#endif
+
+#pragma mark - pow implementation
+static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y) {
+  return simd_make_float2(__tg_pow(simd_make_float4(x), simd_make_float4(y)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_pow(simd_make_float4(x), simd_make_float4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_pow_f4(simd_float4 x, simd_float4 y);
+static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) {
+  return _simd_pow_f4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) {
+  return simd_make_float4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y);
+static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
+  return _simd_pow_f8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
+  return simd_make_float8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y);
+static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) {
+  return _simd_pow_f16(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) {
+  return simd_make_float16(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_pow_d2(simd_double2 x, simd_double2 y);
+static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) {
+  return _simd_pow_d2(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) {
+  return simd_make_double2(pow(x.x, y.x), pow(x.y, y.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y);
+static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
+  return _simd_pow_d4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
+  return simd_make_double4(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y);
+static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) {
+  return _simd_pow_d8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) {
+  return simd_make_double8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi));
+}
+#endif
+
+#pragma mark - fmod implementation
+static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y) {
+  return simd_make_float2(__tg_fmod(simd_make_float4(x), simd_make_float4(y)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_fmod(simd_make_float4(x), simd_make_float4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_fmod_f4(simd_float4 x, simd_float4 y);
+static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) {
+  return _simd_fmod_f4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) {
+  return simd_make_float4(fmod(x.x, y.x), fmod(x.y, y.y), fmod(x.z, y.z), fmod(x.w, y.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y);
+static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
+  return _simd_fmod_f8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
+  return simd_make_float8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y);
+static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) {
+  return _simd_fmod_f16(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) {
+  return simd_make_float16(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_fmod_d2(simd_double2 x, simd_double2 y);
+static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) {
+  return _simd_fmod_d2(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) {
+  return simd_make_double2(fmod(x.x, y.x), fmod(x.y, y.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y);
+static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) {
+  return _simd_fmod_d4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) {
+  return simd_make_double4(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y);
+static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) {
+  return _simd_fmod_d8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) {
+  return simd_make_double8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi));
+}
+#endif
+
+#pragma mark - remainder implementation
+static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y) {
+  return simd_make_float2(__tg_remainder(simd_make_float4(x), simd_make_float4(y)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_remainder(simd_make_float4(x), simd_make_float4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_remainder_f4(simd_float4 x, simd_float4 y);
+static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) {
+  return _simd_remainder_f4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) {
+  return simd_make_float4(remainder(x.x, y.x), remainder(x.y, y.y), remainder(x.z, y.z), remainder(x.w, y.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y);
+static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) {
+  return _simd_remainder_f8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) {
+  return simd_make_float8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y);
+static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) {
+  return _simd_remainder_f16(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) {
+  return simd_make_float16(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_remainder_d2(simd_double2 x, simd_double2 y);
+static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) {
+  return _simd_remainder_d2(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) {
+  return simd_make_double2(remainder(x.x, y.x), remainder(x.y, y.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y);
+static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) {
+  return _simd_remainder_d4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) {
+  return simd_make_double4(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y);
+static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) {
+  return _simd_remainder_d8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) {
+  return simd_make_double8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi));
+}
+#endif
+
+#pragma mark - nextafter implementation
+static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y) {
+  return simd_make_float2(__tg_nextafter(simd_make_float4(x), simd_make_float4(y)));
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y) {
+  return simd_make_float3(__tg_nextafter(simd_make_float4(x), simd_make_float4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_nextafter_f4(simd_float4 x, simd_float4 y);
+static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) {
+  return _simd_nextafter_f4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) {
+  return simd_make_float4(nextafter(x.x, y.x), nextafter(x.y, y.y), nextafter(x.z, y.z), nextafter(x.w, y.w));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y);
+static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) {
+  return _simd_nextafter_f8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) {
+  return simd_make_float8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y);
+static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) {
+  return _simd_nextafter_f16(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) {
+  return simd_make_float16(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_nextafter_d2(simd_double2 x, simd_double2 y);
+static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) {
+  return _simd_nextafter_d2(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) {
+  return simd_make_double2(nextafter(x.x, y.x), nextafter(x.y, y.y));
+}
+#endif
+
+static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y) {
+  return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
+extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y);
+static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) {
+  return _simd_nextafter_d4(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) {
+  return simd_make_double4(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi));
+}
+#endif
+
+#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
+extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y);
+static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) {
+  return _simd_nextafter_d8(x, y);
+}
+#else
+static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) {
+  return simd_make_double8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi));
+}
+#endif
+
+static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y) { return simd_bitselect(x-y, 0, x<y); }
+static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y) { return simd_bitselect(x-y, 0, x<y); }
+ 
+static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z) {
+#if defined __arm64__ || defined __ARM_VFPV4__
+  return vfma_f32(z, x, y);
+#else
+  return simd_make_float2(__tg_fma(simd_make_float4_undef(x), simd_make_float4_undef(y), simd_make_float4_undef(z)));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z) {
+  return simd_make_float3(__tg_fma(simd_make_float4(x), simd_make_float4(y), simd_make_float4(z)));
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_float4 _simd_fma_f4(simd_float4 x, simd_float4 y, simd_float4 z);
+#endif
+static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z) {
+#if defined __arm64__ || defined __ARM_VFPV4__
+  return vfmaq_f32(z, x, y);
+#elif (defined __i386__ || defined __x86_64__) && defined __FMA__
+  return _mm_fmadd_ps(x, y, z);
+#elif SIMD_LIBRARY_VERSION >= 3
+  return _simd_fma_f4(x, y, z);
+#else
+  return simd_make_float4(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y), fma(x.z, y.z, z.z), fma(x.w, y.w, z.w));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z) {
+#if (defined __i386__ || defined __x86_64__) && defined __FMA__
+  return _mm256_fmadd_ps(x, y, z);
+#else
+  return simd_make_float8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_fmadd_ps(x, y, z);
+#else
+  return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
+#endif
+}
+
+#if SIMD_LIBRARY_VERSION >= 3
+extern simd_double2 _simd_fma_d2(simd_double2 x, simd_double2 y, simd_double2 z);
+#endif
+static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z) {
+#if defined __arm64__
+  return vfmaq_f64(z, x, y);
+#elif (defined __i386__ || defined __x86_64__) && defined __FMA__
+  return _mm_fmadd_pd(x, y, z);
+#elif SIMD_LIBRARY_VERSION >= 3
+  return _simd_fma_d2(x, y, z);
+#else
+  return simd_make_double2(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y));
+#endif
+}
+
+static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z) {
+  return simd_make_double3(__tg_fma(simd_make_double4(x), simd_make_double4(y), simd_make_double4(z)));
+}
+
+static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z) {
+#if (defined __i386__ || defined __x86_64__) && defined __FMA__
+  return _mm256_fmadd_pd(x, y, z);
+#else
+  return simd_make_double4(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
+#endif
+}
+
+static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) {
+#if defined __x86_64__ && defined __AVX512F__
+  return _mm512_fmadd_pd(x, y, z);
+#else
+  return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
+#endif
+}
+
+static inline SIMD_CFUNC float simd_muladd(float x, float y, float z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC double simd_muladd(double x, double y, double z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z) {
+#pragma STDC FP_CONTRACT ON
+  return x*y + z;
+}
+#ifdef __cplusplus
+}      /* extern "C" */
+#endif
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* SIMD_MATH_HEADER */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/matrix.h
@@ -0,0 +1,1786 @@
+/* Copyright (c) 2014-2017 Apple, Inc. All rights reserved.
+ *
+ *      Function                        Result
+ *      ------------------------------------------------------------------
+ *
+ *      simd_diagonal_matrix(x)         A square matrix with the vector x
+ *                                      as its diagonal.
+ *
+ *      simd_matrix(c0, c1, ... )       A matrix with the specified vectors
+ *                                      as columns.
+ *
+ *      simd_matrix_from_rows(r0, r1, ... )  A matrix with the specified vectors
+ *                                      as rows.
+ *
+ *      simd_mul(a,x)                   Scalar product a*x.
+ *
+ *      simd_linear_combination(a,x,b,y)  a*x + b*y.
+ *
+ *      simd_add(x,y)                   Macro wrapping linear_combination
+ *                                      to compute x + y.
+ *
+ *      simd_sub(x,y)                   Macro wrapping linear_combination
+ *                                      to compute x - y.
+ *
+ *      simd_transpose(x)               Transpose of the matrix x.
+ *
+ *      simd_inverse(x)                 Inverse of x if x is non-singular.  If
+ *                                      x is singular, the result is undefined.
+ *
+ *      simd_mul(x,y)                   If x is a matrix, returns the matrix
+ *                                      product x*y, where y is either a matrix
+ *                                      or a column vector.  If x is a vector,
+ *                                      returns the product x*y where x is
+ *                                      interpreted as a row vector.
+ *
+ *      simd_equal(x,y)                 Returns true if and only if every
+ *                                      element of x is exactly equal to the
+ *                                      corresponding element of y.
+ *
+ *      simd_almost_equal_elements(x,y,tol)
+ *                                      Returns true if and only if for each
+ *                                      entry xij in x, the corresponding
+ *                                      element yij in y satisfies
+ *                                      |xij - yij| <= tol.
+ *
+ *      simd_almost_equal_elements_relative(x,y,tol)
+ *                                      Returns true if and only if for each
+ *                                      entry xij in x, the corresponding
+ *                                      element yij in y satisfies
+ *                                      |xij - yij| <= tol*|xij|.
+ *
+ *  The header also defines a few useful global matrix objects:
+ *  matrix_identity_floatNxM and matrix_identity_doubleNxM, may be used to get
+ *  an identity matrix of the specified size.
+ *
+ *  In C++, we are able to use namespacing to make the functions more concise;
+ *  we also overload some common arithmetic operators to work with the matrix
+ *  types:
+ *
+ *      C++ Function                    Equivalent C Function
+ *      --------------------------------------------------------------------
+ *      simd::inverse                   simd_inverse
+ *      simd::transpose                 simd_transpose
+ *      operator+                       simd_add
+ *      operator-                       simd_sub
+ *      operator+=                      N/A
+ *      operator-=                      N/A
+ *      operator*                       simd_mul or simd_mul
+ *      operator*=                      simd_mul or simd_mul
+ *      operator==                      simd_equal
+ *      operator!=                      !simd_equal
+ *      simd::almost_equal_elements     simd_almost_equal_elements
+ *      simd::almost_equal_elements_relative  simd_almost_equal_elements_relative
+ *
+ *  <simd/matrix_types.h> provides constructors for C++ matrix types.
+ */
+
+#ifndef SIMD_MATRIX_HEADER
+#define SIMD_MATRIX_HEADER
+
+#include <simd/base.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#include <simd/matrix_types.h>
+#include <simd/geometry.h>
+#include <simd/extern.h>
+#include <simd/logic.h>
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+extern const simd_float2x2 matrix_identity_float2x2  __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+extern const simd_float3x3 matrix_identity_float3x3  __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+extern const simd_float4x4 matrix_identity_float4x4  __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+extern const simd_double2x2 matrix_identity_double2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+extern const simd_double3x3 matrix_identity_double3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+extern const simd_double4x4 matrix_identity_double4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+
+static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x);
+static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x);
+static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x);
+static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x);
+static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x);
+static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x);
+#define matrix_from_diagonal simd_diagonal_matrix
+
+static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1);
+static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2);
+static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3);
+static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1);
+static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2);
+static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3);
+static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1);
+static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2);
+static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3);
+static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1);
+static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2);
+static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3);
+static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1);
+static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2);
+static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3);
+static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1);
+static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2);
+static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3);
+#define matrix_from_columns simd_matrix
+
+static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1);
+static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2);
+static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3);
+static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1);
+static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2);
+static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3);
+static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1);
+static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2);
+static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3);
+static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1);
+static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2);
+static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3);
+static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1);
+static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2);
+static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3);
+static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1);
+static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2);
+static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3);
+#define matrix_from_rows simd_matrix_from_rows
+        
+static  simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q);
+static  simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q);
+static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q);
+static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q);
+
+static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x);
+static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x);
+static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x);
+static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x);
+static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x);
+static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x);
+static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x);
+static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x);
+static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x);
+static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x);
+static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x);
+static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x);
+static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x);
+static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x);
+static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x);
+static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x);
+static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x);
+static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x);
+
+static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y);
+static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y);
+static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y);
+static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y);
+static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y);
+static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y);
+static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y);
+static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y);
+static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y);
+static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y);
+static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y);
+static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y);
+static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y);
+static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y);
+static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y);
+static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y);
+static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y);
+static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y);
+#define matrix_linear_combination simd_linear_combination
+      
+static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y);
+static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y);
+static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y);
+static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y);
+static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y);
+static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y);
+static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y);
+static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y);
+static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y);
+static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y);
+static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y);
+static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y);
+static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y);
+static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y);
+static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y);
+static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y);
+static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y);
+static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y);
+#define matrix_add simd_add
+      
+static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y);
+static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y);
+static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y);
+static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y);
+static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y);
+static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y);
+static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y);
+static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y);
+static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y);
+static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y);
+static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y);
+static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y);
+static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y);
+static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y);
+static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y);
+static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y);
+static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y);
+static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y);
+#define matrix_sub simd_sub
+
+static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x);
+static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x);
+static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x);
+static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x);
+static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x);
+static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x);
+static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x);
+static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x);
+static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x);
+static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x);
+static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x);
+static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x);
+static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x);
+static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x);
+static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x);
+static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x);
+static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x);
+static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x);
+#define matrix_transpose simd_transpose
+
+static float SIMD_CFUNC simd_determinant(simd_float2x2 __x);
+static float SIMD_CFUNC simd_determinant(simd_float3x3 __x);
+static float SIMD_CFUNC simd_determinant(simd_float4x4 __x);
+static double SIMD_CFUNC simd_determinant(simd_double2x2 __x);
+static double SIMD_CFUNC simd_determinant(simd_double3x3 __x);
+static double SIMD_CFUNC simd_determinant(simd_double4x4 __x);
+#define matrix_determinant simd_determinant
+
+static simd_float2x2 SIMD_CFUNC simd_inverse(simd_float2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+static simd_float3x3 SIMD_CFUNC simd_inverse(simd_float3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+static simd_float4x4 SIMD_CFUNC simd_inverse(simd_float4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+#define matrix_invert simd_inverse
+
+static simd_float2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2 __y);
+static simd_float2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3 __y);
+static simd_float2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y);
+static simd_float2 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float2x2 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float3x2 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float4x2 __y);
+static simd_float2 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float2x3 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float3x3 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float4x3 __y);
+static simd_float2 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float2x4 __y);
+static simd_float3 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float3x4 __y);
+static simd_float4 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float4x4 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y);
+static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y);
+static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y);
+static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y);
+static simd_float2x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2x2 __y);
+static simd_float3x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float3x2 __y);
+static simd_float4x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float4x2 __y);
+static simd_float2x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2x2 __y);
+static simd_float3x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float3x2 __y);
+static simd_float4x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float4x2 __y);
+static simd_float2x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2x2 __y);
+static simd_float3x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float3x2 __y);
+static simd_float4x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float4x2 __y);
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y);
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y);
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y);
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y);
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y);
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y);
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y);
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y);
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y);
+static simd_float2x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float2x3 __y);
+static simd_float3x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3x3 __y);
+static simd_float4x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float4x3 __y);
+static simd_float2x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float2x3 __y);
+static simd_float3x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3x3 __y);
+static simd_float4x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float4x3 __y);
+static simd_float2x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float2x3 __y);
+static simd_float3x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3x3 __y);
+static simd_float4x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float4x3 __y);
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y);
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y);
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y);
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y);
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y);
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y);
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y);
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y);
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y);
+static simd_float2x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float2x4 __y);
+static simd_float3x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float3x4 __y);
+static simd_float4x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4x4 __y);
+static simd_float2x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float2x4 __y);
+static simd_float3x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float3x4 __y);
+static simd_float4x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4x4 __y);
+static simd_float2x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float2x4 __y);
+static simd_float3x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float3x4 __y);
+static simd_float4x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4x4 __y);
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y);
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y);
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y);
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y);
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y);
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y);
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y);
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y);
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y);
+    
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y);
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y);
+#define matrix_equal simd_equal
+      
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol);
+#define matrix_almost_equal_elements simd_almost_equal_elements
+      
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol);
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol);
+#define matrix_almost_equal_elements_relative simd_almost_equal_elements_relative
+
+#ifdef __cplusplus
+} /* extern "C" */
+
+namespace simd {
+  static SIMD_CPPFUNC float2x2 operator+(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float2x3 operator+(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float2x4 operator+(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float3x2 operator+(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float3x3 operator+(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float3x4 operator+(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float4x2 operator+(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float4x3 operator+(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC float4x4 operator+(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, 1, y)); }
+  
+  static SIMD_CPPFUNC float2x2 operator-(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float2x3 operator-(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float2x4 operator-(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float3x2 operator-(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float3x3 operator-(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float3x4 operator-(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float4x2 operator-(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float4x3 operator-(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC float4x4 operator-(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, -1, y)); }
+  
+  static SIMD_CPPFUNC float2x2& operator+=(float2x2& x, const float2x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float2x3& operator+=(float2x3& x, const float2x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float2x4& operator+=(float2x4& x, const float2x4 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float3x2& operator+=(float3x2& x, const float3x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float3x3& operator+=(float3x3& x, const float3x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float3x4& operator+=(float3x4& x, const float3x4 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float4x2& operator+=(float4x2& x, const float4x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float4x3& operator+=(float4x3& x, const float4x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC float4x4& operator+=(float4x4& x, const float4x4 y) { x = x + y; return x; }
+  
+  static SIMD_CPPFUNC float2x2& operator-=(float2x2& x, const float2x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float2x3& operator-=(float2x3& x, const float2x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float2x4& operator-=(float2x4& x, const float2x4 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float3x2& operator-=(float3x2& x, const float3x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float3x3& operator-=(float3x3& x, const float3x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float3x4& operator-=(float3x4& x, const float3x4 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float4x2& operator-=(float4x2& x, const float4x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float4x3& operator-=(float4x3& x, const float4x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC float4x4& operator-=(float4x4& x, const float4x4 y) { x = x - y; return x; }
+  
+  static SIMD_CPPFUNC float2x2 transpose(const float2x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float2x3 transpose(const float3x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float2x4 transpose(const float4x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float3x2 transpose(const float2x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float3x3 transpose(const float3x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float3x4 transpose(const float4x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); }
+  
+  static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); }
+  static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); }
+  static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); }
+  
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wgcc-compat"
+  static SIMD_CPPFUNC float2x2 inverse(const float2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+  static SIMD_CPPFUNC float3x3 inverse(const float3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+  static SIMD_CPPFUNC float4x4 inverse(const float4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+#pragma clang diagnostic pop
+  
+  static SIMD_CPPFUNC float2x2 operator*(const float a, const float2x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x3 operator*(const float a, const float2x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x4 operator*(const float a, const float2x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x2 operator*(const float a, const float3x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x3 operator*(const float a, const float3x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x4 operator*(const float a, const float3x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x2 operator*(const float a, const float4x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x3 operator*(const float a, const float4x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x4 operator*(const float a, const float4x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float a) { x = ::simd_mul(a, x); return x; }
+  
+  static SIMD_CPPFUNC float2 operator*(const float2 x, const float2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float2 x, const float3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float2 x, const float4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2 operator*(const float3 x, const float2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float3 x, const float3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float3 x, const float4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2 operator*(const float4 x, const float2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float4 x, const float3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float4 x, const float4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2 operator*(const float2x2 x, const float2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2 operator*(const float3x2 x, const float3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2 operator*(const float4x2 x, const float4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float2x3 x, const float2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float3x3 x, const float3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3 operator*(const float4x3 x, const float4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float2x4 x, const float2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float3x4 x, const float3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4 operator*(const float4x4 x, const float4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2& operator*=(float2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float3& operator*=(float3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float4& operator*=(float4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; }
+  
+  static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x2 operator*(const float2x2 x, const float3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x2 operator*(const float2x2 x, const float4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x3 operator*(const float2x3 x, const float3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x3 operator*(const float2x3 x, const float4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x4 operator*(const float2x4 x, const float3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x4 operator*(const float2x4 x, const float4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x2 operator*(const float3x2 x, const float2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x2 operator*(const float3x2 x, const float4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x3 operator*(const float3x3 x, const float2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x3 operator*(const float3x3 x, const float4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x4 operator*(const float3x4 x, const float2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x4 operator*(const float3x4 x, const float4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x2 operator*(const float4x2 x, const float2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x2 operator*(const float4x2 x, const float3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x3 operator*(const float4x3 x, const float2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x3 operator*(const float4x3 x, const float3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x4 operator*(const float4x4 x, const float2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float3x4 operator*(const float4x4 x, const float3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float4x4 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float4x4 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; }
+  
+  static SIMD_CPPFUNC bool operator==(const float2x2& x, const float2x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float2x3& x, const float2x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float2x4& x, const float2x4& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float3x2& x, const float3x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float3x3& x, const float3x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float3x4& x, const float3x4& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float4x2& x, const float4x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float4x3& x, const float4x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const float4x4& x, const float4x4& y) { return ::simd_equal(x, y); }
+  
+  static SIMD_CPPFUNC bool operator!=(const float2x2& x, const float2x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float2x3& x, const float2x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float2x4& x, const float2x4& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float3x2& x, const float3x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float3x3& x, const float3x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float3x4& x, const float3x4& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float4x2& x, const float4x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float4x3& x, const float4x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const float4x4& x, const float4x4& y) { return !(x == y); }
+  
+  static SIMD_CPPFUNC bool almost_equal_elements(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); }
+    
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  
+  static SIMD_CPPFUNC double2x2 operator+(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double2x3 operator+(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double2x4 operator+(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double3x2 operator+(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double3x3 operator+(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double3x4 operator+(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double4x2 operator+(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double4x3 operator+(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, 1, y)); }
+  static SIMD_CPPFUNC double4x4 operator+(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, 1, y)); }
+  
+  static SIMD_CPPFUNC double2x2 operator-(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double2x3 operator-(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double2x4 operator-(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double3x2 operator-(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double3x3 operator-(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double3x4 operator-(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double4x2 operator-(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double4x3 operator-(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, -1, y)); }
+  static SIMD_CPPFUNC double4x4 operator-(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, -1, y)); }
+  
+  static SIMD_CPPFUNC double2x2& operator+=(double2x2& x, const double2x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double2x3& operator+=(double2x3& x, const double2x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double2x4& operator+=(double2x4& x, const double2x4 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double3x2& operator+=(double3x2& x, const double3x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double3x3& operator+=(double3x3& x, const double3x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double3x4& operator+=(double3x4& x, const double3x4 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double4x2& operator+=(double4x2& x, const double4x2 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double4x3& operator+=(double4x3& x, const double4x3 y) { x = x + y; return x; }
+  static SIMD_CPPFUNC double4x4& operator+=(double4x4& x, const double4x4 y) { x = x + y; return x; }
+  
+  static SIMD_CPPFUNC double2x2& operator-=(double2x2& x, const double2x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double2x3& operator-=(double2x3& x, const double2x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double2x4& operator-=(double2x4& x, const double2x4 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double3x2& operator-=(double3x2& x, const double3x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double3x3& operator-=(double3x3& x, const double3x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double3x4& operator-=(double3x4& x, const double3x4 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double4x2& operator-=(double4x2& x, const double4x2 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double4x3& operator-=(double4x3& x, const double4x3 y) { x = x - y; return x; }
+  static SIMD_CPPFUNC double4x4& operator-=(double4x4& x, const double4x4 y) { x = x - y; return x; }
+  
+  static SIMD_CPPFUNC double2x2 transpose(const double2x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double2x3 transpose(const double3x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double2x4 transpose(const double4x2 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double3x2 transpose(const double2x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double3x3 transpose(const double3x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double3x4 transpose(const double4x3 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); }
+  static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); }
+  
+  static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); }
+  static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); }
+  static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); }
+  
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wgcc-compat"
+  static SIMD_CPPFUNC double2x2 inverse(const double2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+  static SIMD_CPPFUNC double3x3 inverse(const double3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+  static SIMD_CPPFUNC double4x4 inverse(const double4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); }
+#pragma clang diagnostic pop
+  
+  static SIMD_CPPFUNC double2x2 operator*(const double a, const double2x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x3 operator*(const double a, const double2x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x4 operator*(const double a, const double2x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x2 operator*(const double a, const double3x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x3 operator*(const double a, const double3x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x4 operator*(const double a, const double3x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x2 operator*(const double a, const double4x2 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x3 operator*(const double a, const double4x3 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x4 operator*(const double a, const double4x4 x) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double a) { return ::simd_mul(a, x); }
+  static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double a) { x = ::simd_mul(a, x); return x; }
+  static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double a) { x = ::simd_mul(a, x); return x; }
+  
+  static SIMD_CPPFUNC double2 operator*(const double2 x, const double2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double2 x, const double3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double2 x, const double4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2 operator*(const double3 x, const double2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double3 x, const double3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double3 x, const double4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2 operator*(const double4 x, const double2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double4 x, const double3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double4 x, const double4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2 operator*(const double2x2 x, const double2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2 operator*(const double3x2 x, const double3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2 operator*(const double4x2 x, const double4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double2x3 x, const double2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double3x3 x, const double3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3 operator*(const double4x3 x, const double4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double2x4 x, const double2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double3x4 x, const double3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4 operator*(const double4x4 x, const double4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2& operator*=(double2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double3& operator*=(double3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double4& operator*=(double4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; }
+  
+  static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x2 operator*(const double2x2 x, const double3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x2 operator*(const double2x2 x, const double4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x3 operator*(const double2x3 x, const double3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x3 operator*(const double2x3 x, const double4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double2x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x4 operator*(const double2x4 x, const double3x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x4 operator*(const double2x4 x, const double4x2 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x2 operator*(const double3x2 x, const double2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x2 operator*(const double3x2 x, const double4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x3 operator*(const double3x3 x, const double2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x3 operator*(const double3x3 x, const double4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x4 operator*(const double3x4 x, const double2x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double3x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x4 operator*(const double3x4 x, const double4x3 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x2 operator*(const double4x2 x, const double2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x2 operator*(const double4x2 x, const double3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x3 operator*(const double4x3 x, const double2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x3 operator*(const double4x3 x, const double3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x4 operator*(const double4x4 x, const double2x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double3x4 operator*(const double4x4 x, const double3x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double4x4 y) { return ::simd_mul(x, y); }
+  static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double2x2 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double3x3 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double4x4 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double4x4 y) { x = ::simd_mul(x, y); return x; }
+  static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; }
+  
+  static SIMD_CPPFUNC bool operator==(const double2x2& x, const double2x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double2x3& x, const double2x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double2x4& x, const double2x4& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double3x2& x, const double3x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double3x3& x, const double3x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double3x4& x, const double3x4& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double4x2& x, const double4x2& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double4x3& x, const double4x3& y) { return ::simd_equal(x, y); }
+  static SIMD_CPPFUNC bool operator==(const double4x4& x, const double4x4& y) { return ::simd_equal(x, y); }
+  
+  static SIMD_CPPFUNC bool operator!=(const double2x2& x, const double2x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double2x3& x, const double2x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double2x4& x, const double2x4& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double3x2& x, const double3x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double3x3& x, const double3x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double3x4& x, const double3x4& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double4x2& x, const double4x2& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double4x3& x, const double4x3& y) { return !(x == y); }
+  static SIMD_CPPFUNC bool operator!=(const double4x4& x, const double4x4& y) { return !(x == y); }
+  
+  static SIMD_CPPFUNC bool almost_equal_elements(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); }
+  
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+  static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); }
+}
+
+extern "C" {
+#endif /* __cplusplus */
+
+#pragma mark - Implementation
+
+static  simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2  __x) {  simd_float2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; }
+static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x) { simd_double2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; }
+static  simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3  __x) {  simd_float3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; }
+static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x) { simd_double3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; }
+static  simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4  __x) {  simd_float4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; }
+static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x) { simd_double4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; }
+
+static  simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2  col0, simd_float2  col1) {  simd_float2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static  simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3  col0, simd_float3  col1) {  simd_float2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static  simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4  col0, simd_float4  col1) {  simd_float2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1) { simd_double2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1) { simd_double2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1) { simd_double2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; }
+static  simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2  col0, simd_float2  col1, simd_float2  col2) {  simd_float3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static  simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3  col0, simd_float3  col1, simd_float3  col2) {  simd_float3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static  simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4  col0, simd_float4  col1, simd_float4  col2) {  simd_float3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2) { simd_double3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2) { simd_double3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2) { simd_double3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; }
+static  simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2  col0, simd_float2  col1, simd_float2  col2, simd_float2  col3) {  simd_float4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+static  simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3  col0, simd_float3  col1, simd_float3  col2, simd_float3  col3) {  simd_float4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+static  simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4  col0, simd_float4  col1, simd_float4  col2, simd_float4  col3) {  simd_float4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3) { simd_double4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3) { simd_double4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3) { simd_double4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; }
+
+static  simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2  row0, simd_float2  row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static  simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3  row0, simd_float3  row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static  simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4  row0, simd_float4  row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1) { return simd_transpose(simd_matrix(row0, row1)); }
+static  simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2  row0, simd_float2  row1, simd_float2  row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static  simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3  row0, simd_float3  row1, simd_float3  row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static  simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4  row0, simd_float4  row1, simd_float4  row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); }
+static  simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2  row0, simd_float2  row1, simd_float2  row2, simd_float2  row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+static  simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3  row0, simd_float3  row1, simd_float3  row2, simd_float3  row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+static  simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4  row0, simd_float4  row1, simd_float4  row2, simd_float4  row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); }
+  
+static  simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q) {
+  simd_float4x4 r = simd_matrix4x4(q);
+  return (simd_float3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz };
+}
+
+static  simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q) {
+  simd_float4 v = q.vector;
+  simd_float4x4 r = {
+    .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z),
+                        2*(v.x*v.y + v.z*v.w),
+                        2*(v.x*v.z - v.y*v.w), 0 },
+    .columns[1] = {     2*(v.x*v.y - v.z*v.w),
+                    1 - 2*(v.z*v.z + v.x*v.x),
+                        2*(v.y*v.z + v.x*v.w), 0 },
+    .columns[2] = {     2*(v.z*v.x + v.y*v.w),
+                        2*(v.y*v.z - v.x*v.w),
+                    1 - 2*(v.y*v.y + v.x*v.x), 0 },
+    .columns[3] = { 0, 0, 0, 1 }
+  };
+  return r;
+}
+  
+static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q) {
+  simd_double4x4 r = simd_matrix4x4(q);
+  return (simd_double3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz };
+}
+
+static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q) {
+  simd_double4 v = q.vector;
+  simd_double4x4 r = {
+    .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z),
+                        2*(v.x*v.y + v.z*v.w),
+                        2*(v.x*v.z - v.y*v.w), 0 },
+    .columns[1] = {     2*(v.x*v.y - v.z*v.w),
+                    1 - 2*(v.z*v.z + v.x*v.x),
+                        2*(v.y*v.z + v.x*v.w), 0 },
+    .columns[2] = {     2*(v.z*v.x + v.y*v.w),
+                        2*(v.y*v.z - v.x*v.w),
+                    1 - 2*(v.y*v.y + v.x*v.x), 0 },
+    .columns[3] = { 0, 0, 0, 1 }
+  };
+  return r;
+}
+
+static  simd_float2x2 SIMD_CFUNC matrix_scale(float  __a,  simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x2 SIMD_CFUNC matrix_scale(float  __a,  simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x2 SIMD_CFUNC matrix_scale(float  __a,  simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static  simd_float2x3 SIMD_CFUNC matrix_scale(float  __a,  simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x3 SIMD_CFUNC matrix_scale(float  __a,  simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x3 SIMD_CFUNC matrix_scale(float  __a,  simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static  simd_float2x4 SIMD_CFUNC matrix_scale(float  __a,  simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x4 SIMD_CFUNC matrix_scale(float  __a,  simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x4 SIMD_CFUNC matrix_scale(float  __a,  simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x2 SIMD_CFUNC matrix_scale(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x2 SIMD_CFUNC matrix_scale(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x2 SIMD_CFUNC matrix_scale(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x3 SIMD_CFUNC matrix_scale(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x3 SIMD_CFUNC matrix_scale(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x3 SIMD_CFUNC matrix_scale(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x4 SIMD_CFUNC matrix_scale(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x4 SIMD_CFUNC matrix_scale(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x4 SIMD_CFUNC matrix_scale(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+  
+static  simd_float2x2 SIMD_CFUNC simd_mul(float  __a,  simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x2 SIMD_CFUNC simd_mul(float  __a,  simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x2 SIMD_CFUNC simd_mul(float  __a,  simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static  simd_float2x3 SIMD_CFUNC simd_mul(float  __a,  simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x3 SIMD_CFUNC simd_mul(float  __a,  simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x3 SIMD_CFUNC simd_mul(float  __a,  simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static  simd_float2x4 SIMD_CFUNC simd_mul(float  __a,  simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static  simd_float3x4 SIMD_CFUNC simd_mul(float  __a,  simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static  simd_float4x4 SIMD_CFUNC simd_mul(float  __a,  simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; }
+static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; }
+static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; }
+
+static  simd_float2x2 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float2x2 __x, float  __b,  simd_float2x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static  simd_float3x2 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float3x2 __x, float  __b,  simd_float3x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static  simd_float4x2 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float4x2 __x, float  __b,  simd_float4x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+static  simd_float2x3 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float2x3 __x, float  __b,  simd_float2x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static  simd_float3x3 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float3x3 __x, float  __b,  simd_float3x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static  simd_float4x3 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float4x3 __x, float  __b,  simd_float4x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+static  simd_float2x4 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float2x4 __x, float  __b,  simd_float2x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static  simd_float3x4 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float3x4 __x, float  __b,  simd_float3x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static  simd_float4x4 SIMD_CFUNC simd_linear_combination(float  __a,  simd_float4x4 __x, float  __b,  simd_float4x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    return __x;
+}
+static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    return __x;
+}
+static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y) {
+    __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0];
+    __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1];
+    __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2];
+    __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3];
+    return __x;
+}
+  
+static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, 1, __y); }
+      
+static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, -1, __y); }
+
+static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1;
+    __x0.xy = __x.columns[0];
+    __x1.xy = __x.columns[1];
+    simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1);
+    return simd_matrix(__r01.lo, __r01.hi);
+#else
+    return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_float2){__x.columns[0][1], __x.columns[1][1]});
+#endif
+}
+    
+static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1;
+    __x0.xyz = __x.columns[0];
+    __x1.xyz = __x.columns[1];
+    simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1);
+    simd_float4 __r2x = _mm_unpackhi_ps(__x0, __x1);
+    return simd_matrix(__r01.lo, __r01.hi, __r2x.lo);
+#else
+    return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_float2){__x.columns[0][1], __x.columns[1][1]},
+                               (simd_float2){__x.columns[0][2], __x.columns[1][2]});
+#endif
+}
+    
+static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x) {
+#if defined __SSE__
+    simd_float4 __r01 = _mm_unpacklo_ps(__x.columns[0], __x.columns[1]);
+    simd_float4 __r23 = _mm_unpackhi_ps(__x.columns[0], __x.columns[1]);
+    return simd_matrix(__r01.lo, __r01.hi, __r23.lo, __r23.hi);
+#else
+    return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_float2){__x.columns[0][1], __x.columns[1][1]},
+                               (simd_float2){__x.columns[0][2], __x.columns[1][2]},
+                               (simd_float2){__x.columns[0][3], __x.columns[1][3]});
+#endif
+}
+    
+static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1, __x2;
+    __x0.xy = __x.columns[0];
+    __x1.xy = __x.columns[1];
+    __x2.xy = __x.columns[2];
+    simd_float4 __t = _mm_unpacklo_ps(__x0, __x1);
+    simd_float4 __r0 = _mm_shuffle_ps(__t,__x2,0xc4);
+    simd_float4 __r1 = _mm_shuffle_ps(__t,__x2,0xde);
+    return simd_matrix(__r0.xyz, __r1.xyz);
+#else
+    return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]});
+#endif
+}
+    
+static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1, __x2;
+    __x0.xyz = __x.columns[0];
+    __x1.xyz = __x.columns[1];
+    __x2.xyz = __x.columns[2];
+    simd_float4 __t0 = _mm_unpacklo_ps(__x0, __x1);
+    simd_float4 __t1 = _mm_unpackhi_ps(__x0, __x1);
+    simd_float4 __r0 = __t0; __r0.hi = __x2.lo;
+    simd_float4 __r1 = _mm_shuffle_ps(__t0, __x2, 0xde);
+    simd_float4 __r2 = __x2; __r2.lo = __t1.lo;
+    return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz);
+#else
+    return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]},
+                               (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]});
+#endif
+}
+    
+static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x) {
+#if defined __SSE__
+    simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[1]); /* 00 10 01 11 */
+    simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[1]); /* 02 12 03 13 */
+    simd_float4 __r0 = __t0; __r0.hi = __x.columns[2].lo;
+    simd_float4 __r1 = _mm_shuffle_ps(__t0, __x.columns[2], 0xde);
+    simd_float4 __r2 = __x.columns[2]; __r2.lo = __t1.lo;
+    simd_float4 __r3 = _mm_shuffle_ps(__t1, __x.columns[2], 0xfe);
+    return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz, __r3.xyz);
+#else
+    return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]},
+                               (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]},
+                               (simd_float3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]});
+#endif
+}
+
+static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1, __x2, __x3;
+    __x0.xy = __x.columns[0];
+    __x1.xy = __x.columns[1];
+    __x2.xy = __x.columns[2];
+    __x3.xy = __x.columns[3];
+    simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2);
+    simd_float4 __t1 = _mm_unpacklo_ps(__x1,__x3);
+    simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t1);
+    simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t1);
+    return simd_matrix(__r0,__r1);
+#else
+    return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]});
+#endif
+}
+
+static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x) {
+#if defined __SSE__
+    simd_float4 __x0, __x1, __x2, __x3;
+    __x0.xyz = __x.columns[0];
+    __x1.xyz = __x.columns[1];
+    __x2.xyz = __x.columns[2];
+    __x3.xyz = __x.columns[3];
+    simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2);
+    simd_float4 __t1 = _mm_unpackhi_ps(__x0,__x2);
+    simd_float4 __t2 = _mm_unpacklo_ps(__x1,__x3);
+    simd_float4 __t3 = _mm_unpackhi_ps(__x1,__x3);
+    simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2);
+    simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2);
+    simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3);
+    return simd_matrix(__r0,__r1,__r2);
+#else
+    return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]},
+                               (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]});
+#endif
+}
+
+static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x) {
+#if defined __SSE__
+    simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[2]);
+    simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[2]);
+    simd_float4 __t2 = _mm_unpacklo_ps(__x.columns[1],__x.columns[3]);
+    simd_float4 __t3 = _mm_unpackhi_ps(__x.columns[1],__x.columns[3]);
+    simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2);
+    simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2);
+    simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3);
+    simd_float4 __r3 = _mm_unpackhi_ps(__t1,__t3);
+    return simd_matrix(__r0,__r1,__r2,__r3);
+#else
+    return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]},
+                               (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]},
+                               (simd_float4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]});
+#endif
+}
+
+static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x) {
+    return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_double2){__x.columns[0][1], __x.columns[1][1]});
+}
+
+static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x) {
+    return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_double2){__x.columns[0][1], __x.columns[1][1]},
+                               (simd_double2){__x.columns[0][2], __x.columns[1][2]});
+}
+
+static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x) {
+    return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]},
+                               (simd_double2){__x.columns[0][1], __x.columns[1][1]},
+                               (simd_double2){__x.columns[0][2], __x.columns[1][2]},
+                               (simd_double2){__x.columns[0][3], __x.columns[1][3]});
+}
+
+static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x) {
+    return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]});
+}
+
+static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x) {
+    return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]},
+                               (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]});
+}
+
+static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x) {
+    return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]},
+                               (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]},
+                               (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]},
+                               (simd_double3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]});
+}
+
+static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x) {
+    return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]});
+}
+
+static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x) {
+    return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]},
+                               (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]});
+}
+
+static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x) {
+    return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]},
+                               (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]},
+                               (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]},
+                               (simd_double4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]});
+}
+
+static  simd_float3 SIMD_CFUNC __rotate1( simd_float3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); }
+static  simd_float3 SIMD_CFUNC __rotate2( simd_float3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); }
+static  simd_float4 SIMD_CFUNC __rotate1( simd_float4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); }
+static  simd_float4 SIMD_CFUNC __rotate2( simd_float4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); }
+static  simd_float4 SIMD_CFUNC __rotate3( simd_float4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); }
+static simd_double3 SIMD_CFUNC __rotate1(simd_double3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); }
+static simd_double3 SIMD_CFUNC __rotate2(simd_double3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); }
+static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); }
+static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); }
+static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); }
+
+static  float SIMD_CFUNC simd_determinant( simd_float2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; }
+static double SIMD_CFUNC simd_determinant(simd_double2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; }
+static  float SIMD_CFUNC simd_determinant( simd_float3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); }
+static double SIMD_CFUNC simd_determinant(simd_double3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); }
+static  float SIMD_CFUNC simd_determinant( simd_float4x4 __x) {
+    simd_float4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) +
+                                          __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) +
+                                          __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3])));
+    return simd_reduce_add(codet.even - codet.odd);
+}
+static double SIMD_CFUNC simd_determinant(simd_double4x4 __x) {
+    simd_double4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) +
+                                           __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) +
+                                           __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3])));
+    return simd_reduce_add(codet.even - codet.odd);
+}
+
+static  simd_float2x2 SIMD_CFUNC simd_inverse( simd_float2x2 __x) { return __invert_f2(__x); }
+static  simd_float3x3 SIMD_CFUNC simd_inverse( simd_float3x3 __x) { return __invert_f3(__x); }
+static  simd_float4x4 SIMD_CFUNC simd_inverse( simd_float4x4 __x) { return __invert_f4(__x); }
+static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) { return __invert_d2(__x); }
+static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) { return __invert_d3(__x); }
+static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) { return __invert_d4(__x); }
+
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float2x2 __x,  simd_float2 __y) {  simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float2x3 __x,  simd_float2 __y) {  simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float2x4 __x,  simd_float2 __y) {  simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float3x2 __x,  simd_float3 __y) {  simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float3x3 __x,  simd_float3 __y) {  simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float3x4 __x,  simd_float3 __y) {  simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float4x2 __x,  simd_float4 __y) {  simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float4x3 __x,  simd_float4 __y) {  simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float4x4 __x,  simd_float4 __y) {  simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; }
+
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float2 __x,  simd_float2x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float2 __x,  simd_float3x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float2 __x,  simd_float4x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float3 __x,  simd_float2x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float3 __x,  simd_float3x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float3 __x,  simd_float4x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float2 SIMD_CFUNC simd_mul( simd_float4 __x,  simd_float2x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float3 SIMD_CFUNC simd_mul( simd_float4 __x,  simd_float3x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+static  simd_float4 SIMD_CFUNC simd_mul( simd_float4 __x,  simd_float4x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y) { return simd_mul(simd_transpose(__y), __x); }
+
+static  simd_float2x2 SIMD_CFUNC simd_mul( simd_float2x2 __x,  simd_float2x2 __y) {  simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x3 SIMD_CFUNC simd_mul( simd_float2x3 __x,  simd_float2x2 __y) {  simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x4 SIMD_CFUNC simd_mul( simd_float2x4 __x,  simd_float2x2 __y) {  simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x2 SIMD_CFUNC simd_mul( simd_float3x2 __x,  simd_float2x3 __y) {  simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x3 SIMD_CFUNC simd_mul( simd_float3x3 __x,  simd_float2x3 __y) {  simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x4 SIMD_CFUNC simd_mul( simd_float3x4 __x,  simd_float2x3 __y) {  simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x2 SIMD_CFUNC simd_mul( simd_float4x2 __x,  simd_float2x4 __y) {  simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x3 SIMD_CFUNC simd_mul( simd_float4x3 __x,  simd_float2x4 __y) {  simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float2x4 SIMD_CFUNC simd_mul( simd_float4x4 __x,  simd_float2x4 __y) {  simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+
+static  simd_float3x2 SIMD_CFUNC simd_mul( simd_float2x2 __x,  simd_float3x2 __y) {  simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x3 SIMD_CFUNC simd_mul( simd_float2x3 __x,  simd_float3x2 __y) {  simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x4 SIMD_CFUNC simd_mul( simd_float2x4 __x,  simd_float3x2 __y) {  simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x2 SIMD_CFUNC simd_mul( simd_float3x2 __x,  simd_float3x3 __y) {  simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x3 SIMD_CFUNC simd_mul( simd_float3x3 __x,  simd_float3x3 __y) {  simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x4 SIMD_CFUNC simd_mul( simd_float3x4 __x,  simd_float3x3 __y) {  simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x2 SIMD_CFUNC simd_mul( simd_float4x2 __x,  simd_float3x4 __y) {  simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x3 SIMD_CFUNC simd_mul( simd_float4x3 __x,  simd_float3x4 __y) {  simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float3x4 SIMD_CFUNC simd_mul( simd_float4x4 __x,  simd_float3x4 __y) {  simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+
+static  simd_float4x2 SIMD_CFUNC simd_mul( simd_float2x2 __x,  simd_float4x2 __y) {  simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x3 SIMD_CFUNC simd_mul( simd_float2x3 __x,  simd_float4x2 __y) {  simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x4 SIMD_CFUNC simd_mul( simd_float2x4 __x,  simd_float4x2 __y) {  simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x2 SIMD_CFUNC simd_mul( simd_float3x2 __x,  simd_float4x3 __y) {  simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x3 SIMD_CFUNC simd_mul( simd_float3x3 __x,  simd_float4x3 __y) {  simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x4 SIMD_CFUNC simd_mul( simd_float3x4 __x,  simd_float4x3 __y) {  simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x2 SIMD_CFUNC simd_mul( simd_float4x2 __x,  simd_float4x4 __y) {  simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x3 SIMD_CFUNC simd_mul( simd_float4x3 __x,  simd_float4x4 __y) {  simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static  simd_float4x4 SIMD_CFUNC simd_mul( simd_float4x4 __x,  simd_float4x4 __y) {  simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; }
+  
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x,  simd_float2 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x,  simd_float2 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x,  simd_float2 __y) { return simd_mul(__x, __y); }
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x,  simd_float3 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x,  simd_float3 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x,  simd_float3 __y) { return simd_mul(__x, __y); }
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x,  simd_float4 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x,  simd_float4 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x,  simd_float4 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4 __y) { return simd_mul(__x, __y); }
+  
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float2 __x,  simd_float2x2 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float2 __x,  simd_float3x2 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float2 __x,  simd_float4x2 __y) { return simd_mul(__x, __y); }
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float3 __x,  simd_float2x3 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float3 __x,  simd_float3x3 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float3 __x,  simd_float4x3 __y) { return simd_mul(__x, __y); }
+static  simd_float2 SIMD_CFUNC matrix_multiply( simd_float4 __x,  simd_float2x4 __y) { return simd_mul(__x, __y); }
+static  simd_float3 SIMD_CFUNC matrix_multiply( simd_float4 __x,  simd_float3x4 __y) { return simd_mul(__x, __y); }
+static  simd_float4 SIMD_CFUNC matrix_multiply( simd_float4 __x,  simd_float4x4 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); }
+static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); }
+static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); }
+static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); }
+  
+static  simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x,  simd_float2x2 __y) { return simd_mul(__x, __y); }
+static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); }
+static  simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x,  simd_float2x2 __y) { return simd_mul(__x, __y); }
+static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2x2 __y) { return simd_mul(__x, __y); }
+static  simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x,  simd_float2x2 __y) { return simd_mul(__x, __y); }
+static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2x2 __y) { return simd_mul(__x, __y); }
+static  simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x,  simd_float2x3 __y) { return simd_mul(__x, __y); }
+static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double2x3 __y) { return simd_mul(__x, __y); }
+static  simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x,  simd_float2x3 __y) { return simd_mul(__x, __y); }
+static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); }
+static  simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x,  simd_float2x3 __y) { return simd_mul(__x, __y); }
+static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double2x3 __y) { return simd_mul(__x, __y); }
+static  simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x,  simd_float2x4 __y) { return simd_mul(__x, __y); }
+static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double2x4 __y) { return simd_mul(__x, __y); }
+static  simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x,  simd_float2x4 __y) { return simd_mul(__x, __y); }
+static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double2x4 __y) { return simd_mul(__x, __y); }
+static  simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x,  simd_float2x4 __y) { return simd_mul(__x, __y); }
+static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); }
+  
+static  simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x,  simd_float3x2 __y) { return simd_mul(__x, __y); }
+static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); }
+static  simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x,  simd_float3x2 __y) { return simd_mul(__x, __y); }
+static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double3x2 __y) { return simd_mul(__x, __y); }
+static  simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x,  simd_float3x2 __y) { return simd_mul(__x, __y); }
+static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double3x2 __y) { return simd_mul(__x, __y); }
+static  simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x,  simd_float3x3 __y) { return simd_mul(__x, __y); }
+static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3x3 __y) { return simd_mul(__x, __y); }
+static  simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x,  simd_float3x3 __y) { return simd_mul(__x, __y); }
+static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); }
+static  simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x,  simd_float3x3 __y) { return simd_mul(__x, __y); }
+static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3x3 __y) { return simd_mul(__x, __y); }
+static  simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x,  simd_float3x4 __y) { return simd_mul(__x, __y); }
+static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double3x4 __y) { return simd_mul(__x, __y); }
+static  simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x,  simd_float3x4 __y) { return simd_mul(__x, __y); }
+static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double3x4 __y) { return simd_mul(__x, __y); }
+static  simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x,  simd_float3x4 __y) { return simd_mul(__x, __y); }
+static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); }
+  
+static  simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x,  simd_float4x2 __y) { return simd_mul(__x, __y); }
+static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); }
+static  simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x,  simd_float4x2 __y) { return simd_mul(__x, __y); }
+static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double4x2 __y) { return simd_mul(__x, __y); }
+static  simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x,  simd_float4x2 __y) { return simd_mul(__x, __y); }
+static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double4x2 __y) { return simd_mul(__x, __y); }
+static  simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x,  simd_float4x3 __y) { return simd_mul(__x, __y); }
+static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double4x3 __y) { return simd_mul(__x, __y); }
+static  simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x,  simd_float4x3 __y) { return simd_mul(__x, __y); }
+static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); }
+static  simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x,  simd_float4x3 __y) { return simd_mul(__x, __y); }
+static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double4x3 __y) { return simd_mul(__x, __y); }
+static  simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x,  simd_float4x4 __y) { return simd_mul(__x, __y); }
+static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4x4 __y) { return simd_mul(__x, __y); }
+static  simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x,  simd_float4x4 __y) { return simd_mul(__x, __y); }
+static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4x4 __y) { return simd_mul(__x, __y); }
+static  simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x,  simd_float4x4 __y) { return simd_mul(__x, __y); }
+static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); }
+
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y) {
+    return simd_all((__x.columns[0] == __y.columns[0]) &
+                      (__x.columns[1] == __y.columns[1]) &
+                      (__x.columns[2] == __y.columns[2]) &
+                      (__x.columns[3] == __y.columns[3]));
+}
+
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol));
+}
+
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol) {
+    return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) &
+                      (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) &
+                      (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) &
+                      (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3])));
+}
+    
+#ifdef __cplusplus
+}
+#endif
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* __SIMD_HEADER__ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/matrix_types.h
@@ -0,0 +1,264 @@
+/*  Copyright (c) 2014-2017 Apple, Inc. All rights reserved.
+ *
+ *  This header defines nine matrix types for each of float and double, which
+ *  are intended for use together with the vector types defined in
+ *  <simd/vector_types.h>.
+ *
+ *  For compatibility with common graphics libraries, these matrices are stored
+ *  in column-major order, and implemented as arrays of column vectors.
+ *  Column-major storage order may seem a little strange if you aren't used to
+ *  it, but for most usage the memory layout of the matrices shouldn't matter
+ *  at all; instead you should think of matrices as abstract mathematical
+ *  objects that you use to perform arithmetic without worrying about the
+ *  details of the underlying representation.
+ *
+ *  WARNING: vectors of length three are internally represented as length four
+ *  vectors with one element of padding (for alignment purposes).  This means
+ *  that when a floatNx3 or doubleNx3 is viewed as a vector, it appears to
+ *  have 4*N elements instead of the expected 3*N (with one padding element
+ *  at the end of each column).  The matrix elements are laid out in memory
+ *  as follows:
+ *
+ *      { 0, 1, 2, x, 3, 4, 5, x, ... }
+ *
+ *  (where the scalar indices used above indicate the conceptual column-
+ *  major storage order).  If you aren't monkeying around with the internal
+ *  storage details of matrices, you don't need to worry about this at all.
+ *  Consider this yet another good reason to avoid doing so.                  */
+
+#ifndef SIMD_MATRIX_TYPES_HEADER
+#define SIMD_MATRIX_TYPES_HEADER
+
+#include <simd/types.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+
+/*  Matrix types available in C, Objective-C, and C++                         */
+typedef simd_float2x2 matrix_float2x2;
+typedef simd_float3x2 matrix_float3x2;
+typedef simd_float4x2 matrix_float4x2;
+
+typedef simd_float2x3 matrix_float2x3;
+typedef simd_float3x3 matrix_float3x3;
+typedef simd_float4x3 matrix_float4x3;
+
+typedef simd_float2x4 matrix_float2x4;
+typedef simd_float3x4 matrix_float3x4;
+typedef simd_float4x4 matrix_float4x4;
+
+typedef simd_double2x2 matrix_double2x2;
+typedef simd_double3x2 matrix_double3x2;
+typedef simd_double4x2 matrix_double4x2;
+
+typedef simd_double2x3 matrix_double2x3;
+typedef simd_double3x3 matrix_double3x3;
+typedef simd_double4x3 matrix_double4x3;
+
+typedef simd_double2x4 matrix_double2x4;
+typedef simd_double3x4 matrix_double3x4;
+typedef simd_double4x4 matrix_double4x4;
+
+#ifdef __cplusplus
+#if defined SIMD_MATRIX_HEADER
+static  simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q);
+static  simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q);
+static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q);
+static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q);
+#endif
+
+namespace simd {
+  
+  struct float2x2 : ::simd_float2x2 {
+    float2x2() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float2x2(float diagonal) : float2x2((float2)diagonal) { }
+#endif
+    float2x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; }
+    float2x2(float2 c0, float2 c1) { columns[0] = c0; columns[1] = c1; }
+    float2x2(::simd_float2x2 m) : ::simd_float2x2(m) { }
+  };
+  
+  struct float3x2 : ::simd_float3x2 {
+    float3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float3x2(float diagonal) : float3x2((float2)diagonal) { }
+#endif
+    float3x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; }
+    float3x2(float2 c0, float2 c1, float2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    float3x2(::simd_float3x2 m) : ::simd_float3x2(m) { }
+  };
+  
+  struct float4x2 : ::simd_float4x2 {
+    float4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float4x2(float diagonal) : float4x2((float2)diagonal) { }
+#endif
+    float4x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; columns[3] = 0; }
+    float4x2(float2 c0, float2 c1, float2 c2, float2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    float4x2(::simd_float4x2 m) : ::simd_float4x2(m) { }
+  };
+  
+  struct float2x3 : ::simd_float2x3 {
+    float2x3() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float2x3(float diagonal) : float2x3((float2)diagonal) { }
+#endif
+    float2x3(float2 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; }
+    float2x3(float3 c0, float3 c1) { columns[0] = c0; columns[1] = c1; }
+    float2x3(::simd_float2x3 m) : ::simd_float2x3(m) { }
+  };
+  
+  struct float3x3 : ::simd_float3x3 {
+    float3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float3x3(float diagonal) : float3x3((float3)diagonal) { }
+#endif
+    float3x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; }
+    float3x3(float3 c0, float3 c1, float3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    float3x3(::simd_float3x3 m) : ::simd_float3x3(m) { }
+#if defined SIMD_MATRIX_HEADER
+    float3x3(::simd_quatf q) : ::simd_float3x3(::simd_matrix3x3(q)) { }
+#endif
+  };
+  
+  struct float4x3 : ::simd_float4x3 {
+    float4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float4x3(float diagonal) : float4x3((float3)diagonal) { }
+#endif
+    float4x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; columns[3] = 0; }
+    float4x3(float3 c0, float3 c1, float3 c2, float3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    float4x3(::simd_float4x3 m) : ::simd_float4x3(m) { }
+  };
+  
+  struct float2x4 : ::simd_float2x4 {
+    float2x4() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float2x4(float diagonal) : float2x4((float2)diagonal) { }
+#endif
+    float2x4(float2 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; }
+    float2x4(float4 c0, float4 c1) { columns[0] = c0; columns[1] = c1; }
+    float2x4(::simd_float2x4 m) : ::simd_float2x4(m) { }
+  };
+  
+  struct float3x4 : ::simd_float3x4 {
+    float3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float3x4(float diagonal) : float3x4((float3)diagonal) { }
+#endif
+    float3x4(float3 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; }
+    float3x4(float4 c0, float4 c1, float4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    float3x4(::simd_float3x4 m) : ::simd_float3x4(m) { }
+  };
+  
+  struct float4x4 : ::simd_float4x4 {
+    float4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    float4x4(float diagonal) : float4x4((float4)diagonal) { }
+#endif
+    float4x4(float4 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; columns[3] = (float4){0,0,0,v.w}; }
+    float4x4(float4 c0, float4 c1, float4 c2, float4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    float4x4(::simd_float4x4 m) : ::simd_float4x4(m) { }
+#if defined SIMD_MATRIX_HEADER
+    float4x4(::simd_quatf q) : ::simd_float4x4(::simd_matrix4x4(q)) { }
+#endif
+  };
+  
+  struct double2x2 : ::simd_double2x2 {
+    double2x2() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double2x2(double diagonal) : double2x2((double2)diagonal) { }
+#endif
+    double2x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; }
+    double2x2(double2 c0, double2 c1) { columns[0] = c0; columns[1] = c1; }
+    double2x2(::simd_double2x2 m) : ::simd_double2x2(m) { }
+  };
+  
+  struct double3x2 : ::simd_double3x2 {
+    double3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double3x2(double diagonal) : double3x2((double2)diagonal) { }
+#endif
+    double3x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; }
+    double3x2(double2 c0, double2 c1, double2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    double3x2(::simd_double3x2 m) : ::simd_double3x2(m) { }
+  };
+  
+  struct double4x2 : ::simd_double4x2 {
+    double4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double4x2(double diagonal) : double4x2((double2)diagonal) { }
+#endif
+    double4x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; columns[3] = 0; }
+    double4x2(double2 c0, double2 c1, double2 c2, double2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    double4x2(::simd_double4x2 m) : ::simd_double4x2(m) { }
+  };
+  
+  struct double2x3 : ::simd_double2x3 {
+    double2x3() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double2x3(double diagonal) : double2x3((double2)diagonal) { }
+#endif
+    double2x3(double2 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; }
+    double2x3(double3 c0, double3 c1) { columns[0] = c0; columns[1] = c1; }
+    double2x3(::simd_double2x3 m) : ::simd_double2x3(m) { }
+  };
+  
+  struct double3x3 : ::simd_double3x3 {
+    double3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double3x3(double diagonal) : double3x3((double3)diagonal) { }
+#endif
+    double3x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; }
+    double3x3(double3 c0, double3 c1, double3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    double3x3(::simd_double3x3 m) : ::simd_double3x3(m) { }
+#if defined SIMD_MATRIX_HEADER
+    double3x3(::simd_quatd q) : ::simd_double3x3(::simd_matrix3x3(q)) { }
+#endif
+  };
+  
+  struct double4x3 : ::simd_double4x3 {
+    double4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double4x3(double diagonal) : double4x3((double3)diagonal) { }
+#endif
+    double4x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; columns[3] = 0; }
+    double4x3(double3 c0, double3 c1, double3 c2, double3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    double4x3(::simd_double4x3 m) : ::simd_double4x3(m) { }
+  };
+  
+  struct double2x4 : ::simd_double2x4 {
+    double2x4() { columns[0] = 0; columns[1] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double2x4(double diagonal) : double2x4((double2)diagonal) { }
+#endif
+    double2x4(double2 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; }
+    double2x4(double4 c0, double4 c1) { columns[0] = c0; columns[1] = c1; }
+    double2x4(::simd_double2x4 m) : ::simd_double2x4(m) { }
+  };
+  
+  struct double3x4 : ::simd_double3x4 {
+    double3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double3x4(double diagonal) : double3x4((double3)diagonal) { }
+#endif
+    double3x4(double3 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; }
+    double3x4(double4 c0, double4 c1, double4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; }
+    double3x4(::simd_double3x4 m) : ::simd_double3x4(m) { }
+  };
+  
+  struct double4x4 : ::simd_double4x4 {
+    double4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; }
+#if __has_feature(cxx_delegating_constructors)
+    double4x4(double diagonal) : double4x4((double4)diagonal) { }
+#endif
+    double4x4(double4 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; columns[3] = (double4){0,0,0,v.w}; }
+    double4x4(double4 c0, double4 c1, double4 c2, double4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; }
+    double4x4(::simd_double4x4 m) : ::simd_double4x4(m) { }
+#if defined SIMD_MATRIX_HEADER
+    double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { }
+#endif
+  };
+}
+#endif /* __cplusplus */
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* SIMD_MATRIX_TYPES_HEADER */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/quaternion.h
@@ -0,0 +1,1194 @@
+/*! @header
+ *  This header defines functions for constructing and using quaternions.
+ *  @copyright 2015-2016 Apple, Inc. All rights reserved.
+ *  @unsorted                                                                 */
+
+#ifndef SIMD_QUATERNIONS
+#define SIMD_QUATERNIONS
+
+#include <simd/base.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+#include <simd/vector.h>
+#include <simd/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+/*  MARK: - C and Objective-C float interfaces                                */
+
+/*! @abstract Constructs a quaternion from four scalar values.
+ *
+ *  @param ix The first component of the imaginary (vector) part.
+ *  @param iy The second component of the imaginary (vector) part.
+ *  @param iz The third component of the imaginary (vector) part.
+ *
+ *  @param r The real (scalar) part.                                          */
+static inline SIMD_CFUNC simd_quatf simd_quaternion(float ix, float iy, float iz, float r) {
+  return (simd_quatf){ { ix, iy, iz, r } };
+}
+  
+/*! @abstract Constructs a quaternion from an array of four scalars.
+ *
+ *  @discussion Note that the imaginary part of the quaternion comes from 
+ *  array elements 0, 1, and 2, and the real part comes from element 3.       */
+static inline SIMD_NONCONST simd_quatf simd_quaternion(const float xyzr[4]) {
+  return (simd_quatf){ *(const simd_packed_float4 *)xyzr };
+}
+  
+/*! @abstract Constructs a quaternion from a four-element vector.
+ *
+ *  @discussion Note that the imaginary (vector) part of the quaternion comes
+ *  from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from
+ *  lane 3.                                                                   */
+static inline SIMD_CFUNC simd_quatf simd_quaternion(simd_float4 xyzr) {
+  return (simd_quatf){ xyzr };
+}
+  
+/*! @abstract Constructs a quaternion that rotates by `angle` radians about
+ *  `axis`.                                                                   */
+static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis);
+  
+/*! @abstract Construct a quaternion that rotates from one vector to another.
+ *
+ *  @param from A normalized three-element vector.
+ *  @param to A normalized three-element vector.
+ *
+ *  @discussion The rotation axis is `simd_cross(from, to)`. If `from` and
+ *  `to` point in opposite directions (to within machine precision), an
+ *  arbitrary rotation axis is chosen, and the angle is pi radians.           */
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to);
+
+/*! @abstract Construct a quaternion from a 3x3 rotation `matrix`.
+ *
+ *  @discussion If `matrix` is not orthogonal with determinant 1, the result
+ *  is undefined.                                                             */
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix);
+
+/*! @abstract Construct a quaternion from a 4x4 rotation `matrix`.
+ *
+ *  @discussion The last row and column of the matrix are ignored. This
+ *  function is equivalent to calling simd_quaternion with the upper-left 3x3
+ *  submatrix                .                                                */
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix);
+  
+/*! @abstract The real (scalar) part of the quaternion `q`.                   */
+static inline SIMD_CFUNC float simd_real(simd_quatf q) {
+  return q.vector.w;
+}
+  
+/*! @abstract The imaginary (vector) part of the quaternion `q`.              */
+static inline SIMD_CFUNC simd_float3 simd_imag(simd_quatf q) {
+  return q.vector.xyz;
+}
+  
+/*! @abstract The angle (in radians) of rotation represented by `q`.          */
+static inline SIMD_CFUNC float simd_angle(simd_quatf q);
+  
+/*! @abstract The normalized axis (a 3-element vector) around which the
+ *  action of the quaternion `q` rotates.                                     */
+static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q);
+  
+/*! @abstract The sum of the quaternions `p` and `q`.                         */
+static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q);
+  
+/*! @abstract The difference of the quaternions `p` and `q`.                  */
+static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q);
+  
+/*! @abstract The product of the quaternions `p` and `q`.                     */
+static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q);
+  
+/*! @abstract The quaternion `q` scaled by the real value `a`.                */
+static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a);
+  
+/*! @abstract The quaternion `q` scaled by the real value `a`.                */
+static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q);
+  
+/*! @abstract The conjugate of the quaternion `q`.                            */
+static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q);
+  
+/*! @abstract The (multiplicative) inverse of the quaternion `q`.             */
+static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q);
+  
+/*! @abstract The negation (additive inverse) of the quaternion `q`.          */
+static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q);
+  
+/*! @abstract The dot product of the quaternions `p` and `q` interpreted as
+ *  four-dimensional vectors.                                                 */
+static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q);
+  
+/*! @abstract The length of the quaternion `q`.                               */
+static inline SIMD_CFUNC float simd_length(simd_quatf q);
+  
+/*! @abstract The unit quaternion obtained by normalizing `q`.                */
+static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q);
+  
+/*! @abstract Rotates the vector `v` by the quaternion `q`.                   */
+static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v);
+  
+/*! @abstract Logarithm of the quaternion `q`.
+ *  @discussion Do not call this function directly; use `log(q)` instead.
+ *
+ *  We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where
+ *  `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector.
+ *  The logarithm of `q` is `log(r) + tv`, just like the logarithm of the
+ *  complex number `r*(cos(t) + i sin(t))` is `log(r) + it`.
+ *
+ *  Note that this function is not robust against poorly-scaled non-unit
+ *  quaternions, because it is primarily used for spline interpolation of
+ *  unit quaternions. If you need to compute a robust logarithm of general
+ *  quaternions, you can use the following approach:
+ *
+ *    scale = simd_reduce_max(simd_abs(q.vector));
+ *    logq = log(simd_recip(scale)*q);
+ *    logq.real += log(scale);
+ *    return logq;                                                            */
+static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q);
+    
+/*! @abstract Inverse of `log( )`; the exponential map on quaternions.
+ *  @discussion Do not call this function directly; use `exp(q)` instead.     */
+static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q);
+  
+/*! @abstract Spherical linear interpolation along the shortest arc between
+ *  quaternions `q0` and `q1`.                                                */
+static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t);
+
+/*! @abstract Spherical linear interpolation along the longest arc between
+ *  quaternions `q0` and `q1`.                                                */
+static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t);
+
+/*! @abstract Interpolate between quaternions along a spherical cubic spline.
+ *
+ *  @discussion The function interpolates between q1 and q2. q0 is the left
+ *  endpoint of the previous interval, and q3 is the right endpoint of the next
+ *  interval. Use this function to smoothly interpolate between a sequence of
+ *  rotations.                                                                */
+static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t);
+
+/*! @abstract Spherical cubic Bezier interpolation between quaternions.
+ *
+ *  @discussion The function treats q0 ... q3 as control points and uses slerp
+ *  in place of lerp in the De Castlejeau algorithm. The endpoints of
+ *  interpolation are thus q0 and q3, and the curve will not generally pass
+ *  through q1 or q2. Note that the convex hull property of "standard" Bezier
+ *  curve does not hold on the sphere.                                        */
+static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t);
+  
+#ifdef __cplusplus
+} /* extern "C" */
+/*  MARK: - C++ float interfaces                                              */
+
+namespace simd {
+  struct quatf : ::simd_quatf {
+    /*! @abstract The identity quaternion.                                    */
+    quatf( ) : ::simd_quatf(::simd_quaternion((float4){0,0,0,1})) { }
+    
+    /*! @abstract Constructs a C++ quaternion from a C quaternion.            */
+    quatf(::simd_quatf q) : ::simd_quatf(q) { }
+    
+    /*! @abstract Constructs a quaternion from components.                    */
+    quatf(float ix, float iy, float iz, float r) : ::simd_quatf(::simd_quaternion(ix, iy, iz, r)) { }
+    
+    /*! @abstract Constructs a quaternion from an array of scalars.           */
+    quatf(const float xyzr[4]) : ::simd_quatf(::simd_quaternion(xyzr)) { }
+    
+    /*! @abstract Constructs a quaternion from a vector.                      */
+    quatf(float4 xyzr) : ::simd_quatf(::simd_quaternion(xyzr)) { }
+    
+    /*! @abstract Quaternion representing rotation about `axis` by `angle` 
+     *  radians.                                                              */
+    quatf(float angle, float3 axis) : ::simd_quatf(::simd_quaternion(angle, axis)) { }
+    
+    /*! @abstract Quaternion that rotates `from` into `to`.                   */
+    quatf(float3 from, float3 to) : ::simd_quatf(::simd_quaternion(from, to)) { }
+    
+    /*! @abstract Constructs a quaternion from a rotation matrix.             */
+    quatf(::simd_float3x3 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { }
+    
+    /*! @abstract Constructs a quaternion from a rotation matrix.             */
+    quatf(::simd_float4x4 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { }
+  
+    /*! @abstract The real (scalar) part of the quaternion.                   */
+    float real(void) const { return ::simd_real(*this); }
+    
+    /*! @abstract The imaginary (vector) part of the quaternion.              */
+    float3 imag(void) const { return ::simd_imag(*this); }
+    
+    /*! @abstract The angle the quaternion rotates by.                        */
+    float angle(void) const { return ::simd_angle(*this); }
+    
+    /*! @abstract The axis the quaternion rotates about.                      */
+    float3 axis(void) const { return ::simd_axis(*this); }
+    
+    /*! @abstract The length of the quaternion.                               */
+    float length(void) const { return ::simd_length(*this); }
+    
+    /*! @abstract Act on the vector `v` by rotation.                          */
+    float3  operator()(const ::simd_float3 v) const { return ::simd_act(*this, v); }
+  };
+  
+  static SIMD_CPPFUNC quatf operator+(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_add(p, q); }
+  static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_sub(p, q); }
+  static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p) { return ::simd_negate(p); }
+  static SIMD_CPPFUNC quatf operator*(const float r, const ::simd_quatf p) { return ::simd_mul(r, p); }
+  static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const float r) { return ::simd_mul(p, r); }
+  static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, q); }
+  static SIMD_CPPFUNC quatf operator/(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, ::simd_inverse(q)); }
+  static SIMD_CPPFUNC quatf operator+=(quatf &p, const ::simd_quatf q) { return p = p+q; }
+  static SIMD_CPPFUNC quatf operator-=(quatf &p, const ::simd_quatf q) { return p = p-q; }
+  static SIMD_CPPFUNC quatf operator*=(quatf &p, const float r) { return p = p*r; }
+  static SIMD_CPPFUNC quatf operator*=(quatf &p, const ::simd_quatf q) { return p = p*q; }
+  static SIMD_CPPFUNC quatf operator/=(quatf &p, const ::simd_quatf q) { return p = p/q; }
+  
+  /*! @abstract The conjugate of the quaternion `q`.                          */
+  static SIMD_CPPFUNC quatf conjugate(const ::simd_quatf p) { return ::simd_conjugate(p); }
+  
+  /*! @abstract The (multiplicative) inverse of the quaternion `q`.           */
+  static SIMD_CPPFUNC quatf inverse(const ::simd_quatf p) { return ::simd_inverse(p); }
+
+  /*! @abstract The dot product of the quaternions `p` and `q` interpreted as
+   *  four-dimensional vectors.                                               */
+  static SIMD_CPPFUNC float dot(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_dot(p, q); }
+  
+  /*! @abstract The unit quaternion obtained by normalizing `q`.              */
+  static SIMD_CPPFUNC quatf normalize(const ::simd_quatf p) { return ::simd_normalize(p); }
+
+  /*! @abstract logarithm of the quaternion `q`.                              */
+  static SIMD_CPPFUNC quatf log(const ::simd_quatf q) { return ::__tg_log(q); }
+
+  /*! @abstract exponential map of quaterion `q`.                             */
+  static SIMD_CPPFUNC quatf exp(const ::simd_quatf q) { return ::__tg_exp(q); }
+  
+  /*! @abstract Spherical linear interpolation along the shortest arc between
+   *  quaternions `q0` and `q1`.                                              */
+  static SIMD_CPPFUNC quatf slerp(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp(p0, p1, t); }
+  
+  /*! @abstract Spherical linear interpolation along the longest arc between
+   *  quaternions `q0` and `q1`.                                              */
+  static SIMD_CPPFUNC quatf slerp_longest(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp_longest(p0, p1, t); }
+  
+  /*! @abstract Interpolate between quaternions along a spherical cubic spline.
+   *
+   *  @discussion The function interpolates between q1 and q2. q0 is the left
+   *  endpoint of the previous interval, and q3 is the right endpoint of the next
+   *  interval. Use this function to smoothly interpolate between a sequence of
+   *  rotations.                                                              */
+  static SIMD_CPPFUNC quatf spline(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_spline(p0, p1, p2, p3, t); }
+  
+  /*! @abstract Spherical cubic Bezier interpolation between quaternions.
+   *
+   *  @discussion The function treats q0 ... q3 as control points and uses slerp
+   *  in place of lerp in the De Castlejeau algorithm. The endpoints of
+   *  interpolation are thus q0 and q3, and the curve will not generally pass
+   *  through q1 or q2. Note that the convex hull property of "standard" Bezier
+   *  curve does not hold on the sphere.                                      */
+  static SIMD_CPPFUNC quatf bezier(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_bezier(p0, p1, p2, p3, t); }
+}
+
+extern "C" {
+#endif /* __cplusplus */
+  
+/*  MARK: - float implementations                                             */
+
+#include <simd/math.h>
+#include <simd/geometry.h>
+  
+/*  tg_promote is implementation gobbledygook that enables the compile-time
+ *  dispatching in tgmath.h to work its magic.                                */
+static simd_quatf __attribute__((__overloadable__)) __tg_promote(simd_quatf);
+  
+/*! @abstract Constructs a quaternion from imaginary and real parts.
+ *  @discussion This function is hidden behind an underscore to avoid confusion
+ *  with the angle-axis constructor.                                          */
+static inline SIMD_CFUNC simd_quatf _simd_quaternion(simd_float3 imag, float real) {
+  return simd_quaternion(simd_make_float4(imag, real));
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis) {
+  return _simd_quaternion(sin(angle/2) * axis, cos(angle/2));
+}
+  
+static inline SIMD_CFUNC float simd_angle(simd_quatf q) {
+  return 2*atan2(simd_length(q.vector.xyz), q.vector.w);
+}
+  
+static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q) {
+  return simd_normalize(q.vector.xyz);
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q) {
+  return simd_quaternion(p.vector + q.vector);
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q) {
+  return simd_quaternion(p.vector - q.vector);
+}
+
+static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q) {
+  #pragma STDC FP_CONTRACT ON
+  return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) +
+                          p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) +
+                         (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) +
+                          p.vector.w * q.vector));
+}
+
+static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a) {
+  return simd_quaternion(a * q.vector);
+}
+
+static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q) {
+  return simd_mul(q,a);
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q) {
+  return simd_quaternion(q.vector * (simd_float4){-1,-1,-1, 1});
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q) {
+  return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector)));
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q) {
+  return simd_quaternion(-q.vector);
+}
+  
+static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q) {
+  return simd_dot(p.vector, q.vector);
+}
+  
+static inline SIMD_CFUNC float simd_length(simd_quatf q) {
+  return simd_length(q.vector);
+}
+  
+static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q) {
+  float length_squared = simd_length_squared(q.vector);
+  if (length_squared == 0) {
+    return simd_quaternion((simd_float4){0,0,0,1});
+  }
+  return simd_quaternion(q.vector * simd_rsqrt(length_squared));
+}
+
+#if defined __arm__ || defined __arm64__
+/*! @abstract Multiplies the vector `v` by the quaternion `q`.
+ *  
+ *  @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation
+ *  by `q`. That operation is provided by `simd_act(q, v)`. This function is an
+ *  implementation detail and you should not call it directly. It may be
+ *  removed or modified in future versions of the simd module.                */
+static inline SIMD_CFUNC simd_quatf _simd_mul_vq(simd_float3 v, simd_quatf q) {
+  #pragma STDC FP_CONTRACT ON
+  return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) +
+                         v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) +
+                         v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6));
+}
+#endif
+  
+static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v) {
+#if defined __arm__ || defined __arm64__
+  return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz;
+#else
+  #pragma STDC FP_CONTRACT ON
+  simd_float3 t = 2*simd_cross(simd_imag(q),v);
+  return v + simd_real(q)*t + simd_cross(simd_imag(q), t);
+#endif
+}
+
+static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q) {
+  float real = __tg_log(simd_length_squared(q.vector))/2;
+  if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real);
+  simd_float3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q));
+  return _simd_quaternion(imag, real);
+}
+  
+static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q) {
+  //  angle is actually *twice* the angle of the rotation corresponding to
+  //  the resulting quaternion, which is why we don't simply use the (angle,
+  //  axis) constructor to generate `unit`.
+  float angle = simd_length(simd_imag(q));
+  if (angle == 0) return _simd_quaternion(0, exp(simd_real(q)));
+  simd_float3 axis = simd_normalize(simd_imag(q));
+  simd_quatf unit = _simd_quaternion(sin(angle)*axis, cosf(angle));
+  return simd_mul(exp(simd_real(q)), unit);
+}
+ 
+/*! @abstract Implementation detail of the `simd_quaternion(from, to)`
+ *  initializer.
+ *
+ *  @discussion Computes the quaternion rotation `from` to `to` if they are
+ *  separated by less than 90 degrees. Not numerically stable for larger
+ *  angles. This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static inline SIMD_CFUNC simd_quatf _simd_quaternion_reduced(simd_float3 from, simd_float3 to) {
+  simd_float3 half = simd_normalize(from + to);
+  return _simd_quaternion(simd_cross(from, half), simd_dot(from, half));
+}
+
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to) {
+  
+  //  If the angle between from and to is not too big, we can compute the
+  //  rotation accurately using a simple implementation.
+  if (simd_dot(from, to) >= 0) {
+    return _simd_quaternion_reduced(from, to);
+  }
+  
+  //  Because from and to are more than 90 degrees apart, we compute the
+  //  rotation in two stages (from -> half), (half -> to) to preserve numerical
+  //  accuracy.
+  simd_float3 half = from + to;
+  
+  if (simd_length_squared(half) == 0) {
+    //  half is nearly zero, so from and to point in nearly opposite directions
+    //  and the rotation is numerically underspecified. Pick an axis orthogonal
+    //  to the vectors, and use an angle of pi radians.
+    simd_float3 abs_from = simd_abs(from);
+    if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z)
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){1,0,0})), 0.f);
+    else if (abs_from.y <= abs_from.z)
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,1,0})), 0.f);
+    else
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f);
+  }
+
+  //  Compute the two-step rotation.                         */
+  half = simd_normalize(half);
+  return simd_mul(_simd_quaternion_reduced(from, half),
+                  _simd_quaternion_reduced(half, to));
+}
+
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix) {
+  const simd_float3 *mat = matrix.columns;
+  float trace = mat[0][0] + mat[1][1] + mat[2][2];
+  if (trace >= 0.0) {
+    float r = 2*sqrt(1 + trace);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[1][2] - mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]),
+                           rinv*(mat[0][1] - mat[1][0]),
+                           r/4);
+  } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) {
+    float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(r/4,
+                           rinv*(mat[0][1] + mat[1][0]),
+                           rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] - mat[2][1]));
+  } else if (mat[1][1] >= mat[2][2]) {
+    float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][1] + mat[1][0]),
+                           r/4,
+                           rinv*(mat[1][2] + mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]));
+  } else {
+    float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] + mat[2][1]),
+                           r/4,
+                           rinv*(mat[0][1] - mat[1][0]));
+  }
+}
+  
+static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix) {
+  const simd_float4 *mat = matrix.columns;
+  float trace = mat[0][0] + mat[1][1] + mat[2][2];
+  if (trace >= 0.0) {
+    float r = 2*sqrt(1 + trace);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[1][2] - mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]),
+                           rinv*(mat[0][1] - mat[1][0]),
+                           r/4);
+  } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) {
+    float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(r/4,
+                           rinv*(mat[0][1] + mat[1][0]),
+                           rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] - mat[2][1]));
+  } else if (mat[1][1] >= mat[2][2]) {
+    float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][1] + mat[1][0]),
+                           r/4,
+                           rinv*(mat[1][2] + mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]));
+  } else {
+    float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]);
+    float rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] + mat[2][1]),
+                           r/4,
+                           rinv*(mat[0][1] - mat[1][0]));
+  }
+}
+  
+/*! @abstract The angle between p and q interpreted as 4-dimensional vectors.
+ *
+ *  @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE float _simd_angle(simd_quatf p, simd_quatf q) {
+  return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector));
+}
+  
+/*! @abstract sin(x)/x.
+ *
+ *  @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_CFUNC float _simd_sinc(float x) {
+  if (x == 0) return 1;
+  return sin(x)/x;
+}
+ 
+/*! @abstract Spherical lerp between q0 and q1.
+ *
+ *  @discussion This function may interpolate along either the longer or
+ *  shorter path between q0 and q1; it is used as an implementation detail
+ *  in `simd_slerp` and `simd_slerp_longest`; you should use those functions
+ *  instead of calling this directly.                                         */
+static SIMD_NOINLINE simd_quatf _simd_slerp_internal(simd_quatf q0, simd_quatf q1, float t) {
+  float s = 1 - t;
+  float a = _simd_angle(q0, q1);
+  float r = simd_recip(_simd_sinc(a));
+  return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector));
+}
+  
+static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t) {
+  if (simd_dot(q0, q1) >= 0)
+    return _simd_slerp_internal(q0, q1, t);
+  return _simd_slerp_internal(q0, simd_negate(q1), t);
+}
+
+static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t) {
+  if (simd_dot(q0, q1) >= 0)
+    return _simd_slerp_internal(q0, simd_negate(q1), t);
+  return _simd_slerp_internal(q0, q1, t);
+}
+  
+/*! @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE simd_quatf _simd_intermediate(simd_quatf q0, simd_quatf q1, simd_quatf q2) {
+  simd_quatf p0 = __tg_log(simd_mul(q0, simd_inverse(q1)));
+  simd_quatf p2 = __tg_log(simd_mul(q2, simd_inverse(q1)));
+  return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2)))));
+}
+
+/*! @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE simd_quatf _simd_squad(simd_quatf q0, simd_quatf qa, simd_quatf qb, simd_quatf q1, float t) {
+  simd_quatf r0 = _simd_slerp_internal(q0, q1, t);
+  simd_quatf r1 = _simd_slerp_internal(qa, qb, t);
+  return _simd_slerp_internal(r0, r1, 2*t*(1 - t));
+}
+  
+static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) {
+  simd_quatf qa = _simd_intermediate(q0, q1, q2);
+  simd_quatf qb = _simd_intermediate(q1, q2, q3);
+  return _simd_squad(q1, qa, qb, q2, t);
+}
+  
+static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) {
+  simd_quatf q01 = _simd_slerp_internal(q0, q1, t);
+  simd_quatf q12 = _simd_slerp_internal(q1, q2, t);
+  simd_quatf q23 = _simd_slerp_internal(q2, q3, t);
+  simd_quatf q012 = _simd_slerp_internal(q01, q12, t);
+  simd_quatf q123 = _simd_slerp_internal(q12, q23, t);
+  return _simd_slerp_internal(q012, q123, t);
+}
+
+/*  MARK: - C and Objective-C double interfaces                                */
+
+/*! @abstract Constructs a quaternion from four scalar values.
+ *
+ *  @param ix The first component of the imaginary (vector) part.
+ *  @param iy The second component of the imaginary (vector) part.
+ *  @param iz The third component of the imaginary (vector) part.
+ *
+ *  @param r The real (scalar) part.                                          */
+static inline SIMD_CFUNC simd_quatd simd_quaternion(double ix, double iy, double iz, double r) {
+  return (simd_quatd){ { ix, iy, iz, r } };
+}
+  
+/*! @abstract Constructs a quaternion from an array of four scalars.
+ *
+ *  @discussion Note that the imaginary part of the quaternion comes from 
+ *  array elements 0, 1, and 2, and the real part comes from element 3.       */
+static inline SIMD_NONCONST simd_quatd simd_quaternion(const double xyzr[4]) {
+  return (simd_quatd){ *(const simd_packed_double4 *)xyzr };
+}
+  
+/*! @abstract Constructs a quaternion from a four-element vector.
+ *
+ *  @discussion Note that the imaginary (vector) part of the quaternion comes
+ *  from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from
+ *  lane 3.                                                                   */
+static inline SIMD_CFUNC simd_quatd simd_quaternion(simd_double4 xyzr) {
+  return (simd_quatd){ xyzr };
+}
+  
+/*! @abstract Constructs a quaternion that rotates by `angle` radians about
+ *  `axis`.                                                                   */
+static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis);
+  
+/*! @abstract Construct a quaternion that rotates from one vector to another.
+ *
+ *  @param from A normalized three-element vector.
+ *  @param to A normalized three-element vector.
+ *
+ *  @discussion The rotation axis is `simd_cross(from, to)`. If `from` and
+ *  `to` point in opposite directions (to within machine precision), an
+ *  arbitrary rotation axis is chosen, and the angle is pi radians.           */
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to);
+
+/*! @abstract Construct a quaternion from a 3x3 rotation `matrix`.
+ *
+ *  @discussion If `matrix` is not orthogonal with determinant 1, the result
+ *  is undefined.                                                             */
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix);
+
+/*! @abstract Construct a quaternion from a 4x4 rotation `matrix`.
+ *
+ *  @discussion The last row and column of the matrix are ignored. This
+ *  function is equivalent to calling simd_quaternion with the upper-left 3x3
+ *  submatrix                .                                                */
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix);
+  
+/*! @abstract The real (scalar) part of the quaternion `q`.                   */
+static inline SIMD_CFUNC double simd_real(simd_quatd q) {
+  return q.vector.w;
+}
+  
+/*! @abstract The imaginary (vector) part of the quaternion `q`.              */
+static inline SIMD_CFUNC simd_double3 simd_imag(simd_quatd q) {
+  return q.vector.xyz;
+}
+  
+/*! @abstract The angle (in radians) of rotation represented by `q`.          */
+static inline SIMD_CFUNC double simd_angle(simd_quatd q);
+  
+/*! @abstract The normalized axis (a 3-element vector) around which the
+ *  action of the quaternion `q` rotates.                                     */
+static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q);
+  
+/*! @abstract The sum of the quaternions `p` and `q`.                         */
+static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q);
+  
+/*! @abstract The difference of the quaternions `p` and `q`.                  */
+static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q);
+  
+/*! @abstract The product of the quaternions `p` and `q`.                     */
+static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q);
+  
+/*! @abstract The quaternion `q` scaled by the real value `a`.                */
+static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a);
+  
+/*! @abstract The quaternion `q` scaled by the real value `a`.                */
+static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q);
+  
+/*! @abstract The conjugate of the quaternion `q`.                            */
+static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q);
+  
+/*! @abstract The (multiplicative) inverse of the quaternion `q`.             */
+static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q);
+  
+/*! @abstract The negation (additive inverse) of the quaternion `q`.          */
+static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q);
+  
+/*! @abstract The dot product of the quaternions `p` and `q` interpreted as
+ *  four-dimensional vectors.                                                 */
+static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q);
+  
+/*! @abstract The length of the quaternion `q`.                               */
+static inline SIMD_CFUNC double simd_length(simd_quatd q);
+  
+/*! @abstract The unit quaternion obtained by normalizing `q`.                */
+static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q);
+  
+/*! @abstract Rotates the vector `v` by the quaternion `q`.                   */
+static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v);
+  
+/*! @abstract Logarithm of the quaternion `q`.
+ *  @discussion Do not call this function directly; use `log(q)` instead.
+ *
+ *  We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where
+ *  `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector.
+ *  The logarithm of `q` is `log(r) + tv`, just like the logarithm of the
+ *  complex number `r*(cos(t) + i sin(t))` is `log(r) + it`.
+ *
+ *  Note that this function is not robust against poorly-scaled non-unit
+ *  quaternions, because it is primarily used for spline interpolation of
+ *  unit quaternions. If you need to compute a robust logarithm of general
+ *  quaternions, you can use the following approach:
+ *
+ *    scale = simd_reduce_max(simd_abs(q.vector));
+ *    logq = log(simd_recip(scale)*q);
+ *    logq.real += log(scale);
+ *    return logq;                                                            */
+static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q);
+    
+/*! @abstract Inverse of `log( )`; the exponential map on quaternions.
+ *  @discussion Do not call this function directly; use `exp(q)` instead.     */
+static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q);
+  
+/*! @abstract Spherical linear interpolation along the shortest arc between
+ *  quaternions `q0` and `q1`.                                                */
+static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t);
+
+/*! @abstract Spherical linear interpolation along the longest arc between
+ *  quaternions `q0` and `q1`.                                                */
+static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t);
+
+/*! @abstract Interpolate between quaternions along a spherical cubic spline.
+ *
+ *  @discussion The function interpolates between q1 and q2. q0 is the left
+ *  endpoint of the previous interval, and q3 is the right endpoint of the next
+ *  interval. Use this function to smoothly interpolate between a sequence of
+ *  rotations.                                                                */
+static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t);
+
+/*! @abstract Spherical cubic Bezier interpolation between quaternions.
+ *
+ *  @discussion The function treats q0 ... q3 as control points and uses slerp
+ *  in place of lerp in the De Castlejeau algorithm. The endpoints of
+ *  interpolation are thus q0 and q3, and the curve will not generally pass
+ *  through q1 or q2. Note that the convex hull property of "standard" Bezier
+ *  curve does not hold on the sphere.                                        */
+static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t);
+  
+#ifdef __cplusplus
+} /* extern "C" */
+/*  MARK: - C++ double interfaces                                              */
+
+namespace simd {
+  struct quatd : ::simd_quatd {
+    /*! @abstract The identity quaternion.                                    */
+    quatd( ) : ::simd_quatd(::simd_quaternion((double4){0,0,0,1})) { }
+    
+    /*! @abstract Constructs a C++ quaternion from a C quaternion.            */
+    quatd(::simd_quatd q) : ::simd_quatd(q) { }
+    
+    /*! @abstract Constructs a quaternion from components.                    */
+    quatd(double ix, double iy, double iz, double r) : ::simd_quatd(::simd_quaternion(ix, iy, iz, r)) { }
+    
+    /*! @abstract Constructs a quaternion from an array of scalars.           */
+    quatd(const double xyzr[4]) : ::simd_quatd(::simd_quaternion(xyzr)) { }
+    
+    /*! @abstract Constructs a quaternion from a vector.                      */
+    quatd(double4 xyzr) : ::simd_quatd(::simd_quaternion(xyzr)) { }
+    
+    /*! @abstract Quaternion representing rotation about `axis` by `angle` 
+     *  radians.                                                              */
+    quatd(double angle, double3 axis) : ::simd_quatd(::simd_quaternion(angle, axis)) { }
+    
+    /*! @abstract Quaternion that rotates `from` into `to`.                   */
+    quatd(double3 from, double3 to) : ::simd_quatd(::simd_quaternion(from, to)) { }
+    
+    /*! @abstract Constructs a quaternion from a rotation matrix.             */
+    quatd(::simd_double3x3 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { }
+    
+    /*! @abstract Constructs a quaternion from a rotation matrix.             */
+    quatd(::simd_double4x4 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { }
+  
+    /*! @abstract The real (scalar) part of the quaternion.                   */
+    double real(void) const { return ::simd_real(*this); }
+    
+    /*! @abstract The imaginary (vector) part of the quaternion.              */
+    double3 imag(void) const { return ::simd_imag(*this); }
+    
+    /*! @abstract The angle the quaternion rotates by.                        */
+    double angle(void) const { return ::simd_angle(*this); }
+    
+    /*! @abstract The axis the quaternion rotates about.                      */
+    double3 axis(void) const { return ::simd_axis(*this); }
+    
+    /*! @abstract The length of the quaternion.                               */
+    double length(void) const { return ::simd_length(*this); }
+    
+    /*! @abstract Act on the vector `v` by rotation.                          */
+    double3  operator()(const ::simd_double3 v) const { return ::simd_act(*this, v); }
+  };
+  
+  static SIMD_CPPFUNC quatd operator+(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_add(p, q); }
+  static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_sub(p, q); }
+  static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p) { return ::simd_negate(p); }
+  static SIMD_CPPFUNC quatd operator*(const double r, const ::simd_quatd p) { return ::simd_mul(r, p); }
+  static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const double r) { return ::simd_mul(p, r); }
+  static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, q); }
+  static SIMD_CPPFUNC quatd operator/(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, ::simd_inverse(q)); }
+  static SIMD_CPPFUNC quatd operator+=(quatd &p, const ::simd_quatd q) { return p = p+q; }
+  static SIMD_CPPFUNC quatd operator-=(quatd &p, const ::simd_quatd q) { return p = p-q; }
+  static SIMD_CPPFUNC quatd operator*=(quatd &p, const double r) { return p = p*r; }
+  static SIMD_CPPFUNC quatd operator*=(quatd &p, const ::simd_quatd q) { return p = p*q; }
+  static SIMD_CPPFUNC quatd operator/=(quatd &p, const ::simd_quatd q) { return p = p/q; }
+  
+  /*! @abstract The conjugate of the quaternion `q`.                          */
+  static SIMD_CPPFUNC quatd conjugate(const ::simd_quatd p) { return ::simd_conjugate(p); }
+  
+  /*! @abstract The (multiplicative) inverse of the quaternion `q`.           */
+  static SIMD_CPPFUNC quatd inverse(const ::simd_quatd p) { return ::simd_inverse(p); }
+
+  /*! @abstract The dot product of the quaternions `p` and `q` interpreted as
+   *  four-dimensional vectors.                                               */
+  static SIMD_CPPFUNC double dot(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_dot(p, q); }
+  
+  /*! @abstract The unit quaternion obtained by normalizing `q`.              */
+  static SIMD_CPPFUNC quatd normalize(const ::simd_quatd p) { return ::simd_normalize(p); }
+
+  /*! @abstract logarithm of the quaternion `q`.                              */
+  static SIMD_CPPFUNC quatd log(const ::simd_quatd q) { return ::__tg_log(q); }
+
+  /*! @abstract exponential map of quaterion `q`.                             */
+  static SIMD_CPPFUNC quatd exp(const ::simd_quatd q) { return ::__tg_exp(q); }
+  
+  /*! @abstract Spherical linear interpolation along the shortest arc between
+   *  quaternions `q0` and `q1`.                                              */
+  static SIMD_CPPFUNC quatd slerp(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp(p0, p1, t); }
+  
+  /*! @abstract Spherical linear interpolation along the longest arc between
+   *  quaternions `q0` and `q1`.                                              */
+  static SIMD_CPPFUNC quatd slerp_longest(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp_longest(p0, p1, t); }
+  
+  /*! @abstract Interpolate between quaternions along a spherical cubic spline.
+   *
+   *  @discussion The function interpolates between q1 and q2. q0 is the left
+   *  endpoint of the previous interval, and q3 is the right endpoint of the next
+   *  interval. Use this function to smoothly interpolate between a sequence of
+   *  rotations.                                                              */
+  static SIMD_CPPFUNC quatd spline(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_spline(p0, p1, p2, p3, t); }
+  
+  /*! @abstract Spherical cubic Bezier interpolation between quaternions.
+   *
+   *  @discussion The function treats q0 ... q3 as control points and uses slerp
+   *  in place of lerp in the De Castlejeau algorithm. The endpoints of
+   *  interpolation are thus q0 and q3, and the curve will not generally pass
+   *  through q1 or q2. Note that the convex hull property of "standard" Bezier
+   *  curve does not hold on the sphere.                                      */
+  static SIMD_CPPFUNC quatd bezier(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_bezier(p0, p1, p2, p3, t); }
+}
+
+extern "C" {
+#endif /* __cplusplus */
+  
+/*  MARK: - double implementations                                             */
+
+#include <simd/math.h>
+#include <simd/geometry.h>
+  
+/*  tg_promote is implementation gobbledygook that enables the compile-time
+ *  dispatching in tgmath.h to work its magic.                                */
+static simd_quatd __attribute__((__overloadable__)) __tg_promote(simd_quatd);
+  
+/*! @abstract Constructs a quaternion from imaginary and real parts.
+ *  @discussion This function is hidden behind an underscore to avoid confusion
+ *  with the angle-axis constructor.                                          */
+static inline SIMD_CFUNC simd_quatd _simd_quaternion(simd_double3 imag, double real) {
+  return simd_quaternion(simd_make_double4(imag, real));
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis) {
+  return _simd_quaternion(sin(angle/2) * axis, cos(angle/2));
+}
+  
+static inline SIMD_CFUNC double simd_angle(simd_quatd q) {
+  return 2*atan2(simd_length(q.vector.xyz), q.vector.w);
+}
+  
+static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q) {
+  return simd_normalize(q.vector.xyz);
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q) {
+  return simd_quaternion(p.vector + q.vector);
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q) {
+  return simd_quaternion(p.vector - q.vector);
+}
+
+static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q) {
+  #pragma STDC FP_CONTRACT ON
+  return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) +
+                          p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) +
+                         (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) +
+                          p.vector.w * q.vector));
+}
+
+static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a) {
+  return simd_quaternion(a * q.vector);
+}
+
+static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q) {
+  return simd_mul(q,a);
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q) {
+  return simd_quaternion(q.vector * (simd_double4){-1,-1,-1, 1});
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q) {
+  return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector)));
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q) {
+  return simd_quaternion(-q.vector);
+}
+  
+static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q) {
+  return simd_dot(p.vector, q.vector);
+}
+  
+static inline SIMD_CFUNC double simd_length(simd_quatd q) {
+  return simd_length(q.vector);
+}
+  
+static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q) {
+  double length_squared = simd_length_squared(q.vector);
+  if (length_squared == 0) {
+    return simd_quaternion((simd_double4){0,0,0,1});
+  }
+  return simd_quaternion(q.vector * simd_rsqrt(length_squared));
+}
+
+#if defined __arm__ || defined __arm64__
+/*! @abstract Multiplies the vector `v` by the quaternion `q`.
+ *  
+ *  @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation
+ *  by `q`. That operation is provided by `simd_act(q, v)`. This function is an
+ *  implementation detail and you should not call it directly. It may be
+ *  removed or modified in future versions of the simd module.                */
+static inline SIMD_CFUNC simd_quatd _simd_mul_vq(simd_double3 v, simd_quatd q) {
+  #pragma STDC FP_CONTRACT ON
+  return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) +
+                         v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) +
+                         v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6));
+}
+#endif
+  
+static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v) {
+#if defined __arm__ || defined __arm64__
+  return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz;
+#else
+  #pragma STDC FP_CONTRACT ON
+  simd_double3 t = 2*simd_cross(simd_imag(q),v);
+  return v + simd_real(q)*t + simd_cross(simd_imag(q), t);
+#endif
+}
+
+static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q) {
+  double real = __tg_log(simd_length_squared(q.vector))/2;
+  if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real);
+  simd_double3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q));
+  return _simd_quaternion(imag, real);
+}
+  
+static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q) {
+  //  angle is actually *twice* the angle of the rotation corresponding to
+  //  the resulting quaternion, which is why we don't simply use the (angle,
+  //  axis) constructor to generate `unit`.
+  double angle = simd_length(simd_imag(q));
+  if (angle == 0) return _simd_quaternion(0, exp(simd_real(q)));
+  simd_double3 axis = simd_normalize(simd_imag(q));
+  simd_quatd unit = _simd_quaternion(sin(angle)*axis, cosf(angle));
+  return simd_mul(exp(simd_real(q)), unit);
+}
+ 
+/*! @abstract Implementation detail of the `simd_quaternion(from, to)`
+ *  initializer.
+ *
+ *  @discussion Computes the quaternion rotation `from` to `to` if they are
+ *  separated by less than 90 degrees. Not numerically stable for larger
+ *  angles. This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static inline SIMD_CFUNC simd_quatd _simd_quaternion_reduced(simd_double3 from, simd_double3 to) {
+  simd_double3 half = simd_normalize(from + to);
+  return _simd_quaternion(simd_cross(from, half), simd_dot(from, half));
+}
+
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to) {
+  
+  //  If the angle between from and to is not too big, we can compute the
+  //  rotation accurately using a simple implementation.
+  if (simd_dot(from, to) >= 0) {
+    return _simd_quaternion_reduced(from, to);
+  }
+  
+  //  Because from and to are more than 90 degrees apart, we compute the
+  //  rotation in two stages (from -> half), (half -> to) to preserve numerical
+  //  accuracy.
+  simd_double3 half = from + to;
+  
+  if (simd_length_squared(half) == 0) {
+    //  half is nearly zero, so from and to point in nearly opposite directions
+    //  and the rotation is numerically underspecified. Pick an axis orthogonal
+    //  to the vectors, and use an angle of pi radians.
+    simd_double3 abs_from = simd_abs(from);
+    if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z)
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){1,0,0})), 0.f);
+    else if (abs_from.y <= abs_from.z)
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,1,0})), 0.f);
+    else
+      return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f);
+  }
+
+  //  Compute the two-step rotation.                         */
+  half = simd_normalize(half);
+  return simd_mul(_simd_quaternion_reduced(from, half),
+                  _simd_quaternion_reduced(half, to));
+}
+
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix) {
+  const simd_double3 *mat = matrix.columns;
+  double trace = mat[0][0] + mat[1][1] + mat[2][2];
+  if (trace >= 0.0) {
+    double r = 2*sqrt(1 + trace);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[1][2] - mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]),
+                           rinv*(mat[0][1] - mat[1][0]),
+                           r/4);
+  } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) {
+    double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(r/4,
+                           rinv*(mat[0][1] + mat[1][0]),
+                           rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] - mat[2][1]));
+  } else if (mat[1][1] >= mat[2][2]) {
+    double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][1] + mat[1][0]),
+                           r/4,
+                           rinv*(mat[1][2] + mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]));
+  } else {
+    double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] + mat[2][1]),
+                           r/4,
+                           rinv*(mat[0][1] - mat[1][0]));
+  }
+}
+  
+static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix) {
+  const simd_double4 *mat = matrix.columns;
+  double trace = mat[0][0] + mat[1][1] + mat[2][2];
+  if (trace >= 0.0) {
+    double r = 2*sqrt(1 + trace);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[1][2] - mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]),
+                           rinv*(mat[0][1] - mat[1][0]),
+                           r/4);
+  } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) {
+    double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(r/4,
+                           rinv*(mat[0][1] + mat[1][0]),
+                           rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] - mat[2][1]));
+  } else if (mat[1][1] >= mat[2][2]) {
+    double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][1] + mat[1][0]),
+                           r/4,
+                           rinv*(mat[1][2] + mat[2][1]),
+                           rinv*(mat[2][0] - mat[0][2]));
+  } else {
+    double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]);
+    double rinv = simd_recip(r);
+    return simd_quaternion(rinv*(mat[0][2] + mat[2][0]),
+                           rinv*(mat[1][2] + mat[2][1]),
+                           r/4,
+                           rinv*(mat[0][1] - mat[1][0]));
+  }
+}
+  
+/*! @abstract The angle between p and q interpreted as 4-dimensional vectors.
+ *
+ *  @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE double _simd_angle(simd_quatd p, simd_quatd q) {
+  return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector));
+}
+  
+/*! @abstract sin(x)/x.
+ *
+ *  @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_CFUNC double _simd_sinc(double x) {
+  if (x == 0) return 1;
+  return sin(x)/x;
+}
+ 
+/*! @abstract Spherical lerp between q0 and q1.
+ *
+ *  @discussion This function may interpolate along either the longer or
+ *  shorter path between q0 and q1; it is used as an implementation detail
+ *  in `simd_slerp` and `simd_slerp_longest`; you should use those functions
+ *  instead of calling this directly.                                         */
+static SIMD_NOINLINE simd_quatd _simd_slerp_internal(simd_quatd q0, simd_quatd q1, double t) {
+  double s = 1 - t;
+  double a = _simd_angle(q0, q1);
+  double r = simd_recip(_simd_sinc(a));
+  return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector));
+}
+  
+static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t) {
+  if (simd_dot(q0, q1) >= 0)
+    return _simd_slerp_internal(q0, q1, t);
+  return _simd_slerp_internal(q0, simd_negate(q1), t);
+}
+
+static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t) {
+  if (simd_dot(q0, q1) >= 0)
+    return _simd_slerp_internal(q0, simd_negate(q1), t);
+  return _simd_slerp_internal(q0, q1, t);
+}
+  
+/*! @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE simd_quatd _simd_intermediate(simd_quatd q0, simd_quatd q1, simd_quatd q2) {
+  simd_quatd p0 = __tg_log(simd_mul(q0, simd_inverse(q1)));
+  simd_quatd p2 = __tg_log(simd_mul(q2, simd_inverse(q1)));
+  return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2)))));
+}
+
+/*! @discussion This function is an implementation detail and you should not
+ *  call it directly. It may be removed or modified in future versions of the
+ *  simd module.                                                              */
+static SIMD_NOINLINE simd_quatd _simd_squad(simd_quatd q0, simd_quatd qa, simd_quatd qb, simd_quatd q1, double t) {
+  simd_quatd r0 = _simd_slerp_internal(q0, q1, t);
+  simd_quatd r1 = _simd_slerp_internal(qa, qb, t);
+  return _simd_slerp_internal(r0, r1, 2*t*(1 - t));
+}
+  
+static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) {
+  simd_quatd qa = _simd_intermediate(q0, q1, q2);
+  simd_quatd qb = _simd_intermediate(q1, q2, q3);
+  return _simd_squad(q1, qa, qb, q2, t);
+}
+  
+static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) {
+  simd_quatd q01 = _simd_slerp_internal(q0, q1, t);
+  simd_quatd q12 = _simd_slerp_internal(q1, q2, t);
+  simd_quatd q23 = _simd_slerp_internal(q2, q3, t);
+  simd_quatd q012 = _simd_slerp_internal(q01, q12, t);
+  simd_quatd q123 = _simd_slerp_internal(q12, q23, t);
+  return _simd_slerp_internal(q012, q123, t);
+}
+
+#ifdef __cplusplus
+}      /* extern "C"  */
+#endif /* __cplusplus */
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* SIMD_QUATERNIONS */
\ No newline at end of file
lib/libc/include/any-macos.11-any/simd/vector_make.h
@@ -0,0 +1,6768 @@
+/*! @header
+ *  This header defines functions for constructing, extending, and truncating
+ *  simd vector types.
+ *
+ *  For each vector type `simd_typeN` supported by <simd/simd.h>, the following
+ *  constructors are provided:
+ *
+ *  ~~~
+ *  simd_typeN simd_make_typeN(type other);
+ *  simd_typeN simd_make_typeN(simd_typeM other);
+ *  ~~~
+ *  For the scalar-input version, or if M < N, these functions zero-extend
+ *  `other` to produce a wider vector. If M == N, `other` is passed through
+ *  unmodified. If `M > N`, `other` is truncated to form the result.
+ *
+ *  ~~~
+ *  simd_typeN simd_make_typeN_undef(type other);
+ *  simd_typeN simd_make_typeN_undef(simd_typeM other);
+ *  ~~~
+ *  These functions are only available for M < N and for scalar inputs. They 
+ *  extend `other` to produce a wider vector where the contents of the newly-
+ *  formed lanes are undefined.
+ *
+ *  In addition, if N is 2, 3, or 4, the following constructors are available:
+ *  ~~~
+ *  simd_make_typeN(parts ...)
+ *  ~~~
+ *  where parts is a list of scalars and smaller vectors such that the sum of
+ *  the number of lanes in the arguments is equal to N. For example, a
+ *  `simd_float3` can be constructed from three `floats`, or a `float` and a
+ *  `simd_float2` in any order:
+ *  ~~~
+ *  simd_float2 ab = { 1, 2 };
+ *  simd_float3 vector = simd_make_float3(ab, 3);
+ *  ~~~
+ *
+ *  @copyright 2014-2016 Apple, Inc. All rights reserved.
+ *  @unsorted                                                                 */
+
+#ifndef SIMD_VECTOR_CONSTRUCTORS
+#define SIMD_VECTOR_CONSTRUCTORS
+
+#include <simd/vector_types.h>
+#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(char x, char y) {
+  simd_char2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(char other) {
+  simd_char2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char2 simd_make_char2_undef(char other) {
+  simd_char2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char16 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char32 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char64 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, char y, char z) {
+  simd_char3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, simd_char2 yz) {
+  simd_char3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 xy, char z) {
+  simd_char3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(char other) {
+  simd_char3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(char other) {
+  simd_char3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 other) {
+  simd_char3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(simd_char2 other) {
+  simd_char3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char32 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char64 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, char z, char w) {
+  simd_char4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, simd_char2 zw) {
+  simd_char4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char2 yz, char w) {
+  simd_char4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, char z, char w) {
+  simd_char4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char3 yzw) {
+  simd_char4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, simd_char2 zw) {
+  simd_char4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 xyz, char w) {
+  simd_char4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(char other) {
+  simd_char4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(char other) {
+  simd_char4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 other) {
+  simd_char4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char2 other) {
+  simd_char4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 other) {
+  simd_char4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char3 other) {
+  simd_char4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char32 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char64 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 lo, simd_char4 hi) {
+  simd_char8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(char other) {
+  simd_char8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(char other) {
+  simd_char8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char2 other) {
+  simd_char8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char2 other) {
+  simd_char8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char3 other) {
+  simd_char8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char3 other) {
+  simd_char8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 other) {
+  simd_char8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char4 other) {
+  simd_char8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char16 other) {
+  return simd_make_char8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char32 other) {
+  return simd_make_char8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char64 other) {
+  return simd_make_char8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 lo, simd_char8 hi) {
+  simd_char16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(char other) {
+  simd_char16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(char other) {
+  simd_char16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char2 other) {
+  simd_char16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char2 other) {
+  simd_char16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char3 other) {
+  simd_char16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char3 other) {
+  simd_char16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char4 other) {
+  simd_char16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char4 other) {
+  simd_char16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 other) {
+  simd_char16 result = 0;
+  result.lo = simd_make_char8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char8 other) {
+  simd_char16 result;
+  result.lo = simd_make_char8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char16 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char32 other) {
+  return simd_make_char16(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char64 other) {
+  return simd_make_char16(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 lo, simd_char16 hi) {
+  simd_char32 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(char other) {
+  simd_char32 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(char other) {
+  simd_char32 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char2 other) {
+  simd_char32 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char2 other) {
+  simd_char32 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char3 other) {
+  simd_char32 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char3 other) {
+  simd_char32 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char4 other) {
+  simd_char32 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char4 other) {
+  simd_char32 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char8 other) {
+  simd_char32 result = 0;
+  result.lo = simd_make_char16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char8 other) {
+  simd_char32 result;
+  result.lo = simd_make_char16(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 other) {
+  simd_char32 result = 0;
+  result.lo = simd_make_char16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char16 other) {
+  simd_char32 result;
+  result.lo = simd_make_char16(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char32 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char64 other) {
+  return simd_make_char32(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 lo, simd_char32 hi) {
+  simd_char64 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(char other) {
+  simd_char64 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(char other) {
+  simd_char64 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char2 other) {
+  simd_char64 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char2 other) {
+  simd_char64 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char3 other) {
+  simd_char64 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char3 other) {
+  simd_char64 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char4 other) {
+  simd_char64 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char4 other) {
+  simd_char64 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char8 other) {
+  simd_char64 result = 0;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char8 other) {
+  simd_char64 result;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char16 other) {
+  simd_char64 result = 0;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char16 other) {
+  simd_char64 result;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 other) {
+  simd_char64 result = 0;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char32 other) {
+  simd_char64 result;
+  result.lo = simd_make_char32(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char64 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char x, unsigned char y) {
+  simd_uchar2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char other) {
+  simd_uchar2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2_undef(unsigned char other) {
+  simd_uchar2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar16 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar32 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar64 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, unsigned char y, unsigned char z) {
+  simd_uchar3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, simd_uchar2 yz) {
+  simd_uchar3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 xy, unsigned char z) {
+  simd_uchar3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char other) {
+  simd_uchar3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(unsigned char other) {
+  simd_uchar3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 other) {
+  simd_uchar3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(simd_uchar2 other) {
+  simd_uchar3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar32 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar64 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) {
+  simd_uchar4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, simd_uchar2 zw) {
+  simd_uchar4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar2 yz, unsigned char w) {
+  simd_uchar4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, unsigned char z, unsigned char w) {
+  simd_uchar4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar3 yzw) {
+  simd_uchar4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, simd_uchar2 zw) {
+  simd_uchar4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 xyz, unsigned char w) {
+  simd_uchar4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char other) {
+  simd_uchar4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(unsigned char other) {
+  simd_uchar4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 other) {
+  simd_uchar4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar2 other) {
+  simd_uchar4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 other) {
+  simd_uchar4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar3 other) {
+  simd_uchar4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar32 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar64 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 lo, simd_uchar4 hi) {
+  simd_uchar8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(unsigned char other) {
+  simd_uchar8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(unsigned char other) {
+  simd_uchar8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar2 other) {
+  simd_uchar8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar2 other) {
+  simd_uchar8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar3 other) {
+  simd_uchar8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar3 other) {
+  simd_uchar8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 other) {
+  simd_uchar8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar4 other) {
+  simd_uchar8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar16 other) {
+  return simd_make_uchar8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar32 other) {
+  return simd_make_uchar8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar64 other) {
+  return simd_make_uchar8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 lo, simd_uchar8 hi) {
+  simd_uchar16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(unsigned char other) {
+  simd_uchar16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(unsigned char other) {
+  simd_uchar16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar2 other) {
+  simd_uchar16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar2 other) {
+  simd_uchar16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar3 other) {
+  simd_uchar16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar3 other) {
+  simd_uchar16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar4 other) {
+  simd_uchar16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar4 other) {
+  simd_uchar16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 other) {
+  simd_uchar16 result = 0;
+  result.lo = simd_make_uchar8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar8 other) {
+  simd_uchar16 result;
+  result.lo = simd_make_uchar8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar16 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar32 other) {
+  return simd_make_uchar16(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar64 other) {
+  return simd_make_uchar16(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 lo, simd_uchar16 hi) {
+  simd_uchar32 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(unsigned char other) {
+  simd_uchar32 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(unsigned char other) {
+  simd_uchar32 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar2 other) {
+  simd_uchar32 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar2 other) {
+  simd_uchar32 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar3 other) {
+  simd_uchar32 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar3 other) {
+  simd_uchar32 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar4 other) {
+  simd_uchar32 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar4 other) {
+  simd_uchar32 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar8 other) {
+  simd_uchar32 result = 0;
+  result.lo = simd_make_uchar16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar8 other) {
+  simd_uchar32 result;
+  result.lo = simd_make_uchar16(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 other) {
+  simd_uchar32 result = 0;
+  result.lo = simd_make_uchar16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar16 other) {
+  simd_uchar32 result;
+  result.lo = simd_make_uchar16(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar32 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of thirty-two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar64 other) {
+  return simd_make_uchar32(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 lo, simd_uchar32 hi) {
+  simd_uchar64 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(unsigned char other) {
+  simd_uchar64 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(unsigned char other) {
+  simd_uchar64 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar2 other) {
+  simd_uchar64 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar2 other) {
+  simd_uchar64 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar3 other) {
+  simd_uchar64 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar3 other) {
+  simd_uchar64 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar4 other) {
+  simd_uchar64 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar4 other) {
+  simd_uchar64 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar8 other) {
+  simd_uchar64 result = 0;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar8 other) {
+  simd_uchar64 result;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar16 other) {
+  simd_uchar64 result = 0;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar16 other) {
+  simd_uchar64 result;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 other) {
+  simd_uchar64 result = 0;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar32 other) {
+  simd_uchar64 result;
+  result.lo = simd_make_uchar32(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar64 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(short x, short y) {
+  simd_short2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(short other) {
+  simd_short2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short2 simd_make_short2_undef(short other) {
+  simd_short2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short16 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short32 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, short y, short z) {
+  simd_short3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, simd_short2 yz) {
+  simd_short3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 xy, short z) {
+  simd_short3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(short other) {
+  simd_short3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(short other) {
+  simd_short3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 other) {
+  simd_short3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(simd_short2 other) {
+  simd_short3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short32 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  16-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, short z, short w) {
+  simd_short4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, simd_short2 zw) {
+  simd_short4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short2 yz, short w) {
+  simd_short4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, short z, short w) {
+  simd_short4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short3 yzw) {
+  simd_short4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, simd_short2 zw) {
+  simd_short4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 xyz, short w) {
+  simd_short4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(short other) {
+  simd_short4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(short other) {
+  simd_short4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 other) {
+  simd_short4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short2 other) {
+  simd_short4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 other) {
+  simd_short4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short3 other) {
+  simd_short4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short32 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 lo, simd_short4 hi) {
+  simd_short8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(short other) {
+  simd_short8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(short other) {
+  simd_short8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short2 other) {
+  simd_short8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short2 other) {
+  simd_short8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short3 other) {
+  simd_short8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short3 other) {
+  simd_short8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 other) {
+  simd_short8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short4 other) {
+  simd_short8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short16 other) {
+  return simd_make_short8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short32 other) {
+  return simd_make_short8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 lo, simd_short8 hi) {
+  simd_short16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(short other) {
+  simd_short16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(short other) {
+  simd_short16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short2 other) {
+  simd_short16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short2 other) {
+  simd_short16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short3 other) {
+  simd_short16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short3 other) {
+  simd_short16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short4 other) {
+  simd_short16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short4 other) {
+  simd_short16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 other) {
+  simd_short16 result = 0;
+  result.lo = simd_make_short8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short8 other) {
+  simd_short16 result;
+  result.lo = simd_make_short8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short16 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short32 other) {
+  return simd_make_short16(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  16-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 lo, simd_short16 hi) {
+  simd_short32 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(short other) {
+  simd_short32 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(short other) {
+  simd_short32 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short2 other) {
+  simd_short32 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short2 other) {
+  simd_short32 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short3 other) {
+  simd_short32 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short3 other) {
+  simd_short32 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short4 other) {
+  simd_short32 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short4 other) {
+  simd_short32 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short8 other) {
+  simd_short32 result = 0;
+  result.lo = simd_make_short16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short8 other) {
+  simd_short32 result;
+  result.lo = simd_make_short16(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 other) {
+  simd_short32 result = 0;
+  result.lo = simd_make_short16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short16 other) {
+  simd_short32 result;
+  result.lo = simd_make_short16(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short32 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short x, unsigned short y) {
+  simd_ushort2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short other) {
+  simd_ushort2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2_undef(unsigned short other) {
+  simd_ushort2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort16 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort32 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, unsigned short y, unsigned short z) {
+  simd_ushort3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, simd_ushort2 yz) {
+  simd_ushort3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 xy, unsigned short z) {
+  simd_ushort3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short other) {
+  simd_ushort3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(unsigned short other) {
+  simd_ushort3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 other) {
+  simd_ushort3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(simd_ushort2 other) {
+  simd_ushort3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort32 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  16-bit unsigned integers.                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) {
+  simd_ushort4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, simd_ushort2 zw) {
+  simd_ushort4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort2 yz, unsigned short w) {
+  simd_ushort4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, unsigned short z, unsigned short w) {
+  simd_ushort4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort3 yzw) {
+  simd_ushort4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, simd_ushort2 zw) {
+  simd_ushort4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 xyz, unsigned short w) {
+  simd_ushort4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short other) {
+  simd_ushort4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(unsigned short other) {
+  simd_ushort4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 other) {
+  simd_ushort4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort2 other) {
+  simd_ushort4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 other) {
+  simd_ushort4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort3 other) {
+  simd_ushort4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort32 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 lo, simd_ushort4 hi) {
+  simd_ushort8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(unsigned short other) {
+  simd_ushort8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(unsigned short other) {
+  simd_ushort8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort2 other) {
+  simd_ushort8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort2 other) {
+  simd_ushort8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort3 other) {
+  simd_ushort8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort3 other) {
+  simd_ushort8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 other) {
+  simd_ushort8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort4 other) {
+  simd_ushort8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort16 other) {
+  return simd_make_ushort8(other.lo);
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort32 other) {
+  return simd_make_ushort8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 lo, simd_ushort8 hi) {
+  simd_ushort16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(unsigned short other) {
+  simd_ushort16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(unsigned short other) {
+  simd_ushort16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort2 other) {
+  simd_ushort16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort2 other) {
+  simd_ushort16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort3 other) {
+  simd_ushort16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort3 other) {
+  simd_ushort16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort4 other) {
+  simd_ushort16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort4 other) {
+  simd_ushort16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 other) {
+  simd_ushort16 result = 0;
+  result.lo = simd_make_ushort8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort8 other) {
+  simd_ushort16 result;
+  result.lo = simd_make_ushort8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort16 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of sixteen 16-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort32 other) {
+  return simd_make_ushort16(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  16-bit unsigned integers.                                                 */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 lo, simd_ushort16 hi) {
+  simd_ushort32 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(unsigned short other) {
+  simd_ushort32 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(unsigned short other) {
+  simd_ushort32 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort2 other) {
+  simd_ushort32 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort2 other) {
+  simd_ushort32 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort3 other) {
+  simd_ushort32 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort3 other) {
+  simd_ushort32 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort4 other) {
+  simd_ushort32 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort4 other) {
+  simd_ushort32 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort8 other) {
+  simd_ushort32 result = 0;
+  result.lo = simd_make_ushort16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort8 other) {
+  simd_ushort32 result;
+  result.lo = simd_make_ushort16(other);
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 other) {
+  simd_ushort32 result = 0;
+  result.lo = simd_make_ushort16(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort16 other) {
+  simd_ushort32 result;
+  result.lo = simd_make_ushort16(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort32 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(int x, int y) {
+  simd_int2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(int other) {
+  simd_int2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int2 simd_make_int2_undef(int other) {
+  simd_int2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int16 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, int y, int z) {
+  simd_int3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, simd_int2 yz) {
+  simd_int3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 xy, int z) {
+  simd_int3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(int other) {
+  simd_int3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(int other) {
+  simd_int3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 other) {
+  simd_int3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(simd_int2 other) {
+  simd_int3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, int z, int w) {
+  simd_int4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, simd_int2 zw) {
+  simd_int4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int2 yz, int w) {
+  simd_int4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, int z, int w) {
+  simd_int4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int3 yzw) {
+  simd_int4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, simd_int2 zw) {
+  simd_int4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 xyz, int w) {
+  simd_int4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(int other) {
+  simd_int4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(int other) {
+  simd_int4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 other) {
+  simd_int4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int2 other) {
+  simd_int4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 other) {
+  simd_int4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int3 other) {
+  simd_int4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 lo, simd_int4 hi) {
+  simd_int8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(int other) {
+  simd_int8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(int other) {
+  simd_int8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int2 other) {
+  simd_int8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int2 other) {
+  simd_int8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int3 other) {
+  simd_int8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int3 other) {
+  simd_int8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 other) {
+  simd_int8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int4 other) {
+  simd_int8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int16 other) {
+  return simd_make_int8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 lo, simd_int8 hi) {
+  simd_int16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(int other) {
+  simd_int16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(int other) {
+  simd_int16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int2 other) {
+  simd_int16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int2 other) {
+  simd_int16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int3 other) {
+  simd_int16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int3 other) {
+  simd_int16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int4 other) {
+  simd_int16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int4 other) {
+  simd_int16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 other) {
+  simd_int16 result = 0;
+  result.lo = simd_make_int8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int8 other) {
+  simd_int16 result;
+  result.lo = simd_make_int8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int16 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) {
+  simd_uint2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int other) {
+  simd_uint2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2_undef(unsigned int other) {
+  simd_uint2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint16 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, unsigned int y, unsigned int z) {
+  simd_uint3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, simd_uint2 yz) {
+  simd_uint3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 xy, unsigned int z) {
+  simd_uint3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int other) {
+  simd_uint3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(unsigned int other) {
+  simd_uint3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 other) {
+  simd_uint3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(simd_uint2 other) {
+  simd_uint3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit unsigned integers.                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) {
+  simd_uint4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, simd_uint2 zw) {
+  simd_uint4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint2 yz, unsigned int w) {
+  simd_uint4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, unsigned int z, unsigned int w) {
+  simd_uint4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint3 yzw) {
+  simd_uint4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, simd_uint2 zw) {
+  simd_uint4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 xyz, unsigned int w) {
+  simd_uint4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int other) {
+  simd_uint4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(unsigned int other) {
+  simd_uint4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 other) {
+  simd_uint4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint2 other) {
+  simd_uint4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 other) {
+  simd_uint4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint3 other) {
+  simd_uint4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 lo, simd_uint4 hi) {
+  simd_uint8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(unsigned int other) {
+  simd_uint8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(unsigned int other) {
+  simd_uint8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint2 other) {
+  simd_uint8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint2 other) {
+  simd_uint8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint3 other) {
+  simd_uint8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint3 other) {
+  simd_uint8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 other) {
+  simd_uint8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint4 other) {
+  simd_uint8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 32-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint16 other) {
+  return simd_make_uint8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 lo, simd_uint8 hi) {
+  simd_uint16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(unsigned int other) {
+  simd_uint16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(unsigned int other) {
+  simd_uint16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint2 other) {
+  simd_uint16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint2 other) {
+  simd_uint16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint3 other) {
+  simd_uint16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint3 other) {
+  simd_uint16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint4 other) {
+  simd_uint16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint4 other) {
+  simd_uint16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 other) {
+  simd_uint16 result = 0;
+  result.lo = simd_make_uint8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint8 other) {
+  simd_uint16 result;
+  result.lo = simd_make_uint8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint16 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(float x, float y) {
+  simd_float2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(float other) {
+  simd_float2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_float2 simd_make_float2_undef(float other) {
+  simd_float2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float8 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float16 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, float y, float z) {
+  simd_float3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, simd_float2 yz) {
+  simd_float3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 xy, float z) {
+  simd_float3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(float other) {
+  simd_float3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(float other) {
+  simd_float3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 other) {
+  simd_float3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(simd_float2 other) {
+  simd_float3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float16 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit floating-point numbers.                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, float z, float w) {
+  simd_float4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, simd_float2 zw) {
+  simd_float4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float2 yz, float w) {
+  simd_float4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, float z, float w) {
+  simd_float4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float3 yzw) {
+  simd_float4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, simd_float2 zw) {
+  simd_float4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 xyz, float w) {
+  simd_float4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(float other) {
+  simd_float4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(float other) {
+  simd_float4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 other) {
+  simd_float4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float2 other) {
+  simd_float4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 other) {
+  simd_float4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float3 other) {
+  simd_float4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float16 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 lo, simd_float4 hi) {
+  simd_float8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(float other) {
+  simd_float8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(float other) {
+  simd_float8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float2 other) {
+  simd_float8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float2 other) {
+  simd_float8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float3 other) {
+  simd_float8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float3 other) {
+  simd_float8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 other) {
+  simd_float8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float4 other) {
+  simd_float8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float8 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of eight 32-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float16 other) {
+  return simd_make_float8(other.lo);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 lo, simd_float8 hi) {
+  simd_float16 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(float other) {
+  simd_float16 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(float other) {
+  simd_float16 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float2 other) {
+  simd_float16 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float2 other) {
+  simd_float16 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float3 other) {
+  simd_float16 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float3 other) {
+  simd_float16 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float4 other) {
+  simd_float16 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float4 other) {
+  simd_float16 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 other) {
+  simd_float16 result = 0;
+  result.lo = simd_make_float8(other);
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float8 other) {
+  simd_float16 result;
+  result.lo = simd_make_float8(other);
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float16 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 x, simd_long1 y) {
+  simd_long2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 other) {
+  simd_long2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long2 simd_make_long2_undef(simd_long1 other) {
+  simd_long2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos-
+ *  complement) integers.                                                     */
+static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long8 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long1 y, simd_long1 z) {
+  simd_long3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long2 yz) {
+  simd_long3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 xy, simd_long1 z) {
+  simd_long3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 other) {
+  simd_long3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long1 other) {
+  simd_long3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 other) {
+  simd_long3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long2 other) {
+  simd_long3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long1 z, simd_long1 w) {
+  simd_long4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long2 zw) {
+  simd_long4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long2 yz, simd_long1 w) {
+  simd_long4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long1 z, simd_long1 w) {
+  simd_long4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long3 yzw) {
+  simd_long4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long2 zw) {
+  simd_long4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 xyz, simd_long1 w) {
+  simd_long4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 other) {
+  simd_long4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long1 other) {
+  simd_long4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 other) {
+  simd_long4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long2 other) {
+  simd_long4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 other) {
+  simd_long4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long3 other) {
+  simd_long4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 lo, simd_long4 hi) {
+  simd_long8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long1 other) {
+  simd_long8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long1 other) {
+  simd_long8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long2 other) {
+  simd_long8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long2 other) {
+  simd_long8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long3 other) {
+  simd_long8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long3 other) {
+  simd_long8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 other) {
+  simd_long8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long4 other) {
+  simd_long8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long8 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 x, simd_ulong1 y) {
+  simd_ulong2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 other) {
+  simd_ulong2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2_undef(simd_ulong1 other) {
+  simd_ulong2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong8 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z) {
+  simd_ulong3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong2 yz) {
+  simd_ulong3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 xy, simd_ulong1 z) {
+  simd_ulong3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 other) {
+  simd_ulong3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong1 other) {
+  simd_ulong3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 other) {
+  simd_ulong3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong2 other) {
+  simd_ulong3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit unsigned integers.                                                 */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z, simd_ulong1 w) {
+  simd_ulong4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong2 zw) {
+  simd_ulong4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong2 yz, simd_ulong1 w) {
+  simd_ulong4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong1 z, simd_ulong1 w) {
+  simd_ulong4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong3 yzw) {
+  simd_ulong4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong2 zw) {
+  simd_ulong4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 xyz, simd_ulong1 w) {
+  simd_ulong4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 other) {
+  simd_ulong4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong1 other) {
+  simd_ulong4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 other) {
+  simd_ulong4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong2 other) {
+  simd_ulong4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 other) {
+  simd_ulong4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong3 other) {
+  simd_ulong4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 lo, simd_ulong4 hi) {
+  simd_ulong8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong1 other) {
+  simd_ulong8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong1 other) {
+  simd_ulong8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong2 other) {
+  simd_ulong8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong2 other) {
+  simd_ulong8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong3 other) {
+  simd_ulong8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong3 other) {
+  simd_ulong8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned
+ *  integers.                                                                 */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 other) {
+  simd_ulong8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong4 other) {
+  simd_ulong8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong8 other) {
+  return other;
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(double x, double y) {
+  simd_double2 result;
+  result.x = x;
+  result.y = y;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of two 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(double other) {
+  simd_double2 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_double2 simd_make_double2_undef(double other) {
+  simd_double2 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double2 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double3 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double4 other) {
+  return other.xy;
+}
+
+/*! @abstract Truncates `other` to form a vector of two 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double8 other) {
+  return other.xy;
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, double y, double z) {
+  simd_double3 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, simd_double2 yz) {
+  simd_double3 result;
+  result.x = x;
+  result.yz = yz;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 xy, double z) {
+  simd_double3 result;
+  result.xy = xy;
+  result.z = z;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(double other) {
+  simd_double3 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(double other) {
+  simd_double3 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 other) {
+  simd_double3 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(simd_double2 other) {
+  simd_double3 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double3 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double4 other) {
+  return other.xyz;
+}
+
+/*! @abstract Truncates `other` to form a vector of three 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double8 other) {
+  return other.xyz;
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit floating-point numbers.                                            */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, double z, double w) {
+  simd_double4 result;
+  result.x = x;
+  result.y = y;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, simd_double2 zw) {
+  simd_double4 result;
+  result.x = x;
+  result.y = y;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double2 yz, double w) {
+  simd_double4 result;
+  result.x = x;
+  result.yz = yz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, double z, double w) {
+  simd_double4 result;
+  result.xy = xy;
+  result.z = z;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double3 yzw) {
+  simd_double4 result;
+  result.x = x;
+  result.yzw = yzw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, simd_double2 zw) {
+  simd_double4 result;
+  result.xy = xy;
+  result.zw = zw;
+  return result;
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 xyz, double w) {
+  simd_double4 result;
+  result.xyz = xyz;
+  result.w = w;
+  return result;
+}
+  
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(double other) {
+  simd_double4 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(double other) {
+  simd_double4 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 other) {
+  simd_double4 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double2 other) {
+  simd_double4 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 other) {
+  simd_double4 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double3 other) {
+  simd_double4 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double4 other) {
+  return other;
+}
+
+/*! @abstract Truncates `other` to form a vector of four 64-bit floating-
+ *  point numbers.                                                            */
+static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double8 other) {
+  return other.xyzw;
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 lo, simd_double4 hi) {
+  simd_double8 result;
+  result.lo = lo;
+  result.hi = hi;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(double other) {
+  simd_double8 result = 0;
+  result.x = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(double other) {
+  simd_double8 result;
+  result.x = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double2 other) {
+  simd_double8 result = 0;
+  result.xy = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double2 other) {
+  simd_double8 result;
+  result.xy = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double3 other) {
+  simd_double8 result = 0;
+  result.xyz = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double3 other) {
+  simd_double8 result;
+  result.xyz = other;
+  return result;
+}
+
+/*! @abstract Zero-extends `other` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 other) {
+  simd_double8 result = 0;
+  result.xyzw = other;
+  return result;
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double4 other) {
+  simd_double8 result;
+  result.xyzw = other;
+  return result;
+}
+
+/*! @abstract Returns `other` unmodified. This function is a convenience for
+ *  templated and autogenerated code.                                         */
+static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) {
+  return other;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+
+namespace simd {
+/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CPPFUNC char2 make_char2(char x, char y) {
+ return ::simd_make_char2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  8-bit signed (twos-complement) integers.                                  */
+template <typename typeN> static SIMD_CPPFUNC char2 make_char2(typeN other) {
+  return ::simd_make_char2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC char2 make_char2_undef(typeN other) {
+  return ::simd_make_char2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char3 make_char3(char x, char y, char z) {
+ return ::simd_make_char3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char3 make_char3(char x, char2 yz) {
+ return ::simd_make_char3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char3 make_char3(char2 xy, char z) {
+ return ::simd_make_char3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  8-bit signed (twos-complement) integers.                                  */
+template <typename typeN> static SIMD_CPPFUNC char3 make_char3(typeN other) {
+  return ::simd_make_char3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC char3 make_char3_undef(typeN other) {
+  return ::simd_make_char3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char z, char w) {
+ return ::simd_make_char4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char2 zw) {
+ return ::simd_make_char4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char x, char2 yz, char w) {
+ return ::simd_make_char4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char z, char w) {
+ return ::simd_make_char4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char x, char3 yzw) {
+ return ::simd_make_char4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char2 zw) {
+ return ::simd_make_char4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char4 make_char4(char3 xyz, char w) {
+ return ::simd_make_char4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  8-bit signed (twos-complement) integers.                                  */
+template <typename typeN> static SIMD_CPPFUNC char4 make_char4(typeN other) {
+  return ::simd_make_char4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC char4 make_char4_undef(typeN other) {
+  return ::simd_make_char4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char8 make_char8(char4 lo, char4 hi) {
+ return ::simd_make_char8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  8-bit signed (twos-complement) integers.                                  */
+template <typename typeN> static SIMD_CPPFUNC char8 make_char8(typeN other) {
+  return ::simd_make_char8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC char8 make_char8_undef(typeN other) {
+  return ::simd_make_char8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC char16 make_char16(char8 lo, char8 hi) {
+ return ::simd_make_char16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  8-bit signed (twos-complement) integers.                                  */
+template <typename typeN> static SIMD_CPPFUNC char16 make_char16(typeN other) {
+  return ::simd_make_char16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC char16 make_char16_undef(typeN other) {
+  return ::simd_make_char16_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CPPFUNC char32 make_char32(char16 lo, char16 hi) {
+ return ::simd_make_char32(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of thirty-
+ *  two 8-bit signed (twos-complement) integers.                              */
+template <typename typeN> static SIMD_CPPFUNC char32 make_char32(typeN other) {
+  return ::simd_make_char32(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC char32 make_char32_undef(typeN other) {
+  return ::simd_make_char32_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four
+ *  8-bit signed (twos-complement) integers.                                  */
+static inline SIMD_CPPFUNC char64 make_char64(char32 lo, char32 hi) {
+ return ::simd_make_char64(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixty-
+ *  four 8-bit signed (twos-complement) integers.                             */
+template <typename typeN> static SIMD_CPPFUNC char64 make_char64(typeN other) {
+  return ::simd_make_char64(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC char64 make_char64_undef(typeN other) {
+  return ::simd_make_char64_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar2 make_uchar2(unsigned char x, unsigned char y) {
+ return ::simd_make_uchar2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  8-bit unsigned integers.                                                  */
+template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2(typeN other) {
+  return ::simd_make_uchar2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2_undef(typeN other) {
+  return ::simd_make_uchar2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) {
+ return ::simd_make_uchar3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, uchar2 yz) {
+ return ::simd_make_uchar3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar3 make_uchar3(uchar2 xy, unsigned char z) {
+ return ::simd_make_uchar3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  8-bit unsigned integers.                                                  */
+template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3(typeN other) {
+  return ::simd_make_uchar3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3_undef(typeN other) {
+  return ::simd_make_uchar3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) {
+ return ::simd_make_uchar4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, uchar2 zw) {
+ return ::simd_make_uchar4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar2 yz, unsigned char w) {
+ return ::simd_make_uchar4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, unsigned char z, unsigned char w) {
+ return ::simd_make_uchar4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar3 yzw) {
+ return ::simd_make_uchar4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, uchar2 zw) {
+ return ::simd_make_uchar4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar3 xyz, unsigned char w) {
+ return ::simd_make_uchar4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  8-bit unsigned integers.                                                  */
+template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4(typeN other) {
+  return ::simd_make_uchar4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4_undef(typeN other) {
+  return ::simd_make_uchar4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar8 make_uchar8(uchar4 lo, uchar4 hi) {
+ return ::simd_make_uchar8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  8-bit unsigned integers.                                                  */
+template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8(typeN other) {
+  return ::simd_make_uchar8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8_undef(typeN other) {
+  return ::simd_make_uchar8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uchar16 make_uchar16(uchar8 lo, uchar8 hi) {
+ return ::simd_make_uchar16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  8-bit unsigned integers.                                                  */
+template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16(typeN other) {
+  return ::simd_make_uchar16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16_undef(typeN other) {
+  return ::simd_make_uchar16_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CPPFUNC uchar32 make_uchar32(uchar16 lo, uchar16 hi) {
+ return ::simd_make_uchar32(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of thirty-
+ *  two 8-bit unsigned integers.                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32(typeN other) {
+  return ::simd_make_uchar32(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32_undef(typeN other) {
+  return ::simd_make_uchar32_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four
+ *  8-bit unsigned integers.                                                  */
+static inline SIMD_CPPFUNC uchar64 make_uchar64(uchar32 lo, uchar32 hi) {
+ return ::simd_make_uchar64(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixty-
+ *  four 8-bit unsigned integers.                                             */
+template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64(typeN other) {
+  return ::simd_make_uchar64(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64_undef(typeN other) {
+  return ::simd_make_uchar64_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CPPFUNC short2 make_short2(short x, short y) {
+ return ::simd_make_short2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  16-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC short2 make_short2(typeN other) {
+  return ::simd_make_short2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC short2 make_short2_undef(typeN other) {
+  return ::simd_make_short2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short3 make_short3(short x, short y, short z) {
+ return ::simd_make_short3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short3 make_short3(short x, short2 yz) {
+ return ::simd_make_short3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short3 make_short3(short2 xy, short z) {
+ return ::simd_make_short3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  16-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC short3 make_short3(typeN other) {
+  return ::simd_make_short3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC short3 make_short3_undef(typeN other) {
+  return ::simd_make_short3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  16-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short z, short w) {
+ return ::simd_make_short4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short2 zw) {
+ return ::simd_make_short4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short x, short2 yz, short w) {
+ return ::simd_make_short4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short z, short w) {
+ return ::simd_make_short4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short x, short3 yzw) {
+ return ::simd_make_short4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short2 zw) {
+ return ::simd_make_short4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short4 make_short4(short3 xyz, short w) {
+ return ::simd_make_short4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  16-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC short4 make_short4(typeN other) {
+  return ::simd_make_short4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC short4 make_short4_undef(typeN other) {
+  return ::simd_make_short4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short8 make_short8(short4 lo, short4 hi) {
+ return ::simd_make_short8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  16-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC short8 make_short8(typeN other) {
+  return ::simd_make_short8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC short8 make_short8_undef(typeN other) {
+  return ::simd_make_short8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC short16 make_short16(short8 lo, short8 hi) {
+ return ::simd_make_short16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  16-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC short16 make_short16(typeN other) {
+  return ::simd_make_short16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC short16 make_short16_undef(typeN other) {
+  return ::simd_make_short16_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  16-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CPPFUNC short32 make_short32(short16 lo, short16 hi) {
+ return ::simd_make_short32(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of thirty-
+ *  two 16-bit signed (twos-complement) integers.                             */
+template <typename typeN> static SIMD_CPPFUNC short32 make_short32(typeN other) {
+  return ::simd_make_short32(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC short32 make_short32_undef(typeN other) {
+  return ::simd_make_short32_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort2 make_ushort2(unsigned short x, unsigned short y) {
+ return ::simd_make_ushort2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  16-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2(typeN other) {
+  return ::simd_make_ushort2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2_undef(typeN other) {
+  return ::simd_make_ushort2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) {
+ return ::simd_make_ushort3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, ushort2 yz) {
+ return ::simd_make_ushort3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort3 make_ushort3(ushort2 xy, unsigned short z) {
+ return ::simd_make_ushort3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  16-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3(typeN other) {
+  return ::simd_make_ushort3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3_undef(typeN other) {
+  return ::simd_make_ushort3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  16-bit unsigned integers.                                                 */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) {
+ return ::simd_make_ushort4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, ushort2 zw) {
+ return ::simd_make_ushort4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort2 yz, unsigned short w) {
+ return ::simd_make_ushort4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, unsigned short z, unsigned short w) {
+ return ::simd_make_ushort4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort3 yzw) {
+ return ::simd_make_ushort4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, ushort2 zw) {
+ return ::simd_make_ushort4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort3 xyz, unsigned short w) {
+ return ::simd_make_ushort4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  16-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4(typeN other) {
+  return ::simd_make_ushort4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4_undef(typeN other) {
+  return ::simd_make_ushort4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort8 make_ushort8(ushort4 lo, ushort4 hi) {
+ return ::simd_make_ushort8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  16-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8(typeN other) {
+  return ::simd_make_ushort8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8_undef(typeN other) {
+  return ::simd_make_ushort8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ushort16 make_ushort16(ushort8 lo, ushort8 hi) {
+ return ::simd_make_ushort16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  16-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16(typeN other) {
+  return ::simd_make_ushort16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16_undef(typeN other) {
+  return ::simd_make_ushort16_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two
+ *  16-bit unsigned integers.                                                 */
+static inline SIMD_CPPFUNC ushort32 make_ushort32(ushort16 lo, ushort16 hi) {
+ return ::simd_make_ushort32(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of thirty-
+ *  two 16-bit unsigned integers.                                             */
+template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32(typeN other) {
+  return ::simd_make_ushort32(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32_undef(typeN other) {
+  return ::simd_make_ushort32_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CPPFUNC int2 make_int2(int x, int y) {
+ return ::simd_make_int2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  32-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC int2 make_int2(typeN other) {
+  return ::simd_make_int2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC int2 make_int2_undef(typeN other) {
+  return ::simd_make_int2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int3 make_int3(int x, int y, int z) {
+ return ::simd_make_int3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int3 make_int3(int x, int2 yz) {
+ return ::simd_make_int3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int3 make_int3(int2 xy, int z) {
+ return ::simd_make_int3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  32-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC int3 make_int3(typeN other) {
+  return ::simd_make_int3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC int3 make_int3_undef(typeN other) {
+  return ::simd_make_int3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int z, int w) {
+ return ::simd_make_int4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int2 zw) {
+ return ::simd_make_int4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int x, int2 yz, int w) {
+ return ::simd_make_int4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int z, int w) {
+ return ::simd_make_int4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int x, int3 yzw) {
+ return ::simd_make_int4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int2 zw) {
+ return ::simd_make_int4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int4 make_int4(int3 xyz, int w) {
+ return ::simd_make_int4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  32-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC int4 make_int4(typeN other) {
+  return ::simd_make_int4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC int4 make_int4_undef(typeN other) {
+  return ::simd_make_int4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int8 make_int8(int4 lo, int4 hi) {
+ return ::simd_make_int8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  32-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC int8 make_int8(typeN other) {
+  return ::simd_make_int8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC int8 make_int8_undef(typeN other) {
+  return ::simd_make_int8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC int16 make_int16(int8 lo, int8 hi) {
+ return ::simd_make_int16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  32-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC int16 make_int16(typeN other) {
+  return ::simd_make_int16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed
+ *  (twos-complement) integers. The contents of the newly-created vector
+ *  lanes are unspecified.                                                    */
+template <typename typeN> static SIMD_CPPFUNC int16 make_int16_undef(typeN other) {
+  return ::simd_make_int16_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint2 make_uint2(unsigned int x, unsigned int y) {
+ return ::simd_make_uint2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  32-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2(typeN other) {
+  return ::simd_make_uint2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2_undef(typeN other) {
+  return ::simd_make_uint2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z) {
+ return ::simd_make_uint3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, uint2 yz) {
+ return ::simd_make_uint3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint3 make_uint3(uint2 xy, unsigned int z) {
+ return ::simd_make_uint3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  32-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3(typeN other) {
+  return ::simd_make_uint3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3_undef(typeN other) {
+  return ::simd_make_uint3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit unsigned integers.                                                 */
+static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) {
+ return ::simd_make_uint4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, uint2 zw) {
+ return ::simd_make_uint4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint2 yz, unsigned int w) {
+ return ::simd_make_uint4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, unsigned int z, unsigned int w) {
+ return ::simd_make_uint4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint3 yzw) {
+ return ::simd_make_uint4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, uint2 zw) {
+ return ::simd_make_uint4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint4 make_uint4(uint3 xyz, unsigned int w) {
+ return ::simd_make_uint4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  32-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4(typeN other) {
+  return ::simd_make_uint4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4_undef(typeN other) {
+  return ::simd_make_uint4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint8 make_uint8(uint4 lo, uint4 hi) {
+ return ::simd_make_uint8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  32-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8(typeN other) {
+  return ::simd_make_uint8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8_undef(typeN other) {
+  return ::simd_make_uint8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC uint16 make_uint16(uint8 lo, uint8 hi) {
+ return ::simd_make_uint16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  32-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16(typeN other) {
+  return ::simd_make_uint16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16_undef(typeN other) {
+  return ::simd_make_uint16_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float2 make_float2(float x, float y) {
+ return ::simd_make_float2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  32-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC float2 make_float2(typeN other) {
+  return ::simd_make_float2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+template <typename typeN> static SIMD_CPPFUNC float2 make_float2_undef(typeN other) {
+  return ::simd_make_float2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float3 make_float3(float x, float y, float z) {
+ return ::simd_make_float3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float3 make_float3(float x, float2 yz) {
+ return ::simd_make_float3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float3 make_float3(float2 xy, float z) {
+ return ::simd_make_float3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  32-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC float3 make_float3(typeN other) {
+  return ::simd_make_float3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC float3 make_float3_undef(typeN other) {
+  return ::simd_make_float3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  32-bit floating-point numbers.                                            */
+static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float z, float w) {
+ return ::simd_make_float4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float2 zw) {
+ return ::simd_make_float4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float x, float2 yz, float w) {
+ return ::simd_make_float4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float z, float w) {
+ return ::simd_make_float4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float x, float3 yzw) {
+ return ::simd_make_float4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float2 zw) {
+ return ::simd_make_float4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float4 make_float4(float3 xyz, float w) {
+ return ::simd_make_float4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  32-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC float4 make_float4(typeN other) {
+  return ::simd_make_float4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 32-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+template <typename typeN> static SIMD_CPPFUNC float4 make_float4_undef(typeN other) {
+  return ::simd_make_float4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float8 make_float8(float4 lo, float4 hi) {
+ return ::simd_make_float8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  32-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC float8 make_float8(typeN other) {
+  return ::simd_make_float8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC float8 make_float8_undef(typeN other) {
+  return ::simd_make_float8_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC float16 make_float16(float8 lo, float8 hi) {
+ return ::simd_make_float16(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen
+ *  32-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC float16 make_float16(typeN other) {
+  return ::simd_make_float16(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC float16 make_float16_undef(typeN other) {
+  return ::simd_make_float16_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed
+ *  (twos-complement) integers.                                               */
+static inline SIMD_CPPFUNC long2 make_long2(long1 x, long1 y) {
+ return ::simd_make_long2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  64-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC long2 make_long2(typeN other) {
+  return ::simd_make_long2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC long2 make_long2_undef(typeN other) {
+  return ::simd_make_long2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long3 make_long3(long1 x, long1 y, long1 z) {
+ return ::simd_make_long3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long3 make_long3(long1 x, long2 yz) {
+ return ::simd_make_long3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long3 make_long3(long2 xy, long1 z) {
+ return ::simd_make_long3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  64-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC long3 make_long3(typeN other) {
+  return ::simd_make_long3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC long3 make_long3_undef(typeN other) {
+  return ::simd_make_long3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit signed (twos-complement) integers.                                 */
+static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long1 z, long1 w) {
+ return ::simd_make_long4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long2 zw) {
+ return ::simd_make_long4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long1 x, long2 yz, long1 w) {
+ return ::simd_make_long4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long1 z, long1 w) {
+ return ::simd_make_long4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long1 x, long3 yzw) {
+ return ::simd_make_long4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long2 zw) {
+ return ::simd_make_long4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long4 make_long4(long3 xyz, long1 w) {
+ return ::simd_make_long4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  64-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC long4 make_long4(typeN other) {
+  return ::simd_make_long4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC long4 make_long4_undef(typeN other) {
+  return ::simd_make_long4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  signed (twos-complement) integers.                                        */
+static inline SIMD_CPPFUNC long8 make_long8(long4 lo, long4 hi) {
+ return ::simd_make_long8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  64-bit signed (twos-complement) integers.                                 */
+template <typename typeN> static SIMD_CPPFUNC long8 make_long8(typeN other) {
+  return ::simd_make_long8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos-
+ *  complement) integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC long8 make_long8_undef(typeN other) {
+  return ::simd_make_long8_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong2 make_ulong2(ulong1 x, ulong1 y) {
+ return ::simd_make_ulong2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  64-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2(typeN other) {
+  return ::simd_make_ulong2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2_undef(typeN other) {
+  return ::simd_make_ulong2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong1 y, ulong1 z) {
+ return ::simd_make_ulong3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong2 yz) {
+ return ::simd_make_ulong3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong2 xy, ulong1 z) {
+ return ::simd_make_ulong3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  64-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3(typeN other) {
+  return ::simd_make_ulong3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3_undef(typeN other) {
+  return ::simd_make_ulong3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit unsigned integers.                                                 */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong1 z, ulong1 w) {
+ return ::simd_make_ulong4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong2 zw) {
+ return ::simd_make_ulong4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong2 yz, ulong1 w) {
+ return ::simd_make_ulong4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong1 z, ulong1 w) {
+ return ::simd_make_ulong4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong3 yzw) {
+ return ::simd_make_ulong4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong2 zw) {
+ return ::simd_make_ulong4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong3 xyz, ulong1 w) {
+ return ::simd_make_ulong4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  64-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4(typeN other) {
+  return ::simd_make_ulong4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4_undef(typeN other) {
+  return ::simd_make_ulong4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  unsigned integers.                                                        */
+static inline SIMD_CPPFUNC ulong8 make_ulong8(ulong4 lo, ulong4 hi) {
+ return ::simd_make_ulong8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  64-bit unsigned integers.                                                 */
+template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8(typeN other) {
+  return ::simd_make_ulong8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned
+ *  integers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8_undef(typeN other) {
+  return ::simd_make_ulong8_undef(other);
+}
+
+/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double2 make_double2(double x, double y) {
+ return ::simd_make_double2(x, y);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of two
+ *  64-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC double2 make_double2(typeN other) {
+  return ::simd_make_double2(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of two 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+template <typename typeN> static SIMD_CPPFUNC double2 make_double2_undef(typeN other) {
+  return ::simd_make_double2_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double3 make_double3(double x, double y, double z) {
+ return ::simd_make_double3(x, y, z);
+}
+  
+/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double3 make_double3(double x, double2 yz) {
+ return ::simd_make_double3(x, yz);
+}
+  
+/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double3 make_double3(double2 xy, double z) {
+ return ::simd_make_double3(xy, z);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of three
+ *  64-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC double3 make_double3(typeN other) {
+  return ::simd_make_double3(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of three 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC double3 make_double3_undef(typeN other) {
+  return ::simd_make_double3_undef(other);
+}
+
+/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four
+ *  64-bit floating-point numbers.                                            */
+static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double z, double w) {
+ return ::simd_make_double4(x, y, z, w);
+}
+  
+/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double2 zw) {
+ return ::simd_make_double4(x, y, zw);
+}
+  
+/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double x, double2 yz, double w) {
+ return ::simd_make_double4(x, yz, w);
+}
+  
+/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double z, double w) {
+ return ::simd_make_double4(xy, z, w);
+}
+  
+/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double x, double3 yzw) {
+ return ::simd_make_double4(x, yzw);
+}
+  
+/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double2 zw) {
+ return ::simd_make_double4(xy, zw);
+}
+  
+/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double4 make_double4(double3 xyz, double w) {
+ return ::simd_make_double4(xyz, w);
+}
+  
+/*! @abstract Truncates or zero-extends `other` to form a vector of four
+ *  64-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC double4 make_double4(typeN other) {
+  return ::simd_make_double4(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of four 64-bit floating-point
+ *  numbers. The contents of the newly-created vector lanes are unspecified.  */
+template <typename typeN> static SIMD_CPPFUNC double4 make_double4_undef(typeN other) {
+  return ::simd_make_double4_undef(other);
+}
+
+/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit
+ *  floating-point numbers.                                                   */
+static inline SIMD_CPPFUNC double8 make_double8(double4 lo, double4 hi) {
+ return ::simd_make_double8(lo, hi);
+}
+
+/*! @abstract Truncates or zero-extends `other` to form a vector of eight
+ *  64-bit floating-point numbers.                                            */
+template <typename typeN> static SIMD_CPPFUNC double8 make_double8(typeN other) {
+  return ::simd_make_double8(other);
+}
+  
+/*! @abstract Extends `other` to form a vector of eight 64-bit floating-
+ *  point numbers. The contents of the newly-created vector lanes are
+ *  unspecified.                                                              */
+template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN other) {
+  return ::simd_make_double8_undef(other);
+}
+
+} /* namespace simd */
+#endif /* __cplusplus */
+#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
+#endif /* SIMD_VECTOR_CONSTRUCTORS */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/_types/_uintptr_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _UINTPTR_T
+#define _UINTPTR_T
+typedef unsigned long           uintptr_t;
+#endif /* _UINTPTR_T */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/_symbol_aliasing.h
@@ -341,24 +341,6 @@
 #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x)
 #endif
 
-#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150000
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) x
-#else
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x)
-#endif
-
-#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150100
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x) x
-#else
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x)
-#endif
-
-#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150200
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x) x
-#else
-#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x)
-#endif
-
 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x
 #else
@@ -573,16 +555,4 @@
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) x
 #else
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x)
-#endif
-
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120000
-#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) x
-#else
-#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x)
-#endif
-
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120100
-#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x) x
-#else
-#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x)
 #endif
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/attr.h
@@ -83,7 +83,6 @@ struct attrlist {
 	attrgroup_t fileattr;                   /* file attribute group */
 	attrgroup_t forkattr;                   /* fork attribute group */
 };
-
 #define ATTR_BIT_MAP_COUNT 5
 
 typedef struct attribute_set {
@@ -94,9 +93,6 @@ typedef struct attribute_set {
 	attrgroup_t forkattr;                   /* fork attribute group */
 } attribute_set_t;
 
-#define ATTRIBUTE_SET_INIT(a)               do {(a)->commonattr = (a)->volattr = (a)->dirattr = (a)->fileattr = (a)->forkattr = 0; } while(0)
-
-
 typedef struct attrreference {
 	int32_t     attr_dataoffset;
 	u_int32_t   attr_length;
@@ -467,13 +463,12 @@ typedef struct vol_attributes_attr {
 #define ATTR_VOL_ENCODINGSUSED                  0x00010000
 #define ATTR_VOL_CAPABILITIES                   0x00020000
 #define ATTR_VOL_UUID                           0x00040000
-#define ATTR_VOL_SPACEUSED                      0x00800000
 #define ATTR_VOL_QUOTA_SIZE                     0x10000000
 #define ATTR_VOL_RESERVED_SIZE          0x20000000
 #define ATTR_VOL_ATTRIBUTES                     0x40000000
 #define ATTR_VOL_INFO                           0x80000000
 
-#define ATTR_VOL_VALIDMASK                      0xF087FFFF
+#define ATTR_VOL_VALIDMASK                      0xF007FFFF
 
 /*
  * The list of settable ATTR_VOL_* attributes include the following:
lib/libc/include/any-macos.11-any/sys/cdefs.h
@@ -152,16 +152,8 @@
 #endif /* !NO_ANSI_KEYWORDS */
 #endif /* !(__STDC__ || __cplusplus) */
 
-/*
- * __pure2 can be used for functions that are only a function of their scalar
- * arguments (meaning they can't dereference pointers).
- *
- * __stateful_pure can be used for functions that have no side effects,
- * but depend on the state of the memory.
- */
 #define __dead2         __attribute__((__noreturn__))
 #define __pure2         __attribute__((__const__))
-#define __stateful_pure __attribute__((__pure__))
 
 /* __unused denotes variables and functions that may not be used, preventing
  * the compiler from warning about it if not used.
@@ -187,9 +179,9 @@
  * __exported_push/_exported_pop are pragmas used to delimit a range of
  *  symbols that should be exported even when symbols are hidden by default.
  */
-#define __exported      __attribute__((__visibility__("default")))
-#define __exported_push _Pragma("GCC visibility push(default)")
-#define __exported_pop  _Pragma("GCC visibility pop")
+#define __exported                      __attribute__((__visibility__("default")))
+#define __exported_push         _Pragma("GCC visibility push(default)")
+#define __exported_pop          _Pragma("GCC visibility pop")
 
 /* __deprecated causes the compiler to produce a warning when encountering
  * code using the deprecated functionality.
@@ -825,7 +817,6 @@
 #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden")))
 #endif
 
-
 /*
  * Architecture validation for current SDK
  */
@@ -882,11 +873,4 @@
 	        typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options
 #endif
 
-
-
-#define __kernel_ptr_semantics
-#define __kernel_data_semantics
-#define __kernel_dual_semantics
-
-
 #endif /* !_CDEFS_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/event.h
@@ -58,9 +58,7 @@
 
 #include <machine/types.h>
 #include <sys/cdefs.h>
-#include <sys/queue.h>
 #include <stdint.h>
-#include <sys/types.h>
 
 /*
  * Filter types
@@ -368,10 +366,13 @@ enum {
 
 
 /* Temporay solution for BootX to use inode.h till kqueue moves to vfs layer */
+#include <sys/queue.h>
 struct knote;
 SLIST_HEAD(klist, knote);
 
 
+#include <sys/types.h>
+
 struct timespec;
 
 __BEGIN_DECLS
lib/libc/include/any-macos.11-any/sys/fcntl.h
@@ -134,11 +134,8 @@
 #define O_NOCTTY        0x00020000      /* don't assign controlling terminal */
 
 
-#if __DARWIN_C_LEVEL >= 200809L
-#define O_DIRECTORY     0x00100000
-#endif
-
 #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define O_DIRECTORY     0x00100000
 #define O_SYMLINK       0x00200000      /* allow open of a symlink */
 #endif
 
@@ -259,13 +256,7 @@
 
 #define F_LOG2PHYS_EXT  65              /* file offset to device offset, extended */
 
-#define F_GETLKPID              66      /* See man fcntl(2) F_GETLK
-	                                 * Similar to F_GETLK but in addition l_pid is treated as an input parameter
-	                                 * which is used as a matching value when searching locks on the file
-	                                 * so that only locks owned by the process with pid l_pid are returned.
-	                                 * However, any flock(2) type lock will also be found with the returned value
-	                                 * of l_pid set to -1 (as with F_GETLK).
-	                                 */
+#define F_GETLKPID              66              /* get record locking information, per-process */
 
 /* See F_DUPFD_CLOEXEC below for 67 */
 
lib/libc/include/any-macos.11-any/sys/ioctl.h
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*-
+ * Copyright (c) 1982, 1986, 1990, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94
+ */
+
+#ifndef _SYS_IOCTL_H_
+#define _SYS_IOCTL_H_
+
+#include <sys/ttycom.h>
+
+/*
+ * Pun for SunOS prior to 3.2.  SunOS 3.2 and later support TIOCGWINSZ
+ * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
+ * nonwithstanding).
+ */
+struct ttysize {
+	unsigned short  ts_lines;
+	unsigned short  ts_cols;
+	unsigned short  ts_xxx;
+	unsigned short  ts_yyy;
+};
+#define TIOCGSIZE       TIOCGWINSZ
+#define TIOCSSIZE       TIOCSWINSZ
+
+#include <sys/ioccom.h>
+
+#include <sys/filio.h>
+#include <sys/sockio.h>
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int     ioctl(int, unsigned long, ...);
+__END_DECLS
+#endif /* !_SYS_IOCTL_H_ */
+
+/*
+ * Keep outside _SYS_IOCTL_H_
+ * Compatability with old terminal driver
+ *
+ * Source level -> #define USE_OLD_TTY
+ * Kernel level -> always on
+ */
+#if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE)
+#include <sys/ioctl_compat.h>
+#endif /* !_SYS_IOCTL_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/mount.h
@@ -388,6 +388,7 @@ struct netfs_status {
 
 
 
+
 /*
  * Generic file handle
  */
@@ -402,7 +403,6 @@ struct fhandle {
 typedef struct fhandle  fhandle_t;
 
 
-
 __BEGIN_DECLS
 int     fhopen(const struct fhandle *, int);
 int     fstatfs(int, struct statfs *) __DARWIN_INODE64(fstatfs);
lib/libc/include/any-macos.11-any/sys/proc_info.h
@@ -620,11 +620,12 @@ struct kqueue_dyninfo {
 };
 
 /* keep in sync with KQ_* in sys/eventvar.h */
-#define PROC_KQUEUE_SELECT      0x0001
-#define PROC_KQUEUE_SLEEP       0x0002
-#define PROC_KQUEUE_32          0x0008
-#define PROC_KQUEUE_64          0x0010
-#define PROC_KQUEUE_QOS         0x0020
+#define PROC_KQUEUE_SELECT      0x01
+#define PROC_KQUEUE_SLEEP       0x02
+#define PROC_KQUEUE_32          0x08
+#define PROC_KQUEUE_64          0x10
+#define PROC_KQUEUE_QOS         0x20
+
 
 struct kqueue_fdinfo {
 	struct proc_fileinfo    pfi;
lib/libc/include/any-macos.11-any/sys/random.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 1999, 2000-2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef __SYS_RANDOM_H__
+#define __SYS_RANDOM_H__
+
+#include <sys/appleapiopts.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+    __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
+int getentropy(void* buffer, size_t size);
+__END_DECLS
+
+#endif /* __SYS_RANDOM_H__ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/resource.h
@@ -0,0 +1,520 @@
+/*
+ * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)resource.h	8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <sys/appleapiopts.h>
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#include <stdint.h>
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#include <Availability.h>
+
+/* [XSI] The timeval structure shall be defined as described in
+ * <sys/time.h>
+ */
+#include <sys/_types/_timeval.h>
+
+/* The id_t type shall be defined as described in <sys/types.h> */
+#include <sys/_types/_id_t.h>
+
+
+/*
+ * Resource limit type (low 63 bits, excluding the sign bit)
+ */
+typedef __uint64_t      rlim_t;
+
+
+/*****
+ * PRIORITY
+ */
+
+/*
+ * Possible values of the first parameter to getpriority()/setpriority(),
+ * used to indicate the type of the second parameter.
+ */
+#define PRIO_PROCESS    0               /* Second argument is a PID */
+#define PRIO_PGRP       1               /* Second argument is a GID */
+#define PRIO_USER       2               /* Second argument is a UID */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define PRIO_DARWIN_THREAD      3               /* Second argument is always 0 (current thread) */
+#define PRIO_DARWIN_PROCESS     4               /* Second argument is a PID */
+
+
+/*
+ * Range limitations for the value of the third parameter to setpriority().
+ */
+#define PRIO_MIN        -20
+#define PRIO_MAX        20
+
+/*
+ * use PRIO_DARWIN_BG to set the current thread into "background" state
+ * which lowers CPU, disk IO, and networking priorites until thread terminates
+ * or "background" state is revoked
+ */
+#define PRIO_DARWIN_BG 0x1000
+
+/*
+ * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to
+ * the GPU. (deprecated)
+ */
+#define PRIO_DARWIN_NONUI 0x1001
+
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+
+/*****
+ * RESOURCE USAGE
+ */
+
+/*
+ * Possible values of the first parameter to getrusage(), used to indicate
+ * the scope of the information to be returned.
+ */
+#define RUSAGE_SELF     0               /* Current process information */
+#define RUSAGE_CHILDREN -1              /* Current process' children */
+
+/*
+ * A structure representing an accounting of resource utilization.  The
+ * address of an instance of this structure is the second parameter to
+ * getrusage().
+ *
+ * Note: All values other than ru_utime and ru_stime are implementaiton
+ *       defined and subject to change in a future release.  Their use
+ *       is discouraged for standards compliant programs.
+ */
+struct  rusage {
+	struct timeval ru_utime;        /* user time used (PL) */
+	struct timeval ru_stime;        /* system time used (PL) */
+#if __DARWIN_C_LEVEL < __DARWIN_C_FULL
+	long    ru_opaque[14];          /* implementation defined */
+#else
+	/*
+	 * Informational aliases for source compatibility with programs
+	 * that need more information than that provided by standards,
+	 * and which do not mind being OS-dependent.
+	 */
+	long    ru_maxrss;              /* max resident set size (PL) */
+#define ru_first        ru_ixrss        /* internal: ruadd() range start */
+	long    ru_ixrss;               /* integral shared memory size (NU) */
+	long    ru_idrss;               /* integral unshared data (NU)  */
+	long    ru_isrss;               /* integral unshared stack (NU) */
+	long    ru_minflt;              /* page reclaims (NU) */
+	long    ru_majflt;              /* page faults (NU) */
+	long    ru_nswap;               /* swaps (NU) */
+	long    ru_inblock;             /* block input operations (atomic) */
+	long    ru_oublock;             /* block output operations (atomic) */
+	long    ru_msgsnd;              /* messages sent (atomic) */
+	long    ru_msgrcv;              /* messages received (atomic) */
+	long    ru_nsignals;            /* signals received (atomic) */
+	long    ru_nvcsw;               /* voluntary context switches (atomic) */
+	long    ru_nivcsw;              /* involuntary " */
+#define ru_last         ru_nivcsw       /* internal: ruadd() range end */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+};
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/*
+ * Flavors for proc_pid_rusage().
+ */
+#define RUSAGE_INFO_V0  0
+#define RUSAGE_INFO_V1  1
+#define RUSAGE_INFO_V2  2
+#define RUSAGE_INFO_V3  3
+#define RUSAGE_INFO_V4  4
+#define RUSAGE_INFO_V5  5
+#define RUSAGE_INFO_CURRENT     RUSAGE_INFO_V5
+
+/*
+ * Flags for RUSAGE_INFO_V5
+ */
+#define RU_PROC_RUNS_RESLIDE    0x00000001      /* proc has reslid shared cache */
+
+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_interval_max_phys_footprint;
+	uint64_t ri_runnable_time;
+};
+
+struct rusage_info_v5 {
+	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_interval_max_phys_footprint;
+	uint64_t ri_runnable_time;
+	uint64_t ri_flags;
+};
+
+typedef struct rusage_info_v5 rusage_info_current;
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+
+/*****
+ * RESOURCE LIMITS
+ */
+
+/*
+ * Symbolic constants for resource limits; since all limits are representable
+ * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of
+ * RLIM_INFINITY.
+ */
+#define RLIM_INFINITY   (((__uint64_t)1 << 63) - 1)     /* no limit */
+#define RLIM_SAVED_MAX  RLIM_INFINITY   /* Unrepresentable hard limit */
+#define RLIM_SAVED_CUR  RLIM_INFINITY   /* Unrepresentable soft limit */
+
+/*
+ * Possible values of the first parameter to getrlimit()/setrlimit(), to
+ * indicate for which resource the operation is being performed.
+ */
+#define RLIMIT_CPU      0               /* cpu time per process */
+#define RLIMIT_FSIZE    1               /* file size */
+#define RLIMIT_DATA     2               /* data segment size */
+#define RLIMIT_STACK    3               /* stack size */
+#define RLIMIT_CORE     4               /* core file size */
+#define RLIMIT_AS       5               /* address space (resident set size) */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define RLIMIT_RSS      RLIMIT_AS       /* source compatibility alias */
+#define RLIMIT_MEMLOCK  6               /* locked-in-memory address space */
+#define RLIMIT_NPROC    7               /* number of processes */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+#define RLIMIT_NOFILE   8               /* number of open files */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define RLIM_NLIMITS    9               /* total number of resource limits */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+#define _RLIMIT_POSIX_FLAG      0x1000  /* Set bit for strict POSIX */
+
+/*
+ * A structure representing a resource limit.  The address of an instance
+ * of this structure is the second parameter to getrlimit()/setrlimit().
+ */
+struct rlimit {
+	rlim_t  rlim_cur;               /* current (soft) limit */
+	rlim_t  rlim_max;               /* maximum value for rlim_cur */
+};
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/*
+ * proc_rlimit_control()
+ *
+ * Resource limit flavors
+ */
+#define RLIMIT_WAKEUPS_MONITOR          0x1 /* Configure the wakeups monitor. */
+#define RLIMIT_CPU_USAGE_MONITOR        0x2 /* Configure the CPU usage monitor. */
+#define RLIMIT_THREAD_CPULIMITS         0x3 /* Configure a blocking, per-thread, CPU limits. */
+#define RLIMIT_FOOTPRINT_INTERVAL       0x4 /* Configure memory footprint interval tracking */
+
+/*
+ * Flags for wakeups monitor control.
+ */
+#define WAKEMON_ENABLE                  0x01
+#define WAKEMON_DISABLE                 0x02
+#define WAKEMON_GET_PARAMS              0x04
+#define WAKEMON_SET_DEFAULTS            0x08
+#define WAKEMON_MAKE_FATAL              0x10 /* Configure the task so that violations are fatal. */
+
+/*
+ * Flags for CPU usage monitor control.
+ */
+#define CPUMON_MAKE_FATAL               0x1000
+
+/*
+ * Flags for memory footprint interval tracking.
+ */
+#define FOOTPRINT_INTERVAL_RESET        0x1 /* Reset the footprint interval counter to zero */
+
+struct proc_rlimit_control_wakeupmon {
+	uint32_t wm_flags;
+	int32_t wm_rate;
+};
+
+
+
+/* I/O type */
+#define IOPOL_TYPE_DISK 0
+#define IOPOL_TYPE_VFS_ATIME_UPDATES 2
+#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3
+#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4
+#define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5
+#define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6
+#define IOPOL_TYPE_VFS_IGNORE_PERMISSIONS 7
+#define IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE 8
+
+/* scope */
+#define IOPOL_SCOPE_PROCESS   0
+#define IOPOL_SCOPE_THREAD    1
+#define IOPOL_SCOPE_DARWIN_BG 2
+
+/* I/O Priority */
+#define IOPOL_DEFAULT           0
+#define IOPOL_IMPORTANT         1
+#define IOPOL_PASSIVE           2
+#define IOPOL_THROTTLE          3
+#define IOPOL_UTILITY           4
+#define IOPOL_STANDARD          5
+
+/* compatibility with older names */
+#define IOPOL_APPLICATION       IOPOL_STANDARD
+#define IOPOL_NORMAL            IOPOL_IMPORTANT
+
+
+#define IOPOL_ATIME_UPDATES_DEFAULT     0
+#define IOPOL_ATIME_UPDATES_OFF         1
+
+#define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0
+#define IOPOL_MATERIALIZE_DATALESS_FILES_OFF     1
+#define IOPOL_MATERIALIZE_DATALESS_FILES_ON      2
+
+#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0
+#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME   1
+
+#define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0
+#define IOPOL_VFS_TRIGGER_RESOLVE_OFF     1
+
+#define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0
+#define IOPOL_VFS_CONTENT_PROTECTION_IGNORE  1
+
+#define IOPOL_VFS_IGNORE_PERMISSIONS_OFF 0
+#define IOPOL_VFS_IGNORE_PERMISSIONS_ON  1
+
+#define IOPOL_VFS_SKIP_MTIME_UPDATE_OFF 0
+#define IOPOL_VFS_SKIP_MTIME_UPDATE_ON 1
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+__BEGIN_DECLS
+int     getpriority(int, id_t);
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+int     getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+int     getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit);
+int     getrusage(int, struct rusage *);
+int     setpriority(int, id_t, int);
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+int     setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+int     setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit);
+__END_DECLS
+
+#endif  /* !_SYS_RESOURCE_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/socket.h
@@ -0,0 +1,741 @@
+/*
+ * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)socket.h	8.4 (Berkeley) 2/21/94
+ * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $
+ */
+/*
+ * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
+ * support for mandatory and extensible security protections.  This notice
+ * is included in support of clause 2.2 (b) of the Apple Public License,
+ * Version 2.0.
+ */
+
+#ifndef _SYS_SOCKET_H_
+#define _SYS_SOCKET_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+#include <machine/_param.h>
+#include <net/net_kev.h>
+
+
+#include <Availability.h>
+
+/*
+ * Definitions related to sockets: types, address families, options.
+ */
+
+/*
+ * Data types.
+ */
+
+#include <sys/_types/_gid_t.h>
+#include <sys/_types/_off_t.h>
+#include <sys/_types/_pid_t.h>
+#include <sys/_types/_sa_family_t.h>
+#include <sys/_types/_socklen_t.h>
+
+/* XXX Not explicitly defined by POSIX, but function return types are */
+#include <sys/_types/_size_t.h>
+
+/* XXX Not explicitly defined by POSIX, but function return types are */
+#include <sys/_types/_ssize_t.h>
+
+/*
+ * [XSI] The iovec structure shall be defined as described in <sys/uio.h>.
+ */
+#include <sys/_types/_iovec_t.h>
+
+/*
+ * Types
+ */
+#define SOCK_STREAM     1               /* stream socket */
+#define SOCK_DGRAM      2               /* datagram socket */
+#define SOCK_RAW        3               /* raw-protocol interface */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SOCK_RDM        4               /* reliably-delivered message */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define SOCK_SEQPACKET  5               /* sequenced packet stream */
+
+/*
+ * Option flags per-socket.
+ */
+#define SO_DEBUG        0x0001          /* turn on debugging info recording */
+#define SO_ACCEPTCONN   0x0002          /* socket has had listen() */
+#define SO_REUSEADDR    0x0004          /* allow local address reuse */
+#define SO_KEEPALIVE    0x0008          /* keep connections alive */
+#define SO_DONTROUTE    0x0010          /* just use interface addresses */
+#define SO_BROADCAST    0x0020          /* permit sending of broadcast msgs */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SO_USELOOPBACK  0x0040          /* bypass hardware when possible */
+#define SO_LINGER       0x0080          /* linger on close if data present (in ticks) */
+#else
+#define SO_LINGER       0x1080          /* linger on close if data present (in seconds) */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define SO_OOBINLINE    0x0100          /* leave received OOB data in line */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SO_REUSEPORT    0x0200          /* allow local address & port reuse */
+#define SO_TIMESTAMP    0x0400          /* timestamp received dgram traffic */
+#define SO_TIMESTAMP_MONOTONIC  0x0800  /* Monotonically increasing timestamp on rcvd dgram */
+#ifndef __APPLE__
+#define SO_ACCEPTFILTER 0x1000          /* there is an accept filter */
+#else
+#define SO_DONTTRUNC    0x2000          /* APPLE: Retain unread data */
+                                        /*  (ATOMIC proto) */
+#define SO_WANTMORE     0x4000          /* APPLE: Give hint when more data ready */
+#define SO_WANTOOBFLAG  0x8000          /* APPLE: Want OOB in MSG_FLAG on receive */
+
+
+#endif  /* (!__APPLE__) */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * Additional options, not kept in so_options.
+ */
+#define SO_SNDBUF       0x1001          /* send buffer size */
+#define SO_RCVBUF       0x1002          /* receive buffer size */
+#define SO_SNDLOWAT     0x1003          /* send low-water mark */
+#define SO_RCVLOWAT     0x1004          /* receive low-water mark */
+#define SO_SNDTIMEO     0x1005          /* send timeout */
+#define SO_RCVTIMEO     0x1006          /* receive timeout */
+#define SO_ERROR        0x1007          /* get error status and clear */
+#define SO_TYPE         0x1008          /* get socket type */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SO_LABEL        0x1010          /* deprecated */
+#define SO_PEERLABEL    0x1011          /* deprecated */
+#ifdef __APPLE__
+#define SO_NREAD        0x1020          /* APPLE: get 1st-packet byte count */
+#define SO_NKE          0x1021          /* APPLE: Install socket-level NKE */
+#define SO_NOSIGPIPE    0x1022          /* APPLE: No SIGPIPE on EPIPE */
+#define SO_NOADDRERR    0x1023          /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */
+#define SO_NWRITE       0x1024          /* APPLE: Get number of bytes currently in send socket buffer */
+#define SO_REUSESHAREUID        0x1025          /* APPLE: Allow reuse of port/socket by different userids */
+#ifdef __APPLE_API_PRIVATE
+#define SO_NOTIFYCONFLICT       0x1026  /* APPLE: send notification if there is a bind on a port which is already in use */
+#define SO_UPCALLCLOSEWAIT      0x1027  /* APPLE: block on close until an upcall returns */
+#endif
+#define SO_LINGER_SEC   0x1080          /* linger on close if data present (in seconds) */
+#define SO_RANDOMPORT   0x1082  /* APPLE: request local port randomization */
+#define SO_NP_EXTENSIONS        0x1083  /* To turn off some POSIX behavior */
+#endif
+
+#define SO_NUMRCVPKT            0x1112  /* number of datagrams in receive socket buffer */
+#define SO_NET_SERVICE_TYPE     0x1116  /* Network service type */
+
+
+#define SO_NETSVC_MARKING_LEVEL    0x1119  /* Get QoS marking in effect for socket */
+
+/*
+ * Network Service Type for option SO_NET_SERVICE_TYPE
+ *
+ * The vast majority of sockets should use Best Effort that is the default
+ * Network Service Type. Other Network Service Types have to be used only if
+ * the traffic actually matches the description of the Network Service Type.
+ *
+ * Network Service Types do not represent priorities but rather describe
+ * different categories of delay, jitter and loss parameters.
+ * Those parameters may influence protocols from layer 4 protocols like TCP
+ * to layer 2 protocols like Wi-Fi. The Network Service Type can determine
+ * how the traffic is queued and scheduled by the host networking stack and
+ * by other entities on the network like switches and routers. For example
+ * for Wi-Fi, the Network Service Type can select the marking of the
+ * layer 2 packet with the appropriate WMM Access Category.
+ *
+ * There is no point in attempting to game the system and use
+ * a Network Service Type that does not correspond to the actual
+ * traffic characteristic but one that seems to have a higher precedence.
+ * The reason is that for service classes that have lower tolerance
+ * for delay and jitter, the queues size is lower than for service
+ * classes that are more tolerant to delay and jitter.
+ *
+ * For example using a voice service type for bulk data transfer will lead
+ * to disastrous results as soon as congestion happens because the voice
+ * queue overflows and packets get dropped. This is not only bad for the bulk
+ * data transfer but it is also bad for VoIP apps that legitimately are using
+ * the voice  service type.
+ *
+ * The characteristics of the Network Service Types are based on the service
+ * classes defined in RFC 4594 "Configuration Guidelines for DiffServ Service
+ * Classes"
+ *
+ * When system detects the outgoing interface belongs to a DiffServ domain
+ * that follows the recommendation of the IETF draft "Guidelines for DiffServ to
+ * IEEE 802.11 Mapping", the packet will marked at layer 3 with a DSCP value
+ * that corresponds to Network Service Type.
+ *
+ * NET_SERVICE_TYPE_BE
+ *	"Best Effort", unclassified/standard.  This is the default service
+ *	class and cover the majority of the traffic.
+ *
+ * NET_SERVICE_TYPE_BK
+ *	"Background", high delay tolerant, loss tolerant. elastic flow,
+ *	variable size & long-lived. E.g: non-interactive network bulk transfer
+ *	like synching or backup.
+ *
+ * NET_SERVICE_TYPE_RD
+ *	"Responsive Data", a notch higher than "Best Effort", medium delay
+ *	tolerant, elastic & inelastic flow, bursty, long-lived. E.g. email,
+ *	instant messaging, for which there is a sense of interactivity and
+ *	urgency (user waiting for output).
+ *
+ * NET_SERVICE_TYPE_OAM
+ *	"Operations, Administration, and Management", medium delay tolerant,
+ *	low-medium loss tolerant, elastic & inelastic flows, variable size.
+ *	E.g. VPN tunnels.
+ *
+ * NET_SERVICE_TYPE_AV
+ *	"Multimedia Audio/Video Streaming", medium delay tolerant, low-medium
+ *	loss tolerant, elastic flow, constant packet interval, variable rate
+ *	and size. E.g. video and audio playback with buffering.
+ *
+ * NET_SERVICE_TYPE_RV
+ *	"Responsive Multimedia Audio/Video", low delay tolerant, low-medium
+ *	loss tolerant, elastic flow, variable packet interval, rate and size.
+ *	E.g. screen sharing.
+ *
+ * NET_SERVICE_TYPE_VI
+ *	"Interactive Video", low delay tolerant, low-medium loss tolerant,
+ *	elastic flow, constant packet interval, variable rate & size. E.g.
+ *	video telephony.
+ *
+ * NET_SERVICE_TYPE_SIG
+ *	"Signaling", low delay tolerant, low loss tolerant, inelastic flow,
+ *	jitter tolerant, rate is bursty but short, variable size. E.g. SIP.
+ *
+ * NET_SERVICE_TYPE_VO
+ *	"Interactive Voice", very low delay tolerant, very low loss tolerant,
+ *	inelastic flow, constant packet rate, somewhat fixed size.
+ *	E.g. VoIP.
+ */
+
+#define NET_SERVICE_TYPE_BE     0 /* Best effort */
+#define NET_SERVICE_TYPE_BK     1 /* Background system initiated */
+#define NET_SERVICE_TYPE_SIG    2 /* Signaling */
+#define NET_SERVICE_TYPE_VI     3 /* Interactive Video */
+#define NET_SERVICE_TYPE_VO     4 /* Interactive Voice */
+#define NET_SERVICE_TYPE_RV     5 /* Responsive Multimedia Audio/Video */
+#define NET_SERVICE_TYPE_AV     6 /* Multimedia Audio/Video Streaming */
+#define NET_SERVICE_TYPE_OAM    7 /* Operations, Administration, and Management */
+#define NET_SERVICE_TYPE_RD     8 /* Responsive Data */
+
+
+/* These are supported values for SO_NETSVC_MARKING_LEVEL */
+#define NETSVC_MRKNG_UNKNOWN            0       /* The outgoing network interface is not known */
+#define NETSVC_MRKNG_LVL_L2             1       /* Default marking at layer 2 (for example Wi-Fi WMM) */
+#define NETSVC_MRKNG_LVL_L3L2_ALL       2       /* Layer 3 DSCP marking and layer 2 marking for all Network Service Types */
+#define NETSVC_MRKNG_LVL_L3L2_BK        3       /* The system policy limits layer 3 DSCP marking and layer 2 marking
+	                                         * to background Network Service Types */
+
+
+typedef __uint32_t sae_associd_t;
+#define SAE_ASSOCID_ANY 0
+#define SAE_ASSOCID_ALL ((sae_associd_t)(-1ULL))
+
+typedef __uint32_t sae_connid_t;
+#define SAE_CONNID_ANY  0
+#define SAE_CONNID_ALL  ((sae_connid_t)(-1ULL))
+
+/* connectx() flag parameters */
+#define CONNECT_RESUME_ON_READ_WRITE    0x1 /* resume connect() on read/write */
+#define CONNECT_DATA_IDEMPOTENT         0x2 /* data is idempotent */
+#define CONNECT_DATA_AUTHENTICATED      0x4 /* data includes security that replaces the TFO-cookie */
+
+/* sockaddr endpoints */
+typedef struct sa_endpoints {
+	unsigned int            sae_srcif;      /* optional source interface */
+	const struct sockaddr   *sae_srcaddr;   /* optional source address */
+	socklen_t               sae_srcaddrlen; /* size of source address */
+	const struct sockaddr   *sae_dstaddr;   /* destination address */
+	socklen_t               sae_dstaddrlen; /* size of destination address */
+} sa_endpoints_t;
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * Structure used for manipulating linger option.
+ */
+struct  linger {
+	int     l_onoff;                /* option on/off */
+	int     l_linger;               /* linger time */
+};
+
+#ifndef __APPLE__
+struct  accept_filter_arg {
+	char    af_name[16];
+	char    af_arg[256 - 16];
+};
+#endif
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#ifdef __APPLE__
+
+/*
+ * Structure to control non-portable Sockets extension to POSIX
+ */
+struct so_np_extensions {
+	u_int32_t       npx_flags;
+	u_int32_t       npx_mask;
+};
+
+#define SONPX_SETOPTSHUT        0x000000001     /* flag for allowing setsockopt after shutdown */
+
+
+
+#endif
+#endif
+
+/*
+ * Level number for (get/set)sockopt() to apply to socket itself.
+ */
+#define SOL_SOCKET      0xffff          /* options for socket level */
+
+
+/*
+ * Address families.
+ */
+#define AF_UNSPEC       0               /* unspecified */
+#define AF_UNIX         1               /* local to host (pipes) */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define AF_LOCAL        AF_UNIX         /* backward compatibility */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define AF_INET         2               /* internetwork: UDP, TCP, etc. */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define AF_IMPLINK      3               /* arpanet imp addresses */
+#define AF_PUP          4               /* pup protocols: e.g. BSP */
+#define AF_CHAOS        5               /* mit CHAOS protocols */
+#define AF_NS           6               /* XEROX NS protocols */
+#define AF_ISO          7               /* ISO protocols */
+#define AF_OSI          AF_ISO
+#define AF_ECMA         8               /* European computer manufacturers */
+#define AF_DATAKIT      9               /* datakit protocols */
+#define AF_CCITT        10              /* CCITT protocols, X.25 etc */
+#define AF_SNA          11              /* IBM SNA */
+#define AF_DECnet       12              /* DECnet */
+#define AF_DLI          13              /* DEC Direct data link interface */
+#define AF_LAT          14              /* LAT */
+#define AF_HYLINK       15              /* NSC Hyperchannel */
+#define AF_APPLETALK    16              /* Apple Talk */
+#define AF_ROUTE        17              /* Internal Routing Protocol */
+#define AF_LINK         18              /* Link layer interface */
+#define pseudo_AF_XTP   19              /* eXpress Transfer Protocol (no AF) */
+#define AF_COIP         20              /* connection-oriented IP, aka ST II */
+#define AF_CNT          21              /* Computer Network Technology */
+#define pseudo_AF_RTIP  22              /* Help Identify RTIP packets */
+#define AF_IPX          23              /* Novell Internet Protocol */
+#define AF_SIP          24              /* Simple Internet Protocol */
+#define pseudo_AF_PIP   25              /* Help Identify PIP packets */
+#define AF_NDRV         27              /* Network Driver 'raw' access */
+#define AF_ISDN         28              /* Integrated Services Digital Network */
+#define AF_E164         AF_ISDN         /* CCITT E.164 recommendation */
+#define pseudo_AF_KEY   29              /* Internal key-management function */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define AF_INET6        30              /* IPv6 */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define AF_NATM         31              /* native ATM access */
+#define AF_SYSTEM       32              /* Kernel event messages */
+#define AF_NETBIOS      33              /* NetBIOS */
+#define AF_PPP          34              /* PPP communication protocol */
+#define pseudo_AF_HDRCMPLT 35           /* Used by BPF to not rewrite headers
+	                                 *  in interface output routine */
+#define AF_RESERVED_36  36              /* Reserved for internal usage */
+#define AF_IEEE80211    37              /* IEEE 802.11 protocol */
+#define AF_UTUN         38
+#define AF_VSOCK        40              /* VM Sockets */
+#define AF_MAX          41
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * [XSI] Structure used by kernel to store most addresses.
+ */
+struct sockaddr {
+	__uint8_t       sa_len;         /* total length */
+	sa_family_t     sa_family;      /* [XSI] address family */
+	char            sa_data[14];    /* [XSI] addr value (actually larger) */
+};
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SOCK_MAXADDRLEN 255             /* longest possible addresses */
+
+/*
+ * Structure used by kernel to pass protocol
+ * information in raw sockets.
+ */
+struct sockproto {
+	__uint16_t      sp_family;              /* address family */
+	__uint16_t      sp_protocol;            /* protocol */
+};
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * RFC 2553: protocol-independent placeholder for socket addresses
+ */
+#define _SS_MAXSIZE     128
+#define _SS_ALIGNSIZE   (sizeof(__int64_t))
+#define _SS_PAD1SIZE    \
+	        (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t))
+#define _SS_PAD2SIZE    \
+	        (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \
+	                        _SS_PAD1SIZE - _SS_ALIGNSIZE)
+
+/*
+ * [XSI] sockaddr_storage
+ */
+struct sockaddr_storage {
+	__uint8_t       ss_len;         /* address length */
+	sa_family_t     ss_family;      /* [XSI] address family */
+	char                    __ss_pad1[_SS_PAD1SIZE];
+	__int64_t       __ss_align;     /* force structure storage alignment */
+	char                    __ss_pad2[_SS_PAD2SIZE];
+};
+
+/*
+ * Protocol families, same as address families for now.
+ */
+#define PF_UNSPEC       AF_UNSPEC
+#define PF_LOCAL        AF_LOCAL
+#define PF_UNIX         PF_LOCAL        /* backward compatibility */
+#define PF_INET         AF_INET
+#define PF_IMPLINK      AF_IMPLINK
+#define PF_PUP          AF_PUP
+#define PF_CHAOS        AF_CHAOS
+#define PF_NS           AF_NS
+#define PF_ISO          AF_ISO
+#define PF_OSI          AF_ISO
+#define PF_ECMA         AF_ECMA
+#define PF_DATAKIT      AF_DATAKIT
+#define PF_CCITT        AF_CCITT
+#define PF_SNA          AF_SNA
+#define PF_DECnet       AF_DECnet
+#define PF_DLI          AF_DLI
+#define PF_LAT          AF_LAT
+#define PF_HYLINK       AF_HYLINK
+#define PF_APPLETALK    AF_APPLETALK
+#define PF_ROUTE        AF_ROUTE
+#define PF_LINK         AF_LINK
+#define PF_XTP          pseudo_AF_XTP   /* really just proto family, no AF */
+#define PF_COIP         AF_COIP
+#define PF_CNT          AF_CNT
+#define PF_SIP          AF_SIP
+#define PF_IPX          AF_IPX          /* same format as AF_NS */
+#define PF_RTIP         pseudo_AF_RTIP  /* same format as AF_INET */
+#define PF_PIP          pseudo_AF_PIP
+#define PF_NDRV         AF_NDRV
+#define PF_ISDN         AF_ISDN
+#define PF_KEY          pseudo_AF_KEY
+#define PF_INET6        AF_INET6
+#define PF_NATM         AF_NATM
+#define PF_SYSTEM       AF_SYSTEM
+#define PF_NETBIOS      AF_NETBIOS
+#define PF_PPP          AF_PPP
+#define PF_RESERVED_36  AF_RESERVED_36
+#define PF_UTUN         AF_UTUN
+#define PF_VSOCK        AF_VSOCK
+#define PF_MAX          AF_MAX
+
+/*
+ * These do not have socket-layer support:
+ */
+#define PF_VLAN         ((uint32_t)0x766c616e)  /* 'vlan' */
+#define PF_BOND         ((uint32_t)0x626f6e64)  /* 'bond' */
+
+/*
+ * Definitions for network related sysctl, CTL_NET.
+ *
+ * Second level is protocol family.
+ * Third level is protocol number.
+ *
+ * Further levels are defined by the individual families below.
+ */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define NET_MAXID       AF_MAX
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * PF_ROUTE - Routing table
+ *
+ * Three additional levels are defined:
+ *	Fourth: address family, 0 is wildcard
+ *	Fifth: type of info, defined below
+ *	Sixth: flag(s) to mask with for NET_RT_FLAGS
+ */
+#define NET_RT_DUMP             1       /* dump; may limit to a.f. */
+#define NET_RT_FLAGS            2       /* by flags, e.g. RESOLVING */
+#define NET_RT_IFLIST           3       /* survey interface list */
+#define NET_RT_STAT             4       /* routing statistics */
+#define NET_RT_TRASH            5       /* routes not in table but not freed */
+#define NET_RT_IFLIST2          6       /* interface list with addresses */
+#define NET_RT_DUMP2            7       /* dump; may limit to a.f. */
+/*
+ * Allows read access non-local host's MAC address
+ * if the process has neighbor cache entitlement.
+ */
+#define NET_RT_FLAGS_PRIV       10
+#define NET_RT_MAXID            11
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+
+
+
+/*
+ * Maximum queue length specifiable by listen.
+ */
+#define SOMAXCONN       128
+
+/*
+ * [XSI] Message header for recvmsg and sendmsg calls.
+ * Used value-result for recvmsg, value only for sendmsg.
+ */
+struct msghdr {
+	void            *msg_name;      /* [XSI] optional address */
+	socklen_t       msg_namelen;    /* [XSI] size of address */
+	struct          iovec *msg_iov; /* [XSI] scatter/gather array */
+	int             msg_iovlen;     /* [XSI] # elements in msg_iov */
+	void            *msg_control;   /* [XSI] ancillary data, see below */
+	socklen_t       msg_controllen; /* [XSI] ancillary data buffer len */
+	int             msg_flags;      /* [XSI] flags on received message */
+};
+
+
+
+#define MSG_OOB         0x1             /* process out-of-band data */
+#define MSG_PEEK        0x2             /* peek at incoming message */
+#define MSG_DONTROUTE   0x4             /* send without using routing tables */
+#define MSG_EOR         0x8             /* data completes record */
+#define MSG_TRUNC       0x10            /* data discarded before delivery */
+#define MSG_CTRUNC      0x20            /* control data lost before delivery */
+#define MSG_WAITALL     0x40            /* wait for full request or error */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define MSG_DONTWAIT    0x80            /* this message should be nonblocking */
+#define MSG_EOF         0x100           /* data completes connection */
+#ifdef __APPLE__
+#ifdef __APPLE_API_OBSOLETE
+#define MSG_WAITSTREAM  0x200           /* wait up to full request.. may return partial */
+#endif
+#define MSG_FLUSH       0x400           /* Start of 'hold' seq; dump so_temp, deprecated */
+#define MSG_HOLD        0x800           /* Hold frag in so_temp, deprecated */
+#define MSG_SEND        0x1000          /* Send the packet in so_temp, deprecated */
+#define MSG_HAVEMORE    0x2000          /* Data ready to be read */
+#define MSG_RCVMORE     0x4000          /* Data remains in current pkt */
+#endif
+#define MSG_NEEDSA      0x10000         /* Fail receive if socket address cannot be allocated */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#define MSG_NOSIGNAL    0x80000         /* do not generate SIGPIPE on EOF */
+#endif /* __DARWIN_C_LEVEL */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * Header for ancillary data objects in msg_control buffer.
+ * Used for additional information with/about a datagram
+ * not expressible by flags.  The format is a sequence
+ * of message elements headed by cmsghdr structures.
+ */
+struct cmsghdr {
+	socklen_t       cmsg_len;       /* [XSI] data byte count, including hdr */
+	int             cmsg_level;     /* [XSI] originating protocol */
+	int             cmsg_type;      /* [XSI] protocol-specific type */
+/* followed by	unsigned char  cmsg_data[]; */
+};
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#ifndef __APPLE__
+/*
+ * While we may have more groups than this, the cmsgcred struct must
+ * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow
+ * this.
+ */
+#define CMGROUP_MAX 16
+
+/*
+ * Credentials structure, used to verify the identity of a peer
+ * process that has sent us a message. This is allocated by the
+ * peer process but filled in by the kernel. This prevents the
+ * peer from lying about its identity. (Note that cmcred_groups[0]
+ * is the effective GID.)
+ */
+struct cmsgcred {
+	pid_t   cmcred_pid;             /* PID of sending process */
+	uid_t   cmcred_uid;             /* real UID of sending process */
+	uid_t   cmcred_euid;            /* effective UID of sending process */
+	gid_t   cmcred_gid;             /* real GID of sending process */
+	short   cmcred_ngroups;         /* number or groups */
+	gid_t   cmcred_groups[CMGROUP_MAX];     /* groups */
+};
+#endif
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/* given pointer to struct cmsghdr, return pointer to data */
+#define CMSG_DATA(cmsg)         ((unsigned char *)(cmsg) + \
+	__DARWIN_ALIGN32(sizeof(struct cmsghdr)))
+
+/*
+ * RFC 2292 requires to check msg_controllen, in case that the kernel returns
+ * an empty list for some reasons.
+ */
+#define CMSG_FIRSTHDR(mhdr) \
+	((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
+	    (struct cmsghdr *)(mhdr)->msg_control : \
+	    (struct cmsghdr *)0L)
+
+
+/*
+ * Given pointer to struct cmsghdr, return pointer to next cmsghdr
+ * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr)
+ */
+#define CMSG_NXTHDR(mhdr, cmsg)                                         \
+	((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) :           \
+	    ((((unsigned char *)(cmsg) +                                \
+	    __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) +            \
+	    __DARWIN_ALIGN32(sizeof(struct cmsghdr))) >                 \
+	    ((unsigned char *)(mhdr)->msg_control +                     \
+	    (mhdr)->msg_controllen)) ?                                  \
+	        (struct cmsghdr *)0L /* NULL */ :                       \
+	        (struct cmsghdr *)(void *)((unsigned char *)(cmsg) +    \
+	            __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len))))
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/* RFC 2292 additions */
+#define CMSG_SPACE(l)           (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l))
+#define CMSG_LEN(l)             (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l))
+
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/* "Socket"-level control message types: */
+#define SCM_RIGHTS                      0x01    /* access rights (array of int) */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SCM_TIMESTAMP                   0x02    /* timestamp (struct timeval) */
+#define SCM_CREDS                       0x03    /* process creds (struct cmsgcred) */
+#define SCM_TIMESTAMP_MONOTONIC         0x04    /* timestamp (uint64_t) */
+
+
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * howto arguments for shutdown(2), specified by Posix.1g.
+ */
+#define SHUT_RD         0               /* shut down the reading side */
+#define SHUT_WR         1               /* shut down the writing side */
+#define SHUT_RDWR       2               /* shut down both sides */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * sendfile(2) header/trailer struct
+ */
+struct sf_hdtr {
+	struct iovec *headers;  /* pointer to an array of header struct iovec's */
+	int hdr_cnt;            /* number of header iovec's */
+	struct iovec *trailers; /* pointer to an array of trailer struct iovec's */
+	int trl_cnt;            /* number of trailer iovec's */
+};
+
+
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+
+__BEGIN_DECLS
+
+int     accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
+__DARWIN_ALIAS_C(accept);
+int     bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind);
+int     connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect);
+int     getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict)
+__DARWIN_ALIAS(getpeername);
+int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict)
+__DARWIN_ALIAS(getsockname);
+int     getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
+int     listen(int, int) __DARWIN_ALIAS(listen);
+ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv);
+ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict,
+    socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom);
+ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg);
+ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send);
+ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg);
+ssize_t sendto(int, const void *, size_t,
+    int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto);
+int     setsockopt(int, int, int, const void *, socklen_t);
+int     shutdown(int, int);
+int     sockatmark(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int     socket(int, int, int);
+int     socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair);
+
+#if !defined(_POSIX_C_SOURCE)
+int     sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int);
+#endif  /* !_POSIX_C_SOURCE */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+void    pfctlinput(int, struct sockaddr *);
+
+__API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0))
+int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,
+    const struct iovec *, unsigned int, size_t *, sae_connid_t *);
+
+__API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0))
+int disconnectx(int, sae_associd_t, sae_connid_t);
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+__END_DECLS
+
+
+#endif /* !_SYS_SOCKET_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/sockio.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*-
+ * Copyright (c) 1982, 1986, 1990, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)sockio.h	8.1 (Berkeley) 3/28/94
+ */
+
+#ifndef _SYS_SOCKIO_H_
+#define _SYS_SOCKIO_H_
+
+#include <sys/appleapiopts.h>
+
+#include <sys/ioccom.h>
+
+/* Socket ioctl's. */
+#define SIOCSHIWAT       _IOW('s',  0, int)             /* set high watermark */
+#define SIOCGHIWAT       _IOR('s',  1, int)             /* get high watermark */
+#define SIOCSLOWAT       _IOW('s',  2, int)             /* set low watermark */
+#define SIOCGLOWAT       _IOR('s',  3, int)             /* get low watermark */
+#define SIOCATMARK       _IOR('s',  7, int)             /* at oob mark? */
+#define SIOCSPGRP        _IOW('s',  8, int)             /* set process group */
+#define SIOCGPGRP        _IOR('s',  9, int)             /* get process group */
+
+/*
+ * OSIOCGIF* ioctls are deprecated; they are kept for binary compatibility.
+ */
+#define SIOCSIFADDR     _IOW('i', 12, struct ifreq)     /* set ifnet address */
+#define SIOCSIFDSTADDR   _IOW('i', 14, struct ifreq)    /* set p-p address */
+#define SIOCSIFFLAGS     _IOW('i', 16, struct ifreq)    /* set ifnet flags */
+#define SIOCGIFFLAGS    _IOWR('i', 17, struct ifreq)    /* get ifnet flags */
+#define SIOCSIFBRDADDR   _IOW('i', 19, struct ifreq)    /* set broadcast addr */
+#define SIOCSIFNETMASK   _IOW('i', 22, struct ifreq)    /* set net addr mask */
+#define SIOCGIFMETRIC   _IOWR('i', 23, struct ifreq)    /* get IF metric */
+#define SIOCSIFMETRIC   _IOW('i', 24, struct ifreq)     /* set IF metric */
+#define SIOCDIFADDR     _IOW('i', 25, struct ifreq)     /* delete IF addr */
+#define SIOCAIFADDR     _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
+
+#define SIOCGIFADDR     _IOWR('i', 33, struct ifreq)    /* get ifnet address */
+#define SIOCGIFDSTADDR  _IOWR('i', 34, struct ifreq)    /* get p-p address */
+#define SIOCGIFBRDADDR  _IOWR('i', 35, struct ifreq)    /* get broadcast addr */
+#define SIOCGIFCONF     _IOWR('i', 36, struct ifconf)   /* get ifnet list */
+#define SIOCGIFNETMASK  _IOWR('i', 37, struct ifreq)    /* get net addr mask */
+#define SIOCAUTOADDR    _IOWR('i', 38, struct ifreq)    /* autoconf address */
+#define SIOCAUTONETMASK _IOW('i', 39, struct ifreq)     /* autoconf netmask */
+#define SIOCARPIPLL             _IOWR('i', 40, struct ifreq)    /* arp for IPv4LL address */
+
+#define SIOCADDMULTI     _IOW('i', 49, struct ifreq)    /* add m'cast addr */
+#define SIOCDELMULTI     _IOW('i', 50, struct ifreq)    /* del m'cast addr */
+#define SIOCGIFMTU      _IOWR('i', 51, struct ifreq)    /* get IF mtu */
+#define SIOCSIFMTU       _IOW('i', 52, struct ifreq)    /* set IF mtu */
+#define SIOCGIFPHYS     _IOWR('i', 53, struct ifreq)    /* get IF wire */
+#define SIOCSIFPHYS      _IOW('i', 54, struct ifreq)    /* set IF wire */
+#define SIOCSIFMEDIA    _IOWR('i', 55, struct ifreq)    /* set net media */
+
+/*
+ * The command SIOCGIFMEDIA does not allow a process to access the extended
+ * media subtype and extended subtype values are returned as IFM_OTHER.
+ */
+#define SIOCGIFMEDIA    _IOWR('i', 56, struct ifmediareq) /* get compatible net media  */
+
+#define SIOCSIFGENERIC   _IOW('i', 57, struct ifreq)    /* generic IF set op */
+#define SIOCGIFGENERIC  _IOWR('i', 58, struct ifreq)    /* generic IF get op */
+#define SIOCRSLVMULTI   _IOWR('i', 59, struct rslvmulti_req)
+
+#define SIOCSIFLLADDR   _IOW('i', 60, struct ifreq)     /* set link level addr */
+#define SIOCGIFSTATUS   _IOWR('i', 61, struct ifstat)   /* get IF status */
+#define SIOCSIFPHYADDR   _IOW('i', 62, struct ifaliasreq) /* set gif addres */
+#define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq)    /* get gif psrc addr */
+#define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq)    /* get gif pdst addr */
+#define SIOCDIFPHYADDR   _IOW('i', 65, struct ifreq)    /* delete gif addrs */
+
+#define SIOCGIFDEVMTU   _IOWR('i', 68, struct ifreq)    /* get if ifdevmtu */
+#define SIOCSIFALTMTU    _IOW('i', 69, struct ifreq)    /* set if alternate mtu */
+#define SIOCGIFALTMTU   _IOWR('i', 72, struct ifreq)    /* get if alternate mtu */
+#define SIOCSIFBOND      _IOW('i', 70, struct ifreq)    /* set bond if config */
+#define SIOCGIFBOND     _IOWR('i', 71, struct ifreq)    /* get bond if config */
+
+/*
+ * The command SIOCGIFXMEDIA is meant to be used by processes only to be able
+ * to access the extended media subtypes with the extended IFM_TMASK.
+ *
+ * An ifnet must not implement SIOCGIFXMEDIA as it gets the extended
+ * media subtypes by simply compiling with <net/if_media.h>
+ */
+#define SIOCGIFXMEDIA   _IOWR('i', 72, struct ifmediareq) /* get net extended media */
+
+
+#define SIOCSIFCAP       _IOW('i', 90, struct ifreq)    /* set IF features */
+#define SIOCGIFCAP      _IOWR('i', 91, struct ifreq)    /* get IF features */
+
+#define SIOCIFCREATE    _IOWR('i', 120, struct ifreq)   /* create clone if */
+#define SIOCIFDESTROY    _IOW('i', 121, struct ifreq)   /* destroy clone if */
+#define SIOCIFCREATE2   _IOWR('i', 122, struct ifreq)   /* create clone if with data */
+
+#define SIOCSDRVSPEC    _IOW('i', 123, struct ifdrv)    /* set driver-specific
+	                                                 *         parameters */
+#define SIOCGDRVSPEC    _IOWR('i', 123, struct ifdrv)   /* get driver-specific
+	                                                 *         parameters */
+#define SIOCSIFVLAN      _IOW('i', 126, struct ifreq)   /* set VLAN config */
+#define SIOCGIFVLAN     _IOWR('i', 127, struct ifreq)   /* get VLAN config */
+#define SIOCSETVLAN     SIOCSIFVLAN
+#define SIOCGETVLAN     SIOCGIFVLAN
+
+#define SIOCIFGCLONERS  _IOWR('i', 129, struct if_clonereq) /* get cloners */
+
+#define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq)   /* get ppp asyncmap */
+#define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq)    /* set ppp asyncmap */
+
+
+
+#define SIOCGIFMAC      _IOWR('i', 130, struct ifreq)   /* deprecated */
+#define SIOCSIFMAC      _IOW('i', 131, struct ifreq)    /* deprecated */
+#define SIOCSIFKPI      _IOW('i', 134, struct ifreq) /* set interface kext param - root only */
+#define SIOCGIFKPI      _IOWR('i', 135, struct ifreq) /* get interface kext param */
+
+#define SIOCGIFWAKEFLAGS _IOWR('i', 136, struct ifreq) /* get interface wake property flags */
+
+#define SIOCGIFFUNCTIONALTYPE   _IOWR('i', 173, struct ifreq) /* get interface functional type */
+
+#define SIOCSIF6LOWPAN  _IOW('i', 196, struct ifreq)    /* set 6LOWPAN config */
+#define SIOCGIF6LOWPAN  _IOWR('i', 197, struct ifreq)   /* get 6LOWPAN config */
+
+
+#endif /* !_SYS_SOCKIO_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/sys/sysctl.h
@@ -338,8 +338,8 @@ struct ctlname {
 #define KERN_KDSET_TYPEFILTER 22
 #define KERN_KDBUFWAIT        23
 #define KERN_KDCPUMAP         24
-#define KERN_KDCPUMAP_EXT     25
-/* 25 - 27 unused */
+/* 25 - 26 unused */
+#define KERN_KDWRITEMAP_V3    27
 #define KERN_KDWRITETR_V3     28
 
 #define CTL_KERN_NAMES { \
@@ -668,28 +668,6 @@ extern struct loadavg averunnable;
  *   hw.l2cachesize            -
  *   hw.l3cachesize            -
  *
- *   hw.nperflevels            - Number of core types in the system. See the parameters below, which can be used to get
- *                             - information associated with a specific perf level.
- *
- *   The following parameters apply to perflevel N, where N is a number between 0 and the number of core types in the system minus one.
- *   perflevel 0 always refers to the highest performance core type in the system.
- *
- *   hw.perflevelN.physicalcpu      - The number of physical processors available in the current power management mode.
- *   hw.perflevelN.physicalcpumax   - The maximum number of physical processors that could be available this boot.
- *   hw.perflevelN.logicalcpu       - The number of logical processors available in the current power management mode.
- *   hw.perflevelN.logicalcpumax    - The maximum number of logical processors that could be available this boot.
- *
- *   hw.perflevelN.l1dcachesize     - These values provide the size in bytes of the L1, L2 and L3 caches.  If a cache is not present
- *   hw.perflevelN.l1icachesize     - then the selector will return and error.
- *   hw.perflevelN.l2cachesize      -
- *   hw.perflevelN.l3cachesize      -
- *
- *   hw.perflevelN.cpusperl2        - These values provide the number of CPUs of the same type that share L2 and L3 caches.
- *   hw.perflevelN.cpusperl3        - If a cache is not present then the selector will return and error.
- *
- *   hw.perflevelN.l2perflevels     - These values provide a bitmap, where bit  number of CPUs of the same type that share L2 and L3 caches.
- *   hw.perflevelN.l3perflevels     - If a cache is not present then the selector will return and error.
- *
  *   hw.packages               - Gives the number of processor packages.
  *
  * These are the selectors for optional processor features for specific processors.  Selectors that return errors are not support
lib/libc/include/any-macos.11-any/sys/ttycom.h
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */
+/*-
+ * Copyright (c) 1982, 1986, 1990, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94
+ */
+
+#ifndef _SYS_TTYCOM_H_
+#define _SYS_TTYCOM_H_
+
+#include <sys/ioccom.h>
+/*
+ * Tty ioctl's except for those supported only for backwards compatibility
+ * with the old tty driver.
+ */
+
+/*
+ * Window/terminal size structure.  This information is stored by the kernel
+ * in order to provide a consistent interface, but is not used by the kernel.
+ */
+struct winsize {
+	unsigned short  ws_row;         /* rows, in characters */
+	unsigned short  ws_col;         /* columns, in characters */
+	unsigned short  ws_xpixel;      /* horizontal size, pixels */
+	unsigned short  ws_ypixel;      /* vertical size, pixels */
+};
+
+#define TIOCMODG        _IOR('t', 3, int)       /* get modem control state */
+#define TIOCMODS        _IOW('t', 4, int)       /* set modem control state */
+#define         TIOCM_LE        0001            /* line enable */
+#define         TIOCM_DTR       0002            /* data terminal ready */
+#define         TIOCM_RTS       0004            /* request to send */
+#define         TIOCM_ST        0010            /* secondary transmit */
+#define         TIOCM_SR        0020            /* secondary receive */
+#define         TIOCM_CTS       0040            /* clear to send */
+#define         TIOCM_CAR       0100            /* carrier detect */
+#define         TIOCM_CD        TIOCM_CAR
+#define         TIOCM_RNG       0200            /* ring */
+#define         TIOCM_RI        TIOCM_RNG
+#define         TIOCM_DSR       0400            /* data set ready */
+                                                /* 8-10 compat */
+#define TIOCEXCL         _IO('t', 13)           /* set exclusive use of tty */
+#define TIOCNXCL         _IO('t', 14)           /* reset exclusive use of tty */
+                                                /* 15 unused */
+#define TIOCFLUSH       _IOW('t', 16, int)      /* flush buffers */
+                                                /* 17-18 compat */
+#define TIOCGETA        _IOR('t', 19, struct termios) /* get termios struct */
+#define TIOCSETA        _IOW('t', 20, struct termios) /* set termios struct */
+#define TIOCSETAW       _IOW('t', 21, struct termios) /* drain output, set */
+#define TIOCSETAF       _IOW('t', 22, struct termios) /* drn out, fls in, set */
+#define TIOCGETD        _IOR('t', 26, int)      /* get line discipline */
+#define TIOCSETD        _IOW('t', 27, int)      /* set line discipline */
+#define TIOCIXON         _IO('t', 129)          /* internal input VSTART */
+#define TIOCIXOFF        _IO('t', 128)          /* internal input VSTOP */
+                                                /* 127-124 compat */
+#define TIOCSBRK         _IO('t', 123)          /* set break bit */
+#define TIOCCBRK         _IO('t', 122)          /* clear break bit */
+#define TIOCSDTR         _IO('t', 121)          /* set data terminal ready */
+#define TIOCCDTR         _IO('t', 120)          /* clear data terminal ready */
+#define TIOCGPGRP       _IOR('t', 119, int)     /* get pgrp of tty */
+#define TIOCSPGRP       _IOW('t', 118, int)     /* set pgrp of tty */
+                                                /* 117-116 compat */
+#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
+#define TIOCSTI         _IOW('t', 114, char)    /* simulate terminal input */
+#define TIOCNOTTY        _IO('t', 113)          /* void tty association */
+#define TIOCPKT         _IOW('t', 112, int)     /* pty: set/clear packet mode */
+#define         TIOCPKT_DATA            0x00    /* data packet */
+#define         TIOCPKT_FLUSHREAD       0x01    /* flush packet */
+#define         TIOCPKT_FLUSHWRITE      0x02    /* flush packet */
+#define         TIOCPKT_STOP            0x04    /* stop output */
+#define         TIOCPKT_START           0x08    /* start output */
+#define         TIOCPKT_NOSTOP          0x10    /* no more ^S, ^Q */
+#define         TIOCPKT_DOSTOP          0x20    /* now do ^S ^Q */
+#define         TIOCPKT_IOCTL           0x40    /* state change of pty driver */
+#define TIOCSTOP         _IO('t', 111)          /* stop output, like ^S */
+#define TIOCSTART        _IO('t', 110)          /* start output, like ^Q */
+#define TIOCMSET        _IOW('t', 109, int)     /* set all modem bits */
+#define TIOCMBIS        _IOW('t', 108, int)     /* bis modem bits */
+#define TIOCMBIC        _IOW('t', 107, int)     /* bic modem bits */
+#define TIOCMGET        _IOR('t', 106, int)     /* get all modem bits */
+#define TIOCREMOTE      _IOW('t', 105, int)     /* remote input editing */
+#define TIOCGWINSZ      _IOR('t', 104, struct winsize)  /* get window size */
+#define TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */
+#define TIOCUCNTL       _IOW('t', 102, int)     /* pty: set/clr usr cntl mode */
+#define TIOCSTAT         _IO('t', 101)          /* simulate ^T status message */
+#define         UIOCCMD(n)      _IO('u', n)     /* usr cntl op "n" */
+#define TIOCSCONS       _IO('t', 99)            /* 4.2 compatibility */
+#define TIOCCONS        _IOW('t', 98, int)      /* become virtual console */
+#define TIOCSCTTY        _IO('t', 97)           /* become controlling tty */
+#define TIOCEXT         _IOW('t', 96, int)      /* pty: external processing */
+#define TIOCSIG          _IO('t', 95)           /* pty: generate signal */
+#define TIOCDRAIN        _IO('t', 94)           /* wait till output drained */
+#define TIOCMSDTRWAIT   _IOW('t', 91, int)      /* modem: set wait on close */
+#define TIOCMGDTRWAIT   _IOR('t', 90, int)      /* modem: get wait on close */
+#define TIOCTIMESTAMP   _IOR('t', 89, struct timeval)   /* enable/get timestamp
+	                                                 * of last input event */
+#define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval)  /* enable/get timestamp
+	                                                 * of last DCd rise */
+#define TIOCSDRAINWAIT  _IOW('t', 87, int)      /* set ttywait timeout */
+#define TIOCGDRAINWAIT  _IOR('t', 86, int)      /* get ttywait timeout */
+#define TIOCDSIMICROCODE _IO('t', 85)           /* download microcode to
+	                                         * DSI Softmodem */
+#define TIOCPTYGRANT    _IO('t', 84)            /* grantpt(3) */
+#define TIOCPTYGNAME    _IOC(IOC_OUT, 't', 83, 128)     /* ptsname(3) */
+#define TIOCPTYUNLK     _IO('t', 82)            /* unlockpt(3) */
+
+#define TTYDISC         0               /* termios tty line discipline */
+#define TABLDISC        3               /* tablet discipline */
+#define SLIPDISC        4               /* serial IP discipline */
+#define PPPDISC         5               /* PPP discipline */
+
+#endif /* !_SYS_TTYCOM_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/uuid/uuid.h
@@ -0,0 +1,79 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/_types.h>
+#include <sys/_types/_uuid_t.h>
+
+#ifndef _UUID_STRING_T
+#define _UUID_STRING_T
+typedef __darwin_uuid_string_t  uuid_string_t;
+#endif /* _UUID_STRING_T */
+
+#define UUID_DEFINE(name, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15) \
+	static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+
+UUID_DEFINE(UUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void uuid_clear(uuid_t uu);
+
+int uuid_compare(const uuid_t uu1, const uuid_t uu2);
+
+void uuid_copy(uuid_t dst, const uuid_t src);
+
+void uuid_generate(uuid_t out);
+void uuid_generate_random(uuid_t out);
+void uuid_generate_time(uuid_t out);
+
+void uuid_generate_early_random(uuid_t out);
+
+int uuid_is_null(const uuid_t uu);
+
+int uuid_parse(const uuid_string_t in, uuid_t uu);
+
+void uuid_unparse(const uuid_t uu, uuid_string_t out);
+void uuid_unparse_lower(const uuid_t uu, uuid_string_t out);
+void uuid_unparse_upper(const uuid_t uu, uuid_string_t out);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UUID_UUID_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/xpc/activity.h
@@ -0,0 +1,446 @@
+#ifndef __XPC_ACTIVITY_H__
+#define __XPC_ACTIVITY_H__
+
+#ifndef __XPC_INDIRECT__
+#error "Please #include <xpc/xpc.h> instead of this file directly."
+// For HeaderDoc.
+#include <xpc/base.h>
+#endif // __XPC_INDIRECT__ 
+
+#ifdef __BLOCKS__
+
+XPC_ASSUME_NONNULL_BEGIN
+__BEGIN_DECLS
+
+/*
+ * The following are a collection of keys and values used to set an activity's
+ * execution criteria.
+ */
+
+/*!
+ * @constant XPC_ACTIVITY_INTERVAL
+ * An integer property indicating the desired time interval (in seconds) of the 
+ * activity. The activity will not be run more than once per time interval.
+ * Due to the nature of XPC Activity finding an opportune time to run
+ * the activity, any two occurrences may be more or less than 'interval'
+ * seconds apart, but on average will be 'interval' seconds apart.
+ * The presence of this key implies the following, unless overridden:
+ * - XPC_ACTIVITY_REPEATING with a value of true
+ * - XPC_ACTIVITY_DELAY with a value of half the 'interval'
+ *   The delay enforces a minimum distance between any two occurrences.
+ * - XPC_ACTIVITY_GRACE_PERIOD with a value of half the 'interval'.
+ *   The grace period is the amount of time allowed to pass after the end of
+ *   the interval before more aggressive scheduling occurs. The grace period
+ *   does not increase the size of the interval.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_INTERVAL;
+
+/*!
+ * @constant XPC_ACTIVITY_REPEATING
+ * A boolean property indicating whether this is a repeating activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_REPEATING;
+
+/*!
+ * @constant XPC_ACTIVITY_DELAY
+ * An integer property indicating the number of seconds to delay before
+ * beginning the activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_DELAY;
+
+/*!
+ * @constant XPC_ACTIVITY_GRACE_PERIOD
+ * An integer property indicating the number of seconds to allow as a grace
+ * period before the scheduling of the activity becomes more aggressive.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_GRACE_PERIOD;
+
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_1_MIN;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_5_MIN;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_15_MIN;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_30_MIN;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_1_HOUR;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_4_HOURS;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_8_HOURS;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_1_DAY;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const int64_t XPC_ACTIVITY_INTERVAL_7_DAYS;
+
+/*!
+ * @constant XPC_ACTIVITY_PRIORITY
+ * A string property indicating the priority of the activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_PRIORITY;
+
+/*!
+ * @constant XPC_ACTIVITY_PRIORITY_MAINTENANCE
+ * A string indicating activity is maintenance priority.
+ *
+ * Maintenance priority is intended for user-invisible maintenance tasks
+ * such as garbage collection or optimization.
+ *
+ * Maintenance activities are not permitted to run if the device thermal
+ * condition exceeds a nominal level or if the battery level is lower than 20%.
+ * In Low Power Mode (on supported devices), maintenance activities are not
+ * permitted to run while the device is on battery, or plugged in and the
+ * battery level is lower than 30%.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_PRIORITY_MAINTENANCE;
+
+/*!
+ * @constant XPC_ACTIVITY_PRIORITY_UTILITY
+ * A string indicating activity is utility priority.
+ *
+ * Utility priority is intended for user-visible tasks such as fetching data
+ * from the network, copying files, or importing data.
+ *
+ * Utility activities are not permitted to run if the device thermal condition
+ * exceeds a moderate level or if the battery level is less than 10%.  In Low
+ * Power Mode (on supported devices) when on battery power, utility activities
+ * are only permitted when they are close to their deadline (90% of their time
+ * window has elapsed).
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_PRIORITY_UTILITY;
+
+/*!
+ * @constant XPC_ACTIVITY_ALLOW_BATTERY
+ * A Boolean value indicating whether the activity should be allowed to run
+ * while the computer is on battery power. The default value is false for
+ * maintenance priority activity and true for utility priority activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_ALLOW_BATTERY;
+
+/*!
+ * @constant XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP
+ * A Boolean value indicating whether the activity should only be performed
+ * while device appears to be asleep.  Note that the definition of screen sleep
+ * may vary by platform and may include states where the device is known to be
+ * idle despite the fact that the display itself is still powered.  Defaults to
+ * false.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool
+
+/*!
+ * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL
+ * An integer percentage of minimum battery charge required to allow the
+ * activity to run. A default minimum battery level is determined by the
+ * system.
+ */
+__OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0,
+	"REQUIRE_BATTERY_LEVEL is not implemented")
+XPC_EXPORT
+const char * const XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL; // int (%)
+
+/*!
+ * @constant XPC_ACTIVITY_REQUIRE_HDD_SPINNING
+ * A Boolean value indicating whether the activity should only be performed
+ * while the hard disk drive (HDD) is spinning. Computers with flash storage
+ * are considered to be equivalent to HDD spinning. Defaults to false.
+ */
+__OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0,
+	"REQUIRE_HDD_SPINNING is not implemented")
+XPC_EXPORT
+const char * const XPC_ACTIVITY_REQUIRE_HDD_SPINNING; // bool
+
+/*!
+ * @define XPC_TYPE_ACTIVITY
+ * A type representing the XPC activity object.
+ */
+#define XPC_TYPE_ACTIVITY (&_xpc_type_activity)
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+XPC_TYPE(_xpc_type_activity);
+
+/*!
+ * @typedef xpc_activity_t
+ *
+ * @abstract
+ * An XPC activity object.
+ *
+ * @discussion
+ * This object represents a set of execution criteria and a current execution
+ * state for background activity on the system. Once an activity is registered,
+ * the system will evaluate its criteria to determine whether the activity is
+ * eligible to run under current system conditions. When an activity becomes
+ * eligible to run, its execution state will be updated and an invocation of
+ * its handler block will be made.
+ */
+XPC_DECL(xpc_activity);
+
+/*!
+ * @typedef xpc_activity_handler_t
+ *
+ * @abstract
+ * A block that is called when an XPC activity becomes eligible to run.
+ */
+XPC_NONNULL1
+typedef void (^xpc_activity_handler_t)(xpc_activity_t activity);
+
+/*!
+ * @constant XPC_ACTIVITY_CHECK_IN
+ * This constant may be passed to xpc_activity_register() as the criteria
+ * dictionary in order to check in with the system for previously registered
+ * activity using the same identifier (for example, an activity taken from a
+ * launchd property list).
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT
+const xpc_object_t XPC_ACTIVITY_CHECK_IN;
+
+/*!
+ * @function xpc_activity_register
+ *
+ * @abstract
+ * Registers an activity with the system.
+ *
+ * @discussion
+ * Registers a new activity with the system. The criteria of the activity are
+ * described by the dictionary passed to this function. If an activity with the
+ * same identifier already exists, the criteria provided override the existing
+ * criteria unless the special dictionary XPC_ACTIVITY_CHECK_IN is used. The
+ * XPC_ACTIVITY_CHECK_IN dictionary instructs the system to first look up an
+ * existing activity without modifying its criteria. Once the existing activity
+ * is found (or a new one is created with an empty set of criteria) the handler
+ * will be called with an activity object in the XPC_ACTIVITY_STATE_CHECK_IN
+ * state.
+ *
+ * @param identifier
+ * A unique identifier for the activity. Each application has its own namespace.
+ * The identifier should remain constant across registrations, relaunches of
+ * the application, and reboots. It should identify the kind of work being done,
+ * not a particular invocation of the work.
+ *
+ * @param criteria
+ * A dictionary of criteria for the activity.
+ *
+ * @param handler
+ * The handler block to be called when the activity changes state to one of the
+ * following states:
+ * - XPC_ACTIVITY_STATE_CHECK_IN (optional)
+ * - XPC_ACTIVITY_STATE_RUN
+ *
+ * The handler block is never invoked reentrantly. It will be invoked on a
+ * dispatch queue with an appropriate priority to perform the activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL3
+void
+xpc_activity_register(const char *identifier, xpc_object_t criteria,
+	xpc_activity_handler_t handler);
+
+/*!
+ * @function xpc_activity_copy_criteria
+ *
+ * @abstract
+ * Returns an XPC dictionary describing the execution criteria of an activity.
+ * This will return NULL in cases where the activity has already completed, e.g.
+ * when checking in to an event that finished and was not rescheduled.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_WARN_RESULT XPC_RETURNS_RETAINED XPC_NONNULL1
+xpc_object_t _Nullable
+xpc_activity_copy_criteria(xpc_activity_t activity);
+
+/*!
+ * @function xpc_activity_set_criteria
+ *
+ * @abstract
+ * Modifies the execution criteria of an activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2
+void
+xpc_activity_set_criteria(xpc_activity_t activity, xpc_object_t criteria);
+
+/*!
+ * @enum xpc_activity_state_t
+ * An activity is defined to be in one of the following states. Applications
+ * may check the current state of the activity using xpc_activity_get_state()
+ * in the handler block provided to xpc_activity_register().
+ *
+ * The application can modify the state of the activity by calling
+ * xpc_activity_set_state() with one of the following:
+ * - XPC_ACTIVITY_STATE_DEFER
+ * - XPC_ACTIVITY_STATE_CONTINUE
+ * - XPC_ACTIVITY_STATE_DONE
+ *
+ * @constant XPC_ACTIVITY_STATE_CHECK_IN
+ * An activity in this state has just completed a checkin with the system after
+ * XPC_ACTIVITY_CHECK_IN was provided as the criteria dictionary to
+ * xpc_activity_register. The state gives the application an opportunity to
+ * inspect and modify the activity's criteria.
+ *
+ * @constant XPC_ACTIVITY_STATE_WAIT
+ * An activity in this state is waiting for an opportunity to run. This value
+ * is never returned within the activity's handler block, as the block is
+ * invoked in response to XPC_ACTIVITY_STATE_CHECK_IN or XPC_ACTIVITY_STATE_RUN.
+ *
+ * Note:
+ * A launchd job may idle exit while an activity is in the wait state and be
+ * relaunched in response to the activity becoming runnable. The launchd job
+ * simply needs to re-register for the activity on its next launch by passing
+ * XPC_ACTIVITY_STATE_CHECK_IN to xpc_activity_register().
+ *
+ * @constant XPC_ACTIVITY_STATE_RUN
+ * An activity in this state is eligible to run based on its criteria.
+ *
+ * @constant XPC_ACTIVITY_STATE_DEFER
+ * An application may pass this value to xpc_activity_set_state() to indicate
+ * that the activity should be deferred (placed back into the WAIT state) until
+ * a time when its criteria are met again. Deferring an activity does not reset
+ * any of its time-based criteria (in other words, it will remain past due).
+ *
+ * IMPORTANT:
+ * This should be done in response to observing xpc_activity_should_defer().
+ * It should not be done unilaterally. If you determine that conditions are bad
+ * to do your activity's work for reasons you can't express in a criteria
+ * dictionary, you should set the activity's state to XPC_ACTIVITY_STATE_DONE.
+ *
+ *
+ * @constant XPC_ACTIVITY_STATE_CONTINUE
+ * An application may pass this value to xpc_activity_set_state() to indicate
+ * that the activity will continue its operation beyond the return of its
+ * handler block. This can be used to extend an activity to include asynchronous
+ * operations. The activity's handler block will not be invoked again until the
+ * state has been updated to either XPC_ACTIVITY_STATE_DEFER or, in the case
+ * of repeating activity, XPC_ACTIVITY_STATE_DONE.
+ *
+ * @constant XPC_ACTIVITY_STATE_DONE
+ * An application may pass this value to xpc_activity_set_state() to indicate
+ * that the activity has completed. For non-repeating activity, the resources
+ * associated with the activity will be automatically released upon return from
+ * the handler block. For repeating activity, timers present in the activity's
+ * criteria will be reset.
+ */
+enum {
+	XPC_ACTIVITY_STATE_CHECK_IN,
+	XPC_ACTIVITY_STATE_WAIT,
+	XPC_ACTIVITY_STATE_RUN,
+	XPC_ACTIVITY_STATE_DEFER,
+	XPC_ACTIVITY_STATE_CONTINUE,
+	XPC_ACTIVITY_STATE_DONE,
+};
+typedef long xpc_activity_state_t;
+
+/*!
+ * @function xpc_activity_get_state
+ *
+ * @abstract
+ * Returns the current state of an activity.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1
+xpc_activity_state_t
+xpc_activity_get_state(xpc_activity_t activity);
+
+/*!
+ * @function xpc_activity_set_state
+ *
+ * @abstract
+ * Updates the current state of an activity.
+ *
+ * @return
+ * Returns true if the state was successfully updated; otherwise, returns
+ * false if the requested state transition is not valid.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1
+bool
+xpc_activity_set_state(xpc_activity_t activity, xpc_activity_state_t state);
+
+/*!
+ * @function xpc_activity_should_defer
+ *
+ * @abstract
+ * Test whether an activity should be deferred.
+ *
+ * @discussion
+ * This function may be used to test whether the criteria of a long-running
+ * activity are still satisfied. If not, the system indicates that the
+ * application should defer the activity. The application may acknowledge the
+ * deferral by calling xpc_activity_set_state() with XPC_ACTIVITY_STATE_DEFER.
+ * Once deferred, the system will place the activity back into the WAIT state
+ * and re-invoke the handler block at the earliest opportunity when the criteria
+ * are once again satisfied.
+ *
+ * @return
+ * Returns true if the activity should be deferred.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1
+bool
+xpc_activity_should_defer(xpc_activity_t activity);
+
+/*!
+ * @function xpc_activity_unregister
+ *
+ * @abstract
+ * Unregisters an activity found by its identifier.
+ *
+ * @discussion
+ * A dynamically registered activity will be deleted in response to this call.
+ * Statically registered activity (from a launchd property list) will be
+ * deleted until the job is next loaded (e.g. at next boot).
+ *
+ * Unregistering an activity has no effect on any outstanding xpc_activity_t
+ * objects or any currently executing xpc_activity_handler_t blocks; however,
+ * no new handler block invocations will be made after it is unregistered.
+ *
+ * @param identifier
+ * The identifier of the activity to unregister.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
+XPC_EXPORT XPC_NONNULL1
+void
+xpc_activity_unregister(const char *identifier);
+
+__END_DECLS
+XPC_ASSUME_NONNULL_END
+
+#endif // __BLOCKS__
+
+#endif // __XPC_ACTIVITY_H__
\ No newline at end of file
lib/libc/include/any-macos.11-any/xpc/availability.h
@@ -0,0 +1,124 @@
+#ifndef __XPC_AVAILABILITY_H__
+#define __XPC_AVAILABILITY_H__
+
+#include <Availability.h>
+
+// Certain parts of the project use all the project's headers but have to build
+// against newer OSX SDKs than ebuild uses -- liblaunch_host being the example.
+// So we need to define these.
+#ifndef __MAC_10_16
+#define __MAC_10_16 101600
+#endif // __MAC_10_16
+
+#ifndef __MAC_10_15
+#define __MAC_10_15 101500
+#define __AVAILABILITY_INTERNAL__MAC_10_15 \
+__attribute__((availability(macosx, introduced=10.15)))
+#endif // __MAC_10_15
+
+#ifndef __MAC_10_14
+#define __MAC_10_14 101400
+#define __AVAILABILITY_INTERNAL__MAC_10_14 \
+__attribute__((availability(macosx, introduced=10.14)))
+#endif // __MAC_10_14
+
+#ifndef __MAC_10_13
+#define __MAC_10_13 101300
+#define __AVAILABILITY_INTERNAL__MAC_10_13 \
+	__attribute__((availability(macosx, introduced=10.13)))
+#endif // __MAC_10_13
+
+#ifndef __MAC_10_12
+#define __MAC_10_12 101200
+#define __AVAILABILITY_INTERNAL__MAC_10_12 \
+	__attribute__((availability(macosx, introduced=10.12)))
+#endif // __MAC_10_12
+
+#ifndef __MAC_10_11
+#define __MAC_10_11 101100
+#define __AVAILABILITY_INTERNAL__MAC_10_11 \
+	__attribute__((availability(macosx, introduced=10.11)))
+#endif // __MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11
+#define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11
+#endif // __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11
+
+#ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13
+#define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13
+#endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13
+
+#if __has_include(<simulator_host.h>)
+#include <simulator_host.h>
+#else // __has_include(<simulator_host.h>)
+#ifndef IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED
+#define IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED 999999
+#endif // IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED
+#endif // __has_include(<simulator_host.h>)
+
+#ifndef __WATCHOS_UNAVAILABLE
+#define __WATCHOS_UNAVAILABLE
+#endif
+
+#ifndef __TVOS_UNAVAILABLE
+#define __TVOS_UNAVAILABLE
+#endif
+
+// simulator host-side bits build against SDKs not having __*_AVAILABLE() yet
+#ifndef __OSX_AVAILABLE
+#define __OSX_AVAILABLE(...)
+#endif
+
+#ifndef __IOS_AVAILABLE
+#define __IOS_AVAILABLE(...)
+#endif
+
+#ifndef __TVOS_AVAILABLE
+#define __TVOS_AVAILABLE(...)
+#endif
+
+#ifndef __WATCHOS_AVAILABLE
+#define __WATCHOS_AVAILABLE(...)
+#endif
+
+#ifndef __API_AVAILABLE
+#define __API_AVAILABLE(...)
+#endif
+
+#endif // __XPC_AVAILABILITY_H__
\ No newline at end of file
lib/libc/include/any-macos.11-any/xpc/base.h
@@ -0,0 +1,213 @@
+// Copyright (c) 2009-2011 Apple Inc. All rights reserved.
+
+#ifndef __XPC_BASE_H__
+#define __XPC_BASE_H__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#if !defined(__has_include)
+#define __has_include(x) 0
+#endif // !defined(__has_include)
+
+#if !defined(__has_attribute)
+#define __has_attribute(x) 0
+#endif // !defined(__has_attribute)
+
+#if !defined(__has_feature)
+#define __has_feature(x) 0
+#endif // !defined(__has_feature)
+
+#if !defined(__has_extension)
+#define __has_extension(x) 0
+#endif // !defined(__has_extension)
+
+#if __has_include(<xpc/availability.h>)
+#include <xpc/availability.h>
+#else // __has_include(<xpc/availability.h>)
+#include <Availability.h>
+#endif // __has_include(<xpc/availability.h>)
+
+#include <os/availability.h>
+
+#ifndef __XPC_INDIRECT__
+#error "Please #include <xpc/xpc.h> instead of this file directly."
+#endif // __XPC_INDIRECT__ 
+
+#pragma mark Attribute Shims
+#ifdef __GNUC__
+#define XPC_CONSTRUCTOR __attribute__((constructor))
+#define XPC_NORETURN __attribute__((__noreturn__))
+#define XPC_NOTHROW __attribute__((__nothrow__))
+#define XPC_NONNULL1 __attribute__((__nonnull__(1)))
+#define XPC_NONNULL2 __attribute__((__nonnull__(2)))
+#define XPC_NONNULL3 __attribute__((__nonnull__(3)))
+#define XPC_NONNULL4 __attribute__((__nonnull__(4)))
+#define XPC_NONNULL5 __attribute__((__nonnull__(5)))
+#define XPC_NONNULL6 __attribute__((__nonnull__(6)))
+#define XPC_NONNULL7 __attribute__((__nonnull__(7)))
+#define XPC_NONNULL8 __attribute__((__nonnull__(8)))
+#define XPC_NONNULL9 __attribute__((__nonnull__(9)))
+#define XPC_NONNULL10 __attribute__((__nonnull__(10)))
+#define XPC_NONNULL11 __attribute__((__nonnull__(11)))
+#define XPC_NONNULL_ALL __attribute__((__nonnull__))
+#define XPC_SENTINEL __attribute__((__sentinel__))
+#define XPC_PURE __attribute__((__pure__))
+#define XPC_WARN_RESULT __attribute__((__warn_unused_result__))
+#define XPC_MALLOC __attribute__((__malloc__))
+#define XPC_UNUSED __attribute__((__unused__))
+#define XPC_USED __attribute__((__used__))
+#define XPC_PACKED __attribute__((__packed__))
+#define XPC_PRINTF(m, n) __attribute__((format(printf, m, n)))
+#define XPC_INLINE static __inline__ __attribute__((__always_inline__))
+#define XPC_NOINLINE __attribute__((noinline))
+#define XPC_NOIMPL __attribute__((unavailable))
+
+#if __has_attribute(noescape)
+#define XPC_NOESCAPE __attribute__((__noescape__))
+#else
+#define XPC_NOESCAPE
+#endif
+
+#if __has_extension(attribute_unavailable_with_message)
+#define XPC_UNAVAILABLE(m) __attribute__((unavailable(m)))
+#else // __has_extension(attribute_unavailable_with_message)
+#define XPC_UNAVAILABLE(m) XPC_NOIMPL
+#endif // __has_extension(attribute_unavailable_with_message)
+
+#define XPC_EXPORT extern __attribute__((visibility("default")))
+#define XPC_NOEXPORT __attribute__((visibility("hidden")))
+#define XPC_WEAKIMPORT extern __attribute__((weak_import))
+#define XPC_DEBUGGER_EXCL XPC_NOEXPORT XPC_USED
+#define XPC_TRANSPARENT_UNION __attribute__((transparent_union))
+#if __clang__
+#define XPC_DEPRECATED(m) __attribute__((deprecated(m)))
+#else // __clang__
+#define XPC_DEPRECATED(m) __attribute__((deprecated))
+#endif // __clang 
+
+#if defined(__XPC_TEST__) && __XPC_TEST__
+#define XPC_TESTSTATIC
+#define XPC_TESTEXTERN extern
+#else // defined(__XPC_TEST__) && __XPC_TEST__
+#define XPC_TESTSTATIC static
+#endif // defined(__XPC_TEST__) && __XPC_TEST__
+
+#if __has_feature(objc_arc)
+#define XPC_GIVES_REFERENCE __strong
+#define XPC_UNRETAINED __unsafe_unretained
+#define XPC_BRIDGE(xo) ((__bridge void *)(xo))
+#define XPC_BRIDGEREF_BEGIN(xo) ((__bridge_retained void *)(xo))
+#define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) ((__bridge void *)(xo))
+#define XPC_BRIDGEREF_MIDDLE(xo) ((__bridge id)(xo))
+#define XPC_BRIDGEREF_END(xo) ((__bridge_transfer id)(xo))
+#else // __has_feature(objc_arc)
+#define XPC_GIVES_REFERENCE
+#define XPC_UNRETAINED
+#define XPC_BRIDGE(xo) (xo)
+#define XPC_BRIDGEREF_BEGIN(xo) (xo)
+#define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) (xo)
+#define XPC_BRIDGEREF_MIDDLE(xo) (xo)
+#define XPC_BRIDGEREF_END(xo) (xo)
+#endif // __has_feature(objc_arc)
+
+#define _xpc_unreachable() __builtin_unreachable()
+#else // __GNUC__ 
+/*! @parseOnly */
+#define XPC_CONSTRUCTOR
+/*! @parseOnly */
+#define XPC_NORETURN
+/*! @parseOnly */
+#define XPC_NOTHROW
+/*! @parseOnly */
+#define XPC_NONNULL1
+/*! @parseOnly */
+#define XPC_NONNULL2
+/*! @parseOnly */
+#define XPC_NONNULL3
+/*! @parseOnly */
+#define XPC_NONNULL4
+/*! @parseOnly */
+#define XPC_NONNULL5
+/*! @parseOnly */
+#define XPC_NONNULL6
+/*! @parseOnly */
+#define XPC_NONNULL7
+/*! @parseOnly */
+#define XPC_NONNULL8
+/*! @parseOnly */
+#define XPC_NONNULL9
+/*! @parseOnly */
+#define XPC_NONNULL10
+/*! @parseOnly */
+#define XPC_NONNULL11
+/*! @parseOnly */
+#define XPC_NONNULL(n)
+/*! @parseOnly */
+#define XPC_NONNULL_ALL
+/*! @parseOnly */
+#define XPC_SENTINEL
+/*! @parseOnly */
+#define XPC_PURE
+/*! @parseOnly */
+#define XPC_WARN_RESULT
+/*! @parseOnly */
+#define XPC_MALLOC
+/*! @parseOnly */
+#define XPC_UNUSED
+/*! @parseOnly */
+#define XPC_PACKED
+/*! @parseOnly */
+#define XPC_PRINTF(m, n)
+/*! @parseOnly */
+#define XPC_INLINE static inline
+/*! @parseOnly */
+#define XPC_NOINLINE
+/*! @parseOnly */
+#define XPC_NOIMPL
+/*! @parseOnly */
+#define XPC_EXPORT extern
+/*! @parseOnly */
+#define XPC_WEAKIMPORT
+/*! @parseOnly */
+#define XPC_DEPRECATED
+/*! @parseOnly */
+#define XPC_UNAVAILABLE(m)
+/*! @parseOnly */
+#define XPC_NOESCAPE
+#endif // __GNUC__
+
+#if __has_feature(assume_nonnull)
+#define XPC_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
+#define XPC_ASSUME_NONNULL_END   _Pragma("clang assume_nonnull end")
+#else
+#define XPC_ASSUME_NONNULL_BEGIN
+#define XPC_ASSUME_NONNULL_END
+#endif
+
+#if __has_feature(nullability_on_arrays)
+#define XPC_NONNULL_ARRAY _Nonnull
+#else
+#define XPC_NONNULL_ARRAY
+#endif
+
+#ifdef OS_CLOSED_OPTIONS
+#define XPC_FLAGS_ENUM(_name, _type, ...) \
+		OS_CLOSED_OPTIONS(_name, _type, __VA_ARGS__)
+#else // OS_CLOSED_ENUM
+#define XPC_FLAGS_ENUM(_name, _type, ...) \
+		OS_ENUM(_name, _type, __VA_ARGS__)
+#endif // OS_CLOSED_ENUM
+
+#ifdef OS_CLOSED_ENUM
+#define XPC_ENUM(_name, _type, ...) \
+		OS_CLOSED_ENUM(_name, _type, __VA_ARGS__)
+#else // OS_CLOSED_ENUM
+#define XPC_ENUM(_name, _type, ...) \
+		OS_ENUM(_name, _type, __VA_ARGS__)
+#endif // OS_CLOSED_ENUM
+
+__END_DECLS
+
+#endif // __XPC_BASE_H__
\ No newline at end of file
lib/libc/include/any-macos.11-any/xpc/connection.h
@@ -0,0 +1,748 @@
+#ifndef __XPC_CONNECTION_H__
+#define __XPC_CONNECTION_H__
+
+#ifndef __XPC_INDIRECT__
+#error "Please #include <xpc/xpc.h> instead of this file directly."
+// For HeaderDoc.
+#include <xpc/base.h>
+#endif // __XPC_INDIRECT__
+
+#ifndef __BLOCKS__
+#error "XPC connections require Blocks support."
+#endif // __BLOCKS__
+
+XPC_ASSUME_NONNULL_BEGIN
+__BEGIN_DECLS
+
+/*!
+ * @constant XPC_ERROR_CONNECTION_INTERRUPTED
+ * Will be delivered to the connection's event handler if the remote service
+ * exited. The connection is still live even in this case, and resending a
+ * message will cause the service to be launched on-demand. This error serves
+ * as a client's indication that it should resynchronize any state that it had
+ * given the service.
+ *
+ * Any messages in the queue to be sent will be unwound and canceled when this
+ * error occurs. In the case where a message waiting to be sent has a reply
+ * handler, that handler will be invoked with this error. In the context of the
+ * reply handler, this error indicates that a reply to the message will never
+ * arrive.
+ *
+ * Messages that do not have reply handlers associated with them will be
+ * silently disposed of. This error will only be given to peer connections.
+ */
+#define XPC_ERROR_CONNECTION_INTERRUPTED \
+	XPC_GLOBAL_OBJECT(_xpc_error_connection_interrupted)
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT
+const struct _xpc_dictionary_s _xpc_error_connection_interrupted;
+
+/*!
+ * @constant XPC_ERROR_CONNECTION_INVALID
+ * Will be delivered to the connection's event handler if the named service
+ * provided to xpc_connection_create() could not be found in the XPC service
+ * namespace. The connection is useless and should be disposed of.
+ *
+ * Any messages in the queue to be sent will be unwound and canceled when this
+ * error occurs, similarly to the behavior when XPC_ERROR_CONNECTION_INTERRUPTED
+ * occurs. The only difference is that the XPC_ERROR_CONNECTION_INVALID will be
+ * given to outstanding reply handlers and the connection's event handler.
+ *
+ * This error may be given to any type of connection.
+ */
+#define XPC_ERROR_CONNECTION_INVALID \
+	XPC_GLOBAL_OBJECT(_xpc_error_connection_invalid)
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT
+const struct _xpc_dictionary_s _xpc_error_connection_invalid;
+
+/*!
+ * @constant XPC_ERROR_TERMINATION_IMMINENT
+ * On macOS, this error will be delivered to a peer connection's event handler
+ * when the XPC runtime has determined that the program should exit and that
+ * all outstanding transactions must be wound down, and no new transactions can
+ * be opened.
+ *
+ * After this error has been delivered to the event handler, no more messages
+ * will be received by the connection. The runtime will still attempt to deliver
+ * outgoing messages, but this error should be treated as an indication that
+ * the program will exit very soon, and any outstanding business over the
+ * connection should be wrapped up as quickly as possible and the connection
+ * canceled shortly thereafter.
+ *
+ * This error will only be delivered to peer connections received through a
+ * listener or the xpc_main() event handler.
+ */
+#define XPC_ERROR_TERMINATION_IMMINENT \
+	XPC_GLOBAL_OBJECT(_xpc_error_termination_imminent)
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT
+const struct _xpc_dictionary_s _xpc_error_termination_imminent;
+
+/*!
+ * @constant XPC_CONNECTION_MACH_SERVICE_LISTENER
+ * Passed to xpc_connection_create_mach_service(). This flag indicates that the
+ * caller is the listener for the named service. This flag may only be passed
+ * for services which are advertised in the process' launchd.plist(5). You may
+ * not use this flag to dynamically add services to the Mach bootstrap
+ * namespace.
+ */
+#define XPC_CONNECTION_MACH_SERVICE_LISTENER (1 << 0)
+
+/*!
+ * @constant XPC_CONNECTION_MACH_SERVICE_PRIVILEGED
+ * Passed to xpc_connection_create_mach_service(). This flag indicates that the
+ * job advertising the service name in its launchd.plist(5) should be in the
+ * privileged Mach bootstrap. This is typically accomplished by placing your
+ * launchd.plist(5) in /Library/LaunchDaemons. If specified alongside the
+ * XPC_CONNECTION_MACH_SERVICE_LISTENER flag, this flag is a no-op.
+ */
+#define XPC_CONNECTION_MACH_SERVICE_PRIVILEGED (1 << 1)
+
+/*!
+ * @typedef xpc_finalizer_f
+ * A function that is invoked when a connection is being torn down and its
+ * context needs to be freed. The sole argument is the value that was given to
+ * {@link xpc_connection_set_context} or NULL if no context has been set. It is
+ * not safe to reference the connection from within this function.
+ *
+ * @param value
+ * The context object that is to be disposed of.
+ */
+typedef void (*xpc_finalizer_t)(void * _Nullable value);
+
+/*!
+ * @function xpc_connection_create
+ * Creates a new connection object.
+ *
+ * @param name
+ * If non-NULL, the name of the service with which to connect. The returned
+ * connection will be a peer.
+ *
+ * If NULL, an anonymous listener connection will be created. You can embed the
+ * ability to create new peer connections in an endpoint, which can be inserted
+ * into a message and sent to another process .
+ *
+ * @param targetq
+ * The GCD queue to which the event handler block will be submitted. This
+ * parameter may be NULL, in which case the connection's target queue will be
+ * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT.
+ * The target queue may be changed later with a call to
+ * xpc_connection_set_target_queue().
+ *
+ * @result
+ * A new connection object. The caller is responsible for disposing of the
+ * returned object with {@link xpc_release} when it is no longer needed.
+ *
+ * @discussion
+ * This method will succeed even if the named service does not exist. This is
+ * because the XPC namespace is not queried for the service name until the
+ * connection has been activated. See {@link xpc_connection_activate()}.
+ *
+ * XPC connections, like dispatch sources, are returned in an inactive state, so
+ * you must call {@link xpc_connection_activate()} in order to begin receiving
+ * events from the connection. Also like dispatch sources, connections must be
+ * activated and not suspended in order to be safely released. It is
+ * a programming error to release an inactive or suspended connection.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
+xpc_connection_t
+xpc_connection_create(const char * _Nullable name,
+	dispatch_queue_t _Nullable targetq);
+
+/*!
+ * @function xpc_connection_create_mach_service
+ * Creates a new connection object representing a Mach service.
+ *
+ * @param name
+ * The name of the remote service with which to connect. The service name must
+ * exist in a Mach bootstrap that is accessible to the process and be advertised
+ * in a launchd.plist.
+ *
+ * @param targetq
+ * The GCD queue to which the event handler block will be submitted. This
+ * parameter may be NULL, in which case the connection's target queue will be
+ * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT.
+ * The target queue may be changed later with a call to
+ * xpc_connection_set_target_queue().
+ *
+ * @param flags
+ * Additional attributes with which to create the connection.
+ *
+ * @result
+ * A new connection object.
+ *
+ * @discussion
+ * If the XPC_CONNECTION_MACH_SERVICE_LISTENER flag is given to this method,
+ * then the connection returned will be a listener connection. Otherwise, a peer
+ * connection will be returned. See the documentation for
+ * {@link xpc_connection_set_event_handler()} for the semantics of listener
+ * connections versus peer connections.
+ *
+ * This method will succeed even if the named service does not exist. This is
+ * because the Mach namespace is not queried for the service name until the
+ * connection has been activated. See {@link xpc_connection_activate()}.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL1
+xpc_connection_t
+xpc_connection_create_mach_service(const char *name,
+	dispatch_queue_t _Nullable targetq, uint64_t flags);
+
+/*!
+ * @function xpc_connection_create_from_endpoint
+ * Creates a new connection from the given endpoint.
+ *
+ * @param endpoint
+ * The endpoint from which to create the new connection.
+ *
+ * @result
+ * A new peer connection to the listener represented by the given endpoint.
+ *
+ * The same responsibilities of setting an event handler and activating the
+ * connection after calling xpc_connection_create() apply to the connection
+ * returned by this API. Since the connection yielded by this API is not
+ * associated with a name (and therefore is not rediscoverable), this connection
+ * will receive XPC_ERROR_CONNECTION_INVALID if the listening side crashes,
+ * exits or cancels the listener connection.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL_ALL
+xpc_connection_t
+xpc_connection_create_from_endpoint(xpc_endpoint_t endpoint);
+
+/*!
+ * @function xpc_connection_set_target_queue
+ * Sets the target queue of the given connection.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @param targetq
+ * The GCD queue to which the event handler block will be submitted. This
+ * parameter may be NULL, in which case the connection's target queue will be
+ * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT.
+ *
+ * @discussion
+ * Setting the target queue is asynchronous and non-preemptive and therefore
+ * this method will not interrupt the execution of an already-running event
+ * handler block. Setting the target queue may be likened to issuing a barrier
+ * to the connection which does the actual work of changing the target queue.
+ *
+ * The XPC runtime guarantees this non-preemptiveness even for concurrent target
+ * queues. If the target queue is a concurrent queue, then XPC still guarantees
+ * that there will never be more than one invocation of the connection's event
+ * handler block executing concurrently. If you wish to process events
+ * concurrently, you can dispatch_async(3) to a concurrent queue from within
+ * the event handler.
+ *
+ * IMPORTANT: When called from within the event handler block,
+ * dispatch_get_current_queue(3) is NOT guaranteed to return a pointer to the
+ * queue set with this method.
+ *
+ * Despite this seeming inconsistency, the XPC runtime guarantees that, when the
+ * target queue is a serial queue, the event handler block will execute
+ * synchonously with respect to other blocks submitted to that same queue. When
+ * the target queue is a concurrent queue, the event handler block may run
+ * concurrently with other blocks submitted to that queue, but it will never run
+ * concurrently with other invocations of itself for the same connection, as
+ * discussed previously.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL1
+void
+xpc_connection_set_target_queue(xpc_connection_t connection,
+	dispatch_queue_t _Nullable targetq);
+
+/*!
+ * @function xpc_connection_set_event_handler
+ * Sets the event handler block for the connection.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @param handler
+ * The event handler block.
+ *
+ * @discussion
+ * Setting the event handler is asynchronous and non-preemptive, and therefore
+ * this method will not interrupt the execution of an already-running event
+ * handler block. If the event handler is executing at the time of this call, it
+ * will finish, and then the connection's event handler will be changed before
+ * the next invocation of the event handler. The XPC runtime guarantees this
+ * non-preemptiveness even for concurrent target queues.
+ *
+ * Connection event handlers are non-reentrant, so it is safe to call
+ * xpc_connection_set_event_handler() from within the event handler block.
+ *
+ * The event handler's execution should be treated as a barrier to all
+ * connection activity. When it is executing, the connection will not attempt to
+ * send or receive messages, including reply messages. Thus, it is not safe to
+ * call xpc_connection_send_message_with_reply_sync() on the connection from
+ * within the event handler.
+ *
+ * You do not hold a reference on the object received as the event handler's
+ * only argument. Regardless of the type of object received, it is safe to call
+ * xpc_retain() on the object to obtain a reference to it.
+ *
+ * A connection may receive different events depending upon whether it is a
+ * listener or not. Any connection may receive an error in its event handler.
+ * But while normal connections may receive messages in addition to errors,
+ * listener connections will receive connections and and not messages.
+ *
+ * Connections received by listeners are equivalent to those returned by
+ * xpc_connection_create() with a non-NULL name argument and a NULL targetq
+ * argument with the exception that you do not hold a reference on them.
+ * You must set an event handler and activate the connection. If you do not wish
+ * to accept the connection, you may simply call xpc_connection_cancel() on it
+ * and return. The runtime will dispose of it for you.
+ *
+ * If there is an error in the connection, this handler will be invoked with the
+ * error dictionary as its argument. This dictionary will be one of the well-
+ * known XPC_ERROR_* dictionaries.
+ *
+ * Regardless of the type of event, ownership of the event object is NOT
+ * implicitly transferred. Thus, the object will be released and deallocated at
+ * some point in the future after the event handler returns. If you wish the
+ * event's lifetime to persist, you must retain it with xpc_retain().
+ *
+ * Connections received through the event handler will be released and
+ * deallocated after the connection has gone invalid and delivered that event to
+ * its event handler.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_set_event_handler(xpc_connection_t connection,
+	xpc_handler_t handler);
+
+/*!
+ * @function xpc_connection_activate
+ * Activates the connection. Connections start in an inactive state, so you must
+ * call xpc_connection_activate() on a connection before it will send or receive
+ * any messages.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @discussion
+ * Calling xpc_connection_activate() on an active connection has no effect.
+ * Releasing the last reference on an inactive connection that was created with
+ * an xpc_connection_create*() call is undefined.
+ *
+ * For backward compatibility reasons, xpc_connection_resume() on an inactive
+ * and not otherwise suspended xpc connection has the same effect as calling
+ * xpc_connection_activate(). For new code, using xpc_connection_activate()
+ * is preferred.
+ */
+__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
+__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_activate(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_suspend
+ * Suspends the connection so that the event handler block will not fire and
+ * that the connection will not attempt to send any messages it has in its
+ * queue. All calls to xpc_connection_suspend() must be balanced with calls to
+ * xpc_connection_resume() before releasing the last reference to the
+ * connection.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @discussion
+ * Suspension is asynchronous and non-preemptive, and therefore this method will
+ * not interrupt the execution of an already-running event handler block. If
+ * the event handler is executing at the time of this call, it will finish, and
+ * then the connection will be suspended before the next scheduled invocation
+ * of the event handler. The XPC runtime guarantees this non-preemptiveness even
+ * for concurrent target queues.
+ *
+ * Connection event handlers are non-reentrant, so it is safe to call
+ * xpc_connection_suspend() from within the event handler block.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_suspend(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_resume
+ * Resumes the connection.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @discussion
+ * In order for a connection to become live, every call to
+ * xpc_connection_suspend() must be balanced with a call to
+ * xpc_connection_resume().
+ *
+ * For backward compatibility reasons, xpc_connection_resume() on an inactive
+ * and not otherwise suspended xpc connection has the same effect as calling
+ * xpc_connection_activate(). For new code, using xpc_connection_activate()
+ * is preferred.
+ *
+ * Calling xpc_connection_resume() more times than xpc_connection_suspend()
+ * has been called is otherwise considered an error.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_resume(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_send_message
+ * Sends a message over the connection to the destination service.
+ *
+ * @param connection
+ * The connection over which the message shall be sent.
+ *
+ * @param message
+ * The message to send. This must be a dictionary object. This dictionary is
+ * logically copied by the connection, so it is safe to modify the dictionary
+ * after this call.
+ *
+ * @discussion
+ * Messages are delivered in FIFO order. This API is safe to call from multiple
+ * GCD queues. There is no indication that a message was delivered successfully.
+ * This is because even once the message has been successfully enqueued on the
+ * remote end, there are no guarantees about when the runtime will dequeue the
+ * message and invoke the other connection's event handler block.
+ *
+ * If this API is used to send a message that is in reply to another message,
+ * there is no guarantee of ordering between the invocations of the connection's
+ * event handler and the reply handler for that message, even if they are
+ * targeted to the same queue.
+ *
+ * After extensive study, we have found that clients who are interested in
+ * the state of the message on the server end are typically holding open
+ * transactions related to that message. And the only reliable way to track the
+ * lifetime of that transaction is at the protocol layer. So the server should
+ * send a reply message, which upon receiving, will cause the client to close
+ * its transaction.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_send_message(xpc_connection_t connection, xpc_object_t message);
+
+/*!
+ * @function xpc_connection_send_barrier
+ * Issues a barrier against the connection's message-send activity.
+ *
+ * @param connection
+ * The connection against which the barrier is to be issued.
+ *
+ * @param barrier
+ * The barrier block to issue. This barrier prevents concurrent message-send
+ * activity on the connection. No messages will be sent while the barrier block
+ * is executing.
+ *
+ * @discussion
+ * XPC guarantees that, even if the connection's target queue is a concurrent
+ * queue, there are no other messages being sent concurrently while the barrier
+ * block is executing. XPC does not guarantee that the receipt of messages
+ * (either through the connection's event handler or through reply handlers)
+ * will be suspended while the barrier is executing.
+ *
+ * A barrier is issued relative to the message-send queue. Thus, if you call
+ * xpc_connection_send_message() five times and then call
+ * xpc_connection_send_barrier(), the barrier will be invoked after the fifth
+ * message has been sent and its memory disposed of. You may safely cancel a
+ * connection from within a barrier block.
+ *
+ * If a barrier is issued after sending a message which expects a reply, the
+ * behavior is the same as described above. The receipt of a reply message will
+ * not influence when the barrier runs.
+ *
+ * A barrier block can be useful for throttling resource consumption on the
+ * connected side of a connection. For example, if your connection sends many
+ * large messages, you can use a barrier to limit the number of messages that
+ * are inflight at any given time. This can be particularly useful for messages
+ * that contain kernel resources (like file descriptors) which have a system-
+ * wide limit.
+ *
+ * If a barrier is issued on a canceled connection, it will be invoked
+ * immediately. If a connection has been canceled and still has outstanding
+ * barriers, those barriers will be invoked as part of the connection's
+ * unwinding process.
+ *
+ * It is important to note that a barrier block's execution order is not
+ * guaranteed with respect to other blocks that have been scheduled on the
+ * target queue of the connection. Or said differently,
+ * xpc_connection_send_barrier(3) is not equivalent to dispatch_async(3).
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_send_barrier(xpc_connection_t connection,
+	dispatch_block_t barrier);
+
+/*!
+ * @function xpc_connection_send_message_with_reply
+ * Sends a message over the connection to the destination service and associates
+ * a handler to be invoked when the remote service sends a reply message.
+ *
+ * @param connection
+ * The connection over which the message shall be sent.
+ *
+ * @param message
+ * The message to send. This must be a dictionary object.
+ *
+ * @param replyq
+ * The GCD queue to which the reply handler will be submitted. This may be a
+ * concurrent queue.
+ *
+ * @param handler
+ * The handler block to invoke when a reply to the message is received from
+ * the connection. If the remote service exits prematurely before the reply was
+ * received, the XPC_ERROR_CONNECTION_INTERRUPTED error will be returned.
+ * If the connection went invalid before the message could be sent, the
+ * XPC_ERROR_CONNECTION_INVALID error will be returned.
+ *
+ * @discussion
+ * If the given GCD queue is a concurrent queue, XPC cannot guarantee that there
+ * will not be multiple reply handlers being invoked concurrently. XPC does not
+ * guarantee any ordering for the invocation of reply handers. So if multiple
+ * messages are waiting for replies and the connection goes invalid, there is no
+ * guarantee that the reply handlers will be invoked in FIFO order. Similarly,
+ * XPC does not guarantee that reply handlers will not run concurrently with
+ * the connection's event handler in the case that the reply queue and the
+ * connection's target queue are the same concurrent queue.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL4
+void
+xpc_connection_send_message_with_reply(xpc_connection_t connection,
+	xpc_object_t message, dispatch_queue_t _Nullable replyq,
+	xpc_handler_t handler);
+
+/*!
+ * @function xpc_connection_send_message_with_reply_sync
+ * Sends a message over the connection and blocks the caller until a reply is
+ * received.
+ *
+ * @param connection
+ * The connection over which the message shall be sent.
+ *
+ * @param message
+ * The message to send. This must be a dictionary object.
+ *
+ * @result
+ * The message that the remote service sent in reply to the original message.
+ * If the remote service exits prematurely before the reply was received, the
+ * XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. If the connection
+ * went invalid before the message could be sent, the
+ * XPC_ERROR_CONNECTION_INVALID error will be returned.
+ *
+ * You are responsible for releasing the returned object.
+ *
+ * @discussion
+ * This API supports priority inversion avoidance, and should be used instead of
+ * combining xpc_connection_send_message_with_reply() with a semaphore.
+ *
+ * Invoking this API from a queue that is a part of the target queue hierarchy
+ * results in deadlocks under certain conditions.
+ *
+ * Be judicious about your use of this API. It can block indefinitely, so if you
+ * are using it to implement an API that can be called from the main thread, you
+ * may wish to consider allowing the API to take a queue and callback block so
+ * that results may be delivered asynchronously if possible.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT XPC_RETURNS_RETAINED
+xpc_object_t
+xpc_connection_send_message_with_reply_sync(xpc_connection_t connection,
+	xpc_object_t message);
+
+/*!
+ * @function xpc_connection_cancel
+ * Cancels the connection and ensures that its event handler will not fire
+ * again. After this call, any messages that have not yet been sent will be
+ * discarded, and the connection will be unwound. If there are messages that are
+ * awaiting replies, they will have their reply handlers invoked with the
+ * XPC_ERROR_CONNECTION_INVALID error.
+ *
+ * @param connection
+ * The connection object which is to be manipulated.
+ *
+ * @discussion
+ * Cancellation is asynchronous and non-preemptive and therefore this method
+ * will not interrupt the execution of an already-running event handler block.
+ * If the event handler is executing at the time of this call, it will finish,
+ * and then the connection will be canceled, causing a final invocation of the
+ * event handler to be scheduled with the XPC_ERROR_CONNECTION_INVALID error.
+ * After that invocation, there will be no further invocations of the event
+ * handler.
+ *
+ * The XPC runtime guarantees this non-preemptiveness even for concurrent target
+ * queues.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL
+void
+xpc_connection_cancel(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_get_name
+ * Returns the name of the service with which the connections was created.
+ *
+ * @param connection
+ * The connection object which is to be examined.
+ *
+ * @result
+ * The name of the remote service. If you obtained the connection through an
+ * invocation of another connection's event handler, NULL is returned.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+const char * _Nullable
+xpc_connection_get_name(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_get_euid
+ * Returns the EUID of the remote peer.
+ *
+ * @param connection
+ * The connection object which is to be examined.
+ *
+ * @result
+ * The EUID of the remote peer at the time the connection was made.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+uid_t
+xpc_connection_get_euid(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_get_egid
+ * Returns the EGID of the remote peer.
+ *
+ * @param connection
+ * The connection object which is to be examined.
+ *
+ * @result
+ * The EGID of the remote peer at the time the connection was made.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+gid_t
+xpc_connection_get_egid(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_get_pid
+ * Returns the PID of the remote peer.
+ *
+ * @param connection
+ * The connection object which is to be examined.
+ *
+ * @result
+ * The PID of the remote peer.
+ *
+ * @discussion
+ * A given PID is not guaranteed to be unique across an entire boot cycle.
+ * Great care should be taken when dealing with this information, as it can go
+ * stale after the connection is established. OS X recycles PIDs, and therefore
+ * another process could spawn and claim the PID before a message is actually
+ * received from the connection.
+ *
+ * XPC will deliver an error to your event handler if the remote process goes
+ * away, but there are no guarantees as to the timing of this notification's
+ * delivery either at the kernel layer or at the XPC layer.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+pid_t
+xpc_connection_get_pid(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_get_asid
+ * Returns the audit session identifier of the remote peer.
+ *
+ * @param connection
+ * The connection object which is to be examined.
+ *
+ * @result
+ * The audit session ID of the remote peer at the time the connection was made.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+au_asid_t
+xpc_connection_get_asid(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_set_context
+ * Sets context on an connection.
+ *
+ * @param connection
+ * The connection which is to be manipulated.
+ *
+ * @param context
+ * The context to associate with the connection.
+ *
+ * @discussion
+ * If you must manage the memory of the context object, you must set a finalizer
+ * to dispose of it. If this method is called on a connection which already has
+ * context associated with it, the finalizer will NOT be invoked. The finalizer
+ * is only invoked when the connection is being deallocated.
+ *
+ * It is recommended that, instead of changing the actual context pointer
+ * associated with the object, you instead change the state of the context
+ * object itself.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL1
+void
+xpc_connection_set_context(xpc_connection_t connection,
+	void * _Nullable context);
+
+/*!
+ * @function xpc_connection_get_context
+ * Returns the context associated with the connection.
+ *
+ * @param connection
+ * The connection which is to be examined.
+ *
+ * @result
+ * The context associated with the connection. NULL if there has been no context
+ * associated with the object.
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT
+void * _Nullable
+xpc_connection_get_context(xpc_connection_t connection);
+
+/*!
+ * @function xpc_connection_set_finalizer_f
+ * Sets the finalizer for the given connection.
+ *
+ * @param connection
+ * The connection on which to set the finalizer.
+ *
+ * @param finalizer
+ * The function that will be invoked when the connection's retain count has
+ * dropped to zero and is being torn down.
+ *
+ * @discussion
+ * This method disposes of the context value associated with a connection, as
+ * set by {@link xpc_connection_set_context}.
+ *
+ * For many uses of context objects, this API allows for a convenient shorthand
+ * for freeing them. For example, for a context object allocated with malloc(3):
+ *
+ * xpc_connection_set_finalizer_f(object, free);
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)
+XPC_EXPORT XPC_NONNULL1
+void
+xpc_connection_set_finalizer_f(xpc_connection_t connection,
+	xpc_finalizer_t _Nullable finalizer);
+
+__END_DECLS
+XPC_ASSUME_NONNULL_END
+
+#endif // __XPC_CONNECTION_H__
\ No newline at end of file
lib/libc/include/any-macos.11-any/assert.h
@@ -0,0 +1,111 @@
+/*-
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)assert.h	8.2 (Berkeley) 1/21/94
+ * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $
+ */
+
+#include <sys/cdefs.h>
+#ifdef __cplusplus
+#include <stdlib.h>
+#endif /* __cplusplus */
+
+/*
+ * Unlike other ANSI header files, <assert.h> may usefully be included
+ * multiple times, with and without NDEBUG defined.
+ */
+
+#undef assert
+#undef __assert
+
+#ifdef NDEBUG
+#define	assert(e)	((void)0)
+#else
+
+#ifndef __GNUC__
+
+__BEGIN_DECLS
+#ifndef __cplusplus
+void abort(void) __dead2 __cold;
+#endif /* !__cplusplus */
+int  printf(const char * __restrict, ...);
+__END_DECLS
+
+#define assert(e)  \
+    ((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__)))
+#define __assert(e, file, line) \
+    ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())
+
+#else /* __GNUC__ */
+
+__BEGIN_DECLS
+void __assert_rtn(const char *, const char *, int, const char *) __dead2 __cold __disable_tail_calls;
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
+void __eprintf(const char *, const char *, unsigned, const char *) __dead2 __cold;
+#endif
+__END_DECLS
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
+#define __assert(e, file, line) \
+    __eprintf ("%s:%d: failed assertion `%s'\n", file, line, e)
+#else
+/* 8462256: modified __assert_rtn() replaces deprecated __eprintf() */
+#define __assert(e, file, line) \
+    __assert_rtn ((const char *)-1L, file, line, e)
+#endif
+
+#if __DARWIN_UNIX03
+#define	assert(e) \
+    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
+#else /* !__DARWIN_UNIX03 */
+#define assert(e)  \
+    (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0)
+#endif /* __DARWIN_UNIX03 */
+
+#endif /* __GNUC__ */
+#endif /* NDEBUG */
+
+#ifndef _ASSERT_H_
+#define _ASSERT_H_
+
+#ifndef __cplusplus
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define static_assert _Static_assert
+#endif /* __STDC_VERSION__ */
+#endif /* !__cplusplus */
+
+#endif /* _ASSERT_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/AssertMacros.h
@@ -0,0 +1,1441 @@
+/*
+ * Copyright (c) 2002-2017 by Apple Inc.. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+
+/*
+	File:       AssertMacros.h
+ 
+	Contains:   This file defines structured error handling and assertion macros for
+				programming in C. Originally used in QuickDraw GX and later enhanced.
+				These macros are used throughout Apple's software.
+	
+				New code may not want to begin adopting these macros and instead use
+				existing language functionality.
+	
+				See "Living In an Exceptional World" by Sean Parent
+				(develop, The Apple Technical Journal, Issue 11, August/September 1992)
+				<http://developer.apple.com/dev/techsupport/develop/issue11toc.shtml> or
+				<http://www.mactech.com/articles/develop/issue_11/Parent_final.html>
+				for the methodology behind these error handling and assertion macros.
+	
+	Bugs?:      For bug reports, consult the following page on
+				the World Wide Web:
+
+	 http://developer.apple.com/bugreporter/ 
+*/
+#ifndef __ASSERTMACROS__
+#define __ASSERTMACROS__
+
+#ifdef DEBUG_ASSERT_CONFIG_INCLUDE
+    #include DEBUG_ASSERT_CONFIG_INCLUDE
+#endif
+
+/*
+ *  Macro overview:
+ *  
+ *      check(assertion)
+ *         In production builds, pre-processed away  
+ *         In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE
+ *  
+ *      verify(assertion)
+ *         In production builds, evaluates assertion and does nothing
+ *         In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE
+ *  
+ *      require(assertion, exceptionLabel)
+ *         In production builds, if the assertion expression evaluates to false, goto exceptionLabel
+ *         In debug builds, if the assertion expression evaluates to false, calls DEBUG_ASSERT_MESSAGE
+ *                          and jumps to exceptionLabel
+ *  
+ *      In addition the following suffixes are available:
+ * 
+ *         _noerr     Adds "!= 0" to assertion.  Useful for asserting and OSStatus or OSErr is noErr (zero)
+ *         _action    Adds statement to be executued if assertion fails
+ *         _quiet     Suppress call to DEBUG_ASSERT_MESSAGE
+ *         _string    Allows you to add explanitory message to DEBUG_ASSERT_MESSAGE
+ *  
+ *        For instance, require_noerr_string(resultCode, label, msg) will do nothing if 
+ *        resultCode is zero, otherwise it will call DEBUG_ASSERT_MESSAGE with msg
+ *        and jump to label.
+ *
+ *  Configuration:
+ *
+ *      By default all macros generate "production code" (i.e non-debug).  If  
+ *      DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero
+ *      while this header is included, the macros will generated debug code.
+ *
+ *      If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will
+ *      be prefixed with it.
+ *
+ *      By default, all messages write to stderr.  If you would like to write a custom
+ *      error message formater, defined DEBUG_ASSERT_MESSAGE to your function name.
+ *
+ *      Each individual macro will only be defined if it is not already defined, so
+ *      you can redefine their behavior singly by providing your own definition before
+ *      this file is included.
+ *
+ *      If you define __ASSERTMACROS__ before this file is included, then nothing in
+ *      this file will take effect.
+ *
+ *      Prior to Mac OS X 10.6 the macro names used in this file conflicted with some
+ *      user code, including libraries in boost and the proposed C++ standards efforts,
+ *      and there was no way for a client of this header to resolve this conflict. Because
+ *      of this, most of the macros have been changed so that they are prefixed with 
+ *      __ and contain at least one capital letter, which should alleviate the current
+ *      and future conflicts.  However, to allow current sources to continue to compile,
+ *      compatibility macros are defined at the end with the old names.  A tops script 
+ *      at the end of this file will convert all of the old macro names used in a directory
+ *      to the new names.  Clients are recommended to migrate over to these new macros as
+ *      they update their sources because a future release of Mac OS X will remove the
+ *      old macro definitions ( without the double-underscore prefix ).  Clients who
+ *      want to compile without the old macro definitions can define the macro
+ *      __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before this file is
+ *      included.
+ */
+
+
+/*
+ *  Before including this file, #define DEBUG_ASSERT_COMPONENT_NAME_STRING to
+ *  a C-string containing the name of your client. This string will be passed to
+ *  the DEBUG_ASSERT_MESSAGE macro for inclusion in any assertion messages.
+ *
+ *  If you do not define DEBUG_ASSERT_COMPONENT_NAME_STRING, the default
+ *  DEBUG_ASSERT_COMPONENT_NAME_STRING value, an empty string, will be used by
+ *  the assertion macros.
+ */
+#ifndef DEBUG_ASSERT_COMPONENT_NAME_STRING
+    #define DEBUG_ASSERT_COMPONENT_NAME_STRING ""
+#endif
+
+
+/*
+ *  To activate the additional assertion code and messages for non-production builds,
+ *  #define DEBUG_ASSERT_PRODUCTION_CODE to zero before including this file.
+ *
+ *  If you do not define DEBUG_ASSERT_PRODUCTION_CODE, the default value 1 will be used
+ *  (production code = no assertion code and no messages).
+ */
+#ifndef DEBUG_ASSERT_PRODUCTION_CODE
+   #define DEBUG_ASSERT_PRODUCTION_CODE !DEBUG
+#endif
+
+
+/*
+ *  DEBUG_ASSERT_MESSAGE(component, assertion, label, error, file, line, errorCode)
+ *
+ *  Summary:
+ *    All assertion messages are routed through this macro. If you wish to use your
+ *    own routine to display assertion messages, you can override DEBUG_ASSERT_MESSAGE
+ *    by #defining DEBUG_ASSERT_MESSAGE before including this file.
+ *
+ *  Parameters:
+ *
+ *    componentNameString:
+ *      A pointer to a string constant containing the name of the
+ *      component this code is part of. This must be a string constant
+ *      (and not a string variable or NULL) because the preprocessor
+ *      concatenates it with other string constants.
+ *
+ *    assertionString:
+ *      A pointer to a string constant containing the assertion.
+ *      This must be a string constant (and not a string variable or
+ *      NULL) because the Preprocessor concatenates it with other
+ *      string constants.
+ *    
+ *    exceptionLabelString:
+ *      A pointer to a string containing the exceptionLabel, or NULL.
+ *    
+ *    errorString:
+ *      A pointer to the error string, or NULL. DEBUG_ASSERT_MESSAGE macros
+ *      must not attempt to concatenate this string with constant
+ *      character strings.
+ *    
+ *    fileName:
+ *      A pointer to the fileName or pathname (generated by the
+ *      preprocessor __FILE__ identifier), or NULL.
+ *    
+ *    lineNumber:
+ *      The line number in the file (generated by the preprocessor
+ *      __LINE__ identifier), or 0 (zero).
+ *    
+ *    errorCode:
+ *      A value associated with the assertion, or 0.
+ *
+ *  Here is an example of a DEBUG_ASSERT_MESSAGE macro and a routine which displays
+ *  assertion messsages:
+ *
+ *      #define DEBUG_ASSERT_COMPONENT_NAME_STRING "MyCoolProgram"
+ *
+ *      #define DEBUG_ASSERT_MESSAGE(componentNameString, assertionString,                           \
+ *                                   exceptionLabelString, errorString, fileName, lineNumber, errorCode) \
+ *              MyProgramDebugAssert(componentNameString, assertionString,                           \
+ *                                   exceptionLabelString, errorString, fileName, lineNumber, errorCode)
+ *
+ *      static void
+ *      MyProgramDebugAssert(const char *componentNameString, const char *assertionString, 
+ *                           const char *exceptionLabelString, const char *errorString, 
+ *                           const char *fileName, long lineNumber, int errorCode)
+ *      {
+ *          if ( (assertionString != NULL) && (*assertionString != '\0') )
+ *              fprintf(stderr, "Assertion failed: %s: %s\n", componentNameString, assertionString);
+ *          else
+ *              fprintf(stderr, "Check failed: %s:\n", componentNameString);
+ *          if ( exceptionLabelString != NULL )
+ *              fprintf(stderr, "    %s\n", exceptionLabelString);
+ *          if ( errorString != NULL )
+ *              fprintf(stderr, "    %s\n", errorString);
+ *          if ( fileName != NULL )
+ *              fprintf(stderr, "    file: %s\n", fileName);
+ *          if ( lineNumber != 0 )
+ *              fprintf(stderr, "    line: %ld\n", lineNumber);
+ *          if ( errorCode != 0 )
+ *              fprintf(stderr, "    error: %d\n", errorCode);
+ *      }
+ *
+ *  If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used.
+ */
+#ifndef DEBUG_ASSERT_MESSAGE
+   #ifdef KERNEL
+      #include <libkern/libkern.h>
+      #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
+                                  printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
+   #else
+      #include <stdio.h>
+      #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
+                                  fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
+   #endif
+#endif
+
+
+
+
+
+/*
+ *  __Debug_String(message)
+ *
+ *  Summary:
+ *    Production builds: does nothing and produces no code.
+ *
+ *    Non-production builds: call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    message:
+ *      The C string to display.
+ *
+ */
+#ifndef __Debug_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Debug_String(message)
+	#else
+	   #define __Debug_String(message)                                             \
+		  do                                                                      \
+		  {                                                                       \
+			  DEBUG_ASSERT_MESSAGE(                                               \
+				  DEBUG_ASSERT_COMPONENT_NAME_STRING,                             \
+				  "",                                                             \
+				  0,                                                              \
+				  message,                                                        \
+				  __FILE__,                                                       \
+				  __LINE__,                                                       \
+				  0);                                                             \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Check(assertion)
+ *
+ *  Summary:
+ *    Production builds: does nothing and produces no code.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ */
+#ifndef __Check
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Check(assertion)
+	#else
+	   #define __Check(assertion)                                                 \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, 0, 0, __FILE__, __LINE__, 0 );                  \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nCheck
+	#define __nCheck(assertion)  __Check(!(assertion))
+#endif
+
+/*
+ *  __Check_String(assertion, message)
+ *
+ *  Summary:
+ *    Production builds: does nothing and produces no code.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Check_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Check_String(assertion, message)
+	#else
+	   #define __Check_String(assertion, message)                                 \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, 0, message, __FILE__, __LINE__, 0 );            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nCheck_String
+	#define __nCheck_String(assertion, message)  __Check_String(!(assertion), message)
+#endif
+
+/*
+ *  __Check_noErr(errorCode)
+ *
+ *  Summary:
+ *    Production builds: does nothing and produces no code.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The errorCode expression to compare with 0.
+ */
+#ifndef __Check_noErr
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Check_noErr(errorCode)
+	#else
+	   #define __Check_noErr(errorCode)                                           \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Check_noErr_String(errorCode, message)
+ *
+ *  Summary:
+ *    Production builds: check_noerr_string() does nothing and produces
+ *    no code.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The errorCode expression to compare to 0.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Check_noErr_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Check_noErr_String(errorCode, message)
+	#else
+	   #define __Check_noErr_String(errorCode, message)                           \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Verify(assertion)
+ *
+ *  Summary:
+ *    Production builds: evaluate the assertion expression, but ignore
+ *    the result.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ */
+#ifndef __Verify
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify(assertion)                                                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( !(assertion) )                                                 \
+			  {                                                                   \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Verify(assertion)                                                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, 0, 0, __FILE__, __LINE__, 0 );                  \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nVerify
+	#define __nVerify(assertion)	__Verify(!(assertion))
+#endif
+
+/*
+ *  __Verify_String(assertion, message)
+ *
+ *  Summary:
+ *    Production builds: evaluate the assertion expression, but ignore
+ *    the result.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Verify_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify_String(assertion, message)                                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( !(assertion) )                                                 \
+			  {                                                                   \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Verify_String(assertion, message)                                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, 0, message, __FILE__, __LINE__, 0 );            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nVerify_String
+	#define __nVerify_String(assertion, message)  __Verify_String(!(assertion), message)
+#endif
+
+/*
+ *  __Verify_noErr(errorCode)
+ *
+ *  Summary:
+ *    Production builds: evaluate the errorCode expression, but ignore
+ *    the result.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ */
+#ifndef __Verify_noErr
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify_noErr(errorCode)                                          \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( 0 != (errorCode) )                                             \
+			  {                                                                   \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Verify_noErr(errorCode)                                          \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Verify_noErr_String(errorCode, message)
+ *
+ *  Summary:
+ *    Production builds: evaluate the errorCode expression, but ignore
+ *    the result.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Verify_noErr_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify_noErr_String(errorCode, message)                          \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( 0 != (errorCode) )                                             \
+			  {                                                                   \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Verify_noErr_String(errorCode, message)                          \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Verify_noErr_Action(errorCode, action)
+ *
+ *  Summary:
+ *    Production builds: if the errorCode expression does not equal 0 (noErr),
+ *    execute the action statement or compound statement (block).
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound
+ *    statement (block).
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Verify_noErr_Action
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify_noErr_Action(errorCode, action)                          \
+		  if ( 0 != (errorCode) ) {                                              \
+			  action;                                                            \
+		  }                                                                      \
+		  else do {} while (0)
+	#else
+	   #define __Verify_noErr_Action(errorCode, action)                          \
+               do {                                                                   \
+		  long evalOnceErrorCode = (errorCode);                                  \
+		  if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) {                   \
+			  DEBUG_ASSERT_MESSAGE(                                              \
+				  DEBUG_ASSERT_COMPONENT_NAME_STRING,                            \
+				  #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode );            \
+			  action;                                                            \
+		  }                                                                      \
+	       } while (0)
+	#endif
+#endif
+
+/*
+ *  __Verify_Action(assertion, action)
+ *
+ *  Summary:
+ *    Production builds: if the assertion expression evaluates to false,
+ *    then execute the action statement or compound statement (block).
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound
+ *    statement (block).
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Verify_Action
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Verify_Action(assertion, action)                                \
+		  if ( __builtin_expect(!(assertion), 0) ) {                             \
+			action;                                                              \
+		  }                                                                      \
+		  else do {} while (0)
+	#else
+	   #define __Verify_Action(assertion, action)                                \
+		  if ( __builtin_expect(!(assertion), 0) ) {                             \
+			  DEBUG_ASSERT_MESSAGE(                                              \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                        \
+					  #assertion, 0, 0, __FILE__, __LINE__, 0 );                 \
+			  action;                                                            \
+		  }                                                                      \
+		  else do {} while (0)
+	#endif
+#endif
+
+/*
+ *  __Require(assertion, exceptionLabel)
+ *
+ *  Summary:
+ *    Production builds: if the assertion expression evaluates to false,
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ */
+#ifndef __Require
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require(assertion, exceptionLabel)                               \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require(assertion, exceptionLabel)                               \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) ) {                          \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, #exceptionLabel, 0, __FILE__, __LINE__,  0);    \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nRequire
+	#define __nRequire(assertion, exceptionLabel)  __Require(!(assertion), exceptionLabel)
+#endif
+
+/*
+ *  __Require_Action(assertion, exceptionLabel, action)
+ *
+ *  Summary:
+ *    Production builds: if the assertion expression evaluates to false,
+ *    execute the action statement or compound statement (block) and then
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE, execute the action statement or compound
+ *    statement (block), and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Require_Action
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_Action(assertion, exceptionLabel, action)                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_Action(assertion, exceptionLabel, action)                \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, #exceptionLabel, 0,   __FILE__, __LINE__, 0);   \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nRequire_Action
+	#define __nRequire_Action(assertion, exceptionLabel, action)                  \
+	__Require_Action(!(assertion), exceptionLabel, action)
+#endif
+
+/*
+ *  __Require_Quiet(assertion, exceptionLabel)
+ *
+ *  Summary:
+ *    If the assertion expression evaluates to false, goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ */
+#ifndef __Require_Quiet
+	#define __Require_Quiet(assertion, exceptionLabel)                            \
+	  do                                                                          \
+	  {                                                                           \
+		  if ( __builtin_expect(!(assertion), 0) )                                \
+		  {                                                                       \
+			  goto exceptionLabel;                                                \
+		  }                                                                       \
+	  } while ( 0 )
+#endif
+
+#ifndef __nRequire_Quiet
+	#define __nRequire_Quiet(assertion, exceptionLabel)  __Require_Quiet(!(assertion), exceptionLabel)
+#endif
+
+/*
+ *  __Require_Action_Quiet(assertion, exceptionLabel, action)
+ *
+ *  Summary:
+ *    If the assertion expression evaluates to false, execute the action
+ *    statement or compound statement (block), and goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Require_Action_Quiet
+	#define __Require_Action_Quiet(assertion, exceptionLabel, action)             \
+	  do                                                                          \
+	  {                                                                           \
+		  if ( __builtin_expect(!(assertion), 0) )                                \
+		  {                                                                       \
+			  {                                                                   \
+				  action;                                                         \
+			  }                                                                   \
+			  goto exceptionLabel;                                                \
+		  }                                                                       \
+	  } while ( 0 )
+#endif
+
+#ifndef __nRequire_Action_Quiet
+	#define __nRequire_Action_Quiet(assertion, exceptionLabel, action)              \
+		__Require_Action_Quiet(!(assertion), exceptionLabel, action)
+#endif
+
+/*
+ *  __Require_String(assertion, exceptionLabel, message)
+ *
+ *  Summary:
+ *    Production builds: if the assertion expression evaluates to false,
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Require_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_String(assertion, exceptionLabel, message)               \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_String(assertion, exceptionLabel, message)               \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, #exceptionLabel,  message,  __FILE__, __LINE__, 0); \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nRequire_String
+	#define __nRequire_String(assertion, exceptionLabel, string)                  \
+		__Require_String(!(assertion), exceptionLabel, string)
+#endif
+
+/*
+ *  __Require_Action_String(assertion, exceptionLabel, action, message)
+ *
+ *  Summary:
+ *    Production builds: if the assertion expression evaluates to false,
+ *    execute the action statement or compound statement (block), and then
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the assertion expression evaluates to false,
+ *    call DEBUG_ASSERT_MESSAGE, execute the action statement or compound
+ *    statement (block), and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    assertion:
+ *      The assertion expression.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Require_Action_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_Action_String(assertion, exceptionLabel, action, message)  \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_Action_String(assertion, exceptionLabel, action, message)  \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(!(assertion), 0) )                            \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #assertion, #exceptionLabel,  message,  __FILE__,  __LINE__, 0); \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+#ifndef __nRequire_Action_String
+	#define __nRequire_Action_String(assertion, exceptionLabel, action, message)    \
+		__Require_Action_String(!(assertion), exceptionLabel, action, message)
+#endif
+
+/*
+ *  __Require_noErr(errorCode, exceptionLabel)
+ *
+ *  Summary:
+ *    Production builds: if the errorCode expression does not equal 0 (noErr),
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ */
+#ifndef __Require_noErr
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_noErr(errorCode, exceptionLabel)                         \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(0 != (errorCode), 0) )                        \
+			  {                                                                   \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_noErr(errorCode, exceptionLabel)                         \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ",  #exceptionLabel,  0,  __FILE__, __LINE__, evalOnceErrorCode); \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Require_noErr_Action(errorCode, exceptionLabel, action)
+ *
+ *  Summary:
+ *    Production builds: if the errorCode expression does not equal 0 (noErr),
+ *    execute the action statement or compound statement (block) and
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE, execute the action statement or
+ *    compound statement (block), and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Require_noErr_Action
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_noErr_Action(errorCode, exceptionLabel, action)          \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(0 != (errorCode), 0) )                        \
+			  {                                                                   \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_noErr_Action(errorCode, exceptionLabel, action)          \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", #exceptionLabel,  0,  __FILE__, __LINE__,  evalOnceErrorCode); \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Require_noErr_Quiet(errorCode, exceptionLabel)
+ *
+ *  Summary:
+ *    If the errorCode expression does not equal 0 (noErr),
+ *    goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ */
+#ifndef __Require_noErr_Quiet
+	#define __Require_noErr_Quiet(errorCode, exceptionLabel)                      \
+	  do                                                                          \
+	  {                                                                           \
+		  if ( __builtin_expect(0 != (errorCode), 0) )                            \
+		  {                                                                       \
+			  goto exceptionLabel;                                                \
+		  }                                                                       \
+	  } while ( 0 )
+#endif
+
+/*
+ *  __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action)
+ *
+ *  Summary:
+ *    If the errorCode expression does not equal 0 (noErr),
+ *    execute the action statement or compound statement (block) and
+ *    goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ */
+#ifndef __Require_noErr_Action_Quiet
+	#define __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action)       \
+	  do                                                                          \
+	  {                                                                           \
+		  if ( __builtin_expect(0 != (errorCode), 0) )                            \
+		  {                                                                       \
+			  {                                                                   \
+				  action;                                                         \
+			  }                                                                   \
+			  goto exceptionLabel;                                                \
+		  }                                                                       \
+	  } while ( 0 )
+#endif
+
+/*
+ *  __Require_noErr_String(errorCode, exceptionLabel, message)
+ *
+ *  Summary:
+ *    Production builds: if the errorCode expression does not equal 0 (noErr),
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Require_noErr_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_noErr_String(errorCode, exceptionLabel, message)         \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(0 != (errorCode), 0) )                        \
+			  {                                                                   \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_noErr_String(errorCode, exceptionLabel, message)         \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ",  #exceptionLabel, message, __FILE__,  __LINE__,  evalOnceErrorCode); \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Require_noErr_Action_String(errorCode, exceptionLabel, action, message)
+ *
+ *  Summary:
+ *    Production builds: if the errorCode expression does not equal 0 (noErr),
+ *    execute the action statement or compound statement (block) and
+ *    goto exceptionLabel.
+ *
+ *    Non-production builds: if the errorCode expression does not equal 0 (noErr),
+ *    call DEBUG_ASSERT_MESSAGE, execute the action statement or compound
+ *    statement (block), and then goto exceptionLabel.
+ *
+ *  Parameters:
+ *
+ *    errorCode:
+ *      The expression to compare to 0.
+ *
+ *    exceptionLabel:
+ *      The label.
+ *
+ *    action:
+ *      The statement or compound statement (block).
+ *
+ *    message:
+ *      The C string to display.
+ */
+#ifndef __Require_noErr_Action_String
+	#if DEBUG_ASSERT_PRODUCTION_CODE
+	   #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \
+		  do                                                                      \
+		  {                                                                       \
+			  if ( __builtin_expect(0 != (errorCode), 0) )                        \
+			  {                                                                   \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#else
+	   #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \
+		  do                                                                      \
+		  {                                                                       \
+			  long evalOnceErrorCode = (errorCode);                               \
+			  if ( __builtin_expect(0 != evalOnceErrorCode, 0) )                  \
+			  {                                                                   \
+				  DEBUG_ASSERT_MESSAGE(                                           \
+					  DEBUG_ASSERT_COMPONENT_NAME_STRING,                         \
+					  #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \
+				  {                                                               \
+					  action;                                                     \
+				  }                                                               \
+				  goto exceptionLabel;                                            \
+			  }                                                                   \
+		  } while ( 0 )
+	#endif
+#endif
+
+/*
+ *  __Check_Compile_Time(expr)
+ *
+ *  Summary:
+ *    any build: if the expression is not true, generated a compile time error.
+ *
+ *  Parameters:
+ *
+ *    expr:
+ *      The compile time expression that should evaluate to non-zero.
+ *
+ *  Discussion:
+ *     This declares an array with a size that is determined by a compile-time expression.
+ *     If false, it declares a negatively sized array, which generates a compile-time error.
+ *
+ * Examples:
+ *     __Check_Compile_Time( sizeof( int ) == 4 );
+ *     __Check_Compile_Time( offsetof( MyStruct, myField ) == 4 );
+ *     __Check_Compile_Time( ( kMyBufferSize % 512 ) == 0 );
+ *
+ *  Note: This only works with compile-time expressions.
+ *  Note: This only works in places where extern declarations are allowed (e.g. global scope).
+ */
+#ifndef __Check_Compile_Time
+    #ifdef __GNUC__ 
+     #if (__cplusplus >= 201103L)
+        #define __Check_Compile_Time( expr )    static_assert( expr , "__Check_Compile_Time")        
+     #elif (__STDC_VERSION__ >= 201112L)
+        #define __Check_Compile_Time( expr )    _Static_assert( expr , "__Check_Compile_Time")
+     #else
+        #define __Check_Compile_Time( expr )    \
+            extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] __attribute__( ( unused ) )
+     #endif
+    #else
+        #define __Check_Compile_Time( expr )    \
+            extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ]
+    #endif
+#endif
+
+/*
+ *	For time immemorial, Mac OS X has defined version of most of these macros without the __ prefix, which
+ *	could collide with similarly named functions or macros in user code, including new functionality in
+ *	Boost and the C++ standard library.
+ *
+ *  macOS High Sierra and iOS 11 will now require that clients move to the new macros as defined above.
+ *
+ *  If you would like to enable the macros for use within your own project, you can define the
+ *  __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES macro via an Xcode Build Configuration.
+ *  See "Add a build configuration (xcconfig) file" in Xcode Help. 
+ *
+ *  To aid users of these macros in converting their sources, the following tops script will convert usages
+ *  of the old macros into the new equivalents.  To do so, in Terminal go into the directory containing the
+ *  sources to be converted and run this command.
+ *
+    find -E . -regex '.*\.(c|cc|cp|cpp|m|mm|h)' -print0 |  xargs -0 tops -verbose \
+      replace "check(<b args>)" with "__Check(<args>)" \
+      replace "check_noerr(<b args>)" with "__Check_noErr(<args>)" \
+      replace "check_noerr_string(<b args>)" with "__Check_noErr_String(<args>)" \
+      replace "check_string(<b args>)" with "__Check_String(<args>)" \
+      replace "require(<b args>)" with "__Require(<args>)" \
+      replace "require_action(<b args>)" with "__Require_Action(<args>)" \
+      replace "require_action_string(<b args>)" with "__Require_Action_String(<args>)" \
+      replace "require_noerr(<b args>)" with "__Require_noErr(<args>)" \
+      replace "require_noerr_action(<b args>)" with "__Require_noErr_Action(<args>)" \
+      replace "require_noerr_action_string(<b args>)" with "__Require_noErr_Action_String(<args>)" \
+      replace "require_noerr_string(<b args>)" with "__Require_noErr_String(<args>)" \
+      replace "require_string(<b args>)" with "__Require_String(<args>)" \
+      replace "verify(<b args>)" with "__Verify(<args>)" \
+      replace "verify_action(<b args>)" with "__Verify_Action(<args>)" \
+      replace "verify_noerr(<b args>)" with "__Verify_noErr(<args>)" \
+      replace "verify_noerr_action(<b args>)" with "__Verify_noErr_Action(<args>)" \
+      replace "verify_noerr_string(<b args>)" with "__Verify_noErr_String(<args>)" \
+      replace "verify_string(<b args>)" with "__Verify_String(<args>)" \
+      replace "ncheck(<b args>)" with "__nCheck(<args>)" \
+      replace "ncheck_string(<b args>)" with "__nCheck_String(<args>)" \
+      replace "nrequire(<b args>)" with "__nRequire(<args>)" \
+      replace "nrequire_action(<b args>)" with "__nRequire_Action(<args>)" \
+      replace "nrequire_action_quiet(<b args>)" with "__nRequire_Action_Quiet(<args>)" \
+      replace "nrequire_action_string(<b args>)" with "__nRequire_Action_String(<args>)" \
+      replace "nrequire_quiet(<b args>)" with "__nRequire_Quiet(<args>)" \
+      replace "nrequire_string(<b args>)" with "__nRequire_String(<args>)" \
+      replace "nverify(<b args>)" with "__nVerify(<args>)" \
+      replace "nverify_string(<b args>)" with "__nVerify_String(<args>)" \
+      replace "require_action_quiet(<b args>)" with "__Require_Action_Quiet(<args>)" \
+      replace "require_noerr_action_quiet(<b args>)" with "__Require_noErr_Action_Quiet(<args>)" \
+      replace "require_noerr_quiet(<b args>)" with "__Require_noErr_Quiet(<args>)" \
+      replace "require_quiet(<b args>)" with "__Require_Quiet(<args>)" \
+      replace "check_compile_time(<b args>)" with "__Check_Compile_Time(<args>)" \
+      replace "debug_string(<b args>)" with "__Debug_String(<args>)"
+ *
+ */
+
+#ifndef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES
+    #if __has_include(<AssertMacrosInternal.h>)
+        #include <AssertMacrosInternal.h>
+    #else 
+        /* In  macOS High Sierra and iOS 11, if we haven't set this yet, it now defaults to off. */
+        #define	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES	0
+    #endif
+#endif
+
+#if	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES
+
+	#ifndef check
+	#define check(assertion)  __Check(assertion)
+	#endif
+
+	#ifndef check_noerr
+	#define check_noerr(errorCode)  __Check_noErr(errorCode)
+	#endif
+
+	#ifndef check_noerr_string
+		#define check_noerr_string(errorCode, message)  __Check_noErr_String(errorCode, message)
+	#endif
+
+	#ifndef check_string
+		#define check_string(assertion, message)  __Check_String(assertion, message)
+	#endif
+
+	#ifndef require
+		#define require(assertion, exceptionLabel)  __Require(assertion, exceptionLabel)
+	#endif
+
+	#ifndef require_action
+		#define require_action(assertion, exceptionLabel, action)  __Require_Action(assertion, exceptionLabel, action)
+	#endif
+
+	#ifndef require_action_string
+		#define require_action_string(assertion, exceptionLabel, action, message)  __Require_Action_String(assertion, exceptionLabel, action, message)
+	#endif
+
+	#ifndef require_noerr
+		#define require_noerr(errorCode, exceptionLabel)  __Require_noErr(errorCode, exceptionLabel)
+	#endif
+
+	#ifndef require_noerr_action
+		#define require_noerr_action(errorCode, exceptionLabel, action)  __Require_noErr_Action(errorCode, exceptionLabel, action)
+	#endif
+
+	#ifndef require_noerr_action_string
+		#define require_noerr_action_string(errorCode, exceptionLabel, action, message)  __Require_noErr_Action_String(errorCode, exceptionLabel, action, message)
+	#endif
+
+	#ifndef require_noerr_string
+		#define require_noerr_string(errorCode, exceptionLabel, message)  __Require_noErr_String(errorCode, exceptionLabel, message)
+	#endif
+
+	#ifndef require_string
+		#define require_string(assertion, exceptionLabel, message)  __Require_String(assertion, exceptionLabel, message)
+	#endif
+
+	#ifndef verify
+		#define verify(assertion) __Verify(assertion)
+	#endif
+
+	#ifndef verify_action
+		#define verify_action(assertion, action)  __Verify_Action(assertion, action)
+	#endif
+
+	#ifndef verify_noerr
+		#define verify_noerr(errorCode)  __Verify_noErr(errorCode)
+	#endif
+
+	#ifndef verify_noerr_action
+		#define verify_noerr_action(errorCode, action)  __Verify_noErr_Action(errorCode, action)
+	#endif
+
+	#ifndef verify_noerr_string
+		#define verify_noerr_string(errorCode, message)  __Verify_noErr_String(errorCode, message)
+	#endif
+
+	#ifndef verify_string
+		#define verify_string(assertion, message)  __Verify_String(assertion, message)
+	#endif
+
+	#ifndef ncheck
+		#define ncheck(assertion)  __nCheck(assertion)
+	#endif
+
+	#ifndef ncheck_string
+		#define ncheck_string(assertion, message)  __nCheck_String(assertion, message)
+	#endif
+
+	#ifndef nrequire
+		#define nrequire(assertion, exceptionLabel)  __nRequire(assertion, exceptionLabel)
+	#endif
+
+	#ifndef nrequire_action
+		#define nrequire_action(assertion, exceptionLabel, action)  __nRequire_Action(assertion, exceptionLabel, action)
+	#endif
+
+	#ifndef nrequire_action_quiet
+		#define nrequire_action_quiet(assertion, exceptionLabel, action)  __nRequire_Action_Quiet(assertion, exceptionLabel, action)
+	#endif
+
+	#ifndef nrequire_action_string
+		#define nrequire_action_string(assertion, exceptionLabel, action, message)  __nRequire_Action_String(assertion, exceptionLabel, action, message)
+	#endif
+
+	#ifndef nrequire_quiet
+		#define nrequire_quiet(assertion, exceptionLabel)  __nRequire_Quiet(assertion, exceptionLabel)
+	#endif
+
+	#ifndef nrequire_string
+		#define nrequire_string(assertion, exceptionLabel, string)  __nRequire_String(assertion, exceptionLabel, string)
+	#endif
+
+	#ifndef nverify
+		#define nverify(assertion)  __nVerify(assertion)
+	#endif
+
+	#ifndef nverify_string
+		#define nverify_string(assertion, message)  __nVerify_String(assertion, message)
+	#endif
+
+	#ifndef require_action_quiet
+		#define require_action_quiet(assertion, exceptionLabel, action)  __Require_Action_Quiet(assertion, exceptionLabel, action)
+	#endif
+
+	#ifndef require_noerr_action_quiet
+		#define require_noerr_action_quiet(errorCode, exceptionLabel, action)  __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action)
+	#endif
+
+	#ifndef require_noerr_quiet
+		#define require_noerr_quiet(errorCode, exceptionLabel)  __Require_noErr_Quiet(errorCode, exceptionLabel)
+	#endif
+
+	#ifndef require_quiet
+		#define require_quiet(assertion, exceptionLabel)  __Require_Quiet(assertion, exceptionLabel)
+	#endif
+
+	#ifndef check_compile_time
+		#define check_compile_time( expr )  __Check_Compile_Time( expr )
+	#endif
+
+	#ifndef debug_string
+		#define debug_string(message)  __Debug_String(message)
+	#endif
+	
+#endif	/* ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES */
+
+
+#endif /* __ASSERTMACROS__ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/AvailabilityInternal.h
@@ -55,7 +55,7 @@
     #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
         /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
         #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
-        #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_2
+        #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_5
         /* for compatibility with existing code.  New code should use platform specific checks */
         #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
     #endif
@@ -65,7 +65,7 @@
     #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
         /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
         #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
-        #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_3
+        #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_4
         /* for compatibility with existing code.  New code should use platform specific checks */
         #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
     #endif
@@ -75,7 +75,7 @@
     #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
         
         #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
-        #define __BRIDGE_OS_VERSION_MAX_ALLOWED 60100
+        #define __BRIDGE_OS_VERSION_MAX_ALLOWED 50300
         /* for compatibility with existing code.  New code should use platform specific checks */
         #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000
     #endif
@@ -90,14 +90,14 @@
 #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
     /* make sure a default max version is set */
     #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
-        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_1
+        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_3
     #endif
 #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
 
 #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
     /* make sure a default max version is set */
     #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
-        #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_15_2
+        #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_14_5
     #endif
     /* make sure a valid min is set */
     #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
lib/libc/include/any-macos.11-any/AvailabilityMacros.h
@@ -0,0 +1,4015 @@
+/*
+ * Copyright (c) 2001-2010 by Apple Inc.. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+/*
+     File:       AvailabilityMacros.h
+ 
+     More Info:  See the SDK Compatibility Guide
+
+     Contains:   Autoconfiguration of AVAILABLE_ macros for Mac OS X
+
+                 This header enables a developer to specify build time
+                 constraints on what Mac OS X versions the resulting
+                 application will be run.  There are two bounds a developer
+                 can specify:
+                 
+                      MAC_OS_X_VERSION_MIN_REQUIRED
+                      MAC_OS_X_VERSION_MAX_ALLOWED
+                      
+                The lower bound controls which calls to OS functions will 
+                be weak-importing (allowed to be unresolved at launch time).
+                The upper bound controls which OS functionality, if used,
+                will result in a compiler error because that functionality is
+                not available on any OS in the specifed range.
+                
+                For example, suppose an application is compiled with:
+                
+                      MAC_OS_X_VERSION_MIN_REQUIRED = MAC_OS_X_VERSION_10_2
+                      MAC_OS_X_VERSION_MAX_ALLOWED  = MAC_OS_X_VERSION_10_3
+                     
+                and an OS header contains:
+                
+                     extern void funcA(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
+                     extern void funcB(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2;
+                     extern void funcC(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
+                     extern void funcD(void) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
+                     extern void funcE(void) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER;
+                     extern void funcF(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
+                     extern void funcG(void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+                     
+                     typedef long TypeA DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER;
+                     typedef long TypeB DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER;
+                     typedef long TypeC DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER;
+                     typedef long TypeD DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER;
+                     typedef long TypeE DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER;
+
+                Any application code which uses these declarations will get the following:
+                
+                                compile         link          run 
+                                -------         ------        -------
+                     funcA:     normal          normal        normal
+                     funcB:     warning         normal        normal
+                     funcC:     normal          normal        normal
+                     funcD:     normal          normal        normal
+                     funcE:     normal          normal        normal
+                     funcF:     normal          weak          on 10.3 normal, on 10.2 (&funcF == NULL)
+                     funcG:     error           error         n/a
+                     typeA:     warning
+                     typeB:     warning
+                     typeC:     warning
+                     typeD:     normal
+                     typeE:     normal
+                  
+  
+*/
+#ifndef __AVAILABILITYMACROS__
+#define __AVAILABILITYMACROS__
+
+/*
+ * Set up standard Mac OS X versions
+ */
+#define MAC_OS_X_VERSION_10_0         1000
+#define MAC_OS_X_VERSION_10_1         1010
+#define MAC_OS_X_VERSION_10_2         1020
+#define MAC_OS_X_VERSION_10_3         1030
+#define MAC_OS_X_VERSION_10_4         1040
+#define MAC_OS_X_VERSION_10_5         1050
+#define MAC_OS_X_VERSION_10_6         1060
+#define MAC_OS_X_VERSION_10_7         1070
+#define MAC_OS_X_VERSION_10_8         1080
+#define MAC_OS_X_VERSION_10_9         1090
+#define MAC_OS_X_VERSION_10_10      101000
+#define MAC_OS_X_VERSION_10_10_2    101002
+#define MAC_OS_X_VERSION_10_10_3    101003
+#define MAC_OS_X_VERSION_10_11      101100
+#define MAC_OS_X_VERSION_10_11_2    101102
+#define MAC_OS_X_VERSION_10_11_3    101103
+#define MAC_OS_X_VERSION_10_11_4    101104
+#define MAC_OS_X_VERSION_10_12      101200
+#define MAC_OS_X_VERSION_10_12_1    101201
+#define MAC_OS_X_VERSION_10_12_2    101202
+#define MAC_OS_X_VERSION_10_12_4    101204
+#define MAC_OS_X_VERSION_10_13      101300
+#define MAC_OS_X_VERSION_10_13_1    101301
+#define MAC_OS_X_VERSION_10_13_2    101302
+#define MAC_OS_X_VERSION_10_13_4    101304
+#define MAC_OS_X_VERSION_10_14      101400
+#define MAC_OS_X_VERSION_10_14_1    101401
+#define MAC_OS_X_VERSION_10_14_4    101404
+#define MAC_OS_X_VERSION_10_15      101500
+#define MAC_OS_VERSION_11_0         110000
+#define MAC_OS_VERSION_11_1         110100
+#define MAC_OS_VERSION_11_3         110300
+
+/* 
+ * If min OS not specified, assume 10.4 for intel
+ * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable
+ */
+#ifndef MAC_OS_X_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+        #if (__i386__ || __x86_64__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < MAC_OS_X_VERSION_10_4)
+            #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
+        #endif
+        #define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+    #else
+        #if __i386__ || __x86_64__
+            #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
+        #elif __arm__ || __arm64__
+            #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5
+        #else
+            #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1
+        #endif
+     #endif
+#endif
+
+/*
+ * if max OS not specified, assume larger of (10.15, min)
+ */
+#ifndef MAC_OS_X_VERSION_MAX_ALLOWED
+    #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_11_3
+        #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED
+    #else
+        #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_11_3
+    #endif
+#endif
+
+/*
+ * Error on bad values
+ */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_MIN_REQUIRED
+    #error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
+#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_0
+    #error MAC_OS_X_VERSION_MIN_REQUIRED must be >= MAC_OS_X_VERSION_10_0
+#endif
+
+/*
+ * only certain compilers support __attribute__((weak_import))
+ */
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020)
+    #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import))
+#elif defined(__MWERKS__) && (__MWERKS__ >= 0x3205) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) && !defined(__INTEL__)
+    #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import))
+#else
+    #define WEAK_IMPORT_ATTRIBUTE
+#endif
+
+/*
+ * only certain compilers support __attribute__((deprecated))
+ */
+#if defined(__has_feature) && defined(__has_attribute)
+    #if __has_attribute(deprecated)
+        #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
+        #if __has_feature(attribute_deprecated_with_message)
+            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
+        #else
+            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated))
+        #endif
+    #else
+        #define DEPRECATED_ATTRIBUTE
+        #define DEPRECATED_MSG_ATTRIBUTE(s)
+    #endif
+#elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+    #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
+    #if (__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))
+        #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
+    #else
+        #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated))
+    #endif
+#else
+    #define DEPRECATED_ATTRIBUTE
+    #define DEPRECATED_MSG_ATTRIBUTE(s)
+#endif
+
+/*
+ * only certain compilers support __attribute__((unavailable))
+ */
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+    #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
+#else
+    #define UNAVAILABLE_ATTRIBUTE
+#endif
+
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+ * 
+ * Used on functions introduced in Mac OS X 10.0 
+ */
+#define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED
+ * 
+ * Used on functions introduced in Mac OS X 10.0, 
+ * and deprecated in Mac OS X 10.0
+ */
+#define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER
+ * 
+ * Used on types deprecated in Mac OS X 10.0 
+ */
+#define DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER     DEPRECATED_ATTRIBUTE
+
+#ifndef __AVAILABILITY_MACROS_USES_AVAILABILITY
+	#ifdef __has_attribute
+		#if __has_attribute(availability)
+			#include <Availability.h>
+			#define __AVAILABILITY_MACROS_USES_AVAILABILITY 1
+		#endif
+	#endif
+#endif
+
+#if TARGET_OS_OSX
+#define __IPHONE_COMPAT_VERSION  __IPHONE_NA
+#elif TARGET_OS_MACCATALYST
+#define __IPHONE_COMPAT_VERSION  __IPHONE_NA
+#else
+#define __IPHONE_COMPAT_VERSION  __IPHONE_4_0
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.1 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * and deprecated in Mac OS X 10.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.2 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * and deprecated in Mac OS X 10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.3 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * and deprecated in Mac OS X 10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.4 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * and deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.5 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * and deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.6 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * and deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.7 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * and deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.13
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13    DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.8 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * and deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.9 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * and deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.10 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * and deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.10.2 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_10_2, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * and deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.10.3 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_10_3, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * and deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.11 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * and deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.11.2 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_11_2, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * and deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.11.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.11.3 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_11_3, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * and deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.11.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.11.4 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_11_4, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.11.4,
+ * and deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * but later deprecated in Mac OS X 10.11.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.12 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.12,
+ * and deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12
+ *
+ * Used on declarations introduced in Mac OS X 10.11.4,
+ * but later deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12    AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.12.1 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_12_1, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.12.1,
+ * and deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.11.4,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1
+ *
+ * Used on declarations introduced in Mac OS X 10.12,
+ * but later deprecated in Mac OS X 10.12.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1    AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.12.2 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.12.2,
+ * and deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.11.4,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.12,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2
+ *
+ * Used on declarations introduced in Mac OS X 10.12.1,
+ * but later deprecated in Mac OS X 10.12.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2    AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.12.4 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_12_4, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in Mac OS X 10.12.4,
+ * and deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED    AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.0,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.1,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.2,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.3,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.4,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.5,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.6,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.7,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.8,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.9,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10.2,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.10.3,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11.2,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11.3,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.11.4,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.12,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.12.1,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4
+ *
+ * Used on declarations introduced in Mac OS X 10.12.2,
+ * but later deprecated in Mac OS X 10.12.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    DEPRECATED_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4    AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.13 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
+    #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13
+    #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.14 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_14, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_14
+    #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
+    #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER
+ * 
+ * Used on declarations introduced in Mac OS X 10.15 
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER     __OSX_AVAILABLE_STARTING(__MAC_10_15, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
+    #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER     UNAVAILABLE_ATTRIBUTE
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15
+    #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER     WEAK_IMPORT_ATTRIBUTE
+#else
+    #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.1
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.2
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.3
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER
+#endif
+
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.5
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.6
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.7
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.8
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.9
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.10
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.11
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.12
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.13
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER
+ *
+ * Used on types deprecated in Mac OS X 10.14.4
+ */
+#if __AVAILABILITY_MACROS_USES_AVAILABILITY
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER    __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_14_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION)
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14_4
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER    DEPRECATED_ATTRIBUTE
+#else
+    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER
+#endif
+
+#endif  /* __AVAILABILITYMACROS__ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/AvailabilityVersions.h
@@ -60,11 +60,6 @@
 #define __MAC_11_0          110000
 #define __MAC_11_1          110100
 #define __MAC_11_3          110300
-#define __MAC_11_4          110400
-#define __MAC_11_5          110500
-#define __MAC_11_6          110600
-#define __MAC_12_0          120000
-#define __MAC_12_1          120100
 /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
 
 #define __IPHONE_2_0      20000
@@ -119,12 +114,6 @@
 #define __IPHONE_14_2    140200
 #define __IPHONE_14_3    140300
 #define __IPHONE_14_5    140500
-#define __IPHONE_14_6    140600
-#define __IPHONE_14_7    140700
-#define __IPHONE_14_8    140800
-#define __IPHONE_15_0    150000
-#define __IPHONE_15_1    150100
-#define __IPHONE_15_2    150200
 /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
 
 #define __TVOS_9_0        90000
@@ -153,11 +142,6 @@
 #define __TVOS_14_2      140200
 #define __TVOS_14_3      140300
 #define __TVOS_14_5      140500
-#define __TVOS_14_6      140600
-#define __TVOS_14_7      140700
-#define __TVOS_15_0      150000
-#define __TVOS_15_1      150100
-#define __TVOS_15_2      150200
 
 #define __WATCHOS_1_0     10000
 #define __WATCHOS_2_0     20000
@@ -183,12 +167,6 @@
 #define __WATCHOS_7_2     70200
 #define __WATCHOS_7_3     70300
 #define __WATCHOS_7_4     70400
-#define __WATCHOS_7_5     70500
-#define __WATCHOS_7_6     70600
-#define __WATCHOS_8_0     80000
-#define __WATCHOS_8_1     80100
-#define __WATCHOS_8_3     80300
-
 
 /*
  * Set up standard Mac OS X versions
@@ -229,12 +207,10 @@
 #define MAC_OS_X_VERSION_10_15_1    101501
 #define MAC_OS_X_VERSION_10_16      101600
 #define MAC_OS_VERSION_11_0         110000
-#define MAC_OS_VERSION_12_0         120000
 
 #endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
 
 #define __DRIVERKIT_19_0 190000
 #define __DRIVERKIT_20_0 200000
-#define __DRIVERKIT_21_0 210000
 
 #endif /* __AVAILABILITY_VERSIONS__ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/execinfo.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#ifndef _EXECINFO_H_
+#define _EXECINFO_H_ 1
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <os/base.h>
+#include <os/availability.h>
+#include <stdint.h>
+#include <uuid/uuid.h>
+
+__BEGIN_DECLS
+
+int backtrace(void**,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0))
+OS_EXPORT
+int backtrace_from_fp(void *startfp, void **array, int size);
+
+char** backtrace_symbols(void* const*,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+void backtrace_symbols_fd(void* const*,int,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+struct image_offset {
+	/*
+	 * The UUID of the image.
+	 */
+	uuid_t uuid;
+
+	/*
+	 * The offset is relative to the __TEXT section of the image.
+	 */
+	uint32_t offset;
+};
+
+API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0))
+OS_EXPORT
+void backtrace_image_offsets(void* const* array,
+		struct image_offset *image_offsets, int size);
+
+__END_DECLS
+
+#endif /* !_EXECINFO_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/gethostuuid.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef __GETHOSTUUID_H
+#define __GETHOSTUUID_H
+
+#include <sys/_types/_timespec.h>
+#include <sys/_types/_uuid_t.h>
+#include <Availability.h>
+
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0)
+int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_NA, __MAC_NA, __IPHONE_2_0, __IPHONE_5_0, "gethostuuid() is no longer supported");
+#else
+int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
+#endif
+
+#endif /* __GETHOSTUUID_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/libproc.h
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2006, 2007, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#ifndef _LIBPROC_H_
+#define _LIBPROC_H_
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mount.h>
+#include <sys/resource.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <mach/message.h> /* for audit_token_t */
+
+#include <sys/proc_info.h>
+
+#include <Availability.h>
+#include <os/availability.h>
+
+/*
+ * This header file contains private interfaces to obtain process information.
+ * These interfaces are subject to change in future releases.
+ */
+
+/*!
+ *       @define PROC_LISTPIDSPATH_PATH_IS_VOLUME
+ *       @discussion This flag indicates that all processes that hold open
+ *               file references on the volume associated with the specified
+ *               path should be returned.
+ */
+#define PROC_LISTPIDSPATH_PATH_IS_VOLUME        1
+
+
+/*!
+ *       @define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY
+ *       @discussion This flag indicates that file references that were opened
+ *               with the O_EVTONLY flag should be excluded from the matching
+ *               criteria.
+ */
+#define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY       2
+
+__BEGIN_DECLS
+
+
+/*!
+ *       @function proc_listpidspath
+ *       @discussion A function which will search through the current
+ *               processes looking for open file references which match
+ *               a specified path or volume.
+ *       @param type types of processes to be searched (see proc_listpids)
+ *       @param typeinfo adjunct information for type
+ *       @param path file or volume path
+ *       @param pathflags flags to control which files should be considered
+ *               during the process search.
+ *       @param buffer a C array of int-sized values to be filled with
+ *               process identifiers that hold an open file reference
+ *               matching the specified path or volume.  Pass NULL to
+ *               obtain the minimum buffer size needed to hold the
+ *               currently active processes.
+ *       @param buffersize the size (in bytes) of the provided buffer.
+ *       @result the number of bytes of data returned in the provided buffer;
+ *               -1 if an error was encountered;
+ */
+int     proc_listpidspath(uint32_t      type,
+    uint32_t      typeinfo,
+    const char    *path,
+    uint32_t      pathflags,
+    void          *buffer,
+    int           buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_listallpids(void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1);
+int proc_listpgrppids(pid_t pgrpid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1);
+int proc_listchildpids(pid_t ppid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1);
+int proc_pidinfo(int pid, int flavor, uint64_t arg, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_pidfdinfo(int pid, int fd, int flavor, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_pidfileportinfo(int pid, uint32_t fileport, int flavor, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+int proc_name(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_regionfilename(int pid, uint64_t address, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_kmsgbuf(void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_pidpath(int pid, void * buffer, uint32_t  buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int proc_pidpath_audittoken(audit_token_t *audittoken, void * buffer, uint32_t  buffersize) API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
+int proc_libversion(int *major, int * minor) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+
+/*
+ * Return resource usage information for the given pid, which can be a live process or a zombie.
+ *
+ * Returns 0 on success; or -1 on failure, with errno set to indicate the specific error.
+ */
+int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
+
+/*
+ * A process can use the following api to set its own process control
+ * state on resoure starvation. The argument can have one of the PROC_SETPC_XX values
+ */
+#define PROC_SETPC_NONE         0
+#define PROC_SETPC_THROTTLEMEM  1
+#define PROC_SETPC_SUSPEND      2
+#define PROC_SETPC_TERMINATE    3
+
+int proc_setpcontrol(const int control) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+int proc_setpcontrol(const int control);
+
+int proc_track_dirty(pid_t pid, uint32_t flags);
+int proc_set_dirty(pid_t pid, bool dirty);
+int proc_get_dirty(pid_t pid, uint32_t *flags);
+int proc_clear_dirty(pid_t pid, uint32_t flags);
+
+int proc_terminate(pid_t pid, int *sig);
+
+/*
+ * NO_SMT means that on an SMT CPU, this thread must be scheduled alone,
+ * with the paired CPU idle.
+ *
+ * Set NO_SMT on the current proc (all existing and future threads)
+ * This attribute is inherited on fork and exec
+ */
+int proc_set_no_smt(void) __API_AVAILABLE(macos(11.0));
+
+/* Set NO_SMT on the current thread */
+int proc_setthread_no_smt(void) __API_AVAILABLE(macos(11.0));
+
+/*
+ * CPU Security Mitigation APIs
+ *
+ * Set CPU security mitigation on the current proc (all existing and future threads)
+ * This attribute is inherited on fork and exec
+ */
+int proc_set_csm(uint32_t flags) __API_AVAILABLE(macos(11.0));
+
+/* Set CPU security mitigation on the current thread */
+int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0));
+
+/*
+ * flags for CPU Security Mitigation APIs
+ * PROC_CSM_ALL should be used in most cases,
+ * the individual flags are provided only for performance evaluation etc
+ */
+#define PROC_CSM_ALL         0x0001  /* Set all available mitigations */
+#define PROC_CSM_NOSMT       0x0002  /* Set NO_SMT - see above */
+#define PROC_CSM_TECS        0x0004  /* Execute VERW on every return to user mode */
+
+#ifdef PRIVATE
+#include <sys/event.h>
+/*
+ * Enumerate potential userspace pointers embedded in kernel data structures.
+ * Currently inspects kqueues only.
+ *
+ * NOTE: returned "pointers" are opaque user-supplied values and thus not
+ * guaranteed to address valid objects or be pointers at all.
+ *
+ * Returns the number of pointers found (which may exceed buffersize), or -1 on
+ * failure and errno set appropriately.
+ */
+int proc_list_uptrs(pid_t pid, uint64_t *buffer, uint32_t buffersize);
+
+int proc_list_dynkqueueids(int pid, kqueue_id_t *buf, uint32_t bufsz);
+int proc_piddynkqueueinfo(int pid, int flavor, kqueue_id_t kq_id, void *buffer,
+    int buffersize);
+#endif /* PRIVATE */
+
+int proc_udata_info(int pid, int flavor, void *buffer, int buffersize);
+
+__END_DECLS
+
+#endif /*_LIBPROC_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/pthread.h
@@ -0,0 +1,592 @@
+/*
+ * Copyright (c) 2000-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991
+ *              All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appears in all copies and
+ * that both the copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
+ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * MkLinux
+ */
+
+/*
+ * POSIX Threads - IEEE 1003.1c
+ */
+
+#ifndef _PTHREAD_H
+#define _PTHREAD_H
+
+#include <_types.h>
+#include <pthread/sched.h>
+#include <time.h>
+#include <sys/_pthread/_pthread_types.h>
+#include <sys/_pthread/_pthread_attr_t.h>
+#include <sys/_pthread/_pthread_cond_t.h>
+#include <sys/_pthread/_pthread_condattr_t.h>
+#include <sys/_pthread/_pthread_key_t.h>
+#include <sys/_pthread/_pthread_mutex_t.h>
+#include <sys/_pthread/_pthread_mutexattr_t.h>
+#include <sys/_pthread/_pthread_once_t.h>
+#include <sys/_pthread/_pthread_rwlock_t.h>
+#include <sys/_pthread/_pthread_rwlockattr_t.h>
+#include <sys/_pthread/_pthread_t.h>
+
+#include <pthread/qos.h>
+
+#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus)
+
+#include <sys/_types/_mach_port_t.h>
+#include <sys/_types/_sigset_t.h>
+
+#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */
+
+/*
+ * These symbols indicate which [optional] features are available
+ * They can be tested at compile time via '#ifdef XXX'
+ * The way to check for pthreads is like so:
+
+ * #include <unistd.h>
+ * #ifdef _POSIX_THREADS
+ * #include <pthread.h>
+ * #endif
+
+ */
+
+/* These will be moved to unistd.h */
+
+/*
+ * Note: These data structures are meant to be opaque.  Only enough
+ * structure is exposed to support initializers.
+ * All of the typedefs will be moved to <sys/types.h>
+ */
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#if __has_feature(assume_nonnull)
+_Pragma("clang assume_nonnull begin")
+#endif
+__BEGIN_DECLS
+/*
+ * Threads
+ */
+
+
+/*
+ * Cancel cleanup handler management.  Note, since these are implemented as macros,
+ * they *MUST* occur in matched pairs!
+ */
+
+#define pthread_cleanup_push(func, val) \
+   { \
+	     struct __darwin_pthread_handler_rec __handler; \
+	     pthread_t __self = pthread_self(); \
+	     __handler.__routine = func; \
+	     __handler.__arg = val; \
+	     __handler.__next = __self->__cleanup_stack; \
+	     __self->__cleanup_stack = &__handler;
+
+#define pthread_cleanup_pop(execute) \
+	     /* Note: 'handler' must be in this same lexical context! */ \
+	     __self->__cleanup_stack = __handler.__next; \
+	     if (execute) (__handler.__routine)(__handler.__arg); \
+   }
+
+/*
+ * Thread attributes
+ */
+
+#define PTHREAD_CREATE_JOINABLE      1
+#define PTHREAD_CREATE_DETACHED      2
+
+#define PTHREAD_INHERIT_SCHED        1
+#define PTHREAD_EXPLICIT_SCHED       2
+
+#define PTHREAD_CANCEL_ENABLE        0x01  /* Cancel takes place at next cancellation point */
+#define PTHREAD_CANCEL_DISABLE       0x00  /* Cancel postponed */
+#define PTHREAD_CANCEL_DEFERRED      0x02  /* Cancel waits until cancellation point */
+#define PTHREAD_CANCEL_ASYNCHRONOUS  0x00  /* Cancel occurs immediately */
+
+/* Value returned from pthread_join() when a thread is canceled */
+#define PTHREAD_CANCELED	     ((void *) 1)
+
+/* We only support PTHREAD_SCOPE_SYSTEM */
+#define PTHREAD_SCOPE_SYSTEM         1
+#define PTHREAD_SCOPE_PROCESS        2
+
+#define PTHREAD_PROCESS_SHARED         1
+#define PTHREAD_PROCESS_PRIVATE        2
+
+/*
+ * Mutex protocol attributes
+ */
+#define PTHREAD_PRIO_NONE            0
+#define PTHREAD_PRIO_INHERIT         1
+#define PTHREAD_PRIO_PROTECT         2
+
+/*
+ * Mutex type attributes
+ */
+#define PTHREAD_MUTEX_NORMAL		0
+#define PTHREAD_MUTEX_ERRORCHECK	1
+#define PTHREAD_MUTEX_RECURSIVE		2
+#define PTHREAD_MUTEX_DEFAULT		PTHREAD_MUTEX_NORMAL
+
+/*
+ * Mutex policy attributes
+ */
+#define PTHREAD_MUTEX_POLICY_FAIRSHARE_NP   1
+#define PTHREAD_MUTEX_POLICY_FIRSTFIT_NP    3
+
+/*
+ * RWLock variables
+ */
+#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWLOCK_SIG_init, {0}}
+
+/*
+ * Mutex variables
+ */
+#define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}}
+
+/* <rdar://problem/10854763> */
+#if ((__MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) || defined(__DRIVERKIT_VERSION_MIN_REQUIRED)
+#	if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
+#		define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {_PTHREAD_ERRORCHECK_MUTEX_SIG_init, {0}}
+#		define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {_PTHREAD_RECURSIVE_MUTEX_SIG_init, {0}}
+#	endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
+#endif
+
+/* <rdar://problem/25944576> */
+#define _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT \
+	defined(SWIFT_CLASS_EXTRA) && (!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH < 1))
+
+/*
+ * Condition variable attributes
+ */
+
+/*
+ * Condition variables
+ */
+
+#define PTHREAD_COND_INITIALIZER {_PTHREAD_COND_SIG_init, {0}}
+
+/*
+ * Initialization control (once) variables
+ */
+
+#define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}}
+
+/*
+ * Prototypes for all PTHREAD interfaces
+ */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_atfork(void (* _Nullable)(void), void (* _Nullable)(void),
+		void (* _Nullable)(void));
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_destroy(pthread_attr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getguardsize(const pthread_attr_t * __restrict, size_t * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getinheritsched(const pthread_attr_t * __restrict, int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getschedparam(const pthread_attr_t * __restrict,
+		struct sched_param * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getschedpolicy(const pthread_attr_t * __restrict, int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getscope(const pthread_attr_t * __restrict, int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getstack(const pthread_attr_t * __restrict,
+		void * _Nullable * _Nonnull __restrict, size_t * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getstackaddr(const pthread_attr_t * __restrict,
+		void * _Nullable * _Nonnull __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_getstacksize(const pthread_attr_t * __restrict, size_t * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_init(pthread_attr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setdetachstate(pthread_attr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setguardsize(pthread_attr_t *, size_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setinheritsched(pthread_attr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setschedparam(pthread_attr_t * __restrict,
+		const struct sched_param * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setschedpolicy(pthread_attr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setscope(pthread_attr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setstackaddr(pthread_attr_t *, void *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_attr_setstacksize(pthread_attr_t *, size_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cancel(pthread_t) __DARWIN_ALIAS(pthread_cancel);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_broadcast(pthread_cond_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_destroy(pthread_cond_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_init(
+		pthread_cond_t * __restrict,
+		const pthread_condattr_t * _Nullable __restrict)
+		__DARWIN_ALIAS(pthread_cond_init);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_signal(pthread_cond_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_timedwait(
+		pthread_cond_t * __restrict, pthread_mutex_t * __restrict,
+		const struct timespec * _Nullable __restrict)
+		__DARWIN_ALIAS_C(pthread_cond_timedwait);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_wait(pthread_cond_t * __restrict,
+		pthread_mutex_t * __restrict) __DARWIN_ALIAS_C(pthread_cond_wait);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_condattr_destroy(pthread_condattr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_condattr_init(pthread_condattr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_condattr_getpshared(const pthread_condattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_condattr_setpshared(pthread_condattr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+#if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
+int pthread_create(pthread_t _Nullable * _Nonnull __restrict,
+		const pthread_attr_t * _Nullable __restrict,
+		void * _Nullable (* _Nonnull)(void * _Nullable),
+		void * _Nullable __restrict);
+#else
+int pthread_create(pthread_t * __restrict,
+		const pthread_attr_t * _Nullable __restrict,
+		void *(* _Nonnull)(void *), void * _Nullable __restrict);
+#endif // _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_detach(pthread_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_equal(pthread_t _Nullable, pthread_t _Nullable);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+void pthread_exit(void * _Nullable) __dead2;
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_getconcurrency(void);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_getschedparam(pthread_t , int * _Nullable __restrict,
+		struct sched_param * _Nullable __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+void* _Nullable pthread_getspecific(pthread_key_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_join(pthread_t , void * _Nullable * _Nullable)
+		__DARWIN_ALIAS_C(pthread_join);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *));
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_key_delete(pthread_key_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_destroy(pthread_mutex_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_getprioceiling(const pthread_mutex_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_init(pthread_mutex_t * __restrict,
+		const pthread_mutexattr_t * _Nullable __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_lock(pthread_mutex_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_setprioceiling(pthread_mutex_t * __restrict, int,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_trylock(pthread_mutex_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutex_unlock(pthread_mutex_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_destroy(pthread_mutexattr_t *) __DARWIN_ALIAS(pthread_mutexattr_destroy);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_getprotocol(const pthread_mutexattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_gettype(const pthread_mutexattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.13.4), ios(11.3), watchos(4.3), tvos(11.3))
+int pthread_mutexattr_getpolicy_np(const pthread_mutexattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_init(pthread_mutexattr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
+
+__API_AVAILABLE(macos(10.7), ios(5.0))
+int pthread_mutexattr_setpolicy_np(pthread_mutexattr_t *, int);
+
+__SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead")
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_once(pthread_once_t *, void (* _Nonnull)(void));
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_destroy(pthread_rwlock_t * ) __DARWIN_ALIAS(pthread_rwlock_destroy);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_init(pthread_rwlock_t * __restrict,
+		const pthread_rwlockattr_t * _Nullable __restrict)
+		__DARWIN_ALIAS(pthread_rwlock_init);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_rdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_rdlock);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_tryrdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_tryrdlock);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_trywrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_trywrlock);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_wrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_wrlock);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlock_unlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_unlock);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t * __restrict,
+		int * __restrict);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlockattr_init(pthread_rwlockattr_t *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+pthread_t pthread_self(void);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_setcancelstate(int , int * _Nullable)
+		__DARWIN_ALIAS(pthread_setcancelstate);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_setcanceltype(int , int * _Nullable)
+		__DARWIN_ALIAS(pthread_setcanceltype);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_setconcurrency(int);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_setschedparam(pthread_t, int, const struct sched_param *);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_setspecific(pthread_key_t , const void * _Nullable);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+void pthread_testcancel(void) __DARWIN_ALIAS(pthread_testcancel);
+
+#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus)
+
+/* returns non-zero if pthread_create or cthread_fork have been called */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_is_threaded_np(void);
+
+__API_AVAILABLE(macos(10.6), ios(3.2))
+int pthread_threadid_np(pthread_t _Nullable,__uint64_t* _Nullable);
+
+/*SPI to set and get pthread name*/
+__API_AVAILABLE(macos(10.6), ios(3.2))
+int	pthread_getname_np(pthread_t,char*,size_t);
+
+__API_AVAILABLE(macos(10.6), ios(3.2))
+int	pthread_setname_np(const char*);
+
+/* returns non-zero if the current thread is the main thread */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int	pthread_main_np(void);
+
+/* return the mach thread bound to the pthread */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+mach_port_t pthread_mach_thread_np(pthread_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+size_t pthread_get_stacksize_np(pthread_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+void* pthread_get_stackaddr_np(pthread_t);
+
+/* Like pthread_cond_signal(), but only wake up the specified pthread */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_signal_thread_np(pthread_cond_t *, pthread_t _Nullable);
+
+/* Like pthread_cond_timedwait, but use a relative timeout */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *,
+		const struct timespec * _Nullable);
+
+/* Like pthread_create(), but leaves the thread suspended */
+__API_AVAILABLE(macos(10.4), ios(2.0))
+#if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
+int pthread_create_suspended_np(
+		pthread_t _Nullable * _Nonnull, const pthread_attr_t * _Nullable,
+		void * _Nullable (* _Nonnull)(void * _Nullable), void * _Nullable);
+#else
+int pthread_create_suspended_np(pthread_t *, const pthread_attr_t * _Nullable,
+		void *(* _Nonnull)(void *), void * _Nullable);
+#endif
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_kill(pthread_t, int);
+
+__API_AVAILABLE(macos(10.5), ios(2.0))
+_Nullable pthread_t pthread_from_mach_thread_np(mach_port_t);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable)
+		__DARWIN_ALIAS(pthread_sigmask);
+
+__API_AVAILABLE(macos(10.4), ios(2.0))
+void pthread_yield_np(void);
+
+__API_AVAILABLE(macos(11.0))
+__API_UNAVAILABLE(ios, tvos, watchos, driverkit)
+void pthread_jit_write_protect_np(int enabled);
+
+__API_AVAILABLE(macos(11.0))
+__API_UNAVAILABLE(ios, tvos, watchos, driverkit)
+int pthread_jit_write_protect_supported_np(void);
+
+/*!
+ * @function pthread_cpu_number_np
+ *
+ * @param cpu_number_out
+ * The CPU number that the thread was running on at the time of query.
+ * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu"))
+ *
+ * @result
+ * This function returns 0 or the value of errno if an error occurred.
+ *
+ * @note
+ * Optimizations of per-CPU datastructures based on the result of this function
+ * still require synchronization since it is not guaranteed that the thread will
+ * still be on the same CPU by the time the function returns.
+ */
+__API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1))
+int
+pthread_cpu_number_np(size_t *cpu_number_out);
+
+#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */
+__END_DECLS
+#if __has_feature(assume_nonnull)
+_Pragma("clang assume_nonnull end")
+#endif
+
+#endif /* _PTHREAD_H */
\ No newline at end of file
lib/libc/include/any-macos.11-any/stdio.h
@@ -0,0 +1,410 @@
+/*
+ * Copyright (c) 2000, 2005, 2007, 2009, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
+ */
+
+#ifndef	_STDIO_H_
+#define	_STDIO_H_
+
+#include <_stdio.h>
+
+__BEGIN_DECLS
+extern FILE *__stdinp;
+extern FILE *__stdoutp;
+extern FILE *__stderrp;
+__END_DECLS
+
+#define	__SLBF	0x0001		/* line buffered */
+#define	__SNBF	0x0002		/* unbuffered */
+#define	__SRD	0x0004		/* OK to read */
+#define	__SWR	0x0008		/* OK to write */
+	/* RD and WR are never simultaneously asserted */
+#define	__SRW	0x0010		/* open for reading & writing */
+#define	__SEOF	0x0020		/* found EOF */
+#define	__SERR	0x0040		/* found error */
+#define	__SMBF	0x0080		/* _buf is from malloc */
+#define	__SAPP	0x0100		/* fdopen()ed in append mode */
+#define	__SSTR	0x0200		/* this is an sprintf/snprintf string */
+#define	__SOPT	0x0400		/* do fseek() optimisation */
+#define	__SNPT	0x0800		/* do not do fseek() optimisation */
+#define	__SOFF	0x1000		/* set iff _offset is in fact correct */
+#define	__SMOD	0x2000		/* true => fgetln modified _p text */
+#define __SALC  0x4000		/* allocate string space dynamically */
+#define __SIGN  0x8000		/* ignore this file in _fwalk */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define	_IOFBF	0		/* setvbuf should set fully buffered */
+#define	_IOLBF	1		/* setvbuf should set line buffered */
+#define	_IONBF	2		/* setvbuf should set unbuffered */
+
+#define	BUFSIZ	1024		/* size of buffer used by setbuf */
+#define	EOF	(-1)
+
+				/* must be == _POSIX_STREAM_MAX <limits.h> */
+#define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */
+#define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#ifndef _ANSI_SOURCE
+#define	P_tmpdir	"/var/tmp/"
+#endif
+#define	L_tmpnam	1024	/* XXX must be == PATH_MAX */
+#define	TMP_MAX		308915776
+
+#ifndef SEEK_SET
+#define	SEEK_SET	0	/* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define	SEEK_CUR	1	/* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define	SEEK_END	2	/* set file offset to EOF plus offset */
+#endif
+
+#define	stdin	__stdinp
+#define	stdout	__stdoutp
+#define	stderr	__stderrp
+
+#ifdef _DARWIN_UNLIMITED_STREAMS
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
+#error "_DARWIN_UNLIMITED_STREAMS specified, but -miphoneos-version-min version does not support it."
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
+#error "_DARWIN_UNLIMITED_STREAMS specified, but -mmacosx-version-min version does not support it."
+#endif
+#endif
+
+/* ANSI-C */
+
+__BEGIN_DECLS
+void	 clearerr(FILE *);
+int	 fclose(FILE *);
+int	 feof(FILE *);
+int	 ferror(FILE *);
+int	 fflush(FILE *);
+int	 fgetc(FILE *);
+int	 fgetpos(FILE * __restrict, fpos_t *);
+char	*fgets(char * __restrict, int, FILE *);
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fopen));
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fopen));
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+int	 fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3);
+int	 fputc(int, FILE *);
+int	 fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs);
+size_t	 fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream);
+FILE	*freopen(const char * __restrict, const char * __restrict,
+                 FILE * __restrict) __DARWIN_ALIAS(freopen);
+int	 fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3);
+int	 fseek(FILE *, long, int);
+int	 fsetpos(FILE *, const fpos_t *);
+long	 ftell(FILE *);
+size_t	 fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite);
+int	 getc(FILE *);
+int	 getchar(void);
+char	*gets(char *);
+void	 perror(const char *) __cold;
+int	 printf(const char * __restrict, ...) __printflike(1, 2);
+int	 putc(int, FILE *);
+int	 putchar(int);
+int	 puts(const char *);
+int	 remove(const char *);
+int	 rename (const char *__old, const char *__new);
+void	 rewind(FILE *);
+int	 scanf(const char * __restrict, ...) __scanflike(1, 2);
+void	 setbuf(FILE * __restrict, char * __restrict);
+int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t);
+int	 sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3) __swift_unavailable("Use snprintf instead.");
+int	 sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3);
+FILE	*tmpfile(void);
+
+__swift_unavailable("Use mkstemp(3) instead.")
+#if !defined(_POSIX_C_SOURCE)
+__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
+#endif
+char	*tmpnam(char *);
+int	 ungetc(int, FILE *);
+int	 vfprintf(FILE * __restrict, const char * __restrict, va_list) __printflike(2, 0);
+int	 vprintf(const char * __restrict, va_list) __printflike(1, 0);
+int	 vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0) __swift_unavailable("Use vsnprintf instead.");
+__END_DECLS
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-1988
+ */
+
+#if __DARWIN_C_LEVEL >= 198808L
+#define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */
+
+__BEGIN_DECLS
+#include <_ctermid.h>
+
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen));
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+int	 fileno(FILE *);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 198808L */
+
+
+/* Additional functionality provided by:
+ * POSIX.2-1992 C Language Binding Option
+ */
+#if TARGET_OS_IPHONE
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
+#else
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
+#endif
+
+#if __DARWIN_C_LEVEL >= 199209L
+__BEGIN_DECLS
+int	 pclose(FILE *) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 199209L */
+
+#undef __swift_unavailable_on
+
+/* Additional functionality provided by:
+ * POSIX.1c-1995,
+ * POSIX.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ */
+
+#if __DARWIN_C_LEVEL >= 199506L
+
+/* Functions internal to the implementation. */
+__BEGIN_DECLS
+int	__srget(FILE *);
+int	__svfscanf(FILE *, const char *, va_list) __scanflike(2, 0);
+int	__swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__) && defined(__STDC__)
+__header_always_inline int __sputc(int _c, FILE *_p) {
+	if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+		return (*_p->_p++ = _c);
+	else
+		return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define	__sputc(c, p) \
+	(--(p)->_w < 0 ? \
+		(p)->_w >= (p)->_lbfsize ? \
+			(*(p)->_p = (c)), *(p)->_p != '\n' ? \
+				(int)*(p)->_p++ : \
+				__swbuf('\n', p) : \
+			__swbuf((int)(c), p) : \
+		(*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define	__sfeof(p)	(((p)->_flags & __SEOF) != 0)
+#define	__sferror(p)	(((p)->_flags & __SERR) != 0)
+#define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define	__sfileno(p)	((p)->_file)
+
+__BEGIN_DECLS
+void	 flockfile(FILE *);
+int	 ftrylockfile(FILE *);
+void	 funlockfile(FILE *);
+int	 getc_unlocked(FILE *);
+int	 getchar_unlocked(void);
+int	 putc_unlocked(int, FILE *);
+int	 putchar_unlocked(int);
+
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+int	 getw(FILE *);
+int	 putw(int, FILE *);
+#endif
+
+__swift_unavailable("Use mkstemp(3) instead.")
+#if !defined(_POSIX_C_SOURCE)
+__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.")
+#endif
+char	*tempnam(const char *__dir, const char *__prefix) __DARWIN_ALIAS(tempnam);
+__END_DECLS
+
+#ifndef lint
+#define	getc_unlocked(fp)	__sgetc(fp)
+#define putc_unlocked(x, fp)	__sputc(x, fp)
+#endif /* lint */
+
+#define	getchar_unlocked()	getc_unlocked(stdin)
+#define	putchar_unlocked(x)	putc_unlocked(x, stdout)
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2001
+ * ISO C99
+ */
+
+#if __DARWIN_C_LEVEL >= 200112L
+#include <sys/_types/_off_t.h>
+
+__BEGIN_DECLS
+int	 fseeko(FILE * __stream, off_t __offset, int __whence);
+off_t	 ftello(FILE * __stream);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+#if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus)
+__BEGIN_DECLS
+int	 snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4);
+int	 vfscanf(FILE * __restrict __stream, const char * __restrict __format, va_list) __scanflike(2, 0);
+int	 vscanf(const char * __restrict __format, va_list) __scanflike(1, 0);
+int	 vsnprintf(char * __restrict __str, size_t __size, const char * __restrict __format, va_list) __printflike(3, 0);
+int	 vsscanf(const char * __restrict __str, const char * __restrict __format, va_list) __scanflike(2, 0);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2008
+ */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#include <sys/_types/_ssize_t.h>
+
+__BEGIN_DECLS
+int	dprintf(int, const char * __restrict, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+int	vdprintf(int, const char * __restrict, va_list) __printflike(2, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+ssize_t getdelim(char ** __restrict __linep, size_t * __restrict __linecapp, int __delimiter, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+FILE *fmemopen(void * __restrict __buf, size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+FILE *open_memstream(char **__bufp, size_t *__sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+
+
+/* Darwin extensions */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+__BEGIN_DECLS
+extern __const int sys_nerr;		/* perror(3) external variables */
+extern __const char *__const sys_errlist[];
+
+int	 asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3);
+char	*ctermid_r(char *);
+char	*fgetln(FILE *, size_t *);
+__const char *fmtcheck(const char *, const char *);
+int	 fpurge(FILE *);
+void	 setbuffer(FILE *, char *, int);
+int	 setlinebuf(FILE *);
+int	 vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0);
+FILE	*zopen(const char *, const char *, int);
+
+
+/*
+ * Stdio function-access interface.
+ */
+FILE	*funopen(const void *,
+                 int (* _Nullable)(void *, char *, int),
+                 int (* _Nullable)(void *, const char *, int),
+                 fpos_t (* _Nullable)(void *, fpos_t, int),
+                 int (* _Nullable)(void *));
+__END_DECLS
+#define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+
+#define	feof_unlocked(p)	__sfeof(p)
+#define	ferror_unlocked(p)	__sferror(p)
+#define	clearerr_unlocked(p)	__sclearerr(p)
+#define	fileno_unlocked(p)	__sfileno(p)
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_stdio.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus)
+/* Security checking functions.  */
+#include <secure/_stdio.h>
+#endif
+
+#endif /* _STDIO_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/stdlib.h
@@ -0,0 +1,373 @@
+/*
+ * Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
+ */
+
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <Availability.h>
+#include <sys/cdefs.h>
+
+#include <_types.h>
+#if !defined(_ANSI_SOURCE)
+#include <sys/wait.h>
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <alloca.h>
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#endif /* !_ANSI_SOURCE */
+
+/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
+ * _GCC_SIZE_T */
+#include <sys/_types/_size_t.h>
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <sys/_types/_ct_rune_t.h>
+#include <sys/_types/_rune_t.h>
+#endif	/* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#include <sys/_types/_wchar_t.h>
+
+typedef struct {
+	int quot;		/* quotient */
+	int rem;		/* remainder */
+} div_t;
+
+typedef struct {
+	long quot;		/* quotient */
+	long rem;		/* remainder */
+} ldiv_t;
+
+#if !__DARWIN_NO_LONG_LONG
+typedef struct {
+	long long quot;
+	long long rem;
+} lldiv_t;
+#endif /* !__DARWIN_NO_LONG_LONG */
+
+#include <sys/_types/_null.h>
+
+#define	EXIT_FAILURE	1
+#define	EXIT_SUCCESS	0
+
+#define	RAND_MAX	0x7fffffff
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <_xlocale.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#ifndef MB_CUR_MAX
+#ifdef _USE_EXTENDED_LOCALES_
+#define	MB_CUR_MAX	(___mb_cur_max())
+#ifndef MB_CUR_MAX_L
+#define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x))
+#endif /* !MB_CUR_MAX_L */
+#else /* !_USE_EXTENDED_LOCALES_ */
+extern int __mb_cur_max;
+#define	MB_CUR_MAX	__mb_cur_max
+#endif /* _USE_EXTENDED_LOCALES_ */
+#endif /* MB_CUR_MAX */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \
+    && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L)
+#define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x))
+#endif
+
+#include <malloc/_malloc.h>
+
+__BEGIN_DECLS
+void	 abort(void) __cold __dead2;
+int	 abs(int) __pure2;
+int	 atexit(void (* _Nonnull)(void));
+double	 atof(const char *);
+int	 atoi(const char *);
+long	 atol(const char *);
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 atoll(const char *);
+#endif /* !__DARWIN_NO_LONG_LONG */
+void	*bsearch(const void *__key, const void *__base, size_t __nel,
+	    size_t __width, int (* _Nonnull __compar)(const void *, const void *));
+/* calloc is now declared in _malloc.h */
+div_t	 div(int, int) __pure2;
+void	 exit(int) __dead2;
+/* free is now declared in _malloc.h */
+char	*getenv(const char *);
+long	 labs(long) __pure2;
+ldiv_t	 ldiv(long, long) __pure2;
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 llabs(long long);
+lldiv_t	 lldiv(long long, long long);
+#endif /* !__DARWIN_NO_LONG_LONG */
+/* malloc is now declared in _malloc.h */
+int	 mblen(const char *__s, size_t __n);
+size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
+int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
+/* posix_memalign is now declared in _malloc.h */
+void	 qsort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+int	 rand(void) __swift_unavailable("Use arc4random instead.");
+/* realloc is now declared in _malloc.h */
+void	 srand(unsigned) __swift_unavailable("Use arc4random instead.");
+double	 strtod(const char *, char **) __DARWIN_ALIAS(strtod);
+float	 strtof(const char *, char **) __DARWIN_ALIAS(strtof);
+long	 strtol(const char *__str, char **__endptr, int __base);
+long double
+	 strtold(const char *, char **);
+#if !__DARWIN_NO_LONG_LONG
+long long 
+	 strtoll(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+unsigned long
+	 strtoul(const char *__str, char **__endptr, int __base);
+#if !__DARWIN_NO_LONG_LONG
+unsigned long long
+	 strtoull(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+
+#if TARGET_OS_IPHONE
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
+#else
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
+#endif
+
+__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable")
+__API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+int	 system(const char *) __DARWIN_ALIAS_C(system);
+
+#undef __swift_unavailable_on
+
+size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
+int	 wctomb(char *, wchar_t);
+
+#ifndef _ANSI_SOURCE
+void	_Exit(int) __dead2;
+long	 a64l(const char *);
+double	 drand48(void);
+char	*ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */
+double	 erand48(unsigned short[3]);
+char	*fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */
+char	*gcvt(double, int, char *); /* LEGACY */
+int	 getsubopt(char **, char * const *, char **);
+int	 grantpt(int);
+#if __DARWIN_UNIX03
+char	*initstate(unsigned, char *, size_t); /* no  __DARWIN_ALIAS needed */
+#else /* !__DARWIN_UNIX03 */
+char	*initstate(unsigned long, char *, long);
+#endif /* __DARWIN_UNIX03 */
+long	 jrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead.");
+char	*l64a(long);
+void	 lcong48(unsigned short[7]);
+long	 lrand48(void) __swift_unavailable("Use arc4random instead.");
+char	*mktemp(char *);
+int	 mkstemp(char *);
+long	 mrand48(void) __swift_unavailable("Use arc4random instead.");
+long	 nrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead.");
+int	 posix_openpt(int);
+char	*ptsname(int);
+
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3));
+#endif
+
+int	 putenv(char *) __DARWIN_ALIAS(putenv);
+long	 random(void) __swift_unavailable("Use arc4random instead.");
+int	 rand_r(unsigned *) __swift_unavailable("Use arc4random instead.");
+#if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH)
+char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath);
+#else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */
+char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath);
+#endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */
+unsigned short
+	*seed48(unsigned short[3]);
+int	 setenv(const char * __name, const char * __value, int __overwrite) __DARWIN_ALIAS(setenv);
+#if __DARWIN_UNIX03
+void	 setkey(const char *) __DARWIN_ALIAS(setkey);
+#else /* !__DARWIN_UNIX03 */
+int	 setkey(const char *);
+#endif /* __DARWIN_UNIX03 */
+char	*setstate(const char *);
+void	 srand48(long);
+#if __DARWIN_UNIX03
+void	 srandom(unsigned);
+#else /* !__DARWIN_UNIX03 */
+void	 srandom(unsigned long);
+#endif /* __DARWIN_UNIX03 */
+int	 unlockpt(int);
+#if __DARWIN_UNIX03
+int	 unsetenv(const char *) __DARWIN_ALIAS(unsetenv);
+#else /* !__DARWIN_UNIX03 */
+void	 unsetenv(const char *);
+#endif /* __DARWIN_UNIX03 */
+#endif	/* !_ANSI_SOURCE */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <machine/types.h>
+#include <sys/_types/_dev_t.h>
+#include <sys/_types/_mode_t.h>
+#include <_types/_uint32_t.h>
+
+uint32_t arc4random(void);
+void	 arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/)
+    __OSX_DEPRECATED(10.0, 10.12, "use arc4random_stir")
+    __IOS_DEPRECATED(2.0, 10.0, "use arc4random_stir")
+    __TVOS_DEPRECATED(2.0, 10.0, "use arc4random_stir")
+    __WATCHOS_DEPRECATED(1.0, 3.0, "use arc4random_stir");
+void	 arc4random_buf(void * __buf, size_t __nbytes) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+void	 arc4random_stir(void);
+uint32_t
+	 arc4random_uniform(uint32_t __upper_bound) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+#ifdef __BLOCKS__
+int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+void	*bsearch_b(const void *__key, const void *__base, size_t __nel,
+	    size_t __width, int (^ _Nonnull __compar)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+
+	 /* getcap(3) functions */
+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) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+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);
+void	 setprogname(const char *);
+
+#ifdef __BLOCKS__
+#if __has_attribute(noescape)
+#define __sort_noescape __attribute__((__noescape__))
+#else
+#define __sort_noescape
+#endif
+#endif /* __BLOCKS__ */
+
+int	 heapsort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int	 heapsort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+int	 mergesort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int	 mergesort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void	 psort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *))
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#ifdef __BLOCKS__
+void	 psort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void	 psort_r(void *__base, size_t __nel, size_t __width, void *,
+	    int (* _Nonnull __compar)(void *, const void *, const void *))
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#ifdef __BLOCKS__
+void	 qsort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+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);
+int	rpmatch(const char *)
+	__API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
+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) __alloc_size(2);
+long long
+	strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp)
+	__API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0));
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 strtoq(const char *__str, char **__endptr, int __base);
+unsigned long long
+	 strtouq(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+extern char *suboptarg;		/* getsubopt(3) external variable */
+/* valloc is now declared in _malloc.h */
+#endif	/* !_ANSI_SOURCE && !_POSIX_SOURCE */
+
+/* Poison the following routines if -fshort-wchar is set */
+#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
+#pragma GCC poison mbstowcs mbtowc wcstombs wctomb
+#endif
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_stdlib.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* _STDLIB_H_ */
\ No newline at end of file
lib/libc/include/any-macos.11-any/TargetConditionals.h
@@ -61,10 +61,8 @@
  *  The IOS/TV/WATCH conditionals are mutually exclusive.
  *
  *
- *      TARGET_OS_WIN32           - Generated code will run under WIN32 API
- *      TARGET_OS_WINDOWS         - Generated code will run under Windows
+ *      TARGET_OS_WIN32           - Generated code will run under 32-bit Windows
  *      TARGET_OS_UNIX            - Generated code will run under some Unix (not OSX)
- *      TARGET_OS_LINUX           - Generated code will run under Linux
  *      TARGET_OS_MAC             - Generated code will run under Mac OS X variant
  *         TARGET_OS_OSX          - Generated code will run under OS X devices
  *         TARGET_OS_IPHONE          - Generated code for firmware, devices, or simulator
@@ -180,7 +178,7 @@
     /* -target=x86_64-apple-driverkit19.0 */
     /* -target=arm64-apple-driverkit19.0 */
     /* -target=arm64e-apple-driverkit19.0 */
-    #if __is_target_vendor(apple) && __is_target_os(driverkit)
+    #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit)
         #define TARGET_OS_OSX               0
         #define TARGET_OS_IPHONE            0
         #define TARGET_OS_IOS               0
@@ -216,9 +214,7 @@
 #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
     #define TARGET_OS_MAC               1
     #define TARGET_OS_WIN32             0
-    #define TARGET_OS_WINDOWS           0
     #define TARGET_OS_UNIX              0
-    #define TARGET_OS_LINUX             0
 
     #if !DYNAMIC_TARGETS_ENABLED
         #define TARGET_OS_OSX               1
@@ -359,9 +355,7 @@
 #elif defined(__MWERKS__)
     #define TARGET_OS_MAC               1
     #define TARGET_OS_WIN32             0
-    #define TARGET_OS_WINDOWS           0
     #define TARGET_OS_UNIX              0
-    #define TARGET_OS_LINUX             0
     #define TARGET_OS_EMBEDDED          0
     #if defined(__POWERPC__)
         #define TARGET_CPU_PPC          1
@@ -487,9 +481,7 @@
     #endif
     #define TARGET_OS_MAC                1
     #define TARGET_OS_WIN32              0
-    #define TARGET_OS_WINDOWS            0
     #define TARGET_OS_UNIX               0
-    #define TARGET_OS_LINUX              0
     #define TARGET_OS_EMBEDDED           0
     #if TARGET_CPU_PPC || TARGET_CPU_PPC64
         #define TARGET_RT_BIG_ENDIAN     1
lib/libc/include/any-macos.11-any/unistd.h
@@ -0,0 +1,787 @@
+/*
+ * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved
+ * Copyright (c) 1991, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)unistd.h	8.12 (Berkeley) 4/27/95
+ *
+ *  Copyright (c)  1998 Apple Compter, Inc.
+ *  All Rights Reserved
+ */
+
+/* History:
+        7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr
+        3/26/98 CHW at Apple added real interface to searchfs call
+  	3/5/98  CHW at Apple added hfs semantic system calls headers
+*/
+
+#ifndef _UNISTD_H_
+#define	_UNISTD_H_
+
+#include <_types.h>
+#include <sys/unistd.h>
+#include <Availability.h>
+#include <sys/_types/_gid_t.h>
+#include <sys/_types/_intptr_t.h>
+#include <sys/_types/_off_t.h>
+#include <sys/_types/_pid_t.h>
+/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
+ * _GCC_SIZE_T */
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_ssize_t.h>
+#include <sys/_types/_uid_t.h>
+#include <sys/_types/_useconds_t.h>
+#include <sys/_types/_null.h>
+
+#define	 STDIN_FILENO	0	/* standard input file descriptor */
+#define	STDOUT_FILENO	1	/* standard output file descriptor */
+#define	STDERR_FILENO	2	/* standard error file descriptor */
+
+
+/* Version test macros */
+/* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */
+#define	_XOPEN_VERSION			600		/* [XSI] */
+#define	_XOPEN_XCU_VERSION		4		/* Older standard */
+
+
+/* Please keep this list in the same order as the applicable standard */
+#define	_POSIX_ADVISORY_INFO		(-1)		/* [ADV] */
+#define	_POSIX_ASYNCHRONOUS_IO		(-1)		/* [AIO] */
+#define	_POSIX_BARRIERS			(-1)		/* [BAR] */
+#define	_POSIX_CHOWN_RESTRICTED		200112L
+#define	_POSIX_CLOCK_SELECTION		(-1)		/* [CS] */
+#define	_POSIX_CPUTIME			(-1)		/* [CPT] */
+#define	_POSIX_FSYNC			200112L		/* [FSC] */
+#define	_POSIX_IPV6			200112L
+#define	_POSIX_JOB_CONTROL		200112L
+#define	_POSIX_MAPPED_FILES		200112L		/* [MF] */
+#define	_POSIX_MEMLOCK			(-1)		/* [ML] */
+#define	_POSIX_MEMLOCK_RANGE		(-1)		/* [MR] */
+#define	_POSIX_MEMORY_PROTECTION	200112L		/* [MPR] */
+#define	_POSIX_MESSAGE_PASSING		(-1)		/* [MSG] */
+#define	_POSIX_MONOTONIC_CLOCK		(-1)		/* [MON] */
+#define	_POSIX_NO_TRUNC			200112L
+#define	_POSIX_PRIORITIZED_IO		(-1)		/* [PIO] */
+#define	_POSIX_PRIORITY_SCHEDULING	(-1)		/* [PS] */
+#define	_POSIX_RAW_SOCKETS		(-1)		/* [RS] */
+#define	_POSIX_READER_WRITER_LOCKS	200112L		/* [THR] */
+#define	_POSIX_REALTIME_SIGNALS		(-1)		/* [RTS] */
+#define	_POSIX_REGEXP			200112L
+#define	_POSIX_SAVED_IDS		200112L		/* XXX required */
+#define	_POSIX_SEMAPHORES		(-1)		/* [SEM] */
+#define	_POSIX_SHARED_MEMORY_OBJECTS	(-1)		/* [SHM] */
+#define	_POSIX_SHELL			200112L
+#define	_POSIX_SPAWN			(-1)		/* [SPN] */
+#define	_POSIX_SPIN_LOCKS		(-1)		/* [SPI] */
+#define	_POSIX_SPORADIC_SERVER		(-1)		/* [SS] */
+#define	_POSIX_SYNCHRONIZED_IO		(-1)		/* [SIO] */
+#define	_POSIX_THREAD_ATTR_STACKADDR	200112L		/* [TSA] */
+#define	_POSIX_THREAD_ATTR_STACKSIZE	200112L		/* [TSS] */
+#define	_POSIX_THREAD_CPUTIME		(-1)		/* [TCT] */
+#define	_POSIX_THREAD_PRIO_INHERIT	(-1)		/* [TPI] */
+#define	_POSIX_THREAD_PRIO_PROTECT	(-1)		/* [TPP] */
+#define	_POSIX_THREAD_PRIORITY_SCHEDULING	(-1)	/* [TPS] */
+#define	_POSIX_THREAD_PROCESS_SHARED	200112L		/* [TSH] */
+#define	_POSIX_THREAD_SAFE_FUNCTIONS	200112L		/* [TSF] */
+#define	_POSIX_THREAD_SPORADIC_SERVER	(-1)		/* [TSP] */
+#define	_POSIX_THREADS			200112L		/* [THR] */
+#define	_POSIX_TIMEOUTS			(-1)		/* [TMO] */
+#define	_POSIX_TIMERS			(-1)		/* [TMR] */
+#define	_POSIX_TRACE			(-1)		/* [TRC] */
+#define	_POSIX_TRACE_EVENT_FILTER	(-1)		/* [TEF] */
+#define	_POSIX_TRACE_INHERIT		(-1)		/* [TRI] */
+#define	_POSIX_TRACE_LOG		(-1)		/* [TRL] */
+#define	_POSIX_TYPED_MEMORY_OBJECTS	(-1)		/* [TYM] */
+#ifndef _POSIX_VDISABLE
+#define	_POSIX_VDISABLE			0xff		/* same as sys/termios.h */
+#endif /* _POSIX_VDISABLE */
+
+#if __DARWIN_C_LEVEL >= 199209L
+#define	_POSIX2_C_BIND			200112L
+#define	_POSIX2_C_DEV			200112L		/* c99 command */
+#define	_POSIX2_CHAR_TERM		200112L
+#define	_POSIX2_FORT_DEV		(-1)		/* fort77 command */
+#define	_POSIX2_FORT_RUN		200112L
+#define	_POSIX2_LOCALEDEF		200112L		/* localedef command */
+#define	_POSIX2_PBS			(-1)
+#define	_POSIX2_PBS_ACCOUNTING		(-1)
+#define	_POSIX2_PBS_CHECKPOINT		(-1)
+#define	_POSIX2_PBS_LOCATE		(-1)
+#define	_POSIX2_PBS_MESSAGE		(-1)
+#define	_POSIX2_PBS_TRACK		(-1)
+#define	_POSIX2_SW_DEV			200112L
+#define	_POSIX2_UPE			200112L	/* XXXX no fc, newgrp, tabs */
+#endif /* __DARWIN_C_LEVEL */
+
+#define	__ILP32_OFF32          (-1)
+#define	__ILP32_OFFBIG         (-1)
+
+#define	__LP64_OFF64           (1)
+#define	__LPBIG_OFFBIG         (1)
+
+#if __DARWIN_C_LEVEL >= 200112L
+#define	_POSIX_V6_ILP32_OFF32		__ILP32_OFF32
+#define	_POSIX_V6_ILP32_OFFBIG		__ILP32_OFFBIG
+#define	_POSIX_V6_LP64_OFF64		__LP64_OFF64
+#define	_POSIX_V6_LPBIG_OFFBIG		__LPBIG_OFFBIG
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#define	_POSIX_V7_ILP32_OFF32		__ILP32_OFF32
+#define	_POSIX_V7_ILP32_OFFBIG		__ILP32_OFFBIG
+#define	_POSIX_V7_LP64_OFF64		__LP64_OFF64
+#define	_POSIX_V7_LPBIG_OFFBIG		__LPBIG_OFFBIG
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define	_V6_ILP32_OFF32             __ILP32_OFF32
+#define	_V6_ILP32_OFFBIG            __ILP32_OFFBIG
+#define	_V6_LP64_OFF64              __LP64_OFF64
+#define	_V6_LPBIG_OFFBIG            __LPBIG_OFFBIG
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/* Removed in Issue 7 */
+#define	_XBS5_ILP32_OFF32		    __ILP32_OFF32
+#define	_XBS5_ILP32_OFFBIG		    __ILP32_OFFBIG
+#define	_XBS5_LP64_OFF64		    __LP64_OFF64
+#define	_XBS5_LPBIG_OFFBIG		    __LPBIG_OFFBIG
+#endif /* __DARWIN_C_LEVEL < 200809L */
+
+#if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */ 
+#define	_XOPEN_CRYPT			(1)
+#define	_XOPEN_ENH_I18N			(1)		/* XXX required */
+#define	_XOPEN_LEGACY			(-1)	/* no ftime gcvt, wcswcs */
+#define	_XOPEN_REALTIME			(-1)	/* no q'ed signals, mq_* */
+#define	_XOPEN_REALTIME_THREADS		(-1)	/* no posix_spawn, et. al. */
+#define	_XOPEN_SHM			(1)
+#define	_XOPEN_STREAMS			(-1)   /* Issue 6 */
+#define	_XOPEN_UNIX			(1)
+#endif /* XSI */
+
+/* configurable system variables */
+#define	_SC_ARG_MAX			 1
+#define	_SC_CHILD_MAX			 2
+#define	_SC_CLK_TCK			 3
+#define	_SC_NGROUPS_MAX			 4
+#define	_SC_OPEN_MAX			 5
+#define	_SC_JOB_CONTROL			 6
+#define	_SC_SAVED_IDS			 7
+#define	_SC_VERSION			 8
+#define	_SC_BC_BASE_MAX			 9
+#define	_SC_BC_DIM_MAX			10
+#define	_SC_BC_SCALE_MAX		11
+#define	_SC_BC_STRING_MAX		12
+#define	_SC_COLL_WEIGHTS_MAX		13
+#define	_SC_EXPR_NEST_MAX		14
+#define	_SC_LINE_MAX			15
+#define	_SC_RE_DUP_MAX			16
+#define	_SC_2_VERSION			17
+#define	_SC_2_C_BIND			18
+#define	_SC_2_C_DEV			19
+#define	_SC_2_CHAR_TERM			20
+#define	_SC_2_FORT_DEV			21
+#define	_SC_2_FORT_RUN			22
+#define	_SC_2_LOCALEDEF			23
+#define	_SC_2_SW_DEV			24
+#define	_SC_2_UPE			25
+#define	_SC_STREAM_MAX			26
+#define	_SC_TZNAME_MAX			27
+
+#if __DARWIN_C_LEVEL >= 199309L
+#define	_SC_ASYNCHRONOUS_IO		28
+#define	_SC_PAGESIZE			29
+#define	_SC_MEMLOCK			30
+#define	_SC_MEMLOCK_RANGE		31
+#define	_SC_MEMORY_PROTECTION		32
+#define	_SC_MESSAGE_PASSING		33
+#define	_SC_PRIORITIZED_IO		34
+#define	_SC_PRIORITY_SCHEDULING		35
+#define	_SC_REALTIME_SIGNALS		36
+#define	_SC_SEMAPHORES			37
+#define	_SC_FSYNC			38
+#define	_SC_SHARED_MEMORY_OBJECTS 	39
+#define	_SC_SYNCHRONIZED_IO		40
+#define	_SC_TIMERS			41
+#define	_SC_AIO_LISTIO_MAX		42
+#define	_SC_AIO_MAX			43
+#define	_SC_AIO_PRIO_DELTA_MAX		44
+#define	_SC_DELAYTIMER_MAX		45
+#define	_SC_MQ_OPEN_MAX			46
+#define	_SC_MAPPED_FILES		47	/* swap _SC_PAGESIZE vs. BSD */
+#define	_SC_RTSIG_MAX			48
+#define	_SC_SEM_NSEMS_MAX		49
+#define	_SC_SEM_VALUE_MAX		50
+#define	_SC_SIGQUEUE_MAX		51
+#define	_SC_TIMER_MAX			52
+#endif /* __DARWIN_C_LEVEL >= 199309L */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define	_SC_NPROCESSORS_CONF		57
+#define	_SC_NPROCESSORS_ONLN		58
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#if __DARWIN_C_LEVEL >= 200112L
+#define	_SC_2_PBS			59
+#define	_SC_2_PBS_ACCOUNTING		60
+#define	_SC_2_PBS_CHECKPOINT		61
+#define	_SC_2_PBS_LOCATE		62
+#define	_SC_2_PBS_MESSAGE		63
+#define	_SC_2_PBS_TRACK			64
+#define	_SC_ADVISORY_INFO		65
+#define	_SC_BARRIERS			66
+#define	_SC_CLOCK_SELECTION		67
+#define	_SC_CPUTIME			68
+#define	_SC_FILE_LOCKING		69
+#define	_SC_GETGR_R_SIZE_MAX		70
+#define	_SC_GETPW_R_SIZE_MAX		71
+#define	_SC_HOST_NAME_MAX		72
+#define	_SC_LOGIN_NAME_MAX		73
+#define	_SC_MONOTONIC_CLOCK		74
+#define	_SC_MQ_PRIO_MAX			75
+#define	_SC_READER_WRITER_LOCKS		76
+#define	_SC_REGEXP			77
+#define	_SC_SHELL			78
+#define	_SC_SPAWN			79
+#define	_SC_SPIN_LOCKS			80
+#define	_SC_SPORADIC_SERVER		81
+#define	_SC_THREAD_ATTR_STACKADDR	82
+#define	_SC_THREAD_ATTR_STACKSIZE	83
+#define	_SC_THREAD_CPUTIME		84
+#define	_SC_THREAD_DESTRUCTOR_ITERATIONS 85
+#define	_SC_THREAD_KEYS_MAX		86
+#define	_SC_THREAD_PRIO_INHERIT		87
+#define	_SC_THREAD_PRIO_PROTECT		88
+#define	_SC_THREAD_PRIORITY_SCHEDULING	89
+#define	_SC_THREAD_PROCESS_SHARED	90
+#define	_SC_THREAD_SAFE_FUNCTIONS	91
+#define	_SC_THREAD_SPORADIC_SERVER	92
+#define	_SC_THREAD_STACK_MIN		93
+#define	_SC_THREAD_THREADS_MAX		94
+#define	_SC_TIMEOUTS			95
+#define	_SC_THREADS			96
+#define	_SC_TRACE			97
+#define	_SC_TRACE_EVENT_FILTER		98
+#define	_SC_TRACE_INHERIT		99
+#define	_SC_TRACE_LOG			100
+#define	_SC_TTY_NAME_MAX		101
+#define	_SC_TYPED_MEMORY_OBJECTS	102
+#define	_SC_V6_ILP32_OFF32		103
+#define	_SC_V6_ILP32_OFFBIG		104
+#define	_SC_V6_LP64_OFF64		105
+#define	_SC_V6_LPBIG_OFFBIG		106
+#define	_SC_IPV6			118
+#define	_SC_RAW_SOCKETS			119
+#define	_SC_SYMLOOP_MAX			120
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+#if __DARWIN_C_LEVEL >= 199506L /* Really XSI */
+#define	_SC_ATEXIT_MAX			107
+#define	_SC_IOV_MAX			56
+#define	_SC_PAGE_SIZE			_SC_PAGESIZE
+#define	_SC_XOPEN_CRYPT			108
+#define	_SC_XOPEN_ENH_I18N		109
+#define	_SC_XOPEN_LEGACY		110      /* Issue 6 */
+#define	_SC_XOPEN_REALTIME		111      /* Issue 6 */
+#define	_SC_XOPEN_REALTIME_THREADS	112  /* Issue 6 */
+#define	_SC_XOPEN_SHM			113
+#define	_SC_XOPEN_STREAMS		114      /* Issue 6 */
+#define	_SC_XOPEN_UNIX			115
+#define	_SC_XOPEN_VERSION		116
+#define	_SC_XOPEN_XCU_VERSION		121
+#endif /* XSI */
+
+#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/* Removed in Issue 7 */
+#define	_SC_XBS5_ILP32_OFF32		122
+#define	_SC_XBS5_ILP32_OFFBIG		123
+#define	_SC_XBS5_LP64_OFF64		124
+#define	_SC_XBS5_LPBIG_OFFBIG		125
+#endif /* __DARWIN_C_LEVEL <= 200809L */
+
+#if __DARWIN_C_LEVEL >= 200112L
+#define	_SC_SS_REPL_MAX			126
+#define	_SC_TRACE_EVENT_NAME_MAX	127
+#define	_SC_TRACE_NAME_MAX		128
+#define	_SC_TRACE_SYS_MAX		129
+#define	_SC_TRACE_USER_EVENT_MAX	130
+#endif
+
+#if __DARWIN_C_LEVEL < 200112L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/* Removed in Issue 6 */
+#define	_SC_PASS_MAX			131
+#endif
+
+/* 132-199 available for future use */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define	_SC_PHYS_PAGES			200
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#if __DARWIN_C_LEVEL >= 199209L
+#ifndef _CS_PATH /* Defined in <sys/unistd.h> */
+#define	_CS_PATH				1
+#endif
+#endif
+
+#if __DARWIN_C_LEVEL >= 200112
+#define	_CS_POSIX_V6_ILP32_OFF32_CFLAGS		2
+#define	_CS_POSIX_V6_ILP32_OFF32_LDFLAGS	3
+#define	_CS_POSIX_V6_ILP32_OFF32_LIBS		4
+#define	_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	5
+#define	_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	6
+#define	_CS_POSIX_V6_ILP32_OFFBIG_LIBS		7
+#define	_CS_POSIX_V6_LP64_OFF64_CFLAGS		8
+#define	_CS_POSIX_V6_LP64_OFF64_LDFLAGS		9
+#define	_CS_POSIX_V6_LP64_OFF64_LIBS		10
+#define	_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	11
+#define	_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	12
+#define	_CS_POSIX_V6_LPBIG_OFFBIG_LIBS		13
+#define	_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	14
+#endif
+
+#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/* Removed in Issue 7 */
+#define	_CS_XBS5_ILP32_OFF32_CFLAGS		20
+#define	_CS_XBS5_ILP32_OFF32_LDFLAGS		21
+#define	_CS_XBS5_ILP32_OFF32_LIBS		22
+#define	_CS_XBS5_ILP32_OFF32_LINTFLAGS		23
+#define	_CS_XBS5_ILP32_OFFBIG_CFLAGS		24
+#define	_CS_XBS5_ILP32_OFFBIG_LDFLAGS		25
+#define	_CS_XBS5_ILP32_OFFBIG_LIBS		26
+#define	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS		27
+#define	_CS_XBS5_LP64_OFF64_CFLAGS		28
+#define	_CS_XBS5_LP64_OFF64_LDFLAGS		29
+#define	_CS_XBS5_LP64_OFF64_LIBS		30
+#define	_CS_XBS5_LP64_OFF64_LINTFLAGS		31
+#define	_CS_XBS5_LPBIG_OFFBIG_CFLAGS		32
+#define	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS		33
+#define	_CS_XBS5_LPBIG_OFFBIG_LIBS		34
+#define	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS		35
+#endif
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define	_CS_DARWIN_USER_DIR			65536
+#define	_CS_DARWIN_USER_TEMP_DIR		65537
+#define	_CS_DARWIN_USER_CACHE_DIR		65538
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+#ifdef _DARWIN_UNLIMITED_GETGROUPS
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
+#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -miphoneos-version-min version does not support it."
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
+#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -mmacosx-version-min version does not support it."
+#endif
+#endif
+
+/* POSIX.1-1990 */
+
+__BEGIN_DECLS
+void	 _exit(int) __dead2;
+int	 access(const char *, int);
+unsigned int
+	 alarm(unsigned int);
+int	 chdir(const char *);
+int	 chown(const char *, uid_t, gid_t);
+
+int	 close(int) __DARWIN_ALIAS_C(close);
+
+int	 dup(int);
+int	 dup2(int, int);
+int	 execl(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 execle(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 execlp(const char * __file, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 execv(const char * __path, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+pid_t	 fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+long	 fpathconf(int, int);
+char	*getcwd(char *, size_t);
+gid_t	 getegid(void);
+uid_t	 geteuid(void);
+gid_t	 getgid(void);
+#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE)
+int	 getgroups(int, gid_t []) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(getgroups));
+#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */
+int	 getgroups(int, gid_t []);
+#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */
+char	*getlogin(void);
+pid_t	 getpgrp(void);
+pid_t	 getpid(void);
+pid_t	 getppid(void);
+uid_t	 getuid(void);
+int	 isatty(int);
+int	 link(const char *, const char *);
+off_t	 lseek(int, off_t, int);
+long	 pathconf(const char *, int);
+
+int	 pause(void) __DARWIN_ALIAS_C(pause);
+
+int	 pipe(int [2]);
+
+ssize_t	 read(int, void *, size_t) __DARWIN_ALIAS_C(read);
+
+int	 rmdir(const char *);
+int	 setgid(gid_t);
+int	 setpgid(pid_t, pid_t);
+pid_t	 setsid(void);
+int	 setuid(uid_t);
+
+unsigned int
+	 sleep(unsigned int) __DARWIN_ALIAS_C(sleep);
+
+long	 sysconf(int);
+pid_t	 tcgetpgrp(int);
+int	 tcsetpgrp(int, pid_t);
+char	*ttyname(int);
+
+#if __DARWIN_UNIX03
+int	 ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r);
+#else /* !__DARWIN_UNIX03 */
+char	*ttyname_r(int, char *, size_t);
+#endif /* __DARWIN_UNIX03 */
+
+int	 unlink(const char *);
+
+ssize_t	 write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write);
+__END_DECLS
+
+
+
+/* Additional functionality provided by:
+ * POSIX.2-1992 C Language Binding Option
+ */
+
+#if __DARWIN_C_LEVEL >= 199209L
+__BEGIN_DECLS
+size_t	 confstr(int, char *, size_t) __DARWIN_ALIAS(confstr);
+
+int	 getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt);
+
+extern char *optarg;			/* getopt(3) external variables */
+extern int optind, opterr, optopt;
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 199209L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1c-1995,
+ * POSIX.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ */
+
+#if __DARWIN_C_LEVEL >= 199506L
+#include <_ctermid.h>
+                               /* These F_* are really XSI or Issue 6 */
+#define F_ULOCK         0      /* unlock locked section */
+#define	F_LOCK          1      /* lock a section for exclusive use */
+#define	F_TLOCK         2      /* test and lock a section for exclusive use */
+#define	F_TEST          3      /* test a section for locks by other procs */
+
+ __BEGIN_DECLS
+
+/* Begin XSI */
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+#if !defined(_POSIX_C_SOURCE)
+__deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED
+#endif
+void	*brk(const void *);
+int	 chroot(const char *) __POSIX_C_DEPRECATED(199506L);
+#endif
+
+char	*crypt(const char *, const char *);
+#if __DARWIN_UNIX03
+void	 encrypt(char *, int) __DARWIN_ALIAS(encrypt);
+#else /* !__DARWIN_UNIX03 */
+int	 encrypt(char *, int);
+#endif /* __DARWIN_UNIX03 */
+int	 fchdir(int);
+long	 gethostid(void);
+pid_t	 getpgid(pid_t);
+pid_t	 getsid(pid_t);
+
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+int	 getdtablesize(void) __POSIX_C_DEPRECATED(199506L);
+int	 getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L);
+char	*getpass(const char *) __POSIX_C_DEPRECATED(199506L);
+#endif
+
+/* Removed in Issue 7 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L
+char	*getwd(char *) __POSIX_C_DEPRECATED(200112L); /* obsoleted by getcwd() */
+#endif
+
+int	 lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown);
+
+int	 lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf);
+
+int	 nice(int) __DARWIN_ALIAS(nice);
+
+ssize_t	 pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pread);
+
+ssize_t	 pwrite(int __fd, const void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pwrite);
+
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+/* Note that Issue 5 changed the argument as intprt_t,
+ * but we keep it as int for binary compatability. */
+#if !defined(_POSIX_C_SOURCE)
+__deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED
+#endif
+void	*sbrk(int);
+#endif
+
+#if __DARWIN_UNIX03
+pid_t	 setpgrp(void) __DARWIN_ALIAS(setpgrp);
+#else /* !__DARWIN_UNIX03 */
+int	 setpgrp(pid_t pid, pid_t pgrp);	/* obsoleted by setpgid() */
+#endif /* __DARWIN_UNIX03 */
+
+int	 setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid);
+
+int	 setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid);
+
+void     swab(const void * __restrict, void * __restrict, ssize_t);
+void	 sync(void);
+int	 truncate(const char *, off_t);
+useconds_t	 ualarm(useconds_t, useconds_t);
+int	 usleep(useconds_t) __DARWIN_ALIAS_C(usleep);
+pid_t	 vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+/* End XSI */
+
+int	 fsync(int) __DARWIN_ALIAS_C(fsync);
+
+int	 ftruncate(int, off_t);
+int	 getlogin_r(char *, size_t);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2001
+ * ISO C99
+ */
+
+#if __DARWIN_C_LEVEL >= 200112L
+__BEGIN_DECLS
+int	 fchown(int, uid_t, gid_t);
+int	 gethostname(char *, size_t);
+ssize_t  readlink(const char * __restrict, char * __restrict, size_t);
+int	 setegid(gid_t);
+int	 seteuid(uid_t);
+int	 symlink(const char *, const char *);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+
+
+/* Darwin extensions */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#include <sys/select.h>
+
+#include <sys/_types/_dev_t.h>
+#include <sys/_types/_mode_t.h>
+#include <sys/_types/_uuid_t.h>
+
+__BEGIN_DECLS
+void	 _Exit(int) __dead2;
+int	 accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t);
+int	 acct(const char *);
+int	 add_profil(char *, size_t, unsigned long, unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+void	 endusershell(void);
+int	 execvP(const char * __file, const char * __searchpath, char * const * __argv)  __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+char	*fflagstostr(unsigned long);
+int	 getdomainname(char *, int);
+int	 getgrouplist(const char *, int, int *, int *);
+#if defined(__has_include)
+#if __has_include(<gethostuuid_private.h>)
+#include <gethostuuid_private.h>
+#else
+#include <gethostuuid.h>
+#endif
+#else
+#include <gethostuuid.h>
+#endif
+mode_t	 getmode(const void *, mode_t);
+int	 getpeereid(int, uid_t *, gid_t *);
+int	 getsgroups_np(int *, uuid_t);
+char	*getusershell(void);
+int	 getwgroups_np(int *, uuid_t);
+int	 initgroups(const char *, int);
+int	 issetugid(void);
+char	*mkdtemp(char *);
+int	 mknod(const char *, mode_t, dev_t);
+int	 mkpath_np(const char *path, mode_t omode) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); /* returns errno */
+int	 mkpathat_np(int dfd, const char *path, mode_t omode) /* returns errno */
+		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
+		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+int	 mkstemp(char *);
+int	 mkstemps(char *, int);
+char	*mktemp(char *);
+int	 mkostemp(char *path, int oflags)
+		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
+		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+int	 mkostemps(char *path, int slen, int oflags)
+		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
+		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+/* Non-portable mkstemp that uses open_dprotected_np */
+int	 mkstemp_dprotected_np(char *path, int dpclass, int dpflags)
+		__OSX_UNAVAILABLE __IOS_AVAILABLE(10.0)
+		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+char   *mkdtempat_np(int dfd, char *path)
+		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0)
+		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
+int     mkstempsat_np(int dfd, char *path, int slen)
+		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0)
+		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
+int     mkostempsat_np(int dfd, char *path, int slen, int oflags)
+		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0)
+		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
+int	 nfssvc(int, void *);
+int	 profil(char *, size_t, unsigned long, unsigned int);
+
+__deprecated_msg("Use of per-thread security contexts is error-prone and discouraged.")
+int	 pthread_setugid_np(uid_t, gid_t);
+int	 pthread_getugid_np( uid_t *, gid_t *);
+
+int	 reboot(int);
+int	 revoke(const char *);
+
+__deprecated int	 rcmd(char **, int, const char *, const char *, const char *, int *);
+__deprecated int	 rcmd_af(char **, int, const char *, const char *, const char *, int *,
+		int);
+__deprecated int	 rresvport(int *);
+__deprecated int	 rresvport_af(int *, int);
+__deprecated int	 iruserok(unsigned long, int, const char *, const char *);
+__deprecated int	 iruserok_sa(const void *, int, int, const char *, const char *);
+__deprecated int	 ruserok(const char *, int, const char *, const char *);
+
+int	 setdomainname(const char *, int);
+int	 setgroups(int, const gid_t *);
+void	 sethostid(long);
+int	 sethostname(const char *, int);
+#if __DARWIN_UNIX03
+void	 setkey(const char *) __DARWIN_ALIAS(setkey);
+#else /* !__DARWIN_UNIX03 */
+int	 setkey(const char *);
+#endif /* __DARWIN_UNIX03 */
+int	 setlogin(const char *);
+void	*setmode(const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(setmode));
+int	 setrgid(gid_t);
+int	 setruid(uid_t);
+int	 setsgroups_np(int, const uuid_t);
+void	 setusershell(void);
+int	 setwgroups_np(int, const uuid_t);
+int	 strtofflags(char **, unsigned long *, unsigned long *);
+int	 swapon(const char *);
+int	 ttyslot(void);
+int	 undelete(const char *);
+int	 unwhiteout(const char *);
+void	*valloc(size_t);			
+
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+__OS_AVAILABILITY_MSG(ios,deprecated=10.0,"syscall(2) is unsupported; "
+    "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().")
+__OS_AVAILABILITY_MSG(macosx,deprecated=10.12,"syscall(2) is unsupported; "
+    "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().")
+int	 syscall(int, ...);
+
+extern char *suboptarg;			/* getsubopt(3) external variable */
+int	 getsubopt(char **, char * const *, char **);
+
+/*  HFS & HFS Plus semantics system calls go here */
+#ifdef __LP64__
+int    fgetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+int    fsetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+int    getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist);
+int    setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist);
+int exchangedata(const char*,const char*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int    getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+
+#else /* __LP64__ */
+int	fgetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+int	fsetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+int	getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist);
+int	setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist);
+int exchangedata(const char*,const char*,unsigned long)
+		__OSX_DEPRECATED(10.0, 10.13, "use renamex_np with the RENAME_SWAP flag")
+		__IOS_DEPRECATED(2.0, 11.0, "use renamex_np with the RENAME_SWAP flag")
+		__WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+
+#endif /* __LP64__ */
+
+struct fssearchblock;
+struct searchstate;
+
+int	 searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	 fsctl(const char *,unsigned long,void*,unsigned int);
+int	 ffsctl(int,unsigned long,void*,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+
+#define	SYNC_VOLUME_FULLSYNC	0x01	/* Flush data and metadata to platter, not just to disk cache */
+#define SYNC_VOLUME_WAIT	0x02	/* Wait for sync to complete */
+
+int	fsync_volume_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0);
+int	sync_volume_np(const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0);
+
+extern int optreset;
+
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#endif /* _UNISTD_H_ */
\ No newline at end of file
lib/libc/include/any-macos-any/dispatch/base.h โ†’ lib/libc/include/any-macos.12-any/dispatch/base.h
File renamed without changes
lib/libc/include/any-macos-any/mach/clock.h โ†’ lib/libc/include/any-macos.12-any/mach/clock.h
File renamed without changes
lib/libc/include/any-macos-any/mach/clock_priv.h โ†’ lib/libc/include/any-macos.12-any/mach/clock_priv.h
File renamed without changes
lib/libc/include/any-macos-any/mach/exception_types.h โ†’ lib/libc/include/any-macos.12-any/mach/exception_types.h
File renamed without changes
lib/libc/include/any-macos-any/mach/host_priv.h โ†’ lib/libc/include/any-macos.12-any/mach/host_priv.h
File renamed without changes
lib/libc/include/any-macos-any/mach/host_security.h โ†’ lib/libc/include/any-macos.12-any/mach/host_security.h
File renamed without changes
lib/libc/include/any-macos-any/mach/lock_set.h โ†’ lib/libc/include/any-macos.12-any/mach/lock_set.h
File renamed without changes
lib/libc/include/any-macos-any/mach/mach.h โ†’ lib/libc/include/any-macos.12-any/mach/mach.h
File renamed without changes
lib/libc/include/any-macos-any/mach/mach_host.h โ†’ lib/libc/include/any-macos.12-any/mach/mach_host.h
File renamed without changes
lib/libc/include/any-macos-any/mach/mach_port.h โ†’ lib/libc/include/any-macos.12-any/mach/mach_port.h
File renamed without changes
lib/libc/include/any-macos-any/mach/mach_voucher_types.h โ†’ lib/libc/include/any-macos.12-any/mach/mach_voucher_types.h
File renamed without changes
lib/libc/include/any-macos-any/mach/machine.h โ†’ lib/libc/include/any-macos.12-any/mach/machine.h
File renamed without changes
lib/libc/include/any-macos-any/mach/message.h โ†’ lib/libc/include/any-macos.12-any/mach/message.h
File renamed without changes
lib/libc/include/any-macos-any/mach/port.h โ†’ lib/libc/include/any-macos.12-any/mach/port.h
File renamed without changes
lib/libc/include/any-macos-any/mach/processor.h โ†’ lib/libc/include/any-macos.12-any/mach/processor.h
File renamed without changes
lib/libc/include/any-macos-any/mach/processor_set.h โ†’ lib/libc/include/any-macos.12-any/mach/processor_set.h
File renamed without changes
lib/libc/include/any-macos-any/mach/thread_act.h โ†’ lib/libc/include/any-macos.12-any/mach/thread_act.h
File renamed without changes
lib/libc/include/any-macos-any/mach/thread_policy.h โ†’ lib/libc/include/any-macos.12-any/mach/thread_policy.h
File renamed without changes
lib/libc/include/any-macos-any/mach/vm_map.h โ†’ lib/libc/include/any-macos.12-any/mach/vm_map.h
File renamed without changes
lib/libc/include/any-macos-any/mach/vm_prot.h โ†’ lib/libc/include/any-macos.12-any/mach/vm_prot.h
File renamed without changes
lib/libc/include/any-macos-any/mach/vm_statistics.h โ†’ lib/libc/include/any-macos.12-any/mach/vm_statistics.h
File renamed without changes
lib/libc/include/any-macos-any/mach/vm_types.h โ†’ lib/libc/include/any-macos.12-any/mach/vm_types.h
File renamed without changes
lib/libc/include/any-macos-any/mach_debug/mach_debug_types.h โ†’ lib/libc/include/any-macos.12-any/mach_debug/mach_debug_types.h
File renamed without changes
lib/libc/include/any-macos-any/malloc/malloc.h โ†’ lib/libc/include/any-macos.12-any/malloc/malloc.h
File renamed without changes
lib/libc/include/any-macos-any/netinet6/in6.h โ†’ lib/libc/include/any-macos.12-any/netinet6/in6.h
File renamed without changes
lib/libc/include/any-macos-any/objc/message.h โ†’ lib/libc/include/any-macos.12-any/objc/message.h
File renamed without changes
lib/libc/include/any-macos-any/objc/NSObjCRuntime.h โ†’ lib/libc/include/any-macos.12-any/objc/NSObjCRuntime.h
File renamed without changes
lib/libc/include/any-macos-any/objc/objc-api.h โ†’ lib/libc/include/any-macos.12-any/objc/objc-api.h
File renamed without changes
lib/libc/include/any-macos-any/os/base.h โ†’ lib/libc/include/any-macos.12-any/os/base.h
File renamed without changes
lib/libc/include/any-macos-any/simd/base.h โ†’ lib/libc/include/any-macos.12-any/simd/base.h
File renamed without changes
lib/libc/include/any-macos-any/simd/math.h โ†’ lib/libc/include/any-macos.12-any/simd/math.h
File renamed without changes
lib/libc/include/any-macos-any/sys/resource.h โ†’ lib/libc/include/any-macos.12-any/sys/resource.h
File renamed without changes
lib/libc/include/any-macos-any/sys/socket.h โ†’ lib/libc/include/any-macos.12-any/sys/socket.h
File renamed without changes
lib/libc/include/any-macos-any/xpc/base.h โ†’ lib/libc/include/any-macos.12-any/xpc/base.h
File renamed without changes
lib/libc/include/any-macos-any/xpc/connection.h โ†’ lib/libc/include/any-macos.12-any/xpc/connection.h
File renamed without changes
lib/libc/include/any-macos-any/AvailabilityMacros.h โ†’ lib/libc/include/any-macos.12-any/AvailabilityMacros.h
File renamed without changes
lib/libc/include/any-macos-any/libproc.h โ†’ lib/libc/include/any-macos.12-any/libproc.h
File renamed without changes
lib/libc/include/any-macos-any/pthread.h โ†’ lib/libc/include/any-macos.12-any/pthread.h
File renamed without changes
lib/libc/include/any-macos-any/stdio.h โ†’ lib/libc/include/any-macos.12-any/stdio.h
File renamed without changes
lib/libc/include/any-macos-any/stdlib.h โ†’ lib/libc/include/any-macos.12-any/stdlib.h
File renamed without changes
lib/libc/include/any-macos.13-any/net/if.h
@@ -152,7 +152,7 @@ struct if_clonereq {
 #define IFNET_SLOWHZ    1       /* granularity is 1 second */
 #define IFQ_DEF_C_TARGET_DELAY        (10ULL * 1000 * 1000)   /* 10 ms */
 #define IFQ_DEF_C_UPDATE_INTERVAL     (100ULL * 1000 * 1000)  /* 100 ms */
-#define IFQ_DEF_L4S_TARGET_DELAY        (10ULL * 1000 * 1000)   /* 10 ms */
+#define IFQ_DEF_L4S_TARGET_DELAY        (2ULL * 1000 * 1000)   /* 2 ms */
 #define IFQ_DEF_L4S_UPDATE_INTERVAL     (100ULL * 1000 * 1000)  /* 100 ms */
 #define IFQ_LL_C_TARGET_DELAY     (10ULL * 1000 * 1000)   /* 10 ms */
 #define IFQ_LL_C_UPDATE_INTERVAL  (100ULL * 1000 * 1000)  /* 100 ms */
lib/libc/include/any-macos.13-any/sys/_symbol_aliasing.h
@@ -383,6 +383,12 @@
 #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_1(x)
 #endif
 
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 160200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_2(x)
+#endif
+
 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x
 #else
@@ -633,4 +639,10 @@
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_0(x) x
 #else
 #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 130100
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_13_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_13_1(x)
 #endif
\ No newline at end of file
lib/libc/include/any-macos.13-any/sys/constrained_ctypes.h
@@ -31,9 +31,8 @@
 
 #include <sys/cdefs.h>
 
-/* This file introduces macros for constraining pointer
- * types to specific contracts:
- *
+/*
+ * Constraining pointer types based on contracts.
  *
  * 1. List of supported constrained pointers.
  *
@@ -184,12 +183,19 @@
  *      `basetag`:  the prefix of the constrained type.
  *
  *      This macro acts differently in the user-space and the kernel-space
- *      code. When used in the former, it will only declare types which are
- *      ABI-safe. See `ABI Compatibility Considerations' below for more details.
+ *      code.
+ *      When used in the user-space code, the macro will declare
+ *      types which are ABI-safe. See `ABI Compatibility Considerations'
+ *      below for more details on ABI-safety. In the user-space code,
+ *      the macro is guarded by the `__CCT_ENABLE_USER_SPACE' compilation
+ *      flag.
+ *      When used in the kernel-space code, the macro will declare
+ *      the common constrained types.
  *
  *      Examples:
  *
- *      (1) When used from the user space,
+ *      (1) When used from the user space, and `__CCT_ENABLE_USER_SPACE'
+ *          is defined, the expression
  *          `__CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct socket, socket);'
  *           will declare types:
  *
@@ -224,16 +230,32 @@
  *
  *      `basetype`: the pointee type.
  *      `basetag`:  the prefix of the constrained type.
- *      `...`:      list of `REF', `CREF', `BPTR' or `PTR', which represent
- *                  the desired constraints.
+ *      `...`:      list of constraints:
+ *                  - `__CCT_REF' for the "reference" contract;
+ *                  - `__CCT_CREF' for the "const reference" contract;
+ *                  - `__CCT_PTR' for the "checked pointer" contract; or
+ *                  - `__CCT_BPTR' for the "bidirectional pointer" contract.
  *
  *      Examples:
  *
- *      (1) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, REF)'
- *          will declare the type `socket_ref_t`:
+ *      (1) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF)'
+ *          will declare the type
+ *              `reference' pointer to `struct socket'
+ *          and call this type by `socket_ref_t'
  *
- *      (2) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, REF, PTR, REF)'
- *           will declare the type `socket_ref_ptr_ref_t`:
+ *      (2) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF, __CCT_PTR)'
+ *          will declare the type
+ *              `checked' pointer to `socket_ref_t'
+ *          which in turn is equivalent to the type
+ *              `checked' pointer to `reference' pointer to `struct socket'
+ *
+ *      (3) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF, __CCT_PTR, __CCT_REF)'
+ *          will declare the type
+ *              `reference' pointer to `socket_ref_ptr_t'
+ *          which is equivalent to the type
+ *              `reference' pointer to `checked' pointer to `socket_ref_t'
+ *          which in turn is equivalent to the type
+ *              `reference' pointer to `checked' pointer to `reference' pointer to `struct socket'
  *
  *
  * 3. Using constrained pointer types.
@@ -513,27 +535,28 @@
  * Support for other compilers will be added after the introduction of support
  * for pointer tagging on those compilers.
  */
+#if defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE)
 #if defined(__clang__)
-#define __CCT_CONTRACT_ATTR_REF         __single
-#define __CCT_CONTRACT_ATTR_CREF        const __single
+#define __CCT_CONTRACT_ATTR___CCT_REF         __single
+#define __CCT_CONTRACT_ATTR___CCT_CREF        const __single
 #if  __has_ptrcheck
-#define __CCT_CONTRACT_ATTR_BPTR        __bidi_indexable
-#define __CCT_CONTRACT_ATTR_PTR         __indexable
+#define __CCT_CONTRACT_ATTR___CCT_BPTR        __bidi_indexable
+#define __CCT_CONTRACT_ATTR___CCT_PTR         __indexable
 #else /* __clang__ + __has_ptrcheck */
-#define __CCT_CONTRACT_ATTR_BPTR
-#define __CCT_CONTRACT_ATTR_PTR
+#define __CCT_CONTRACT_ATTR___CCT_BPTR
+#define __CCT_CONTRACT_ATTR___CCT_PTR
 #endif /* __clang__ + !__has_ptrcheck */
 #else /* !__clang__ */
-#define __CCT_CONTRACT_ATTR_REF
-#define __CCT_CONTRACT_ATTR_CREF        const
-#define __CCT_CONTRACT_ATTR_BPTR
-#define __CCT_CONTRACT_ATTR_PTR
+#define __CCT_CONTRACT_ATTR___CCT_REF
+#define __CCT_CONTRACT_ATTR___CCT_CREF        const
+#define __CCT_CONTRACT_ATTR___CCT_BPTR
+#define __CCT_CONTRACT_ATTR___CCT_PTR
 #endif /* __clang__ */
 
-#define __CCT_CONTRACT_TAG_REF          _ref
-#define __CCT_CONTRACT_TAG_CREF         _cref
-#define __CCT_CONTRACT_TAG_BPTR         _bptr
-#define __CCT_CONTRACT_TAG_PTR          _ptr
+#define __CCT_CONTRACT_TAG___CCT_REF          _ref
+#define __CCT_CONTRACT_TAG___CCT_CREF         _cref
+#define __CCT_CONTRACT_TAG___CCT_BPTR         _bptr
+#define __CCT_CONTRACT_TAG___CCT_PTR          _ptr
 
 /* Helper macros */
 #define __CCT_DEFER(F, ...) F(__VA_ARGS__)
@@ -572,20 +595,43 @@ typedef basetype * __CCT_CONTRACT_TO_ATTR(kind1)
 	         * __CCT_CONTRACT_TO_ATTR(kind2)                                                        \
 	         * __CCT_CONTRACT_TO_ATTR(kind3)                                                        \
 	__CCT_DEFER(__CONCAT, basetag,  __CCT_CONTRACT_LIST_TO_TAGGED_SUFFIX_3(kind1, kind2, kind3))
+#endif /* defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE) */
 
 /*
  * Lower level type constructor.
  */
+#if defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE)
 #define __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, ...)                                  \
 	__CCT_DISPATCH(__CCT_DECLARE_CONSTRAINED_PTR_TYPE, basetype, basetag, __VA_ARGS__)
+#else /* !defined(KERNEL) && !defined(__CCT_ENABLE_USER_SPACE) */
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wextra-semi"
+#endif /* defined(__clang__) */
+#define __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, ...)
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif /* defined(__clang__) */
+#endif /* !defined(KERNEL) && !defined(__CCT_ENABLE_USER_SPACE) */
 
 /*
  * Higher level type constructors.
- * The constrained types that can potentially break the ABI are not exposed
- * into the user-space.
  */
+#if defined(__CCT_ENABLE_USER_SPACE)
+/* Limiting the higher-level constructor to the ABI-preserving constructs. */
 #define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag)                                      \
-__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, REF);                                         \
-__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, REF, REF)
+	__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, __CCT_REF);                               \
+	__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, __CCT_REF, __CCT_REF)
+#else /* !defined(__CCT_ENABLE_USER_SPACE) */
+/* Disabling the higher-level constructor */
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wextra-semi"
+#endif /* defined(__clang__) */
+#define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag)
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif /* defined(__clang__) */
+#endif /* !defined(__CCT_ENABLE_USER_SPACE) */
 
 #endif /* __CONSTRAINED_CTYPES__ */
\ No newline at end of file
lib/libc/include/any-macos.13-any/AvailabilityInternal.h
@@ -55,7 +55,7 @@
     #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
         /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
         #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
-        #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_16_1
+        #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_16_2
         /* for compatibility with existing code.  New code should use platform specific checks */
         #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
     #endif
@@ -65,7 +65,7 @@
     #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
         /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
         #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
-        #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_9_1
+        #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_9_2
         /* for compatibility with existing code.  New code should use platform specific checks */
         #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
     #endif
@@ -90,14 +90,14 @@
 #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
     /* make sure a default max version is set */
     #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
-        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_13_0
+        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_13_1
     #endif
 #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
 
 #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
     /* make sure a default max version is set */
     #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
-        #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_16_1
+        #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_16_2
     #endif
     /* make sure a valid min is set */
     #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
lib/libc/include/any-macos.13-any/AvailabilityVersions.h
@@ -68,6 +68,7 @@
 #define __MAC_12_2          120200
 #define __MAC_12_3          120300
 #define __MAC_13_0          130000
+#define __MAC_13_1          130100
 /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
 
 #define __IPHONE_2_0      20000
@@ -132,6 +133,7 @@
 #define __IPHONE_15_4    150400
 #define __IPHONE_16_0    160000
 #define __IPHONE_16_1    160100
+#define __IPHONE_16_2    160200
 /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
 
 #define __TVOS_9_0        90000
@@ -169,6 +171,7 @@
 #define __TVOS_15_4      150400
 #define __TVOS_16_0      160000
 #define __TVOS_16_1      160100
+#define __TVOS_16_2      160200
 
 #define __WATCHOS_1_0     10000
 #define __WATCHOS_2_0     20000
@@ -203,6 +206,7 @@
 #define __WATCHOS_8_5     80500
 #define __WATCHOS_9_0     90000
 #define __WATCHOS_9_1     90100
+#define __WATCHOS_9_2     90200
 
 /*
  * Set up standard Mac OS X versions
lib/libc/include/any-macos.13-any/vis.h
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*	$NetBSD: vis.h,v 1.25 2017/04/23 01:57:36 christos Exp $	*/
+/*	$FreeBSD$	*/
+
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)vis.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _VIS_H_
+#define	_VIS_H_
+
+#include <_types.h>
+#include <sys/_types/_size_t.h>
+
+/*
+ * to select alternate encoding format
+ */
+#define	VIS_OCTAL	0x0001	/* use octal \ddd format */
+#define	VIS_CSTYLE	0x0002	/* use \[nrft0..] where appropiate */
+
+/*
+ * to alter set of characters encoded (default is to encode all
+ * non-graphic except space, tab, and newline).
+ */
+#define	VIS_SP		0x0004	/* also encode space */
+#define	VIS_TAB		0x0008	/* also encode tab */
+#define	VIS_NL		0x0010	/* also encode newline */
+#define	VIS_WHITE	(VIS_SP | VIS_TAB | VIS_NL)
+#define	VIS_SAFE	0x0020	/* only encode "unsafe" characters */
+#define	VIS_DQ		0x8000	/* also encode double quotes */
+
+/*
+ * other
+ */
+#define	VIS_NOSLASH	0x0040	/* inhibit printing '\' */
+#define	VIS_HTTP1808	0x0080	/* http-style escape % hex hex */
+#define	VIS_HTTPSTYLE	0x0080	/* http-style escape % hex hex */
+#define	VIS_GLOB	0x0100	/* encode glob(3) magic characters */
+#define	VIS_MIMESTYLE	0x0200	/* mime-style escape = HEX HEX */
+#define	VIS_HTTP1866	0x0400	/* http-style &#num; or &string; */
+#define	VIS_NOESCAPE	0x0800	/* don't decode `\' */
+#define	_VIS_END	0x1000	/* for unvis */
+#define	VIS_SHELL	0x2000	/* encode shell special characters [not glob] */
+#define	VIS_META	(VIS_WHITE | VIS_GLOB | VIS_SHELL)
+#define	VIS_NOLOCALE	0x4000	/* encode using the C locale */
+
+/*
+ * unvis return codes
+ */
+#define	UNVIS_VALID	 1	/* character valid */
+#define	UNVIS_VALIDPUSH	 2	/* character valid, push back passed char */
+#define	UNVIS_NOCHAR	 3	/* valid sequence, no character produced */
+#define	UNVIS_SYNBAD	-1	/* unrecognized escape sequence */
+#define	UNVIS_ERROR	-2	/* decoder in unknown state (unrecoverable) */
+
+/*
+ * unvis flags
+ */
+#define	UNVIS_END	_VIS_END	/* no more characters */
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+char	*vis(char *, int, int, int);
+char	*nvis(char *, size_t, int, int, int);
+
+char	*svis(char *, int, int, int, const char *);
+char	*snvis(char *, size_t, int, int, int, const char *);
+
+int	strvis(char *, const char *, int);
+int	stravis(char **, const char *, int);
+int	strnvis(char *, size_t, const char *, int);
+
+int	strsvis(char *, const char *, int, const char *);
+int	strsnvis(char *, size_t, const char *, int, const char *);
+
+int	strvisx(char *, const char *, size_t, int);
+int	strnvisx(char *, size_t, const char *, size_t, int);
+int 	strenvisx(char *, size_t, const char *, size_t, int, int *);
+
+int	strsvisx(char *, const char *, size_t, int, const char *);
+int	strsnvisx(char *, size_t, const char *, size_t, int, const char *);
+int	strsenvisx(char *, size_t, const char *, size_t , int, const char *,
+    int *);
+
+int	strunvis(char *, const char *);
+int	strnunvis(char *, size_t, const char *);
+
+int	strunvisx(char *, const char *, int);
+int	strnunvisx(char *, size_t, const char *, int);
+
+int	unvis(char *, int, int *, int);
+__END_DECLS
+
+#endif /* !_VIS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/_limits.h
@@ -22,10 +22,6 @@
 #ifndef _I386__LIMITS_H_
 #define _I386__LIMITS_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #define __DARWIN_CLK_TCK                100     /* ticks per second */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _I386__LIMITS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/_mcontext.h
@@ -29,8 +29,6 @@
 #ifndef __I386_MCONTEXT_H_
 #define __I386_MCONTEXT_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <sys/cdefs.h> /* __DARWIN_UNIX03 */
 #include <sys/appleapiopts.h>
 #include <mach/machine/_structs.h>
@@ -211,6 +209,4 @@ typedef _STRUCT_MCONTEXT32      *mcontext_t;
 #endif
 #endif /* _MCONTEXT_T */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif /* __I386_MCONTEXT_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/_param.h
@@ -29,8 +29,6 @@
 #ifndef _I386__PARAM_H_
 #define _I386__PARAM_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <i386/_types.h>
 
 /*
@@ -44,6 +42,5 @@
 #define      __DARWIN_ALIGNBYTES32     (sizeof(__uint32_t) - 1)
 #define       __DARWIN_ALIGN32(p)       ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
 
 #endif /* _I386__PARAM_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/_types.h
@@ -28,8 +28,6 @@
 #ifndef _BSD_I386__TYPES_H_
 #define _BSD_I386__TYPES_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 /*
  * This header file contains integer types.  It's intended to also contain
  * flotaing point and other arithmetic types, as needed, later.
@@ -121,6 +119,4 @@ typedef __uint32_t              __darwin_socklen_t;     /* socklen_t (duh) */
 typedef long                    __darwin_ssize_t;       /* byte count or error */
 typedef long                    __darwin_time_t;        /* time() */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _BSD_I386__TYPES_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/eflags.h
@@ -59,8 +59,6 @@
 #ifndef _I386_EFLAGS_H_
 #define _I386_EFLAGS_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 /*
  *	i386 flags register
  */
@@ -93,6 +91,4 @@
 #define EFL_USER_SET    (EFL_IF)
 #define EFL_USER_CLEAR  (EFL_IOPL|EFL_NT|EFL_RF)
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _I386_EFLAGS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/endian.h
@@ -66,8 +66,6 @@
 #ifndef _I386__ENDIAN_H_
 #define _I386__ENDIAN_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <sys/cdefs.h>
 /*
  * Define _NOQUAD if the compiler does NOT support 64-bit integers.
@@ -101,5 +99,4 @@
 #include <sys/_endian.h>
 
 #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
-#endif /* defined (__i386__) || defined (__x86_64__) */
 #endif /* !_I386__ENDIAN_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/limits.h
@@ -36,8 +36,6 @@
 #ifndef _I386_LIMITS_H_
 #define _I386_LIMITS_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <sys/cdefs.h>
 #include <i386/_limits.h>
 
@@ -106,6 +104,4 @@
 #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
 #endif /* !_ANSI_SOURCE */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif /* _I386_LIMITS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/param.h
@@ -72,8 +72,6 @@
 #ifndef _I386_PARAM_H_
 #define _I386_PARAM_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <i386/_param.h>
 
 /*
@@ -170,6 +168,4 @@
 #define DELAY(n)        { int N = (n); while (--N > 0); }
 #endif  /* defined(KERNEL) || defined(STANDALONE) */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif /* _I386_PARAM_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/signal.h
@@ -33,8 +33,6 @@
 #ifndef _I386_SIGNAL_H_
 #define _I386_SIGNAL_H_ 1
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <sys/cdefs.h>
 
 #ifndef _ANSI_SOURCE
@@ -42,6 +40,4 @@ typedef int sig_atomic_t;
 
 #endif /* ! _ANSI_SOURCE */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _I386_SIGNAL_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/i386/types.h
@@ -63,12 +63,9 @@
  *	@(#)types.h	8.3 (Berkeley) 1/5/94
  */
 
-#ifndef _I386_MACHTYPES_H_
-#define _I386_MACHTYPES_H_
+#ifndef _MACHTYPES_H_
 #define _MACHTYPES_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #ifndef __ASSEMBLER__
 #include <i386/_types.h>
 #include <sys/cdefs.h>
@@ -114,5 +111,4 @@ typedef int64_t                 user_off_t;
 typedef u_int64_t               syscall_arg_t;
 
 #endif /* __ASSEMBLER__ */
-#endif /* defined (__i386__) || defined (__x86_64__) */
-#endif  /* _I386_MACHTYPES_H_ */
\ No newline at end of file
+#endif  /* _MACHTYPES_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/_structs.h
@@ -32,8 +32,6 @@
 #ifndef	_MACH_I386__STRUCTS_H_
 #define	_MACH_I386__STRUCTS_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <sys/cdefs.h> /* __DARWIN_UNIX03 */
 #include <machine/types.h> /* __uint8_t */
 
@@ -1311,6 +1309,4 @@ _STRUCT_X86_CPMU_STATE64
 };
 #endif /* !__DARWIN_UNIX03 */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif /* _MACH_I386__STRUCTS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/boolean.h
@@ -65,14 +65,10 @@
 #ifndef _MACH_I386_BOOLEAN_H_
 #define _MACH_I386_BOOLEAN_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #if defined(__x86_64__) && !defined(KERNEL)
 typedef unsigned int    boolean_t;
 #else
 typedef int             boolean_t;
 #endif
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_BOOLEAN_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/exception.h
@@ -59,8 +59,6 @@
 #ifndef _MACH_I386_EXCEPTION_H_
 #define _MACH_I386_EXCEPTION_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 /*
  * No machine dependent types for the 80386
  */
@@ -134,6 +132,4 @@
  */
 #define EXC_MASK_MACHINE        0
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_EXCEPTION_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/fp_reg.h
@@ -59,8 +59,6 @@
 #ifndef _I386_FP_SAVE_H_
 #define _I386_FP_SAVE_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 /*
  * Control register
  */
@@ -117,6 +115,4 @@
 #define FP_387          3               /* 80387 or 80486 */
 #define FP_FXSR         4               /* Fast save/restore SIMD Extension */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _I386_FP_SAVE_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/kern_return.h
@@ -67,12 +67,8 @@
 #ifndef _MACH_I386_KERN_RETURN_H_
 #define _MACH_I386_KERN_RETURN_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #ifndef ASSEMBLER
 typedef int             kern_return_t;
 #endif  /* ASSEMBLER */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_KERN_RETURN_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/processor_info.h
@@ -34,8 +34,4 @@
 #ifndef _MACH_I386_PROCESSOR_INFO_H_
 #define _MACH_I386_PROCESSOR_INFO_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_PROCESSOR_INFO_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/rpc.h
@@ -32,8 +32,4 @@
 #ifndef _MACH_I386_RPC_H_
 #define _MACH_I386_RPC_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_RPC_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/thread_state.h
@@ -32,11 +32,11 @@
 #ifndef _MACH_I386_THREAD_STATE_H_
 #define _MACH_I386_THREAD_STATE_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 /* Size of maximum exported thread state in 32-bit words */
 #define I386_THREAD_STATE_MAX   (614)    /* Size of biggest state possible */
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
+#if defined (__i386__) || defined(__x86_64__)
+#define THREAD_STATE_MAX        I386_THREAD_STATE_MAX
+#endif
 
 #endif  /* _MACH_I386_THREAD_STATE_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/thread_status.h
@@ -67,12 +67,10 @@
 #ifndef _MACH_I386_THREAD_STATUS_H_
 #define _MACH_I386_THREAD_STATUS_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #include <mach/machine/_structs.h>
-#include <mach/machine/thread_state.h>
 #include <mach/message.h>
 #include <mach/i386/fp_reg.h>
+#include <mach/i386/thread_state.h>
 #include <i386/eflags.h>
 
 
@@ -361,6 +359,4 @@ typedef struct x86_avx512_state x86_avx512_state_t;
 #define MACHINE_THREAD_STATE_COUNT      x86_THREAD_STATE_COUNT
 
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_THREAD_STATUS_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/vm_param.h
@@ -90,8 +90,6 @@
 #ifndef _MACH_I386_VM_PARAM_H_
 #define _MACH_I386_VM_PARAM_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #if !defined(KERNEL) && !defined(__ASSEMBLER__)
 
 #include <mach/vm_page_size.h>
@@ -124,11 +122,9 @@
 
 #define VM_MIN_ADDRESS64        ((user_addr_t) 0x0000000000000000ULL)
 /*
- * Default top of user stack, grows down from here.
- * Address chosen to be 1G (3rd level page table entry) below SHARED_REGION_BASE_X86_64
- * minus additional 1Meg (1/2 1st level page table coverage) to allow a redzone after it.
+ * default top of user stack... it grows down from here
  */
-#define VM_USRSTACK64           ((user_addr_t) (0x00007FF7C0000000ull - (1024 * 1024)))
+#define VM_USRSTACK64           ((user_addr_t) 0x00007FFEEFC00000ULL)
 
 /*
  * XXX TODO: Obsolete?
@@ -158,6 +154,4 @@
 
 
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_VM_PARAM_H_ */
\ No newline at end of file
lib/libc/include/x86_64-macos.11-none/mach/i386/vm_types.h
@@ -67,13 +67,10 @@
 #ifndef _MACH_I386_VM_TYPES_H_
 #define _MACH_I386_VM_TYPES_H_
 
-#if defined (__i386__) || defined (__x86_64__)
-
 #ifndef ASSEMBLER
 
 #include <i386/_types.h>
 #include <stdint.h>
-#include <sys/cdefs.h>
 
 /*
  * natural_t and integer_t are Mach's legacy types for machine-
@@ -100,9 +97,9 @@ typedef int                     integer_t;
  * e.g. an offset into a virtual memory space.
  */
 #ifdef __LP64__
-typedef uintptr_t               vm_offset_t __kernel_ptr_semantics;
+typedef uintptr_t               vm_offset_t;
 #else   /* __LP64__ */
-typedef natural_t               vm_offset_t __kernel_ptr_semantics;
+typedef natural_t               vm_offset_t;
 #endif  /* __LP64__ */
 
 /*
@@ -123,12 +120,12 @@ typedef natural_t               vm_size_t;
  * where the size of the map is not known - or we don't
  * want to have to distinguish.
  */
-typedef uint64_t                mach_vm_address_t __kernel_ptr_semantics;
-typedef uint64_t                mach_vm_offset_t __kernel_ptr_semantics;
+typedef uint64_t                mach_vm_address_t;
+typedef uint64_t                mach_vm_offset_t;
 typedef uint64_t                mach_vm_size_t;
 
-typedef uint64_t                vm_map_offset_t __kernel_ptr_semantics;
-typedef uint64_t                vm_map_address_t __kernel_ptr_semantics;
+typedef uint64_t                vm_map_offset_t;
+typedef uint64_t                vm_map_address_t;
 typedef uint64_t                vm_map_size_t;
 
 typedef mach_vm_address_t       mach_port_context_t;
@@ -141,6 +138,4 @@ typedef mach_vm_address_t       mach_port_context_t;
  */
 #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
 
-#endif /* defined (__i386__) || defined (__x86_64__) */
-
 #endif  /* _MACH_I386_VM_TYPES_H_ */
\ No newline at end of file