// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/src/main.cpp
// Function: main
int main(int argc, char ** argv)
{
    errorHandler EH;

    std::map< std::string, int > PROGS;

    PROGS[ "annotate" ] = 1;
    PROGS[ "varcall"  ] = 2;

    if(argc < 2){
        EH.croak(EH.USAGE, true);
    }

    std::string prog = argv[1];

    if(PROGS.find(prog) == PROGS.end()){
        EH.croak(EH.BAD_COMMAND_LINE_OPTION, true, prog);
    }

    switch(PROGS[argv[1]]){
    case 1:
        {
            return annotate((std::string)argv[2],
                            (std::string)argv[3],
                            (std::string)argv[4]);
            break;
        }
    case 2:
        {
            std::string bf = argv[2];
            std::string tf = argv[3];
            std::string qf = argv[4];

            return varcall(bf, tf, qf);
            break;
        }

    default:
        {
            /* should never hit here */
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x140(%rsp), %rdi
callq 0xc788
leaq 0x98(%rsp), %r14
andl $0x0, (%r14)
andq $0x0, 0x8(%r14)
movq %r14, 0x10(%r14)
movq %r14, 0x18(%r14)
andq $0x0, 0x20(%r14)
leaq 0x2244f(%rip), %rsi     # 0x2f175
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x96f2
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd030
movl $0x1, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x58f8
leaq 0x224ec(%rip), %rsi     # 0x2f24a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x96f2
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd030
movl $0x2, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x58f8
cmpl $0x1, %ebp
jg 0xcda7
leaq 0x140(%rsp), %rdi
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0xc93a
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x96f2
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd49e
cmpq %r14, %rax
jne 0xce0b
leaq 0x120(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5600
leaq 0x140(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
leaq 0x120(%rsp), %rcx
callq 0xc968
leaq 0x120(%rsp), %rdi
callq 0x58f8
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x96f2
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xd030
movl (%rax), %r14d
leaq 0x30(%rsp), %rdi
callq 0x58f8
cmpl $0x1, %r14d
je 0xcebc
xorl %ebp, %ebp
cmpl $0x2, %r14d
jne 0xcf44
movq 0x10(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x96f2
movq 0x18(%rbx), %rsi
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x96f2
movq 0x20(%rbx), %rsi
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x96f2
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0xe557
movl %eax, %ebp
leaq 0x70(%rsp), %rdi
callq 0x58f8
leaq 0x50(%rsp), %rdi
callq 0x58f8
leaq 0x30(%rsp), %rdi
jmp 0xcf3f
movq 0x10(%rbx), %rsi
leaq 0x100(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x96f2
movq 0x18(%rbx), %rsi
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x96f2
movq 0x20(%rbx), %rsi
leaq 0xc0(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x96f2
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x91ea
movl %eax, %ebp
leaq 0xc0(%rsp), %rdi
callq 0x58f8
leaq 0xe0(%rsp), %rdi
callq 0x58f8
leaq 0x100(%rsp), %rdi
callq 0x58f8
leaq 0x10(%rsp), %rdi
callq 0x58f8
leaq 0x90(%rsp), %rdi
callq 0xd096
leaq 0x140(%rsp), %rdi
callq 0x9c2c
movl %ebp, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x58f8
jmp 0xcf9a
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x58f8
jmp 0xcfac
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x58f8
jmp 0xcfbb
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x58f8
jmp 0xcfdf
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
jmp 0xcfe4
jmp 0xcfdc
jmp 0xcff5
jmp 0xcff5
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
jmp 0xcfe4
jmp 0xcff5
jmp 0xd004
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x58f8
jmp 0xcff8
jmp 0xcff5
jmp 0xcff5
jmp 0xd004
jmp 0xcff5
jmp 0xd004
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x58f8
jmp 0xd007
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xd096
leaq 0x140(%rsp), %rdi
callq 0x9c2c
movq %rbx, %rdi
callq 0x57d0
nop