// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]base256/base256.cpp
// Function: UnixArgs::parse(int, char**)
bool parse(int argc, char *argv[]) {
    if(!argc) {
      error = "zero length arguments";
      return false;
    }

    binary = argv[0];

    for(int i = 0; i < argc; i++) {
      if(i > 0) command += " ";
      command += std::string(argv[i]);
    }

    for(int i = 1; i < argc; i++) {
      int num = 0;
      std::string s = argv[i];
      if(s == "--") {
        if(!allowpost) {
          error = "invalid loose double dash argument";
          return false;
        }
        for(int j = i + 1; j < argc; j++) {
          if(j > i + 1) post += " ";
          post += std::string(argv[j]);
        }
        break;
      } else if(s.size() > 2 && s[0] == '-' && s[1] == '-') {
        std::string s2 = s.substr(2);
        std::string val = "";
        size_t eq = s2.find('=');
        if(eq != std::string::npos) {
          val = s2.substr(eq + 1);
          s2 = s2.substr(0, eq);
        }
        if(!strings.count(s2)) {
          error = "unkonwn argument: " + s2;
          return false;
        }
        Arg& arg = args[strings[s2]];
        arg.present = true;
        if(!val.empty()) {
          arg.value = val;
        }
      } else if(s.size() > 1 && s[0] == '-') {
        for(int j = 1; j < s.size(); j++) {
          char c = s[j];
          if(!chars.count(c)) {
            error = "unkonwn argument: " + std::string(1, c);
            return false;
          }
          args[chars[c]].present = true;
        }
      } else {
        if(s == "-") {
          error = "loose single dash argument invalid";
          return false;
        }
        if(!allowloose) {
          error = "loose argument " + s + " invalid";
          return false;
        }
        loose.push_back(s);
      }
    }
    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbp
testl %esi, %esi
je 0x7ec4
movq %rdx, %r14
movl %esi, %r15d
movq (%rdx), %rsi
leaq 0x20(%rbp), %rdi
callq 0x43e0
xorl %ebx, %ebx
testl %r15d, %r15d
movl $0x0, %r13d
movl %r15d, 0x4(%rsp)
cmovgl %r15d, %r13d
leaq 0x50(%rsp), %r15
leaq 0xa8(%rsp), %r12
cmpq %rbx, %r13
je 0x7af5
testq %rbx, %rbx
je 0x7ace
movq %rbp, %rdi
leaq 0x6be2(%rip), %rsi      # 0xe6ab
callq 0x43d0
movq (%r14,%rbx,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x40c0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x43f0
movq %r15, %rdi
callq 0x4408
incq %rbx
jmp 0x7ab5
leaq 0xf0(%rbp), %rax
movq %rax, 0x8(%rsp)
leaq 0xd8(%rbp), %rax
movq %rax, 0x70(%rsp)
leaq 0x78(%rbp), %rax
movq %rax, 0x48(%rsp)
leaq 0xa8(%rbp), %rax
movq %rax, 0x38(%rsp)
movq %rbp, 0x78(%rsp)
leaq 0x40(%rbp), %r12
movslq 0x4(%rsp), %rax
movq %rax, 0x80(%rsp)
pushq $0x2
popq %rax
pushq $0x1
popq %r13
leaq 0xa8(%rsp), %r15
movq %rax, 0x40(%rsp)
cmpq 0x80(%rsp), %r13
jge 0x7ede
movq (%r14,%r13,8), %rsi
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x40c0
movq %rbx, %rdi
leaq 0x68ce(%rip), %rsi      # 0xe446
callq 0x833b
testb %al, %al
movq 0x78(%rsp), %rbp
je 0x7bea
cmpb $0x0, 0x110(%rbp)
leaq 0x690a(%rip), %rsi      # 0xe49e
je 0x7d8d
leaq 0x1(%r13), %rbx
movq 0x40(%rsp), %rbp
cmpl 0x4(%rsp), %ebp
jge 0x7d9c
cmpq %rbx, %rbp
jbe 0x7bc1
movq %r12, %rdi
leaq 0x6aef(%rip), %rsi      # 0xe6ab
callq 0x43d0
movq (%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0x18(%rsp), %rdx
callq 0x40c0
movq %r12, %rdi
movq %r15, %rsi
callq 0x43f0
movq %r15, %rdi
callq 0x4408
incq %rbp
jmp 0x7ba3
movq 0x58(%rsp), %rax
cmpq $0x3, %rax
jb 0x7d01
movq 0x50(%rsp), %rcx
cmpb $0x2d, (%rcx)
jne 0x7d73
cmpb $0x2d, 0x1(%rcx)
jne 0x7d11
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x4200
leaq 0x18(%rsp), %rdi
leaq 0x5abe(%rip), %rsi      # 0xd6ec
leaq 0x88(%rsp), %rdx
callq 0x40c0
movq %r15, %rdi
pushq $0x3d
popq %rsi
xorl %edx, %edx
callq 0x4280
cmpq $-0x1, %rax
je 0x7ca7
movq %rax, 0x10(%rsp)
leaq 0x1(%rax), %rdx
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
pushq $-0x1
popq %rcx
callq 0x4200
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4408
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq 0x10(%rsp), %rcx
callq 0x4200
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4408
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x993e
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x7e75
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x8c84
movq (%rax), %rax
movq 0x60(%rbp), %rdi
shlq $0x7, %rax
movb $0x1, 0x78(%rdi,%rax)
cmpq $0x0, 0x20(%rsp)
je 0x7ea4
addq %rax, %rdi
addq $0x38, %rdi
leaq 0x18(%rsp), %rsi
callq 0x4130
jmp 0x7ea4
cmpq $0x2, %rax
jne 0x7d73
movq 0x50(%rsp), %rcx
cmpb $0x2d, (%rcx)
jne 0x7d73
pushq $0x1
popq %rbx
cmpq %rbx, %rax
jbe 0x7ebe
movq 0x50(%rsp), %rax
movb (%rax,%rbx), %al
movb %al, 0x88(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x9958
testq %rax, %rax
je 0x7e03
movq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x8d80
movq (%rax), %rax
movq 0x60(%rbp), %rcx
shlq $0x7, %rax
movb $0x1, 0x78(%rcx,%rax)
incq %rbx
movq 0x58(%rsp), %rax
jmp 0x7d14
movq %rbx, %rdi
leaq 0x66ca(%rip), %rsi      # 0xe447
callq 0x833b
leaq 0x674b(%rip), %rsi      # 0xe4d4
testb %al, %al
je 0x7da5
movq 0x8(%rsp), %rdi
callq 0x43e0
jmp 0x7e54
xorl %ebx, %ebx
pushq $0x5
jmp 0x7e58
cmpb $0x0, 0x111(%rbp)
je 0x7dc0
movq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x9972
jmp 0x7ebe
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
leaq 0x6728(%rip), %rsi      # 0xe4f7
movq %rbx, %rdx
callq 0x8cea
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x670a(%rip), %rdx      # 0xe4ee
callq 0x8d60
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4250
movq %r15, %rdi
callq 0x4408
movq %rbp, %rdi
jmp 0x7e4f
movsbl 0x88(%rsp), %edx
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x4240
movq %r15, %rdi
leaq 0x6692(%rip), %rsi      # 0xe4c1
movq %rbx, %rdx
callq 0x8ae6
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4250
movq %r15, %rdi
callq 0x4408
movq %rbx, %rdi
callq 0x4408
xorl %ebx, %ebx
pushq $0x1
popq %rbp
leaq 0x50(%rsp), %rdi
callq 0x4408
incq %r13
incq 0x40(%rsp)
testb %bl, %bl
jne 0x7b4c
jmp 0x7ee1
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
leaq 0x663a(%rip), %rsi      # 0xe4c1
movq %r15, %rdx
callq 0x8cea
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4408
leaq 0x18(%rsp), %rdi
callq 0x4408
movq %r15, %rdi
callq 0x4408
cmpq $0x0, 0x10(%rsp)
je 0x7e54
xorl %ebp, %ebp
movb $0x1, %bl
jmp 0x7e59
addq $0xf0, %rbp
leaq 0x65b6(%rip), %rsi      # 0xe488
movq %rbp, %rdi
callq 0x43e0
xorl %eax, %eax
jmp 0x7ee7
pushq $0x5
popq %rbp
cmpl $0x5, %ebp
sete %al
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7f09
jmp 0x7f09
jmp 0x7f09
jmp 0x7f18
jmp 0x7f45
jmp 0x7f09
jmp 0x7f33
jmp 0x7f45
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4408
jmp 0x7f36
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x7f3e
jmp 0x7f45
jmp 0x7f45
jmp 0x7f28
movq %rax, %rbx
jmp 0x7f52
jmp 0x7f45
jmp 0x7f45
jmp 0x7f45
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x4408
jmp 0x7f48
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4408
movq %rbx, %rdi
callq 0x43a0