// File: /workspace/github_cpp_makefile_star2_O3/mbourand[P]webserv/srcs/Config/ConfigContext.cpp
// Function: ConfigContext::parse_error_page(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ConfigContext::parse_error_page(const std::string& directive_value)
{
	std::list<std::string> words = ft::split(directive_value, " \t\n");
	std::string page = words.back();

	for (std::list<std::string>::const_iterator it = words.begin(); it != --words.end(); it++)
	{
		if (!ft::is_integer<int>(*it))
			throw std::invalid_argument("Bad integer for error_page in config");
		int nb = ft::toInt(*it);

		if (page == "none")
		{
			if (_error_pages.find(nb) != _error_pages.end())
				_error_pages.erase(_error_pages.find(nb));
		}
		else
			_error_pages.insert(std::make_pair(ft::toInt(*it), page));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12dc3(%rip), %rsi     # 0x3b88b
leaq 0x12dbf(%rip), %rdx     # 0x3b88e
movq %rsp, %rdi
callq 0x80f4
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0x1bf30
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x28afd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x58(%rsp), %rax
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x8a92
movq 0x50(%rsp), %rbx
cmpq 0x58(%rsp), %rbx
je 0x28c3b
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %r14
leaq 0x18(%rsp), %r12
leaq 0x70(%rax), %r13
leaq 0x10(%rbx), %rbp
movq %rbp, %rdi
callq 0x2778c
testb %al, %al
je 0x28c70
movq %rbp, %rdi
callq 0x1bab0
movl %eax, %r15d
leaq 0x30(%rsp), %rdi
leaq 0x14263(%rip), %rsi     # 0x3cdd0
callq 0x7180
testl %eax, %eax
je 0x28bc1
movq %rbp, %rdi
callq 0x1bab0
movl %eax, (%rsp)
movq %r12, 0x8(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x8a92
movq %r14, %rdi
movq %rsp, %rsi
callq 0x2de68
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x28c2d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x28c2d
movq 0x28(%rsp), %rax
movq 0x78(%rax), %rax
testq %rax, %rax
je 0x28c2d
movq %rax, %rdx
movq %r13, %rcx
xorl %esi, %esi
cmpl %r15d, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x28bd5
cmpq %r13, %rcx
je 0x28c2d
cmpl 0x20(%rcx), %r15d
jl 0x28c2d
movq %r13, %rcx
xorl %edx, %edx
cmpl %r15d, 0x20(%rax)
setl %dl
cmovgeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x28bfb
movq %r13, %rsi
cmpq %r13, %rcx
je 0x28c25
cmpl 0x20(%rcx), %r15d
cmovlq %r13, %rcx
movq %rcx, %rsi
movq %r14, %rdi
callq 0x2de2e
movq (%rbx), %rbx
cmpq 0x58(%rsp), %rbx
jne 0x28b42
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x28c57
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x96b6
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x7260
movq %rax, %r14
leaq 0x1431b(%rip), %rsi     # 0x3cf9f
movq %rax, %rdi
callq 0x78c0
movq 0x25335(%rip), %rsi     # 0x4dfc8
movq 0x25316(%rip), %rdx     # 0x4dfb0
movq %r14, %rdi
callq 0x77d0
movq %rax, %rbx
jmp 0x28d13
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x28d1d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x28d1d
movq %rax, %rbx
jmp 0x28d1d
jmp 0x28cf4
movq %rax, %rbx
movq %r14, %rdi
callq 0x7390
jmp 0x28cf7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x28cf7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x28cf7
jmp 0x28cf4
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x28d13
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x96b6
movq %rbx, %rdi
callq 0x7810
nop