// File: /workspace/github_cpp_makefile_star2_O1/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 0x12a99(%rip), %rsi     # 0x3b88b
leaq 0x12a95(%rip), %rdx     # 0x3b88e
movq %rsp, %rdi
callq 0x80f4
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0x1c232
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x28e27
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 0x8a8a
movq 0x50(%rsp), %rbx
cmpq 0x58(%rsp), %rbx
je 0x28f84
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %r14
leaq 0x18(%rsp), %r12
leaq 0x70(%rax), %r13
leaq 0x10(%rbx), %rbp
movq %rbp, %rdi
callq 0x27add
testb %al, %al
je 0x28fb9
movq %rbp, %rdi
callq 0x1bda4
movl %eax, %r15d
leaq 0x30(%rsp), %rdi
leaq 0x13f39(%rip), %rsi     # 0x3cdd0
callq 0x7180
testl %eax, %eax
je 0x28ef2
movq %rbp, %rdi
callq 0x1bda4
movl %eax, (%rsp)
movq %r12, 0x8(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x8a8a
movq %r14, %rdi
movq %rsp, %rsi
callq 0x2e1aa
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x28f76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x28f76
movq 0x28(%rsp), %rax
movq 0x78(%rax), %rax
movq %r13, %rcx
testq %rax, %rax
je 0x28f21
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 0x28f09
movq %r13, %rdx
cmpq %r13, %rcx
je 0x28f34
cmpl 0x20(%rcx), %r15d
cmovlq %r13, %rcx
movq %rcx, %rdx
cmpq %r13, %rdx
je 0x28f76
movq %r13, %rcx
testq %rax, %rax
je 0x28f5b
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 0x28f44
movq %r13, %rsi
cmpq %r13, %rcx
je 0x28f6e
cmpl 0x20(%rcx), %r15d
cmovlq %r13, %rcx
movq %rcx, %rsi
movq %r14, %rdi
callq 0x2e170
movq (%rbx), %rbx
cmpq 0x58(%rsp), %rbx
jne 0x28e6c
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x28fa0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x96d8
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 0x13fd2(%rip), %rsi     # 0x3cf9f
movq %rax, %rdi
callq 0x78c0
movq 0x24fec(%rip), %rsi     # 0x4dfc8
movq 0x24fcd(%rip), %rdx     # 0x4dfb0
movq %r14, %rdi
callq 0x77d0
movq %rax, %rbx
jmp 0x2905c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x29066
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x29066
movq %rax, %rbx
jmp 0x29066
jmp 0x2903d
movq %rax, %rbx
movq %r14, %rdi
callq 0x7390
jmp 0x29040
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29040
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x29040
jmp 0x2903d
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2905c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x96d8
movq %rbx, %rdi
callq 0x7810