// File: llefranc[P]42_webserv/srcs/server/Response.cpp
// Function: Response::checkMethods(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const
void Response::checkMethods(int method, const std::vector<std::string>& methodsAllowed) const
{
	std::string tab[NB_METHODS] = { "GET", "HEAD", "POST", "DELETE" };

	for (std::vector<std::string>::const_iterator it = methodsAllowed.begin();
			it != methodsAllowed.end(); ++it)
		if (!it->compare(tab[method]))
			return ;

	throw StatusLine(405, REASON_405, "checkMethods method");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x1, -0xc0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x58f0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x528c(%rip), %rsi      # 0x23bb6
callq 0x63e0
jmp 0x1e931
leaq -0x80(%rbp), %rax
movq %rax, -0x118(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbd(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x58f0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rdx
leaq 0x4924(%rip), %rsi      # 0x2328f
callq 0x63e0
jmp 0x1e972
leaq -0x60(%rbp), %rax
movq %rax, -0x128(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbe(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x58f0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x523b(%rip), %rsi      # 0x23be7
callq 0x63e0
jmp 0x1e9b3
leaq -0x40(%rbp), %rax
movq %rax, -0x138(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbf(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x58f0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0x485d(%rip), %rsi      # 0x2324a
callq 0x63e0
jmp 0x1e9f4
movb $0x0, -0xc0(%rbp)
leaq -0xbf(%rbp), %rdi
callq 0x55c0
leaq -0xbe(%rbp), %rdi
callq 0x55c0
leaq -0xbd(%rbp), %rdi
callq 0x55c0
leaq -0xa9(%rbp), %rdi
callq 0x55c0
movq -0x18(%rbp), %rdi
callq 0xab80
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
callq 0xabb0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xaee0
testb $0x1, %al
jne 0x1ea67
jmp 0x1ebc7
leaq -0xc8(%rbp), %rdi
callq 0x1f250
movq %rax, %rdi
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
leaq -0xa0(%rbp,%rax), %rsi
callq 0x5050
movl %eax, -0x13c(%rbp)
jmp 0x1ea93
movl -0x13c(%rbp), %eax
cmpl $0x0, %eax
jne 0x1ebb4
leaq -0xa0(%rbp), %rax
movq %rax, -0x150(%rbp)
addq $0x80, %rax
movq %rax, -0x148(%rbp)
jmp 0x1ecac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x1eb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x1eb28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x1eb1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xbf(%rbp), %rdi
callq 0x55c0
leaq -0xbe(%rbp), %rdi
callq 0x55c0
leaq -0xbd(%rbp), %rdi
callq 0x55c0
leaq -0xa9(%rbp), %rdi
callq 0x55c0
testb $0x1, -0xc0(%rbp)
jne 0x1eb4b
jmp 0x1eb98
movq -0xa8(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x158(%rbp)
je 0x1eb96
movq -0x158(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x160(%rbp)
callq 0x5a08
movq -0x160(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x158(%rbp)
jne 0x1eb65
jmp 0x1eb98
jmp 0x1ed34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x1ece6
jmp 0x1ebb6
leaq -0xc8(%rbp), %rdi
callq 0xaf70
jmp 0x1ea3b
movb $0x1, -0xf2(%rbp)
movl $0x48, %edi
callq 0x5290
movq %rax, -0x170(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x58f0
movq -0x168(%rbp), %rdx
leaq 0x4dc5(%rip), %rsi      # 0x239c5
leaq -0xf0(%rbp), %rdi
callq 0x63e0
jmp 0x1ec0e
movq -0x170(%rbp), %rdi
leaq 0x4d96(%rip), %rdx      # 0x239b2
movl $0x195, %esi            # imm = 0x195
leaq -0xf0(%rbp), %rcx
callq 0x199d0
jmp 0x1ec2f
movq -0x170(%rbp), %rdi
movb $0x0, -0xf2(%rbp)
leaq 0x1214c(%rip), %rsi     # 0x30d90
leaq -0x51cb(%rip), %rdx     # 0x19a80
callq 0x58a0
jmp 0x1ed40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x1ec87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x5a08
leaq -0xf1(%rbp), %rdi
callq 0x55c0
testb $0x1, -0xf2(%rbp)
jne 0x1ec9e
jmp 0x1ecaa
movq -0x170(%rbp), %rdi
callq 0x53f0
jmp 0x1ece6
movq -0x148(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x178(%rbp)
callq 0x5a08
movq -0x150(%rbp), %rcx
movq -0x178(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x148(%rbp)
jne 0x1ecac
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0xa0(%rbp), %rax
movq %rax, -0x188(%rbp)
addq $0x80, %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x190(%rbp)
callq 0x5a08
movq -0x188(%rbp), %rcx
movq -0x190(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x180(%rbp)
jne 0x1ed01
jmp 0x1ed34
movq -0xb8(%rbp), %rdi
callq 0x58e0