// File: /workspace/github_cpp_makefile_star2_O2/KJTang[P]SimpleCompiler/AST.cpp
// Function: FunctionAST::eval[abi:cxx11]()
std::string FunctionAST::eval() {
    std::string argsStr;
    for (auto it = mArgs.rbegin(); it != mArgs.rend(); ++it) {
        // TODO: only "int" here, maybe more type in the future
        if (it->first == Token::TYPE_INT) {
            argsStr += "INT " + it->second + insEnd + "SAVE " + it->second + insEnd;
        }
    }
    return "FUNC " + mFunc.second + insEnd + argsStr + blockAST->eval() + "ENDF" + insEnd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
leaq -0xf0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, -0x38(%rbp)
movb $0x0, (%rax)
movq %rsi, -0x30(%rbp)
movq 0x40(%rsi), %rax
leaq -0xc0(%rbp), %r13
movq %rax, %rbx
movq -0x30(%rbp), %rax
cmpq 0x38(%rax), %rbx
je 0x6c5b
leaq -0x28(%rbx), %rax
cmpl $0xa, -0x28(%rbx)
jne 0x6b7e
movq %rax, -0x40(%rbp)
addq $-0x20, %rbx
movq %r13, %rdi
leaq 0x5698(%rip), %rsi      # 0xc243
movq %rbx, %rdx
callq 0x6e29
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movq %r13, %r12
movq %r13, %rsi
leaq 0xb631(%rip), %r13      # 0x121f8
movq %r13, %rdx
callq 0x6e00
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x5668(%rip), %rdx      # 0xc248
callq 0x6f10
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6e00
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6e00
leaq -0x100(%rbp), %rdi
movq %r15, %rsi
callq 0x3390
leaq -0x80(%rbp), %rbx
movq %r15, %rdi
callq 0x33a8
leaq -0xa0(%rbp), %rdi
callq 0x33a8
movq %rbx, %rdi
callq 0x33a8
leaq -0x60(%rbp), %rdi
callq 0x33a8
movq %r12, %rdi
callq 0x33a8
movq %r12, %r13
movq -0x40(%rbp), %rax
jmp 0x6b7e
movq -0x30(%rbp), %rax
leaq 0x18(%rax), %rdx
leaq 0x5624(%rip), %rsi      # 0xc28e
leaq -0xc0(%rbp), %rdi
callq 0x6e29
leaq 0xb57b(%rip), %rdx      # 0x121f8
leaq -0x60(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x6e00
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x6e00
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rsi
movq (%rsi), %rax
leaq -0x120(%rbp), %rdi
callq *0x18(%rax)
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x6e9f
movq -0x38(%rbp), %rbx
leaq 0x53a8(%rip), %rdx      # 0xc080
leaq -0xe0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6f10
leaq 0xb506(%rip), %rdx      # 0x121f8
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x6e00
leaq -0xe0(%rbp), %rdi
callq 0x33a8
leaq -0xa0(%rbp), %rdi
callq 0x33a8
leaq -0x120(%rbp), %rdi
callq 0x33a8
leaq -0x80(%rbp), %rdi
callq 0x33a8
leaq -0x60(%rbp), %rdi
callq 0x33a8
leaq -0xc0(%rbp), %rdi
callq 0x33a8
leaq -0x100(%rbp), %rdi
callq 0x33a8
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x33a8
jmp 0x6d78
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x33a8
jmp 0x6d89
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x6dc9
jmp 0x6dae
jmp 0x6d9f
jmp 0x6da9
jmp 0x6d9a
movq %rax, %rbx
jmp 0x6dec
movq %rax, %rbx
jmp 0x6dd7
movq %rax, %rbx
jmp 0x6dc2
movq %rax, %rbx
jmp 0x6de0
movq %rax, %rbx
jmp 0x6dce
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x33a8
leaq -0xa0(%rbp), %rdi
callq 0x33a8
leaq -0x80(%rbp), %rdi
callq 0x33a8
leaq -0x60(%rbp), %rdi
callq 0x33a8
leaq -0xc0(%rbp), %rdi
callq 0x33a8
leaq -0x100(%rbp), %rdi
callq 0x33a8
movq %rbx, %rdi
callq 0x3350