// File: /workspace/github_cpp_makefile_star2_O2/KJTang[P]SimpleCompiler/AST.cpp
// Function: BinaryExprAST::eval[abi:cxx11]()
std::string BinaryExprAST::eval() {
    std::string str = "";
    switch (mOpr) {
        case '+': {
            str += LHS->eval() + RHS->eval() + "ADD" + insEnd;
            break;
        }
        case '-': {
            str += LHS->eval() + RHS->eval() + "SUB" + insEnd;
            break;
        }
        case '*': {
            str += LHS->eval() + RHS->eval() + "MUL" + insEnd;
            break;
        }
        case '/': {
            str += LHS->eval() + RHS->eval() + "DIV" + insEnd;
            break;
        }
        case '=': {
            str += RHS->eval() + "SAVE " + LHS->eval().substr(5);
            break;
        }
        case '>': {
            str += LHS->eval() + RHS->eval() + "GT" + insEnd;
            break;
        }
        case '<': {
            str += LHS->eval() + RHS->eval() + "LT" + insEnd;
            break;
        }
        case (int)Token::OP_GTE: {
            str += LHS->eval() + RHS->eval() + "GTE" + insEnd;
            break;
        }
        case (int)Token::OP_LTE: {
            str += LHS->eval() + RHS->eval() + "LTE" + insEnd;
            break;
        }
        case (int)Token::OP_EQU: {
            str += LHS->eval() + RHS->eval() + "EQU" + insEnd;
            break;
        }
        case (int)Token::OP_NE: {
            str += LHS->eval() + RHS->eval() + "NE" + insEnd;
            break;
        }
        // case ',': {
        //     str = LHS->eval() , RHS->eval();
        //     break;
        // }
        default: {
            std::cout<<"Unknown BinaryExprAST opr: "<<mOpr<<std::endl;
            break;
        }
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x668a(%rip), %rsi      # 0xc20f
leaq -0x30(%rbp), %rdx
callq 0x30d0
movl 0xc(%r14), %eax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
jbe 0x5c2c
leal -0x2a(%rax), %ecx
cmpl $0x5, %ecx
ja 0x5cae
leaq 0x6583(%rip), %rax      # 0xc134
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x6442(%rip), %rdx      # 0xc033
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc5ed(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
leaq 0x64f1(%rip), %rax      # 0xc124
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x63ce(%rip), %rdx      # 0xc041
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc56b(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
cmpl $0x3c, %eax
je 0x600c
cmpl $0x3d, %eax
je 0x60bb
cmpl $0x3e, %eax
jne 0x5d37
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x633f(%rip), %rdx      # 0xc03b
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc4e2(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0xc292(%rip), %rdi      # 0x11fd0
leaq 0x6509(%rip), %rsi      # 0xc24e
callq 0x31d0
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x3340
movq %rax, %rdi
callq 0x3110
jmp 0x60ac
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x6295(%rip), %rdx      # 0xc02f
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc444(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x621f(%rip), %rdx      # 0xc02b
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc3d2(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x61b9(%rip), %rdx      # 0xc037
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc360(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x6159(%rip), %rdx      # 0xc049
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc2ee(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x60eb(%rip), %rdx      # 0xc04d
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc27c(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x6071(%rip), %rdx      # 0xc045
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc20a(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x6079
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *0x18(%rax)
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x6e9f
leaq 0x5ffb(%rip), %rdx      # 0xc03e
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
leaq 0xc19b(%rip), %rdx      # 0x121f8
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6e00
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
leaq -0x30(%rbp), %rdi
callq 0x33a8
leaq -0xb0(%rbp), %rdi
callq 0x33a8
leaq -0x90(%rbp), %rdi
callq 0x33a8
leaq -0x50(%rbp), %rdi
callq 0x33a8
leaq -0x70(%rbp), %rdi
callq 0x33a8
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %rdi
callq *0x18(%rax)
leaq 0x6175(%rip), %rdx      # 0xc248
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6f10
movq 0x10(%r14), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x18(%rax)
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x5
popq %rdx
pushq $-0x1
popq %rcx
callq 0x3200
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x6e9f
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x3390
leaq -0x30(%rbp), %rdi
callq 0x33a8
leaq -0x70(%rbp), %rdi
callq 0x33a8
leaq -0x50(%rbp), %rdi
callq 0x33a8
leaq -0xb0(%rbp), %rdi
callq 0x33a8
leaq -0x90(%rbp), %rdi
jmp 0x60a7
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x33a8
jmp 0x6175
jmp 0x621b
jmp 0x621b
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x33a8
jmp 0x618d
jmp 0x622f
jmp 0x622f
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x33a8
jmp 0x61a5
jmp 0x6246
jmp 0x6246
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x33a8
jmp 0x61c0
jmp 0x625d
jmp 0x625d
movq %rax, %r14
leaq -0x90(%rbp), %rdi
jmp 0x6278
jmp 0x6271
jmp 0x6271
jmp 0x6287
jmp 0x6287
jmp 0x6287
jmp 0x621b
jmp 0x621b
jmp 0x621b
jmp 0x621b
jmp 0x622f
jmp 0x622f
jmp 0x622f
jmp 0x622f
jmp 0x6246
jmp 0x6246
jmp 0x6246
jmp 0x6246
jmp 0x625d
jmp 0x625d
jmp 0x625d
jmp 0x625d
jmp 0x6271
jmp 0x6271
jmp 0x6271
jmp 0x6271
jmp 0x6287
jmp 0x6287
jmp 0x6287
jmp 0x6287
jmp 0x621b
jmp 0x621b
jmp 0x621b
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x33a8
jmp 0x6232
jmp 0x622f
jmp 0x622f
jmp 0x622f
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x33a8
jmp 0x6249
jmp 0x6246
jmp 0x6246
jmp 0x6246
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x33a8
jmp 0x6260
jmp 0x625d
jmp 0x625d
jmp 0x625d
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x33a8
jmp 0x6274
jmp 0x6271
jmp 0x6271
jmp 0x6271
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x33a8
jmp 0x628a
jmp 0x6287
jmp 0x6287
jmp 0x6287
jmp 0x6287
movq %rax, %r14
movq %rbx, %rdi
callq 0x33a8
movq %r14, %rdi
callq 0x3350