// File: /workspace/github_cpp_makefile_star2_O3/devaigergely81[P]flex-bison-example/while.cc
// Function: main
int main(int argc, char *argv[]) {
    if(argc != 3) {
        std::cerr << "Usage: " << argv[0] << " (-c|-i) inputfile" << std::endl;
        exit(1);
    }
    
    if(std::string(argv[1]) == "-c") {
        current_mode = compiler;
    } else if(std::string(argv[1]) == "-i") {
        current_mode = interpreter;
    } else {
        std::cerr << "Usage: " << argv[0] << "(-c|-i) inputfile" << std::endl;
        exit(1);
    }
    
    std::ifstream input(argv[2]);
    if(!input) {
        std::cerr << "Cannot open input file: " << argv[2] << std::endl;
        exit(1);
    }
    
    lexer = new yyFlexLexer(&input);
    yy::parser parser;
    parser.parse();
    delete lexer;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x50f5
movq 0x8(%rbx), %rsi
leaq -0x248(%rbp), %r15
leaq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x51a0
leaq 0x7906(%rip), %rsi      # 0xc8b8
movq %r15, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x238(%rbp), %r12
cmpq %r12, %rdi
je 0x4fdb
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x3240
testl %r14d, %r14d
je 0x504d
movq 0x8(%rbx), %rsi
leaq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x51a0
leaq 0x78c4(%rip), %rsi      # 0xc8bb
movq %r15, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x5019
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x3240
movl $0x1, %eax
testl %r14d, %r14d
je 0x504f
movq 0xcfc6(%rip), %rdi      # 0x11ff0
leaq 0x786c(%rip), %rsi      # 0xc89d
callq 0x3220
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0x785e(%rip), %rsi      # 0xc8a6
jmp 0x511a
xorl %eax, %eax
leaq 0xd1e6(%rip), %rcx      # 0x1223c
movl %eax, (%rcx)
movq 0x10(%rbx), %rsi
leaq -0x248(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x33a0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x228(%rbp,%rax)
jne 0x5134
movl $0x2e0, %edi            # imm = 0x2E0
callq 0x3230
movq %rax, %r14
leaq -0x248(%rbp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x4360
movq %r14, 0xd17e(%rip)      # 0x12228
leaq -0x40(%rbp), %rdi
callq 0x531c
leaq -0x40(%rbp), %rdi
callq 0x571e
movq 0xd165(%rip), %rdi      # 0x12228
testq %rdi, %rdi
je 0x50ce
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x40(%rbp), %rdi
callq 0x533a
leaq -0x248(%rbp), %rdi
callq 0x3090
xorl %eax, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xcef4(%rip), %rdi      # 0x11ff0
leaq 0x779a(%rip), %rsi      # 0xc89d
callq 0x3220
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0x778b(%rip), %rsi      # 0xc8a5
movq %rax, %rdi
callq 0x3220
movq %rax, %rdi
callq 0x3130
movl $0x1, %edi
callq 0x3290
movq 0xceb5(%rip), %rdi      # 0x11ff0
leaq 0x777c(%rip), %rsi      # 0xc8be
movl $0x18, %edx
callq 0x3270
movq 0x10(%rbx), %rsi
movq 0xce99(%rip), %rdi      # 0x11ff0
callq 0x3220
movq %rax, %rdi
callq 0x3130
jmp 0x512a
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x533a
jmp 0x518b
jmp 0x5188
movq %rax, %rbx
movl $0x2e0, %esi            # imm = 0x2E0
movq %r14, %rdi
callq 0x3240
jmp 0x518b
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3380
nop