// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/command_line_interface.cpp
// Function: reviser::CommandLineInterface::Run(int, char const* const*)
int CommandLineInterface::Run(int argc, const char* const argv[]) {
    if (!ParseArguments(argc, argv)) {
      return -1;
    }

    for (int i = 0; i < input_files.size(); i++) {
      for (int j = 0; j < output_directives.size(); j++) {
        OutputDirective directive = output_directives.at(j);
        GeneratorMap::const_iterator iter = generators.find(directive.name);
        Printer* printer;


        if (printer_name == "fs") {
          string output = io::absolute(directive.output_location)
            ? directive.output_location
            : io::join(string(getenv("PWD")), directive.output_location);
          string file_name = io::basename(input_files.at(i)) + "." + iter->second.output_file_suffix;
          printer = new PrinterFile(io::join(output, file_name));
        } else if (printer_name == "terminal") {
          printer = new PrinterTerminal();
        } else {
          cerr << "unkown printer type name: " << printer_name << endl;
          return -1;
        }

        Tokenizer tokenizer(MakeSourceCodeInputs(input_files.at(i)));
        Parser parse(&tokenizer, iter->second.generator, printer);
        parse.Program();
        delete printer;
      }
    }

    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rdi, %r15
callq 0x38618
testb %al, %al
je 0x384ea
leaq 0x48(%r15), %rax
movq %rax, -0x40(%rbp)
leaq 0x30(%r15), %rax
movq %rax, -0x58(%rbp)
leaq 0x80(%r15), %rax
xorl %ebx, %ebx
leaq -0xa8(%rbp), %r14
leaq -0x2b0(%rbp), %r13
leaq -0x1a8(%rbp), %r12
movq %rax, -0x38(%rbp)
movq %r15, -0x50(%rbp)
movq 0x50(%r15), %rcx
subq 0x48(%r15), %rcx
sarq $0x5, %rcx
cmpq %rbx, %rcx
jbe 0x3852a
movq %rcx, -0x48(%rbp)
xorl %esi, %esi
movq %rbx, -0x30(%rbp)
movq 0x38(%r15), %rax
subq 0x30(%r15), %rax
cqto
pushq $0x48
popq %rcx
idivq %rcx
cmpq %rsi, %rax
jbe 0x384e2
movq -0x58(%rbp), %rdi
movq %rsi, -0x60(%rbp)
callq 0x38e86
movq %r14, %rdi
movq %rax, %rsi
callq 0x38ea4
movq %r15, %rdi
movq %r14, %rsi
callq 0x39616
movq %rax, %r15
movq -0x38(%rbp), %r14
movq %r14, %rdi
leaq 0x1ecd9(%rip), %rsi     # 0x5700d
callq 0x38ee6
testb %al, %al
je 0x3835f
leaq -0x80(%rbp), %rdi
callq 0x42697
leaq -0x128(%rbp), %rbx
testb %al, %al
je 0x3838e
movq %r13, %rdi
leaq -0x80(%rbp), %rsi
callq 0x35470
jmp 0x383c6
movq %r14, %rdi
leaq 0x1ec9b(%rip), %rsi     # 0x57004
callq 0x38ee6
testb %al, %al
je 0x384ef
pushq $0x8
popq %rdi
callq 0x35330
movq %rax, %r14
movq %rax, %rdi
callq 0x4f1d0
jmp 0x3845b
leaq 0x1ec7b(%rip), %rdi     # 0x57010
callq 0x353f0
movq %r12, %r14
movq %r12, %rdi
movq %rax, %rsi
leaq -0xc8(%rbp), %rdx
callq 0x35130
movq %r13, %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rdx
callq 0x4252c
movq %r14, %rdi
callq 0x35180
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x38f48
movq %rbx, %rdi
movq %rax, %rsi
callq 0x426cf
leaq -0xc8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x1ed5a(%rip), %rdx     # 0x5714c
callq 0x38f1f
leaq 0x68(%r15), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x38ef6
movq %r14, %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35180
movl $0x228, %edi            # imm = 0x228
callq 0x35330
movq %rax, %r14
leaq -0x108(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4252c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4f020
movq %rbx, %rdi
callq 0x35180
movq %r12, %rdi
callq 0x35180
movq %r13, %rdi
callq 0x35180
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x38f48
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rdx
callq 0x38778
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3d540
movq %rbx, %rdi
callq 0x35180
movq 0x40(%r15), %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x3ab9c
movq %r12, %rdi
callq 0x3ac44
movq %r14, %rdi
callq 0x35310
movq %r12, %rdi
callq 0x3ac20
movq %r13, %rdi
callq 0x3d8c0
leaq -0xa8(%rbp), %r14
movq %r14, %rdi
callq 0x38f6a
movq -0x60(%rbp), %rsi
incq %rsi
movq -0x30(%rbp), %rbx
movq -0x50(%rbp), %r15
jmp 0x382e7
incq %rbx
jmp 0x382c8
pushq $-0x1
popq %rax
jmp 0x38531
movq 0x33aea(%rip), %rdi     # 0x6bfe0
leaq 0x1eb17(%rip), %rsi     # 0x57014
callq 0x35320
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0x352e0
movq %rax, %rdi
callq 0x351c0
leaq -0xa8(%rbp), %rdi
callq 0x38f6a
movq -0x30(%rbp), %rbx
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq %rcx, %rbx
sbbl %eax, %eax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38600
jmp 0x38600
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
jmp 0x385f7
movq %rax, %rbx
movq %r14, %rdi
callq 0x35310
jmp 0x38603
jmp 0x38600
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x35180
jmp 0x38596
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x35180
jmp 0x385a7
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
jmp 0x385b6
movq %rax, %rbx
jmp 0x385af
movq %rax, %rbx
movq %r14, %rdi
callq 0x35310
leaq -0x1a8(%rbp), %rdi
callq 0x35180
jmp 0x385f0
jmp 0x38600
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
callq 0x3ac20
jmp 0x385d3
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x3d8c0
jmp 0x38603
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
jmp 0x385f7
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x35180
jmp 0x38603
jmp 0x38600
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x38f6a
movq %rbx, %rdi
callq 0x355f0
nop