// File: /workspace/github_cpp_makefile_star2_O2/legendddhgf[P]Text2RPG/ArgParser.cpp
// Function: ArgParser::ArgParse(int, char**)
void ArgParser::ArgParse(int argc, char **argv) {
  for (int i = 1; i < argc; i++) {
    if (argv[i][0] == '-') opts.push_back(argv[i] + 1); // add to opts
    else { // add to fields (IE: field:target, field=target, field)
      string field, target = string("");
      char *location = strchr(argv[i], '=');
      if (location == nullptr) location = strchr(argv[i], ':');
      if (location != nullptr) {
        target = string(location + 1);
      }
      if (location != nullptr) *location = '\0';
      field = string(argv[i]);
      if (find(expected.begin(), expected.end(), field) == expected.end()) {
        usage1(field);
      }
      fields.insert(pair<string, string>(field, target));
    }
  }
  for (string check : expected) {
    if (fields.find(check) == fields.end()) {
      usage2(check);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, -0x40(%rbp)
movq %rdi, %r14
leaq 0x18(%rdi), %r13
movslq %esi, %r12
pushq $0x1
popq %rbx
leaq -0xc8(%rbp), %r15
movq %rdi, -0x38(%rbp)
movq %r12, -0x68(%rbp)
cmpq %r12, %rbx
jge 0x2afb
movq -0x40(%rbp), %rax
movq (%rax,%rbx,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x29d6
incq %rsi
movq %r15, %rdi
leaq -0x60(%rbp), %rdx
callq 0x2090
movq %r14, %rdi
movq %r15, %rsi
callq 0x3878
movq %r15, %rdi
jmp 0x2aee
movq %r13, %r12
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
andq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x481f(%rip), %rsi      # 0x7217
movq %r15, %rdx
callq 0x2090
movq -0x40(%rbp), %rax
movq (%rax,%rbx,8), %r14
movq %r14, %rdi
pushq $0x3d
popq %rsi
callq 0x2080
testq %rax, %rax
jne 0x2a2f
movq %r14, %rdi
pushq $0x3a
popq %rsi
callq 0x2080
testq %rax, %rax
leaq -0xc8(%rbp), %r15
je 0x2a6d
movq %rax, %r13
leaq 0x1(%rax), %rsi
leaq -0xc8(%rbp), %r15
movq %r15, %rdi
leaq -0x29(%rbp), %rdx
callq 0x2090
leaq -0x88(%rbp), %rdi
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20d0
movb $0x0, (%r13)
movq -0x40(%rbp), %rax
movq (%rax,%rbx,8), %r14
movq %r15, %rdi
movq %r14, %rsi
leaq -0x29(%rbp), %rdx
callq 0x2090
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20d0
movq -0x38(%rbp), %r14
movq 0x50(%r14), %rdi
movq 0x58(%r14), %rsi
movq %r13, %rdx
callq 0x3969
movq %r12, %r13
cmpq 0x58(%r14), %rax
movq -0x68(%rbp), %r12
je 0x2b6d
movq %r15, %rdi
leaq -0x60(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x2dac
movq %r13, %rdi
movq %r15, %rsi
callq 0x3a5e
movq %r15, %rdi
callq 0x2de2
leaq -0x88(%rbp), %rdi
callq 0x20d0
leaq -0x60(%rbp), %rdi
callq 0x20d0
incq %rbx
jmp 0x299e
movq 0x50(%r14), %r15
movq 0x58(%r14), %rbx
leaq -0xc8(%rbp), %r12
cmpq %rbx, %r15
je 0x2b38
movq %r12, %rdi
movq %r15, %rsi
callq 0x2220
movq %r13, %rdi
movq %r12, %rsi
callq 0x3b64
testq %rax, %rax
je 0x2b4a
movq %r12, %rdi
callq 0x20d0
addq $0x20, %r15
jmp 0x2b0a
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2220
leaq -0xe8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x28d8
leaq -0x108(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2220
leaq -0x108(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x2846
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x20d0
jmp 0x2bd9
jmp 0x2bd6
jmp 0x2bd6
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x20d0
jmp 0x2bee
jmp 0x2beb
movq %rax, %rbx
jmp 0x2be5
jmp 0x2bd6
jmp 0x2bd6
jmp 0x2beb
movq %rax, %rbx
jmp 0x2bfa
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x2de2
jmp 0x2bd9
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x20d0
leaq -0x60(%rbp), %rdi
jmp 0x2bf5
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22a0