// File: /workspace/github_cpp_makefile_star2_O3/mbourand[P]webserv/srcs/Config/ConfigContext.cpp
// Function: ConfigContext::getErrorPage[abi:cxx11](int) const
std::string ConfigContext::getErrorPage(int code) const
{
	if (_error_pages.find(code) != _error_pages.end())
	{
		try
		{
			std::ifstream file(_error_pages.find(code)->second.c_str(), std::ifstream::in);
			std::string content((std::istreambuf_iterator<char>(file)), (std::istreambuf_iterator<char>()));
			return content;
		}
		catch (std::exception& e) {}
	}
	std::stringstream ss;
	ss << code;
	std::string code_str = ss.str();
	return
"<html>\r\n\
	<head><title>" + code_str + " " + ft::getErrorMessage(code) + "</title></head>\r\n\
	<body>\r\n\
		<center><h1>" + code_str + " " + ft::getErrorMessage(code) + "</h1></center>\r\n\
		<hr><center>Webserv 1.0.0</center>\r\n\
	</body>\r\n\
</html>\r\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movl %edx, %ebp
movq %rdi, %rbx
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x2b246
addq $0x70, %rsi
movq %rax, %rdx
movq %rsi, %rcx
xorl %edi, %edi
cmpl %ebp, 0x20(%rdx)
setl %dil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x2b221
cmpq %rsi, %rcx
je 0x2b246
cmpl %ebp, 0x20(%rcx)
jle 0x2b750
leaq 0x150(%rsp), %rdi
callq 0x7360
leaq 0x160(%rsp), %rdi
movl %ebp, %esi
callq 0x77e0
leaq 0x168(%rsp), %rsi
leaq 0x110(%rsp), %rdi
callq 0x7710
leaq 0x11df0(%rip), %rsi     # 0x3d06e
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0xe2cb
leaq 0x1237a(%rip), %rsi     # 0x3d614
leaq 0x130(%rsp), %rdi
callq 0x78d0
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2b2ce
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x2b2d5
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rdi
movl %ebp, %esi
callq 0x1c629
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x2b321
movq 0x60(%rsp), %rdi
movq 0xb0(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2b34d
leaq 0xc0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2b348
movq 0xc0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2b359
leaq 0x50(%rsp), %rdi
callq 0x7190
jmp 0x2b36a
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x2b38e
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x2b394
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x11ccd(%rip), %rsi     # 0x3d085
leaq 0x10(%rsp), %rdi
callq 0x78d0
leaq 0xe0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2b3f3
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x2b3fb
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xd0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x7190
leaq 0x100(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2b45f
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x2b467
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12187(%rip), %rsi     # 0x3d614
callq 0x78d0
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2b4bf
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x2b4c6
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %rdi
movl %ebp, %esi
callq 0x1c629
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x2b515
movq 0x80(%rsp), %rdi
movq 0x90(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2b541
leaq 0xa0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2b53c
movq 0xa0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2b54d
leaq 0x70(%rsp), %rdi
callq 0x7190
jmp 0x2b55e
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x2b582
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2b588
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x11b02(%rip), %rsi     # 0x3d0ae
leaq 0x30(%rsp), %rdi
callq 0x78d0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x2b5d8
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2b5de
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b610
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b631
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b64b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x2b668
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b685
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b6a0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b6c1
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b6d8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b6f9
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b71a
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x2284f(%rip), %rsi     # 0x4df70
leaq 0x150(%rsp), %rdi
callq 0x73b0
leaq 0x1d0(%rsp), %rdi
callq 0x71c0
movq %rbx, %rax
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rcx
xorl %edx, %edx
cmpl %ebp, 0x20(%rax)
setl %dl
cmovgeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x2b753
cmpq %rsi, %rcx
je 0x2b775
cmpl %ebp, 0x20(%rcx)
cmovleq %rcx, %rsi
movq 0x28(%rsi), %rsi
leaq 0x150(%rsp), %rdi
movl $0x8, %edx
callq 0x7870
movq 0x150(%rsp), %rax
movq -0x18(%rax), %rax
movq 0x238(%rsp,%rax), %rsi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0xf420
leaq 0x150(%rsp), %rdi
callq 0x7150
jmp 0x2b73b
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x7150
jmp 0x2b7ec
movq %rdx, %r15
movq %rax, 0x8(%rsp)
cmpl $0x1, %r15d
jne 0x2b99d
movq 0x8(%rsp), %rdi
callq 0x7210
callq 0x7780
jmp 0x2b246
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b831
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b831
movq %rax, 0x8(%rsp)
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b859
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b859
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b87a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b87a
movq %rax, 0x8(%rsp)
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x2b89e
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b89e
movq %rax, 0x8(%rsp)
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b8c2
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b8c2
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b8e4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b8e4
movq %rax, 0x8(%rsp)
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b90c
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b90c
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b92a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b92a
movq %rax, 0x8(%rsp)
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b94b
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b97c
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2b97c
movq %rax, 0x8(%rsp)
jmp 0x2b94b
jmp 0x2b977
movq %rax, 0x8(%rsp)
movq 0x225ed(%rip), %rsi     # 0x4df70
leaq 0x150(%rsp), %rdi
callq 0x73b0
leaq 0x1d0(%rsp), %rdi
callq 0x71c0
movq 0x8(%rsp), %rdi
callq 0x7810
nop