// File: /workspace/github_cpp_makefile_star2_O1/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 0x5171
movq 0x8(%rbx), %rsi
leaq -0x248(%rbp), %r15
leaq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x521c
leaq 0x788a(%rip), %rsi      # 0xc8b8
movq %r15, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x238(%rbp), %r12
cmpq %r12, %rdi
je 0x5057
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x3240
testl %r14d, %r14d
je 0x50c9
movq 0x8(%rbx), %rsi
leaq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x521c
leaq 0x7848(%rip), %rsi      # 0xc8bb
movq %r15, %rdi
callq 0x30b0
movl %eax, %r14d
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x5095
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x3240
movl $0x1, %eax
testl %r14d, %r14d
je 0x50cb
movq 0xcf4a(%rip), %rdi      # 0x11ff0
leaq 0x77f0(%rip), %rsi      # 0xc89d
callq 0x3220
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0x77e2(%rip), %rsi      # 0xc8a6
jmp 0x5196
xorl %eax, %eax
leaq 0xd16a(%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 0x51b0
movl $0x2e0, %edi            # imm = 0x2E0
callq 0x3230
movq %rax, %r14
leaq -0x248(%rbp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x43ac
movq %r14, 0xd102(%rip)      # 0x12228
leaq -0x40(%rbp), %rdi
callq 0x5390
leaq -0x40(%rbp), %rdi
callq 0x5798
movq 0xd0e9(%rip), %rdi      # 0x12228
testq %rdi, %rdi
je 0x514a
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x40(%rbp), %rdi
callq 0x53ae
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 0xce78(%rip), %rdi      # 0x11ff0
leaq 0x771e(%rip), %rsi      # 0xc89d
callq 0x3220
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0x770f(%rip), %rsi      # 0xc8a5
movq %rax, %rdi
callq 0x3220
movq %rax, %rdi
callq 0x3130
movl $0x1, %edi
callq 0x3290
movq 0xce39(%rip), %rdi      # 0x11ff0
leaq 0x7700(%rip), %rsi      # 0xc8be
movl $0x18, %edx
callq 0x3270
movq 0x10(%rbx), %rsi
movq 0xce1d(%rip), %rdi      # 0x11ff0
callq 0x3220
movq %rax, %rdi
callq 0x3130
jmp 0x51a6
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x53ae
jmp 0x5207
jmp 0x5204
movq %rax, %rbx
movl $0x2e0, %esi            # imm = 0x2E0
movq %r14, %rdi
callq 0x3240
jmp 0x5207
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3380
nop