// File: /workspace/github_cpp_makefile_star2_O1/mbourand[P]webserv/incs/Utils/Logger.hpp
// Function: Response Logger::printImpl<Response>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Response, MessageType, LoggerMode)
T printImpl(std::string message, T rval, MessageType type, LoggerMode messagePriority)
		{
			if (messagePriority < _mode)
				return rval;

			// Format timestamp
			std::stringstream ss;
			struct timeval 	tv;
			tm time;
			gettimeofday(&tv, NULL);
			ss << tv.tv_sec;
			strptime(std::string(ss.str()).c_str(), "%s", &time);
			char buffer[100];
			strftime(buffer, 100, "[%d/%h/%Y %T %z]", &time);

			// Replace non-printable characters by their code
			ss.str("");
			for (size_t i = 0; i < message.size(); i++)
				if (message[i] < 32 || message[i] > 127)
				{
					ss << static_cast<int>(message[i]);
					message.replace(i, 1, "<" + ss.str() + ">");
					ss.str("");
				}

			switch (type)
			{
				case INFO:
					std::cout << RES << "[webserv] " << buffer << " (INFO): " << message << RES << std::endl;
					break;
				case SUCCESS:
					std::cout << GRN << "[webserv] " << buffer << " (SUCCESS): " << message << RES << std::endl;
					break;
				case WARNING:
					std::cerr << YLW << "[webserv] " << buffer << " (WARNING): " << message << RES << std::endl;
					break;
				case ERROR:
					std::cerr << RED << "[webserv] " << buffer << " (ERROR): " << message << RES << std::endl;
					break;
			}
			return rval;
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rcx, %r12
movq %rdi, %r14
cmpl %r9d, (%rsi)
jle 0xecda
movq %r14, %rdi
movq %r12, %rsi
callq 0x37246
jmp 0xf291
movl %r8d, %ebp
movq %rdx, %r15
leaq 0x130(%rsp), %rdi
callq 0x7360
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7740
leaq 0x140(%rsp), %rdi
movq (%rbx), %rsi
callq 0x7470
leaq 0x148(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x7710
leaq 0x90(%rsp), %rbx
movq -0x10(%rbx), %rdi
leaq 0x2b66e(%rip), %rsi     # 0x3a3a5
leaq 0xf8(%rsp), %rdx
callq 0x70b0
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0xed5d
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x2ba10(%rip), %rdx     # 0x3a774
leaq 0x80(%rsp), %rdi
leaq 0xf8(%rsp), %rcx
movl $0x64, %esi
callq 0x73f0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2c00d(%rip), %rdx     # 0x3ad9b
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x80f4
movl %ebp, 0x2c(%rsp)
movq %r12, 0x50(%rsp)
movq %r14, 0x58(%rsp)
leaq 0x8(%rsp), %rsi
leaq 0x148(%rsp), %rdi
callq 0x7690
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xedd2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpq $0x0, 0x8(%r15)
je 0xef7a
leaq 0x40(%rsp), %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rbp
movq (%r15), %rax
movsbl (%rax,%r14), %esi
cmpl $0x1f, %esi
jg 0xef6d
leaq 0x140(%rsp), %rdi
callq 0x77e0
leaq 0x60(%rsp), %r12
movq %r12, %rdi
leaq 0x148(%rsp), %rsi
callq 0x7710
movl $0x1, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2b954(%rip), %rcx     # 0x3a785
callq 0x7500
movq %rbx, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xee59
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0xee5f
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
leaq 0x2b7ec(%rip), %rsi     # 0x3a66f
callq 0x78d0
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xeeab
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xeeb3
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7500
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xeefc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xef13
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xef2f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r13, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x2be5d(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x148(%rsp), %rdi
movq %rbp, %rsi
callq 0x7690
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xef6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
incq %r14
cmpq 0x8(%r15), %r14
jb 0xedea
movl 0x2c(%rsp), %eax
cmpl $0x3, %eax
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r12
ja 0xf265
movl %eax, %eax
leaq 0x2b3ce(%rip), %rcx     # 0x3a368
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x3effe(%rip), %rdi     # 0x4dfa8
leaq 0x2b7d6(%rip), %rsi     # 0x3a787
movl $0x5, %edx
callq 0x7510
movq 0x3efe6(%rip), %rdi     # 0x4dfa8
leaq 0x2b7c4(%rip), %rsi     # 0x3a78d
movl $0xa, %edx
callq 0x7510
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x7220
movq 0x3efbe(%rip), %rdi     # 0x4dfa8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7510
movq 0x3efac(%rip), %rdi     # 0x4dfa8
leaq 0x2b795(%rip), %rsi     # 0x3a798
movl $0x9, %edx
callq 0x7510
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x3ef8d(%rip), %rdi     # 0x4dfa8
callq 0x7510
movq %rax, %rbx
leaq 0x2b75d(%rip), %rsi     # 0x3a787
movl $0x5, %edx
movq %rax, %rdi
callq 0x7510
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7490
jmp 0xf252
movq 0x3ef91(%rip), %rdi     # 0x4dfe8
leaq 0x2b757(%rip), %rsi     # 0x3a7b5
movl $0x5, %edx
callq 0x7510
movq 0x3ef79(%rip), %rdi     # 0x4dfe8
leaq 0x2b717(%rip), %rsi     # 0x3a78d
movl $0xa, %edx
callq 0x7510
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x7220
movq 0x3ef51(%rip), %rdi     # 0x4dfe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7510
movq 0x3ef3f(%rip), %rdi     # 0x4dfe8
leaq 0x2b70b(%rip), %rsi     # 0x3a7bb
movl $0xc, %edx
callq 0x7510
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x3ef20(%rip), %rdi     # 0x4dfe8
callq 0x7510
movq %rax, %rbx
leaq 0x2b6b0(%rip), %rsi     # 0x3a787
movl $0x5, %edx
movq %rax, %rdi
callq 0x7510
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7490
jmp 0xf252
movq 0x3eee4(%rip), %rdi     # 0x4dfe8
leaq 0x2b6bd(%rip), %rsi     # 0x3a7c8
movl $0x5, %edx
callq 0x7510
movq 0x3eecc(%rip), %rdi     # 0x4dfe8
leaq 0x2b66a(%rip), %rsi     # 0x3a78d
movl $0xa, %edx
callq 0x7510
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x7220
movq 0x3eea4(%rip), %rdi     # 0x4dfe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7510
movq 0x3ee92(%rip), %rdi     # 0x4dfe8
leaq 0x2b671(%rip), %rsi     # 0x3a7ce
movl $0xa, %edx
callq 0x7510
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x3ee73(%rip), %rdi     # 0x4dfe8
callq 0x7510
movq %rax, %rbx
leaq 0x2b603(%rip), %rsi     # 0x3a787
movl $0x5, %edx
movq %rax, %rdi
callq 0x7510
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7490
jmp 0xf252
movq 0x3edf7(%rip), %rdi     # 0x4dfa8
leaq 0x2b5ea(%rip), %rsi     # 0x3a7a2
movl $0x5, %edx
callq 0x7510
movq 0x3eddf(%rip), %rdi     # 0x4dfa8
leaq 0x2b5bd(%rip), %rsi     # 0x3a78d
movl $0xa, %edx
callq 0x7510
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x7220
movq 0x3edb7(%rip), %rdi     # 0x4dfa8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7510
movq 0x3eda5(%rip), %rdi     # 0x4dfa8
leaq 0x2b59e(%rip), %rsi     # 0x3a7a8
movl $0xc, %edx
callq 0x7510
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x3ed86(%rip), %rdi     # 0x4dfa8
callq 0x7510
movq %rax, %rbx
leaq 0x2b556(%rip), %rsi     # 0x3a787
movl $0x5, %edx
movq %rax, %rdi
callq 0x7510
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
movq %r14, %rdi
movq %r12, %rsi
callq 0x37246
movq 0x3ecf9(%rip), %rsi     # 0x4df70
leaq 0x130(%rsp), %rdi
callq 0x73b0
leaq 0x1b0(%rsp), %rdi
callq 0x71c0
movq %r14, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf30a
jmp 0xf2b9
jmp 0xf2b9
jmp 0xf2b9
jmp 0xf2b9
jmp 0xf2b9
movq %rax, %r14
jmp 0xf2dd
jmp 0xf2b9
movq %rax, %r14
jmp 0xf324
movq %rax, %r14
jmp 0xf2f4
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf2dd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf2f4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xf324
movq 0x70(%rsp), %rsi
jmp 0xf31c
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf324
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x3ec45(%rip), %rsi     # 0x4df70
leaq 0x130(%rsp), %rdi
callq 0x73b0
leaq 0x1b0(%rsp), %rdi
callq 0x71c0
movq %r14, %rdi
callq 0x7810
nop