// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a32(%rip), %rsi      # 0x15be4
leaq 0x3a2e(%rip), %rdx      # 0x15be7
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
callq 0x5790
leaq -0xb0(%rbp), %r14
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x35ab(%rip), %rsi      # 0x1578c
leaq 0x35a8(%rip), %rdx      # 0x15790
movq %r14, %rdi
callq 0x5790
leaq -0x90(%rbp), %r14
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x3a0f(%rip), %rsi      # 0x15c15
leaq 0x3a0c(%rip), %rdx      # 0x15c19
movq %r14, %rdi
callq 0x5790
leaq -0x70(%rbp), %r14
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x303e(%rip), %rsi      # 0x15266
leaq 0x303d(%rip), %rdx      # 0x1526c
movq %r14, %rdi
callq 0x5790
movq (%rbx), %r14
cmpq 0x8(%rbx), %r14
je 0x1226b
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 0x122cc
addq $0x20, %r14
cmpq 0x8(%rbx), %r14
jne 0x12252
movl $0x48, %edi
callq 0x41f0
movq %rax, %r14
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x3782(%rip), %rsi      # 0x15a0a
leaq 0x378e(%rip), %rdx      # 0x15a1d
leaq -0x48(%rbp), %rdi
callq 0x5790
movb $0x1, %r15b
leaq 0x3755(%rip), %rdx      # 0x159f7
leaq -0x48(%rbp), %rcx
movq %r14, %rdi
movl $0x195, %esi            # imm = 0x195
callq 0xe106
xorl %r15d, %r15d
leaq 0xaab3(%rip), %rsi      # 0x1cd70
leaq -0x4150(%rip), %rdx     # 0xe174
movq %r14, %rdi
callq 0x46a0
movq $-0x80, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x122e8
movq (%r13), %rsi
incq %rsi
callq 0x43e0
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x122d3
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12308
jmp 0x12308
movq %rax, %rbx
jmp 0x12313
movq %rax, %rbx
movq %r15, %r14
cmpq %r14, %r15
je 0x123a9
addq $-0x10, %r14
leaq -0xd0(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x1233b
movq (%r14), %rsi
incq %rsi
callq 0x43e0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x12327
jmp 0x123a9
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x1236d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x1236d
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x1237f
movq %r14, %rdi
callq 0x42e0
jmp 0x1237f
movq %rax, %rbx
leaq -0x60(%rbp), %r14
xorl %r15d, %r15d
movq -0x70(%rbp,%r15), %rdi
leaq (%r14,%r15), %rax
cmpq %rdi, %rax
je 0x1239f
movq (%rax), %rsi
incq %rsi
callq 0x43e0
addq $-0x20, %r15
cmpq $-0x80, %r15
jne 0x12386
movq %rbx, %rdi
callq 0x46d0
nop