// File: /workspace/github_cpp_makefile_star2_O3/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 0x88b4
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 0x48(%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 0x5712
movq %r12, %rdi
movl $0x2d, %esi
xorl %edx, %edx
callq 0x4590
testq %rax, %rax
je 0x871b
movq 0x80(%rsp), %rdi
movq %r12, %rsi
callq 0x4230
movl (%rbx), %eax
decl %eax
cmpl %eax, %ebp
movq %r13, %rax
je 0x888a
jmp 0x88c6
movq %r12, %rdi
movl $0x2d, %esi
xorl %edx, %edx
callq 0x4590
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x4490
movq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x9666
cmpq 0x78(%rsp), %rax
je 0x8773
movq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9130
movb $0x1, (%rax)
movq %r13, %rax
leaq 0x18(%rsp), %r15
jmp 0x8870
leaq 0x8(%rsp), %r15
movq %r15, %rdi
leaq 0x1de92(%rip), %rsi     # 0x26614
callq 0x40f0
testl %eax, %eax
je 0x87a2
movq %r15, %rdi
leaq 0x1ca57(%rip), %rsi     # 0x251ec
callq 0x40f0
testl %eax, %eax
jne 0x8957
leal 0x1(%rbp), %ecx
cmpl (%rbx), %ecx
jge 0x8868
movq 0x8(%rbx), %rax
movl %ecx, 0x6c(%rsp)
movslq %ecx, %r14
movq (%rax,%r14,8), %rsi
movq %r13, %r15
movq %r13, %rdi
leaq 0x28(%rsp), %rdx
callq 0x5712
movl $0xa, %ecx
movq %r15, %rdi
leaq 0x1ca16(%rip), %rsi     # 0x251f1
xorl %edx, %edx
callq 0x4730
cmpq $-0x1, %rax
jne 0x8844
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
leaq 0xe8(%rsp), %rdx
callq 0x5712
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x24471
movl %eax, %ebp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8832
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
cmpl $0x2, %ebp
jg 0x89e7
movl %ebp, 0x30(%rbx)
movl 0x6c(%rsp), %eax
movl %eax, %ebp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8860
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x98(%rsp), %r14
leaq 0x18(%rsp), %r15
movq %r13, %rax
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x888a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r13, %rax
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x88aa
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r13, %rax
incl %ebp
cmpl (%rbx), %ebp
jl 0x86c5
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 0x8d2e
leaq 0x1c93f(%rip), %rsi     # 0x25223
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x91ac
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c8d7(%rip), %rsi     # 0x251e0
leaq 0x1c8d4(%rip), %rdx     # 0x251e4
leaq 0xa8(%rsp), %rdi
callq 0x579e
movb $0x1, %bpl
leaq 0x108(%rsp), %rsi
leaq 0xa8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x65b0
xorl %ebp, %ebp
leaq 0x293bd(%rip), %rsi     # 0x31d00
leaq -0x1f82(%rip), %rdx     # 0x69c8
movq %r14, %rdi
callq 0x4760
jmp 0x8a7f
movl $0x30, %edi
callq 0x41d0
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x8d2e
leaq 0x1c89a(%rip), %rsi     # 0x2520f
leaq 0x128(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x91ac
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x6c2a
movb $0x1, %bpl
leaq 0x128(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x65b0
xorl %ebp, %ebp
leaq 0x2932d(%rip), %rsi     # 0x31d00
leaq -0x2012(%rip), %rdx     # 0x69c8
movq %r14, %rdi
callq 0x4760
jmp 0x8a7f
movl $0x30, %edi
callq 0x41d0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x8d2e
leaq 0x1c7f7(%rip), %rsi     # 0x251fc
leaq 0x168(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x91ac
leaq 0x1ce69(%rip), %rdx     # 0x25887
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9276
leaq 0x148(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x921c
movb $0x1, %bpl
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x65b0
xorl %ebp, %ebp
leaq 0x29290(%rip), %rsi     # 0x31d00
leaq -0x20af(%rip), %rdx     # 0x69c8
movq %r14, %rdi
callq 0x4760
movq %rax, %rbx
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aab
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8aab
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ad4
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8ad4
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8af5
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8b11
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
testb %bpl, %bpl
jne 0x8bb6
jmp 0x8c05
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8bb6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8bb6
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8b6c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8b6c
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b8d
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8ba9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
testb %bpl, %bpl
jne 0x8c2d
jmp 0x8cde
movq %rax, %rbx
movq %r14, %rdi
callq 0x4310
jmp 0x8c05
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8c2d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8c2d
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8c05
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8c05
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8cde
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8cde
movq %rax, %rbx
movq %r14, %rdi
callq 0x4310
jmp 0x8cde
jmp 0x8cdb
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8c67
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8c67
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c88
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8ca4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
testb %bpl, %bpl
jne 0x8cd1
jmp 0x8d01
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8cd1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8cd1
jmp 0x8cdb
movq %rax, %rbx
movq %r14, %rdi
callq 0x4310
jmp 0x8d01
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8d01
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x8d01
jmp 0x8cfe
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x8d26
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790