// File: codeandkey[P]neocortex/src/log.h
// Function: void neocortex::log::write<1>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void write(std::string message, Args ... args) {
			std::lock_guard<std::recursive_mutex> lock(log_mutex);

			if (get_level() < level) {
				return;
			}

			/* Test if color supported */
			bool color_supported = true;

#if defined NEOCORTEX_LINUX || defined NEOCORTEX_OSX
			color_supported &= isatty(fileno(stderr));
#endif

			/* Write color reset */
			if (color_supported) {
#if defined NEOCORTEX_WIN32
				SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), 15);
#elif defined NEOCORTEX_LINUX || defined NEOCORTEX_OSX
				fprintf(stderr, "\e[0;39m");
#endif
			}

			/* Write timestamp tag */
			fprintf(stderr, "%s ", neocortex::util::timestring().c_str());

			if (color_supported) {
#if defined NEOCORTEX_WIN32
				static const int colors[] = { 12, 14, 15, 11 };
				SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), colors[level]);
#elif defined NEOCORTEX_LINUX || defined NEOCORTEX_OSX
				static const char* colors[] = {
					"\e[0;31m",
					"\e[0;33m",
					"\e[0;37m",
					"\e[0;36m",
				};

				fprintf(stderr, colors[level]);
#endif
			}

			/* Write level tag */
			static const char* level_strings[] = {
				"ERROR   ",
				"WARNING ",
				"INFO    ",
				"DEBUG   ",
			};

			fprintf(stderr, "%s > ", level_strings[level]);

			/* Write content */
			fprintf(stderr, "%s", neocortex::util::format(message, args...).c_str());

			/* Write color reset */
			if (color_supported) {
#if defined NEOCORTEX_WIN32
				SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), 15);
#elif defined NEOCORTEX_LINUX || defined NEOCORTEX_OSX
				fprintf(stderr, "\e[0;39m");
#endif
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x145cb(%rip), %rsi     # 0x333c8
leaq -0x10(%rbp), %rdi
callq 0xa7c0
callq 0xa670
movl %eax, -0x8c(%rbp)
jmp 0x1ee13
movl -0x8c(%rbp), %eax
cmpl $0x1, %eax
jge 0x1ee3b
movl $0x1, -0x20(%rbp)
jmp 0x1efc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1efd5
movb $0x1, -0x21(%rbp)
movq 0x1416a(%rip), %rax     # 0x32fb0
movq (%rax), %rdi
callq 0x5460
movl %eax, %edi
callq 0x56b0
movl %eax, %ecx
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x1ee8a
movq 0x14137(%rip), %rax     # 0x32fb0
movq (%rax), %rdi
leaq 0x90c7(%rip), %rsi      # 0x27f4a
movb $0x0, %al
callq 0x5580
movq 0x1411f(%rip), %rax     # 0x32fb0
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x21c50
jmp 0x1eea6
leaq -0x48(%rbp), %rdi
callq 0x5140
movq -0xa0(%rbp), %rdi
movq %rax, %rdx
leaq 0x9092(%rip), %rsi      # 0x27f52
movb $0x0, %al
callq 0x5580
leaq -0x48(%rbp), %rdi
callq 0x5230
testb $0x1, -0x21(%rbp)
je 0x1eeee
movq 0x140d3(%rip), %rax     # 0x32fb0
movq (%rax), %rdi
movq 0x145e1(%rip), %rsi     # 0x334c8
movb $0x0, %al
callq 0x5580
movq 0x140bb(%rip), %rax     # 0x32fb0
movq %rax, -0xb0(%rbp)
movq (%rax), %rdi
movq 0x145e2(%rip), %rdx     # 0x334e8
leaq 0x908d(%rip), %rsi      # 0x27f9a
xorl %eax, %eax
callq 0x5580
movq -0x98(%rbp), %rsi
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5150
jmp 0x1ef3a
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x20730
jmp 0x1ef4c
leaq -0x68(%rbp), %rdi
callq 0x5140
movq -0xa8(%rbp), %rdi
movq %rax, %rdx
leaq 0x939d(%rip), %rsi      # 0x28303
movb $0x0, %al
callq 0x5580
leaq -0x68(%rbp), %rdi
callq 0x5230
leaq -0x88(%rbp), %rdi
callq 0x5230
testb $0x1, -0x21(%rbp)
je 0x1efbc
movq 0x14021(%rip), %rax     # 0x32fb0
movq (%rax), %rdi
leaq 0x8fb1(%rip), %rsi      # 0x27f4a
movb $0x0, %al
callq 0x5580
jmp 0x1efbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5230
jmp 0x1efd5
movl $0x0, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xa7f0
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x10(%rbp), %rdi
callq 0xa7f0
movq -0x18(%rbp), %rdi
callq 0x56c0
nopw (%rax,%rax)