// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, %r15
leaq -0x68(%rbp), %r13
cmpl $0x2, %esi
movq %rdi, -0x38(%rbp)
jl 0x3184
movq %rdx, %r14
leaq 0x18(%r15), %rax
movq %rax, -0xc8(%rbp)
movl %esi, %eax
movq %rax, -0xd0(%rbp)
movl $0x1, %ebx
movq %rdx, -0xa0(%rbp)
movq (%r14,%rbx,8), %r13
cmpb $0x2d, (%r13)
jne 0x2fe4
leaq 0x1(%r13), %r15
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %r15, %rdi
callq 0x20c0
leaq (%rax,%r13), %rdx
incq %rdx
leaq -0x78(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x29ba
movq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x400a
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %r13
cmpq %r13, %rdi
je 0x2fd3
callq 0x2160
incq %rbx
cmpq %rbx, -0xd0(%rbp)
jne 0x2f7d
jmp 0x3184
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0x90(%rbp)
movb $0x0, -0x88(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rdi
leaq 0x5227(%rip), %rdx      # 0x8247
movq %rdx, %rsi
callq 0x29ba
movq (%r14,%rbx,8), %r15
movq %r15, %rdi
movl $0x3d, %esi
callq 0x2090
movq %rax, %r13
testq %rax, %rax
jne 0x3051
movq %r15, %rdi
movl $0x3a, %esi
callq 0x2090
movq %rax, %r13
testq %r13, %r13
je 0x30a9
leaq 0x1(%r13), %r15
leaq -0x68(%rbp), %r12
movq %r12, -0x78(%rbp)
movq %r15, %rdi
callq 0x20c0
leaq (%rax,%r13), %rdx
incq %rdx
leaq -0x78(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x29ba
leaq -0xc0(%rbp), %rdi
movq %r14, %rsi
callq 0x2200
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x309d
callq 0x2160
movb $0x0, (%r13)
movq -0xa0(%rbp), %r14
movq (%r14,%rbx,8), %rsi
leaq -0x78(%rbp), %r14
movq %r14, %rdi
leaq -0x29(%rbp), %rdx
callq 0x20a0
leaq -0x98(%rbp), %rdi
movq %r14, %rsi
callq 0x2200
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %r13
cmpq %r13, %rdi
movq -0x38(%rbp), %r15
je 0x30e2
callq 0x2160
movq 0x50(%r15), %rdi
movq 0x58(%r15), %rsi
leaq -0x98(%rbp), %rdx
callq 0x420f
movq -0xa0(%rbp), %r14
cmpq 0x58(%r15), %rax
je 0x321e
leaq -0x78(%rbp), %r12
movq %r12, %rdi
leaq -0x98(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x34e2
movq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x433c
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x3142
callq 0x2160
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x3150
callq 0x2160
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x3168
callq 0x2160
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
jne 0x2fce
jmp 0x2fd3
movq 0x50(%r15), %rbx
movq 0x58(%r15), %r12
cmpq %r12, %rbx
je 0x31da
movq -0x38(%rbp), %rax
leaq 0x18(%rax), %r14
leaq -0x78(%rbp), %r15
movq %r13, -0x78(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2c30
movq %r14, %rdi
movq %r15, %rsi
callq 0x4492
testq %rax, %rax
je 0x31ec
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0x31d1
callq 0x2160
addq $0x20, %rbx
cmpq %r12, %rbx
jne 0x319d
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xe0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x2c30
leaq -0xf0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x2e7c
leaq -0x100(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x2c30
leaq -0x110(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x2dc6
movq %rax, %r14
movq -0x110(%rbp), %rdi
cmpq %rbx, %rdi
je 0x328f
callq 0x2160
jmp 0x328f
jmp 0x328c
jmp 0x328c
jmp 0x328c
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x354a
jmp 0x328f
movq %rax, %r14
jmp 0x32e6
movq %rax, %r14
jmp 0x32a7
jmp 0x328c
movq %rax, %r14
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x32a7
callq 0x2160
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
jmp 0x32dc
jmp 0x32d1
movq %rax, %r14
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x32d4
callq 0x2160
jmp 0x32d4
jmp 0x32d1
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x32e6
callq 0x2160
movq %r14, %rdi
callq 0x2290