// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movl %esi, %r12d
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x3aca(%rip), %rsi      # 0x15be4
leaq 0x3ac6(%rip), %rdx      # 0x15be7
leaq -0xd0(%rbp), %r14
movq %r14, %rdi
callq 0x5796
leaq -0xb0(%rbp), %r15
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x3643(%rip), %rsi      # 0x1578c
leaq 0x3640(%rip), %rdx      # 0x15790
movq %r15, %rdi
callq 0x5796
leaq -0x90(%rbp), %r15
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x3aa7(%rip), %rsi      # 0x15c15
leaq 0x3aa4(%rip), %rdx      # 0x15c19
movq %r15, %rdi
callq 0x5796
leaq -0x70(%rbp), %r15
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x30d6(%rip), %rsi      # 0x15266
leaq 0x30d5(%rip), %rdx      # 0x1526c
movq %r15, %rdi
callq 0x5796
movq (%rbx), %r14
cmpq 0x8(%rbx), %r14
je 0x121d3
movslq %r12d, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %r15
addq $-0xd0, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4040
testl %eax, %eax
je 0x12233
addq $0x20, %r14
cmpq 0x8(%rbx), %r14
jne 0x121ba
movl $0x48, %edi
callq 0x41f0
movq %rax, %r14
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x381b(%rip), %rsi      # 0x15a0a
leaq 0x3827(%rip), %rdx      # 0x15a1d
leaq -0x48(%rbp), %rdi
callq 0x5796
movb $0x1, %r12b
leaq 0x37ee(%rip), %rdx      # 0x159f7
leaq -0x48(%rbp), %rcx
movq %r14, %rdi
movl $0x195, %esi            # imm = 0x195
callq 0xe0d4
xorl %r12d, %r12d
leaq 0xab4c(%rip), %rsi      # 0x1cd70
leaq -0x40e9(%rip), %rdx     # 0xe142
movq %r14, %rdi
callq 0x46a0
movq $-0x80, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x1224f
movq (%r13), %rsi
incq %rsi
callq 0x43e0
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x1223a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1226f
jmp 0x1226f
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1228a
movq (%r15), %rsi
incq %rsi
callq 0x43e0
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x12276
jmp 0x122f5
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x122b4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
testb %r12b, %r12b
jne 0x122be
jmp 0x122cb
movq %rax, %rbx
movq %r14, %rdi
callq 0x42e0
jmp 0x122cb
movq %rax, %rbx
leaq -0x60(%rbp), %r14
xorl %r15d, %r15d
movq -0x70(%rbp,%r15), %rdi
leaq (%r14,%r15), %rax
cmpq %rdi, %rax
je 0x122eb
movq (%rax), %rsi
incq %rsi
callq 0x43e0
addq $-0x20, %r15
cmpq $-0x80, %r15
jne 0x122d2
movq %rbx, %rdi
callq 0x46d0
nop