// File: /workspace/github_cpp_makefile_star2_O1/solaldunckel[P]webserv/srcs/Config/ServerConfig.cpp
// Function: ServerConfig::location_loop(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, 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>>>>>&, std::vector<ServerConfig, std::allocator<ServerConfig>>&)
void ServerConfig::location_loop(std::vector<std::string>::iterator &it, std::vector<ServerConfig> &locations) {
  if (is_loc_modifier(*it)) {
    if (*it == "=")
      modifier_ = EXACT;
    else if (*it == "~")
      modifier_ = CASE_SENSITIVE_REG;
    else if (*it == "~*")
      modifier_ = CASE_INSENSITIVE_REG;
    else if (*it == "^~")
      modifier_ = LONGEST;
    else
      throw std::runtime_error("unknown modifier in location");
    it++;
  }
  else
    modifier_ = NONE;
  uri_ = *it++;
  if (*it != "{")
    throw std::runtime_error("missing opening bracket in server block");
  while (*(++it) != "}") {
    if (ServerConfig::directive_[*it])
      (this->*(ServerConfig::directive_[*it]))(++it);
    else
      throw std::runtime_error("invalid directive '" + *it + "' in 'location'");
  }
  locations.push_back(*this);;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rdi
callq 0xc88c
testb %al, %al
je 0xc97f
movq (%r14), %rdi
leaq 0x18fd8(%rip), %rsi     # 0x258ef
callq 0x40f0
testl %eax, %eax
je 0xc989
movq (%r14), %rdi
leaq 0x18c20(%rip), %rsi     # 0x2554a
callq 0x40f0
testl %eax, %eax
je 0xc990
movq (%r14), %rdi
leaq 0x18c09(%rip), %rsi     # 0x25546
callq 0x40f0
testl %eax, %eax
je 0xc997
movq (%r14), %rdi
leaq 0x18bf9(%rip), %rsi     # 0x25549
callq 0x40f0
movl $0x4, %ecx
testl %eax, %eax
je 0xc99c
movl $0x10, %edi
callq 0x41d0
movq %rax, %rbx
leaq 0x18bda(%rip), %rsi     # 0x2554c
movq %rax, %rdi
callq 0x4170
jmp 0xcb1c
movl $0x0, 0x70(%r15)
jmp 0xc9a4
movl $0x1, %ecx
jmp 0xc99c
movl $0x2, %ecx
jmp 0xc99c
movl $0x3, %ecx
movl %ecx, 0x70(%r15)
addq $0x20, (%r14)
movq (%r14), %rsi
leaq 0x20(%rsi), %rax
movq %rax, (%r14)
leaq 0x50(%r15), %rdi
callq 0x4230
movq (%r14), %rdi
leaq 0x186e8(%rip), %rsi     # 0x250a9
callq 0x40f0
testl %eax, %eax
jne 0xcb00
movq (%r14), %rdi
addq $0x20, %rdi
movq %rdi, (%r14)
leaq 0x186cc(%rip), %rsi     # 0x250ab
callq 0x40f0
testl %eax, %eax
je 0xca48
leaq 0x25af9(%rip), %r12     # 0x324e8
leaq 0x186b5(%rip), %r13     # 0x250ab
movq (%r14), %rsi
movq %r12, %rdi
callq 0xcda8
cmpq $0x0, (%rax)
je 0xca61
movq (%r14), %rsi
movq %r12, %rdi
callq 0xcda8
movq (%rax), %rcx
movq 0x8(%rax), %rdi
addq %r15, %rdi
testb $0x1, %cl
je 0xca29
movq (%rdi), %rax
movq -0x1(%rax,%rcx), %rcx
addq $0x20, (%r14)
movq %r14, %rsi
callq *%rcx
movq (%r14), %rdi
addq $0x20, %rdi
movq %rdi, (%r14)
movq %r13, %rsi
callq 0x40f0
testl %eax, %eax
jne 0xc9f6
movq %rbx, %rdi
movq %r15, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6ad2
movl $0x10, %edi
callq 0x41d0
movq %rax, %rbx
movq (%r14), %rdx
leaq 0x1897b(%rip), %rsi     # 0x253f3
leaq 0x28(%rsp), %rdi
callq 0x567a
leaq 0x18ae0(%rip), %rsi     # 0x25569
leaq 0x28(%rsp), %rdi
callq 0x4830
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xcab4
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0xcac1
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x46d0
xorl %ebp, %ebp
movq 0x254ff(%rip), %rsi     # 0x31ff0
movq 0x254b0(%rip), %rdx     # 0x31fa8
movq %rbx, %rdi
callq 0x4750
movl $0x10, %edi
callq 0x41d0
movq %rax, %rbx
leaq 0x188b7(%rip), %rsi     # 0x253cb
movq %rax, %rdi
callq 0x4170
movq 0x254cd(%rip), %rsi     # 0x31ff0
movq 0x2547e(%rip), %rdx     # 0x31fa8
movq %rbx, %rdi
callq 0x4750
jmp 0xcb34
movq %rax, %r14
jmp 0xcb83
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xcb5b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0xcb5b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb7e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0xcb7e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xcb8b
movq %rbx, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4780
nop