// File: CoinXu[P]reviser-compiler/src/command_line_interface.cpp
// Function: reviser::CommandLineInterface::ParseArguments(int, char const* const*)
bool CommandLineInterface::ParseArguments(int argc, const char* const argv[]) {
    executable_name = argv[0];

    for (int i = 1; i < argc; i++) {
      string name, value;

      if (ParseArgument(argv[i], &name, &value)) {
        if (i + 1 == argc || argv[i + 1][0] == '-') {
          cerr << "missing value for flag: " << name << endl;
          return false;
        } else {
          i++;
          value = argv[i];
        }
      }

      if (!InterpretArgument(name, value)) {
        return false;
      }
    }

    if (input_files.empty()) {
      cerr << "missing input file." << endl;
      return false;
    }

    if (output_directives.empty()) {
      cerr << "missing output directives." << endl;
      return false;
    }

    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rsi
addq $0xa0, %rdi
callq 0x99630
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xa0008
leaq -0x48(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x99650
leaq -0x68(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x99650
movq -0x80(%rbp), %rdi
movq -0x98(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rsi
movq (%rax,%rsi,8), %rsi
callq 0xa04a0
movb %al, -0x81(%rbp)
jmp 0x9fecf
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x9fede
jmp 0x9ff9f
movl -0x24(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
je 0x9ff02
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x9ff7c
movq 0x900d7(%rip), %rdi     # 0x12ffe0
leaq 0x5f11f(%rip), %rsi     # 0xff02f
callq 0x99470
movq %rax, -0xa0(%rbp)
jmp 0x9ff1e
movq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x99410
movq %rax, -0xa8(%rbp)
jmp 0x9ff37
movq -0xa8(%rbp), %rdi
movq 0x90023(%rip), %rsi     # 0x12ff68
callq 0x994c0
jmp 0x9ff4c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x78(%rbp)
jmp 0x9ffd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x992c0
leaq -0x48(%rbp), %rdi
callq 0x992c0
jmp 0xa0090
movl -0x24(%rbp), %eax
incl %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0x68(%rbp), %rdi
callq 0x99630
jmp 0x9ff9b
jmp 0x9ff9d
jmp 0x9ff9f
movq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xa0710
movb %al, -0xa9(%rbp)
jmp 0x9ffb8
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x9ffd1
jmp 0x9ffc4
movb $0x0, -0x1(%rbp)
movl $0x1, -0x78(%rbp)
jmp 0x9ffd8
movl $0x0, -0x78(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x992c0
leaq -0x48(%rbp), %rdi
callq 0x992c0
movl -0x78(%rbp), %eax
testl %eax, %eax
je 0x9fff8
jmp 0x9fff3
jmp 0xa0082
jmp 0x9fffa
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9fe78
movq -0x80(%rbp), %rdi
addq $0x48, %rdi
callq 0xa11a0
testb $0x1, %al
jne 0xa001b
jmp 0xa0043
movq 0x8ffbe(%rip), %rdi     # 0x12ffe0
leaq 0x5f01f(%rip), %rsi     # 0xff048
callq 0x99470
movq %rax, %rdi
movq 0x8ff30(%rip), %rsi     # 0x12ff68
callq 0x994c0
movb $0x0, -0x1(%rbp)
jmp 0xa0082
movq -0x80(%rbp), %rdi
addq $0x30, %rdi
callq 0xa11e0
testb $0x1, %al
jne 0xa0056
jmp 0xa007e
movq 0x8ff83(%rip), %rdi     # 0x12ffe0
leaq 0x5eff8(%rip), %rsi     # 0xff05c
callq 0x99470
movq %rax, %rdi
movq 0x8fef5(%rip), %rsi     # 0x12ff68
callq 0x994c0
movb $0x0, -0x1(%rbp)
jmp 0xa0082
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x99840
nopl (%rax)