+#if defined (_MSC_EXTENSIONS)\r
+//\r
+// Disable warning when last field of data structure is a zero sized array.\r
+//\r
+ #pragma warning ( disable : 4200 )\r
+#endif\r
+\r
+//\r
+// The Microsoft* C compiler can removed references to unreferenced data items\r
+// if the /OPT:REF linker option is used. We defined a macro as this is a\r
+// a non standard extension\r
+//\r
+#if defined (_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)\r
+///\r
+/// Remove global variable from the linked image if there are no references to\r
+/// it after all compiler and linker optimizations have been performed.\r
+///\r
+///\r
+#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)\r
+#else\r
+///\r
+/// Remove the global variable from the linked image if there are no references\r
+/// to it after all compiler and linker optimizations have been performed.\r
+///\r
+///\r
+#define GLOBAL_REMOVE_IF_UNREFERENCED\r
+#endif\r
+\r
+//\r
+// Should be used in combination with NORETURN to avoid 'noreturn' returns\r
+// warnings.\r
+//\r
+#ifndef UNREACHABLE\r
+ #ifdef __GNUC__\r
+///\r
+/// Signal compilers and analyzers that this call is not reachable. It is\r
+/// up to the compiler to remove any code past that point.\r
+///\r
+#define UNREACHABLE() __builtin_unreachable ()\r
+ #elif defined (__has_feature)\r
+ #if __has_builtin (__builtin_unreachable)\r
+///\r
+/// Signal compilers and analyzers that this call is not reachable. It is\r
+/// up to the compiler to remove any code past that point.\r
+///\r
+#define UNREACHABLE() __builtin_unreachable ()\r
+ #endif\r
+ #endif\r
+\r
+ #ifndef UNREACHABLE\r
+///\r
+/// Signal compilers and analyzers that this call is not reachable. It is\r
+/// up to the compiler to remove any code past that point.\r
+///\r
+#define UNREACHABLE()\r
+ #endif\r
+#endif\r
+\r
+//\r
+// Signaling compilers and analyzers that a certain function cannot return may\r
+// remove all following code and thus lead to better optimization and less\r
+// false positives.\r
+//\r
+#ifndef NORETURN\r
+ #if defined (__GNUC__) || defined (__clang__)\r
+///\r
+/// Signal compilers and analyzers that the function cannot return.\r
+/// It is up to the compiler to remove any code past a call to functions\r
+/// flagged with this attribute.\r
+///\r
+#define NORETURN __attribute__((noreturn))\r
+ #elif defined (_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)\r
+///\r
+/// Signal compilers and analyzers that the function cannot return.\r
+/// It is up to the compiler to remove any code past a call to functions\r
+/// flagged with this attribute.\r
+///\r
+#define NORETURN __declspec(noreturn)\r
+ #else\r
+///\r
+/// Signal compilers and analyzers that the function cannot return.\r
+/// It is up to the compiler to remove any code past a call to functions\r
+/// flagged with this attribute.\r
+///\r
+#define NORETURN\r
+ #endif\r
+#endif\r
+\r
+//\r
+// Should be used in combination with ANALYZER_NORETURN to avoid 'noreturn'\r
+// returns warnings.\r
+//\r
+#ifndef ANALYZER_UNREACHABLE\r
+ #ifdef __clang_analyzer__\r
+ #if __has_builtin (__builtin_unreachable)\r
+///\r
+/// Signal the analyzer that this call is not reachable.\r
+/// This excludes compilers.\r
+///\r
+#define ANALYZER_UNREACHABLE() __builtin_unreachable ()\r
+ #endif\r
+ #endif\r
+\r
+ #ifndef ANALYZER_UNREACHABLE\r
+///\r
+/// Signal the analyzer that this call is not reachable.\r
+/// This excludes compilers.\r
+///\r
+#define ANALYZER_UNREACHABLE()\r
+ #endif\r
+#endif\r
+\r
+//\r
+// Static Analyzers may issue errors about potential NULL-dereferences when\r
+// dereferencing a pointer, that has been checked before, outside of a\r
+// NULL-check. This may lead to false positives, such as when using ASSERT()\r
+// for verification.\r
+//\r
+#ifndef ANALYZER_NORETURN\r
+ #ifdef __has_feature\r
+ #if __has_feature (attribute_analyzer_noreturn)\r
+///\r
+/// Signal analyzers that the function cannot return.\r
+/// This excludes compilers.\r
+///\r
+#define ANALYZER_NORETURN __attribute__((analyzer_noreturn))\r
+ #endif\r
+ #endif\r
+\r
+ #ifndef ANALYZER_NORETURN\r
+///\r
+/// Signal the analyzer that the function cannot return.\r
+/// This excludes compilers.\r
+///\r
+#define ANALYZER_NORETURN\r
+ #endif\r
+#endif\r
+\r
+///\r
+/// Tell the code optimizer that the function will return twice.\r
+/// This prevents wrong optimizations which can cause bugs.\r
+///\r
+#ifndef RETURNS_TWICE\r
+ #if defined (__GNUC__) || defined (__clang__)\r
+///\r
+/// Tell the code optimizer that the function will return twice.\r
+/// This prevents wrong optimizations which can cause bugs.\r
+///\r
+#define RETURNS_TWICE __attribute__((returns_twice))\r
+ #else\r
+///\r
+/// Tell the code optimizer that the function will return twice.\r
+/// This prevents wrong optimizations which can cause bugs.\r
+///\r
+#define RETURNS_TWICE\r
+ #endif\r
+#endif\r
+\r
+//\r
+// For symbol name in assembly code, an extra "_" is sometimes necessary\r
+//\r
+\r
+///\r
+/// Private worker functions for ASM_PFX()\r
+///\r
+#define _CONCATENATE(a, b) __CONCATENATE(a, b)\r
+#define __CONCATENATE(a, b) a ## b\r
+\r
+///\r
+/// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix\r
+/// on symbols in assembly language.\r
+///\r
+#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)\r
+\r
+#ifdef __APPLE__\r
+//\r
+// Apple extension that is used by the linker to optimize code size\r
+// with assembly functions. Put at the end of your .S files\r
+//\r
+#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED .subsections_via_symbols\r
+#else\r
+#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r
+#endif\r
+\r
+#define PACKED\r
+\r