// File: /workspace/github_cpp_makefile_star2_O1/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
addq $0x70, %rsi
movq %rsi, %rcx
testq %rax, %rax
je 0x2b583
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 0x2b56c
movq %rsi, %rdx
cmpq %rsi, %rcx
je 0x2b595
cmpl %ebp, 0x20(%rcx)
cmovgq %rsi, %rcx
movq %rcx, %rdx
cmpq %rsi, %rdx
je 0x2b65b
movq %rsi, %rcx
testq %rax, %rax
je 0x2b5bf
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 0x2b5a9
cmpq %rsi, %rcx
je 0x2b5cb
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 0xf46a
leaq 0x150(%rsp), %rdi
callq 0x7150
jmp 0x2bb52
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x7150
jmp 0x2b642
movq %rdx, %r15
movq %rax, 0x8(%rsp)
cmpl $0x1, %r15d
jne 0x2bcfa
movq 0x8(%rsp), %rdi
callq 0x7210
callq 0x7780
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 0x119db(%rip), %rsi     # 0x3d06e
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0xe31d
leaq 0x11f65(%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 0x2b6e3
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x2b6ea
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 0x1c92e
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x2b736
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2b75b
leaq 0xc0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x2b756
movq 0xc0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2b76f
movq 0xb0(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x7190
jmp 0x2b780
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 0x2b7a4
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x2b7aa
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 0x118b7(%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 0x2b809
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x2b811
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 0x2b875
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x2b87d
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 0x11d71(%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 0x2b8d5
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x2b8dc
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 0x1c92e
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x2b92b
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2b950
leaq 0xa0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x2b94b
movq 0xa0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2b964
movq 0x90(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x7190
jmp 0x2b975
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 0x2b999
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2b99f
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 0x116eb(%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 0x2b9ef
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2b9f5
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 0x2ba27
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ba48
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2ba62
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ba7f
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ba9c
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bab7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bad8
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x2baef
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bb10
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bb31
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x22438(%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 %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bb8e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bb8e
movq %rax, 0x8(%rsp)
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bbb6
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bbb6
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x2bbd7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bbd7
movq %rax, 0x8(%rsp)
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x2bbfb
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bbfb
movq %rax, 0x8(%rsp)
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bc1f
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bc1f
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bc41
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bc41
movq %rax, 0x8(%rsp)
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bc69
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bc69
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x2bc87
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bc87
movq %rax, 0x8(%rsp)
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bca8
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bcd9
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2bcd9
movq %rax, 0x8(%rsp)
jmp 0x2bca8
jmp 0x2bcd4
movq %rax, 0x8(%rsp)
movq 0x22290(%rip), %rsi     # 0x4df70
leaq 0x150(%rsp), %rdi
callq 0x73b0
leaq 0x1d0(%rsp), %rdi
callq 0x71c0
movq 0x8(%rsp), %rdi
callq 0x7810