// File: /workspace/github_cpp_makefile_star2_O1/solaldunckel[P]webserv/srcs/Config/InputArgs.cpp
// Function: InputArgs::parse()
void InputArgs::parse() {
  for (int i = 1; i < argc_; i++) {
    std::string arg = argv_[i];

    if (arg.find('-') == 0) {
      std::string opt = arg.substr(arg.find('-') + 1);

      if (options_.find(opt) != options_.end())
        options_[opt] = true;
      else if (opt == "l" || opt == "-log") {
        if (i + 1 < argc_) {
          std::string opt2 = argv_[i + 1];
          if (opt2.find_first_not_of("0123456789") == std::string::npos) {
            i++;
            int level = ft::stoi(argv_[i]);
            if (level <= 2)
              log_level_ = (LogLevel)level;
            else
              throw webserv_exception("invalid option %\n\n" + helpText(), 0, opt + " " + opt2);
          }
        }
      }
      else
        throw webserv_exception("invalid option -%\n\n" + helpText(), 0, opt);
    } else {
      path_ = arg;
      if (i != argc_ - 1)
        throw webserv_exception("too many arguments\n\n" + helpText(), 0, "test");
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
cmpl $0x2, (%rdi)
jl 0x884c
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x80(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x70(%rsp)
leaq 0x40(%rdi), %rax
movq %rax, 0x78(%rsp)
movl $0x1, %ebp
leaq 0x98(%rsp), %r14
leaq 0x88(%rsp), %r12
leaq 0x50(%rsp), %rax
movq %rax, %r13
movq 0x8(%rbx), %rax
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rsi
movq %r12, %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5702
movq %r12, %rdi
movl $0x2d, %esi
xorl %edx, %edx
callq 0x4580
testq %rax, %rax
je 0x86b3
movq 0x80(%rsp), %rdi
movq %r12, %rsi
callq 0x4230
movl (%rbx), %eax
decl %eax
cmpl %eax, %ebp
movq %r13, %rax
je 0x8822
jmp 0x885e
movq %r12, %rdi
movl $0x2d, %esi
xorl %edx, %edx
callq 0x4580
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x4480
movq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x95d6
cmpq 0x78(%rsp), %rax
je 0x870b
movq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x90a0
movb $0x1, (%rax)
movq %r13, %rax
leaq 0x18(%rsp), %r15
jmp 0x8808
leaq 0x8(%rsp), %r15
movq %r15, %rdi
leaq 0x1defa(%rip), %rsi     # 0x26614
callq 0x40f0
testl %eax, %eax
je 0x873a
movq %r15, %rdi
leaq 0x1cabf(%rip), %rsi     # 0x251ec
callq 0x40f0
testl %eax, %eax
jne 0x88ef
leal 0x1(%rbp), %ecx
cmpl (%rbx), %ecx
jge 0x8800
movq 0x8(%rbx), %rax
movl %ecx, 0x2c(%rsp)
movslq %ecx, %r14
movq (%rax,%r14,8), %rsi
movq %r13, %r15
movq %r13, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5702
movl $0xa, %ecx
movq %r15, %rdi
leaq 0x1ca7e(%rip), %rsi     # 0x251f1
xorl %edx, %edx
callq 0x4720
cmpq $-0x1, %rax
jne 0x87dc
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0xe8(%rsp), %rdx
callq 0x5702
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x244f4
movl %eax, %ebp
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x87ca
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
cmpl $0x2, %ebp
jg 0x897f
movl %ebp, 0x30(%rbx)
movl 0x2c(%rsp), %eax
movl %eax, %ebp
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x87f8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0x98(%rsp), %r14
leaq 0x18(%rsp), %r15
movq %r13, %rax
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8822
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4460
movq %r13, %rax
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x8842
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4460
movq %r13, %rax
incl %ebp
cmpl (%rbx), %ebp
jl 0x865d
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x41d0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8c7a
leaq 0x1c9a7(%rip), %rsi     # 0x25223
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x911c
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c93f(%rip), %rsi     # 0x251e0
leaq 0x1c93c(%rip), %rdx     # 0x251e4
leaq 0xa8(%rsp), %rdi
callq 0x578e
movb $0x1, %bpl
leaq 0x108(%rsp), %rsi
leaq 0xa8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6542
xorl %ebp, %ebp
leaq 0x29425(%rip), %rsi     # 0x31d00
leaq -0x1f86(%rip), %rdx     # 0x695c
movq %r14, %rdi
callq 0x4750
jmp 0x8a17
movl $0x30, %edi
callq 0x41d0
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x8c7a
leaq 0x1c902(%rip), %rsi     # 0x2520f
leaq 0x128(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x911c
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x6bac
movb $0x1, %bpl
leaq 0x128(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6542
xorl %ebp, %ebp
leaq 0x29395(%rip), %rsi     # 0x31d00
leaq -0x2016(%rip), %rdx     # 0x695c
movq %r14, %rdi
callq 0x4750
jmp 0x8a17
movl $0x30, %edi
callq 0x41d0
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x8c7a
leaq 0x1c85f(%rip), %rsi     # 0x251fc
leaq 0x168(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x911c
leaq 0x1ced1(%rip), %rdx     # 0x25887
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x91e6
leaq 0x148(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x918c
movb $0x1, %bpl
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6542
xorl %ebp, %ebp
leaq 0x292f8(%rip), %rsi     # 0x31d00
leaq -0x20b3(%rip), %rdx     # 0x695c
movq %r14, %rdi
callq 0x4750
movq %rax, %rbx
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a43
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8a43
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a6c
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8a6c
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a95
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8a95
movq %rax, %rbx
movb $0x1, %bpl
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x8b04
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8b04
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8adb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8adb
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b19
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8b19
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8b5b
movq %r14, %rdi
callq 0x4300
jmp 0x8b5b
movq %rax, %rbx
movb $0x1, %bpl
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x8b86
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8b86
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x8b5b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8b5b
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x8c2a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8c2a
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8c2a
movq %r14, %rdi
callq 0x4300
jmp 0x8c2a
jmp 0x8c27
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8bc9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8bc9
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8bf2
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8bf2
movq %rax, %rbx
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8c18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8c18
jmp 0x8c27
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8c4d
movq %r14, %rdi
callq 0x4300
jmp 0x8c4d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8c4d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x8c4d
jmp 0x8c4a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x8c72
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4460
movq %rbx, %rdi
callq 0x4780