LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: KJTang[P]SimpleCompiler/AST.cpp
// Function: AssignmentAST::eval[abi:cxx11]()
std::string AssignmentAST::eval() {
    std::string str;
    for (auto it = mVarList.begin(); it != mVarList.end(); ++it) {
        str += "INT " + static_cast<VariableAST*>(static_cast<BinaryExprAST*>(*it)->getLNode())->getName()
         + insEnd + (*it)->eval();
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x33a0
movq -0xc0(%rbp), %rdi
addq $0x10, %rdi
callq 0xddb0
movq %rax, -0x20(%rbp)
movq -0xc0(%rbp), %rdi
addq $0x10, %rdi
callq 0xde20
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xdde0
testb $0x1, %al
jne 0xb916
jmp 0xba89
leaq -0x20(%rbp), %rdi
callq 0xde50
movq (%rax), %rdi
callq 0xe140
movq %rax, -0xd8(%rbp)
jmp 0xb930
movq -0xd8(%rbp), %rdi
callq 0xe160
movq %rax, -0xe0(%rbp)
jmp 0xb945
movq -0xe0(%rbp), %rdx
leaq 0xf9bc(%rip), %rsi      # 0x1b30f
leaq -0x88(%rbp), %rdi
callq 0xdf60
jmp 0xb961
leaq 0x1c938(%rip), %rdx     # 0x282a0
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xdf10
jmp 0xb97a
leaq -0x20(%rbp), %rdi
callq 0xde50
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0xb8(%rbp), %rdi
callq *%rax
jmp 0xb998
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0xe070
jmp 0xb9ae
movq -0xd0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3360
jmp 0xb9c0
leaq -0x48(%rbp), %rdi
callq 0x34f8
leaq -0xb8(%rbp), %rdi
callq 0x34f8
leaq -0x68(%rbp), %rdi
callq 0x34f8
leaq -0x88(%rbp), %rdi
callq 0x34f8
leaq -0x20(%rbp), %rdi
callq 0xde70
jmp 0xb8ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xbaaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xba7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xba72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xba66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x34f8
leaq -0xb8(%rbp), %rdi
callq 0x34f8
leaq -0x68(%rbp), %rdi
callq 0x34f8
leaq -0x88(%rbp), %rdi
callq 0x34f8
jmp 0xbaaf
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xba9f
movq -0xd0(%rbp), %rdi
callq 0x34f8
movq -0xc8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0x34f8
movq -0x90(%rbp), %rdi
callq 0x3470
nopw (%rax,%rax)
// File: KJTang[P]SimpleCompiler/AST.cpp
// Function: BlockAST::eval[abi:cxx11]()
std::string BlockAST::eval() {
    std::string str;
    for (auto it = statements.begin(); it != statements.end(); ++it) {
        str += (*it)->eval();
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x33a0
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0xddb0
movq %rax, -0x20(%rbp)
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0xde20
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xdde0
testb $0x1, %al
jne 0xcc01
jmp 0xcc64
leaq -0x20(%rbp), %rdi
callq 0xde50
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x48(%rbp), %rdi
callq *%rax
jmp 0xcc1c
movq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3360
jmp 0xcc2b
leaq -0x48(%rbp), %rdi
callq 0x34f8
leaq -0x20(%rbp), %rdi
callq 0xde70
jmp 0xcbdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xcc81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x34f8
jmp 0xcc81
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xcc77
movq -0x70(%rbp), %rdi
callq 0x34f8
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x34f8
movq -0x50(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)
// File: KJTang[P]SimpleCompiler/./AST.h
// Function: IfExprAST::~IfExprAST()
~IfExprAST() {
        delete condAST;
        delete ifBlockAST;
        if (elseBlockAST) {
            delete elseBlockAST;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x194dd(%rip), %rcx     # 0x27c38
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xe77a
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xe796
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xe7bf
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xe7bd
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xe7bf
movq -0x18(%rbp), %rdi
callq 0xe3e0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parse()
bool Parser::parse() {
    getNextToken(); // start parsing
    ASTNode *newStat = nullptr;
    while (curToken.first != Token::END_OF_FILE) {
        newStat = this->parseStatement();
        if (newStat) {
            ASTList.push_back(newStat);
        }
    }
    for (auto it = ASTList.begin(); it != ASTList.end(); ++it) {
        #ifdef DEBUG
        std::string temp = (*it)->eval();
        std::cout<<temp<<"<<"<<std::endl;
        asmcode += temp;
        #else
        asmcode += (*it)->eval();
        #endif
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x10070
movq $0x0, -0x10(%rbp)
movq -0x58(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
je 0xecc2
movq -0x58(%rbp), %rdi
callq 0xed70
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xecc0
movq -0x58(%rbp), %rdi
addq $0x18, %rdi
leaq -0x10(%rbp), %rsi
callq 0x100c0
jmp 0xec91
movq -0x58(%rbp), %rdi
addq $0x18, %rdi
callq 0xddb0
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rdi
addq $0x18, %rdi
callq 0xde20
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xdde0
testb $0x1, %al
jne 0xecf7
jmp 0xed52
leaq -0x18(%rbp), %rdi
callq 0xde50
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x40(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq *%rax
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x38, %rdi
callq 0x3360
jmp 0xed27
leaq -0x40(%rbp), %rdi
callq 0x34f8
leaq -0x18(%rbp), %rdi
callq 0xde70
jmp 0xecd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x34f8
jmp 0xed5c
movb $0x1, %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseStatement()
ASTNode *Parser::parseStatement() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseStatement"<<std::endl;
    #endif
    switch (curToken.first) {
        case Token::KEYWORD_IF: {
            return this->parseIfExpr();
        }
        case Token::KEYWORD_WHILE: {
            return this->parseWhileExpr();
        }
        case Token::TYPE_INT: {
            return this->parseDeclaration();
        }
        case Token::KEYWORD_RET: {
            return this->parseFuncReturn();
        }
        default: {
            return this->parseExpression();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x58(%rax), %eax
addl $-0x6, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0xede5
movq -0x18(%rbp), %rax
leaq 0xc5c0(%rip), %rcx      # 0x1b360
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rdi
callq 0xee00
movq %rax, -0x8(%rbp)
jmp 0xedf2
movq -0x20(%rbp), %rdi
callq 0xef00
movq %rax, -0x8(%rbp)
jmp 0xedf2
movq -0x20(%rbp), %rdi
callq 0xef90
movq %rax, -0x8(%rbp)
jmp 0xedf2
movq -0x20(%rbp), %rdi
callq 0xefe0
movq %rax, -0x8(%rbp)
jmp 0xedf2
movq -0x20(%rbp), %rdi
callq 0xf100
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseIfExpr()
ASTNode *Parser::parseIfExpr() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseIfExpr"<<std::endl;
    #endif
    getNextToken(); // eat "if"
    ASTNode *cond = this->parseParenExpr();
    ASTNode *ifblock = this->parseBlock();
    ASTNode *elseblock = nullptr;
    if (curToken.second == "else") {
        getNextToken(); // eat "else"
        if (curToken.second == "if") {  // "else if"
            elseblock = this->parseIfExpr();
        } else {
            elseblock = this->parseBlock();   // "else {}"
        }
    }
    ASTNode *ifExpr = new IfExprAST(cond, ifblock, elseblock);
    return ifExpr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x10070
movq -0x40(%rbp), %rdi
callq 0xf680
movq -0x40(%rbp), %rdi
movq %rax, -0x10(%rbp)
callq 0xf880
movq -0x40(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
addq $0x58, %rdi
addq $0x8, %rdi
leaq 0xc295(%rip), %rsi      # 0x1b0e3
callq 0xa8e0
testb $0x1, %al
jne 0xee59
jmp 0xee9e
movq -0x40(%rbp), %rdi
callq 0x10070
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
addq $0x8, %rdi
leaq 0xc26b(%rip), %rsi      # 0x1b0e0
callq 0xa8e0
testb $0x1, %al
jne 0xee80
jmp 0xee8f
movq -0x40(%rbp), %rdi
callq 0xee00
movq %rax, -0x20(%rbp)
jmp 0xee9c
movq -0x40(%rbp), %rdi
callq 0xf880
movq %rax, -0x20(%rbp)
jmp 0xee9e
movl $0x28, %edi
callq 0x3290
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10550
jmp 0xeec5
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x3270
movq -0x30(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseWhileExpr()
ASTNode *Parser::parseWhileExpr() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseWhileExpr"<<std::endl;
    #endif
    getNextToken(); // eat "while"
    ASTNode *cond = this->parseParenExpr();
    ASTNode *block = this->parseBlock();
    ASTNode *whileExpr = new WhileExprAST(cond, block);
    return whileExpr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x10070
movq -0x40(%rbp), %rdi
callq 0xf680
movq -0x40(%rbp), %rdi
movq %rax, -0x10(%rbp)
callq 0xf880
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x3290
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x105b0
jmp 0xef56
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3270
movq -0x28(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseDeclaration()
ASTNode *Parser::parseDeclaration() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseDeclaration"<<std::endl;
    #endif
    Token aheadToken = lookAheadToken(2).first;
    // function declaration
    if (aheadToken == static_cast<Token>('(')) {
        return this->parseFuncDeclaration();
    }
    // variable declaration
    else {
        return this->parseVarDeclaration();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0x2, %esi
callq 0x10600
movl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x28, -0x14(%rbp)
jne 0xefc8
movq -0x20(%rbp), %rdi
callq 0xf960
movq %rax, -0x8(%rbp)
jmp 0xefd5
movq -0x20(%rbp), %rdi
callq 0xfbf0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseFuncReturn()
ASTNode *Parser::parseFuncReturn() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseFuncReturn"<<std::endl;
    #endif
    getNextToken(); // eat "return"
    ASTNode *retExpr = this->parseExpression();
    if (!retExpr) {
        retExpr = new NumberAST("0");
    }
    return new ReturnAST(retExpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x10070
movq -0x50(%rbp), %rdi
callq 0xf100
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xf0b4
movl $0x30, %edi
callq 0x3290
movq %rax, -0x60(%rbp)
movb $0x1, -0x45(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3480
movq -0x58(%rbp), %rdx
leaq 0xc437(%rip), %rsi      # 0x1b472
leaq -0x30(%rbp), %rdi
callq 0x3390
jmp 0xf046
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10130
jmp 0xf055
movq -0x60(%rbp), %rax
movb $0x0, -0x45(%rbp)
movq %rax, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x34f8
leaq -0x31(%rbp), %rdi
callq 0x3300
jmp 0xf0b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xf098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x34f8
leaq -0x31(%rbp), %rdi
callq 0x3300
testb $0x1, -0x45(%rbp)
jne 0xf0a9
jmp 0xf0b2
movq -0x60(%rbp), %rdi
callq 0x3270
jmp 0xf0f2
movl $0x18, %edi
callq 0x3290
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rsi
callq 0x107c0
jmp 0xf0d3
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x3270
movq -0x40(%rbp), %rdi
callq 0x3470
nopl (%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseNumber()
ASTNode *Parser::parseNumber() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseNumber"<<std::endl;
    #endif
    // ASTNode *result = new NumberAST(strtod(curToken.second.c_str(), nullptr));
    ASTNode *result = new NumberAST(curToken.second);
    getNextToken();
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x30, %edi
callq 0x3290
movq -0x30(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
addq $0x60, %rsi
callq 0x10130
jmp 0xf647
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x10070
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x3270
movq -0x18(%rbp), %rdi
callq 0x3470
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseParenExpr()
ASTNode *Parser::parseParenExpr() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseParenExpr"<<std::endl;
    #endif
    getNextToken();  // eat '('
    ASTNode *expr = this->parseExpression();
    if (curToken.first != static_cast<Token>(')')) {
        std::cout<<"expected \')\'"<<std::endl;
    }
    getNextToken();  // eat ')'
    return expr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x10070
movq -0x18(%rbp), %rdi
callq 0xf100
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x10(%rbp)
cmpl $0x29, 0x58(%rax)
je 0xf6d5
movq 0x18916(%rip), %rdi     # 0x27fd0
leaq 0xbda4(%rip), %rsi      # 0x1b465
callq 0x3280
movq %rax, %rdi
movq 0x188e8(%rip), %rsi     # 0x27fb8
callq 0x32e0
movq -0x18(%rbp), %rdi
callq 0x10070
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseIdentifier()
ASTNode *Parser::parseIdentifier() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseIdentifier"<<std::endl;
    #endif
    std::string identifier = curToken.second;
    getNextToken();
    // variable name
    if (curToken.first != static_cast<Token>('(')) {
        return new VariableAST(identifier);
    }
    // function call
    getNextToken(); // eat '('
    std::vector<ASTNode*> args;
    while (true) {
        ASTNode *arg = parseExpression();
        if (arg) {
            args.push_back(arg);
        }
        if (curToken.first == static_cast<Token>(')')) {
            getNextToken(); // eat ')'
            break;
        }
    }
    return new CallFuncAST(identifier, args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x68(%rbp)
addq $0x60, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3120
movq -0x68(%rbp), %rdi
callq 0x10070
jmp 0xf71f
movq -0x68(%rbp), %rax
cmpl $0x28, 0x58(%rax)
je 0xf787
movl $0x30, %edi
callq 0x3290
movq %rax, -0x70(%rbp)
jmp 0xf739
movq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x101a0
jmp 0xf748
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xf850
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xf866
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3270
jmp 0xf866
movq -0x68(%rbp), %rdi
callq 0x10070
jmp 0xf792
leaq -0x58(%rbp), %rdi
callq 0x5680
jmp 0xf79d
movq -0x68(%rbp), %rdi
callq 0xf100
movq %rax, -0x78(%rbp)
jmp 0xf7ac
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xf7da
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x100c0
jmp 0xf7ca
jmp 0xf7da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xf845
movq -0x68(%rbp), %rax
cmpl $0x29, 0x58(%rax)
jne 0xf7f1
movq -0x68(%rbp), %rdi
callq 0x10070
jmp 0xf7ef
jmp 0xf7f3
jmp 0xf79b
movl $0x48, %edi
callq 0x3290
movq %rax, -0x80(%rbp)
jmp 0xf803
movq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x10210
jmp 0xf816
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x40(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x57e0
jmp 0xf850
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3270
leaq -0x58(%rbp), %rdi
callq 0x57e0
jmp 0xf866
leaq -0x30(%rbp), %rdi
callq 0x34f8
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x34f8
movq -0x38(%rbp), %rdi
callq 0x3470
nopl (%rax,%rax)
// File: KJTang[P]SimpleCompiler/Parser.cpp
// Function: Parser::parseBlock()
ASTNode *Parser::parseBlock() {
    #ifdef DEBUG
    std::cout<<curToken.second<<"\tparseBlock"<<std::endl;
    #endif
    getNextToken(); // eat '{'
    std::vector<ASTNode*> stats;
    while (curToken.first != static_cast<Token>('}')) {
        ASTNode *newStat = this->parseStatement();
        if (newStat) {
            stats.push_back(newStat);
        }
    }
    ASTNode *block = new BlockAST(stats);
    getNextToken(); // eat '}'
    return block;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x10070
leaq -0x20(%rbp), %rdi
callq 0x5680
movq -0x48(%rbp), %rax
cmpl $0x7d, 0x58(%rax)
je 0xf8eb
movq -0x48(%rbp), %rdi
callq 0xed70
movq %rax, -0x50(%rbp)
jmp 0xf8bb
movq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xf8e9
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x100c0
jmp 0xf8d9
jmp 0xf8e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xf94d
jmp 0xf8a2
movl $0x28, %edi
callq 0x3290
movq %rax, -0x58(%rbp)
jmp 0xf8fb
movq -0x58(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x104e0
jmp 0xf90a
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x10070
jmp 0xf91d
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x57e0
movq -0x60(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x3270
leaq -0x20(%rbp), %rdi
callq 0x57e0
movq -0x30(%rbp), %rdi
callq 0x3470
nop
// File: KJTang[P]SimpleCompiler/Assembler.cpp
// Function: Assembler::assemble()
bool Assembler::assemble() {
    this->init();
    this->redirect();
    this->interpret();
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x141b0
movq -0x10(%rbp), %rdi
callq 0x14b60
movq -0x10(%rbp), %rdi
callq 0x15240
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: KJTang[P]SimpleCompiler/Assembler.cpp
// Function: Assembler::interpret()
bool Assembler::interpret() {
    std::ostringstream oss;
    for (auto it = this->instructions.begin(); it != this->instructions.end(); ++it) {
        oss<<static_cast<int>(it->op)<<" ";
        for (int i = 0; i != it->args.size(); ++i) {
            oss<<it->args[i]<<" ";
        }
    }
    this->binCode = oss.str();
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3380
movq -0x1c8(%rbp), %rdi
addq $0x70, %rdi
callq 0x157f0
movq %rax, -0x188(%rbp)
movq -0x1c8(%rbp), %rdi
addq $0x70, %rdi
callq 0x15860
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x15820
testb $0x1, %al
jne 0x152b0
jmp 0x153c1
leaq -0x188(%rbp), %rdi
callq 0x15890
movl 0x20(%rax), %esi
leaq -0x180(%rbp), %rdi
callq 0x3450
movq %rax, -0x1d0(%rbp)
jmp 0x152d4
movq -0x1d0(%rbp), %rdi
leaq 0x601f(%rip), %rsi      # 0x1b301
callq 0x3280
jmp 0x152e9
movl $0x0, -0x1a0(%rbp)
movslq -0x1a0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x15890
movq %rax, %rdi
addq $0x28, %rdi
callq 0x15990
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
je 0x153ae
leaq -0x188(%rbp), %rdi
callq 0x15890
movq %rax, %rdi
addq $0x28, %rdi
movslq -0x1a0(%rbp), %rsi
callq 0x156a0
movq %rax, %rsi
leaq -0x180(%rbp), %rdi
callq 0x3250
movq %rax, -0x1e0(%rbp)
jmp 0x15363
movq -0x1e0(%rbp), %rdi
leaq 0x5f90(%rip), %rsi      # 0x1b301
callq 0x3280
jmp 0x15378
jmp 0x1537a
movl -0x1a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a0(%rbp)
jmp 0x152f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x30a0
jmp 0x15412
jmp 0x153b0
leaq -0x188(%rbp), %rdi
callq 0x15970
jmp 0x1527d
leaq -0x1c0(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x32a0
jmp 0x153d6
movq -0x1c8(%rbp), %rdi
addq $0x20, %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3320
leaq -0x1c0(%rbp), %rdi
callq 0x34f8
leaq -0x180(%rbp), %rdi
callq 0x30a0
movb $0x1, %al
andb $0x1, %al
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x3470
nop
// File: KJTang[P]SimpleCompiler/VirtualMachine.cpp
// Function: VirtualMachine::VirtualMachine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
VirtualMachine::VirtualMachine(const std::string &code) {
    std::istringstream iss(code);
    int num = 0;
    while (iss>>num) {
        this->binCode.push_back(num);
    }
    int *global = new int[DATA_SEG_SIZE];
    this->data.push_back(global);
    bool *globalFlag = new bool[DATA_SEG_SIZE];
    memset(globalFlag, false, DATA_SEG_SIZE);
    this->dataFlag.push_back(globalFlag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movq %rdi, %rax
movq %rax, -0x1d0(%rbp)
callq 0x191b0
movq -0x1c8(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x102e0
jmp 0x181d6
movq -0x1d0(%rbp), %rdi
addq $0x68, %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x191d0
movq -0x1d0(%rbp), %rdi
subq $-0x80, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x191f0
movq -0x1d0(%rbp), %rdi
movl $0x0, 0x98(%rdi)
addq $0xa0, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x102e0
jmp 0x1822a
movq -0x10(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
movl $0x8, %edx
callq 0x3430
jmp 0x18241
movl $0x0, -0x1a4(%rbp)
leaq -0x1a0(%rbp), %rdi
leaq -0x1a4(%rbp), %rsi
callq 0x31b0
movq %rax, -0x1f0(%rbp)
jmp 0x18267
movq -0x1f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3340
movb %al, -0x1f1(%rbp)
jmp 0x18285
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x18291
jmp 0x182f8
movq -0x1d0(%rbp), %rdi
leaq -0x1a4(%rbp), %rsi
callq 0x19210
jmp 0x182a6
jmp 0x1824b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x183d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x183b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x183a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3150
jmp 0x183a9
movl $0x190, %edi            # imm = 0x190
callq 0x3030
movq %rax, -0x200(%rbp)
jmp 0x1830b
movq -0x1d0(%rbp), %rdi
movq -0x200(%rbp), %rax
movq %rax, -0x1b0(%rbp)
addq $0x68, %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x19280
jmp 0x18332
movl $0x64, %edi
callq 0x3030
movq %rax, -0x208(%rbp)
jmp 0x18345
movq -0x1d0(%rbp), %rdi
movq -0x208(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x0, 0x60(%rax)
subq $-0x80, %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x192f0
jmp 0x18394
leaq -0x1a0(%rbp), %rdi
callq 0x3150
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x1d8(%rbp), %rdi
callq 0x8bd0
movq -0x1e0(%rbp), %rdi
callq 0x8bf0
movq -0x1e8(%rbp), %rdi
callq 0x8c50
movq -0x1c0(%rbp), %rdi
callq 0x8bd0
movq -0x1c8(%rbp), %rdi
callq 0x8cb0
movq -0x18(%rbp), %rdi
callq 0x3470
nop
// File: KJTang[P]SimpleCompiler/VirtualMachine.cpp
// Function: VirtualMachine::printStack()
void VirtualMachine::printStack() {
    if (!this->stack.empty()) {
        std::cout<<"stack top: "<<this->stack.top()<<std::endl;
    } else {
        std::cout<<"stack top: none"<<std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x18, %rdi
callq 0x10340
testb $0x1, %al
jne 0x18451
movq 0xfbb8(%rip), %rdi      # 0x27fd0
leaq 0x3169(%rip), %rsi      # 0x1b588
callq 0x3280
movq -0x10(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x18, %rdi
callq 0x10360
movq -0x18(%rbp), %rdi
movl (%rax), %esi
callq 0x3450
movq %rax, %rdi
movq 0xfb6e(%rip), %rsi      # 0x27fb8
callq 0x32e0
jmp 0x18473
movq 0xfb78(%rip), %rdi      # 0x27fd0
leaq 0x3135(%rip), %rsi      # 0x1b594
callq 0x3280
movq %rax, %rdi
movq 0xfb4a(%rip), %rsi      # 0x27fb8
callq 0x32e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: KJTang[P]SimpleCompiler/VirtualMachine.cpp
// Function: VirtualMachine::printData()
void VirtualMachine::printData() {
    for (int i = 0; i != eipStack.size()+1; ++i) {
        std::cout<<"data stack "<<i<<": ";
        for (int j = 0; j != 10; ++j) {
            std::cout<<data[i][j]<<" ";
        }
        std::cout<<std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0xa0, %rdi
callq 0x19360
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x18563
movq 0xfb02(%rip), %rdi      # 0x27fd0
leaq 0x30cf(%rip), %rsi      # 0x1b5a4
callq 0x3280
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x3450
movq %rax, %rdi
leaq 0x2df6(%rip), %rsi      # 0x1b2e5
callq 0x3280
movl $0x0, -0x10(%rbp)
cmpl $0xa, -0x10(%rbp)
je 0x18542
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movslq -0xc(%rbp), %rsi
callq 0x19380
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq 0xfaad(%rip), %rdi      # 0x27fd0
callq 0x3450
movq %rax, %rdi
leaq 0x2dcf(%rip), %rsi      # 0x1b301
callq 0x3280
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x184fb
movq 0xfa87(%rip), %rdi      # 0x27fd0
movq 0xfa68(%rip), %rsi      # 0x27fb8
callq 0x32e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1849b
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: thunlp[P]KB2E/CTransR/Train_CTransR.cpp
// Function: Train::add(int, int, int)
void add(int x,int y,int z)
    {
        fb_h.push_back(x);
        fb_r.push_back(z);
        fb_l.push_back(y);
        ok[make_pair(x,z)][y]=1;
        ok_fb[make_pair(x,cluster2fb[z])][y]=1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x90, %rdi
leaq 0x2c(%rsp), %rsi
callq 0x71b0
movq (%rsp), %rdi
addq $0xc0, %rdi
leaq 0x24(%rsp), %rsi
callq 0x71b0
movq (%rsp), %rdi
addq $0xa8, %rdi
leaq 0x28(%rsp), %rsi
callq 0x71b0
leaq 0x2c(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x7310
movq (%rsp), %rdi
movq %rax, 0x1c(%rsp)
leaq 0x1c(%rsp), %rsi
callq 0x7220
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4680
movq %rax, %rcx
movq (%rsp), %rax
movl $0x1, (%rcx)
addq $0x30, %rax
movq %rax, 0x8(%rsp)
leaq 0x4b74b(%rip), %rdi     # 0x4ffc0
leaq 0x24(%rsp), %rsi
callq 0x4680
movq %rax, %rsi
leaq 0x2c(%rsp), %rdi
callq 0x7310
movq 0x8(%rsp), %rdi
movq %rax, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x7220
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4680
movl $0x1, (%rax)
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: getTmpReg[abi:cxx11](int)
string getTmpReg(int size) {
    for (int i = 0; i < 14; i++) {
        if (!regUsed[i])
            return size == 2 ? get2RegName(i) : (size == 4 ? get4RegName(i) : get8RegName(i));
    }
    cerr << "no enough regs" << endl;
    throw 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0xe, -0x10(%rbp)
jge 0x4805
movslq -0x10(%rbp), %rcx
leaq 0x1cd3e(%rip), %rax     # 0x214f0
testb $0x1, (%rax,%rcx)
jne 0x47f8
cmpl $0x2, -0xc(%rbp)
jne 0x47cc
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x38b0
jmp 0x47ee
cmpl $0x4, -0xc(%rbp)
jne 0x47e0
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x3da0
jmp 0x47ec
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4290
jmp 0x47ee
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
jmp 0x47fa
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x47a1
movq 0x1c7e4(%rip), %rdi     # 0x20ff0
leaq 0x12a45(%rip), %rsi     # 0x17258
callq 0x3240
movq %rax, %rdi
movq 0x1c786(%rip), %rsi     # 0x20fa8
callq 0x3290
movl $0x4, %edi
callq 0x3140
movq %rax, %rdi
movl $0x0, (%rdi)
movq 0x1c74f(%rip), %rsi     # 0x20f90
xorl %eax, %eax
movl %eax, %edx
callq 0x3450
nopw (%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: getSymbolMemory[abi:cxx11](Symbol*)
string getSymbolMemory(Symbol* sym) {
    if (varDeclare[sym].size() == 0) {
        cerr << "++++++++ trying getting empty symbol " << sym << endl;
        throw 0;
    }
    return varDeclare[sym] + string("(%rip)");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1c61e(%rip), %rdi     # 0x212c0
leaq -0x10(%rbp), %rsi
callq 0x89c0
movq %rax, %rdi
callq 0x31b0
cmpq $0x0, %rax
jne 0x4d0a
movq 0x1c330(%rip), %rdi     # 0x20ff0
leaq 0x125ac(%rip), %rsi     # 0x17273
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
movq 0x1c2c6(%rip), %rsi     # 0x20fa8
callq 0x3290
movl $0x4, %edi
callq 0x3140
movq %rax, %rdi
movl $0x0, (%rdi)
movq 0x1c28f(%rip), %rsi     # 0x20f90
xorl %eax, %eax
movl %eax, %edx
callq 0x3450
leaq 0x1c5af(%rip), %rdi     # 0x212c0
leaq -0x10(%rbp), %rsi
callq 0x89c0
movq %rax, -0x68(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x3490
movq -0x60(%rbp), %rdx
leaq 0x12563(%rip), %rsi     # 0x17299
leaq -0x30(%rbp), %rdi
callq 0x8910
jmp 0x4d41
movq -0x68(%rbp), %rsi
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x8aa0
jmp 0x4d54
leaq -0x30(%rbp), %rdi
callq 0x3180
leaq -0x31(%rbp), %rdi
callq 0x32c0
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4d93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3180
leaq -0x31(%rbp), %rdi
callq 0x32c0
movq -0x40(%rbp), %rdi
callq 0x3480
nopw %cs:(%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: symbolSize(Symbol* const&)
int symbolSize(Symbol* const & sym) {
    switch (sym->type) {
    case Symbol::VALUE_INT:
        return 4;
    case Symbol::VALUE_CHAR:
        return 1;
    case Symbol::VALUE_NONE:
        return 0;
    case Symbol::VALUE_VOID:
        return 0;
    case Symbol::VALUE_ERROR:
        return 0;
    case Symbol::VALUE_DOUBLE:
        return 8;
    case Symbol::VALUE_STRING:
        return 0;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x6, %rax
ja 0x52de
movq -0x18(%rbp), %rax
leaq 0x11e22(%rip), %rcx     # 0x170b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x4, -0x4(%rbp)
jmp 0x52e5
movl $0x1, -0x4(%rbp)
jmp 0x52e5
movl $0x0, -0x4(%rbp)
jmp 0x52e5
movl $0x0, -0x4(%rbp)
jmp 0x52e5
movl $0x0, -0x4(%rbp)
jmp 0x52e5
movl $0x8, -0x4(%rbp)
jmp 0x52e5
movl $0x0, -0x4(%rbp)
jmp 0x52e5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: handleCodeBlock(TreeNode*)
void handleCodeBlock(TreeNode* node) {
    if (node->nodeType == TreeNode::NODE_STATMENT
            && static_cast<StatementNode*>(node)->type == StatementNode::ST_SCOPE) {
        node = node->child;
    }
    while (node) {
        generateCode(node);
        node = node -> sibling;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x531c
movq -0x8(%rbp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x531c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x531e
cmpq $0x0, -0x8(%rbp)
je 0x533c
movq -0x8(%rbp), %rdi
callq 0x5350
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x531e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: handleFunctionNode(TreeNode*)
void handleFunctionNode(TreeNode* node) {
    Symbol* ownSymbol = static_cast<TreeNode*>(node)->symbol;
    of << "\t.globl\t" << ownSymbol->value << "\n";
    of << "\t.type\t" << ownSymbol->value << ", @function\n";
    of << ownSymbol->value << ":\n";
    of << "\tpushq\t%rbp\n";
    of << "\tmovq\t%rsp, %rbp\n";

    auto children = node -> child;

    handleCodeBlock(children);

    while (true) {
        if (children->sibling != nullptr)
            children = children->sibling;
        else break;
    }

    if (children->nodeType == TreeNode::NODE_STATMENT
            && static_cast<StatementNode*>(children)->type == StatementNode::ST_RET) {

    } else {
        if (ownSymbol->value == "main") {
            of << "\tmovl $0, %eax\n";
        }
        of << "\tleave\n";
        of << "\tret\n";
    }
    of << "\t.size\t"<< ownSymbol->value <<", .-"<< ownSymbol->value <<"\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x199d1(%rip), %rdi     # 0x212f0
leaq 0xfab9(%rip), %rsi      # 0x173df
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x3230
movq %rax, %rdi
leaq 0xfb9f(%rip), %rsi      # 0x174e4
callq 0x3240
leaq 0x1999f(%rip), %rdi     # 0x212f0
leaq 0xfa90(%rip), %rsi      # 0x173e8
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x3230
movq %rax, %rdi
leaq 0xfa79(%rip), %rsi      # 0x173f0
callq 0x3240
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq 0x19965(%rip), %rdi     # 0x212f0
callq 0x3230
movq %rax, %rdi
leaq 0xf9f2(%rip), %rsi      # 0x1738c
callq 0x3240
leaq 0x1994a(%rip), %rdi     # 0x212f0
leaq 0xfa50(%rip), %rsi      # 0x173fd
callq 0x3240
leaq 0x19937(%rip), %rdi     # 0x212f0
leaq 0xfa4a(%rip), %rsi      # 0x1740a
callq 0x3240
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52f0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x79f3
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x79f5
jmp 0x79f7
jmp 0x79da
movq -0x18(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x7a0d
movq -0x18(%rbp), %rax
cmpl $0x3, 0x30(%rax)
jne 0x7a0d
jmp 0x7a60
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
leaq 0xfa00(%rip), %rsi      # 0x1741c
callq 0x8db0
testb $0x1, %al
jne 0x7a27
jmp 0x7a3a
leaq 0x198c2(%rip), %rdi     # 0x212f0
leaq 0xf9ec(%rip), %rsi      # 0x17421
callq 0x3240
leaq 0x198af(%rip), %rdi     # 0x212f0
leaq 0xf9e9(%rip), %rsi      # 0x17431
callq 0x3240
leaq 0x1989c(%rip), %rdi     # 0x212f0
leaq 0xf9de(%rip), %rsi      # 0x17439
callq 0x3240
leaq 0x19889(%rip), %rdi     # 0x212f0
leaq 0xf9d1(%rip), %rsi      # 0x1743f
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x3230
movq %rax, %rdi
leaq 0xf9ba(%rip), %rsi      # 0x17447
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x3230
movq %rax, %rdi
leaq 0xfa38(%rip), %rsi      # 0x174e4
callq 0x3240
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/asm.cpp
// Function: handleWhile(StatementNode*)
void handleWhile(StatementNode* node) {
    string LCondition = getNextLabel();

    of << "\tjmp\t" << LCondition << "\n";

    string LBlock = getNextLabel();

    of << LBlock << ":\n";

    handleCodeBlock(node->child->sibling);

    of << LCondition << ":\n";
    string reg = handleExprNode(node->child);
    of << "\ttestl\t" << reg << ", " << reg << "\n";
    of << "\tje\t" << LBlock << "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4db0
leaq 0x19811(%rip), %rdi     # 0x212f0
leaq 0xf8a0(%rip), %rsi      # 0x17386
callq 0x3240
movq %rax, -0x80(%rbp)
jmp 0x7af1
movq -0x80(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3230
movq %rax, -0x88(%rbp)
jmp 0x7b07
movq -0x88(%rbp), %rdi
leaq 0xf9cf(%rip), %rsi      # 0x174e4
callq 0x3240
jmp 0x7b1c
leaq -0x58(%rbp), %rdi
callq 0x4db0
jmp 0x7b27
leaq 0x197c2(%rip), %rdi     # 0x212f0
leaq -0x58(%rbp), %rsi
callq 0x3230
movq %rax, -0x90(%rbp)
jmp 0x7b40
movq -0x90(%rbp), %rdi
leaq 0xf83e(%rip), %rsi      # 0x1738c
callq 0x3240
jmp 0x7b55
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rdi
callq 0x52f0
jmp 0x7b68
leaq 0x19781(%rip), %rdi     # 0x212f0
leaq -0x28(%rbp), %rsi
callq 0x3230
movq %rax, -0x98(%rbp)
jmp 0x7b81
movq -0x98(%rbp), %rdi
leaq 0xf7fd(%rip), %rsi      # 0x1738c
callq 0x3240
jmp 0x7b96
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5fd0
jmp 0x7ba9
leaq 0x19740(%rip), %rdi     # 0x212f0
leaq 0xf7a0(%rip), %rsi      # 0x17357
callq 0x3240
movq %rax, -0xa0(%rbp)
jmp 0x7bc5
movq -0xa0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3230
movq %rax, -0xa8(%rbp)
jmp 0x7bde
movq -0xa8(%rbp), %rdi
leaq 0xf7ab(%rip), %rsi      # 0x17397
callq 0x3240
movq %rax, -0xb0(%rbp)
jmp 0x7bfa
movq -0xb0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3230
movq %rax, -0xb8(%rbp)
jmp 0x7c13
movq -0xb8(%rbp), %rdi
leaq 0xf8c3(%rip), %rsi      # 0x174e4
callq 0x3240
jmp 0x7c28
leaq 0x196c1(%rip), %rdi     # 0x212f0
leaq 0xf740(%rip), %rsi      # 0x17376
callq 0x3240
movq %rax, -0xc0(%rbp)
jmp 0x7c44
movq -0xc0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3230
movq %rax, -0xc8(%rbp)
jmp 0x7c5d
movq -0xc8(%rbp), %rdi
leaq 0xf879(%rip), %rsi      # 0x174e4
callq 0x3240
jmp 0x7c72
leaq -0x78(%rbp), %rdi
callq 0x3180
leaq -0x58(%rbp), %rdi
callq 0x3180
leaq -0x28(%rbp), %rdi
callq 0x3180
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x7cd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x7cc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3180
leaq -0x58(%rbp), %rdi
callq 0x3180
leaq -0x28(%rbp), %rdi
callq 0x3180
movq -0x30(%rbp), %rdi
callq 0x3480
nopw %cs:(%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    if (argc == 2) {
        FILE* fin = fopen(argv[1], "r");
        if (fin != nullptr) {
            yyin = fin;
        } else {
            cerr << "failed to open file: " << argv[1] << endl;
        }
    } else {
#if YYDEBUG != 0
        extern int yydebug;
        yydebug = 1;
#endif
    }

    scope = new Scope();

    yyparse();

    TreeNode* temp = root;

    while (temp) {
        showTree(temp);
        temp = temp -> sibling;
    }

    extern void generateASM();
    generateASM();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jne 0xc54f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xd004(%rip), %rsi      # 0x194ff
callq 0x3300
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xc51b
movq -0x18(%rbp), %rcx
leaq 0x15002(%rip), %rax     # 0x21518
movq %rcx, (%rax)
jmp 0xc54d
movq 0x14ace(%rip), %rdi     # 0x20ff0
leaq 0xb207(%rip), %rsi      # 0x17730
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3240
movq %rax, %rdi
movq 0x14a60(%rip), %rsi     # 0x20fa8
callq 0x3290
jmp 0xc551
jmp 0xc551
movl $0x18, %edi
callq 0x3250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x12140
jmp 0xc56c
movq -0x38(%rbp), %rcx
leaq 0x15039(%rip), %rax     # 0x215b0
movq %rcx, (%rax)
callq 0xef80
leaq 0x15022(%rip), %rax     # 0x215a8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xc5c7
movq -0x30(%rbp), %rdi
callq 0xbe10
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc58d
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x18, %esi
callq 0x3260
jmp 0xc5d4
callq 0x8340
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3480
nopl (%rax)
// File: SunriseFox[P]very-simple-c-compiler/src/main.lex.yy.cpp
// Function: yy_try_NUL_trans(int)
static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    	char *yy_cp = (yy_c_buf_p);

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 217 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 216);

		return yy_is_jam ? 0 : yy_current_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq 0x136ea(%rip), %rax     # 0x21558
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x9b0f(%rip), %rax      # 0x17990
cmpw $0x0, (%rax,%rcx,2)
je 0xde9c
movl -0x4(%rbp), %eax
movl %eax, 0x136d3(%rip)     # 0x21564
movq -0x10(%rbp), %rax
movq %rax, 0x136cc(%rip)     # 0x21568
jmp 0xde9e
movslq -0x4(%rbp), %rcx
leaq 0xa037(%rip), %rax      # 0x17ee0
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x9c93(%rip), %rax      # 0x17b50
movswl (%rax,%rcx,2), %eax
cmpl -0x4(%rbp), %eax
je 0xdef6
movslq -0x4(%rbp), %rcx
leaq 0xa1cf(%rip), %rax      # 0x180a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0xd9, -0x4(%rbp)
jl 0xdef4
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xa372(%rip), %rax      # 0x18260
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
jmp 0xde9e
movslq -0x4(%rbp), %rcx
leaq 0x9fdf(%rip), %rax      # 0x17ee0
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xa38b(%rip), %rax      # 0x182a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0xd8, -0x4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0xdf3b
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0xdf41
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/scope.cpp
// Function: Scope::findSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Symbol *Scope::findSymbol(const string &name)
{
    for (const auto& l: scopeStack) {
        for (const auto& n: l) {
            if(n.name == name)
                return n.symbol;
        }
    }
    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x124f0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x12520
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x12550
testb $0x1, %al
jne 0x12268
jmp 0x122f9
leaq -0x28(%rbp), %rdi
callq 0x12580
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x125a0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x125d0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x12600
testb $0x1, %al
jne 0x122aa
jmp 0x122e9
leaq -0x48(%rbp), %rdi
callq 0x12630
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x12660
testb $0x1, %al
jne 0x122ce
jmp 0x122dc
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x12301
jmp 0x122de
leaq -0x48(%rbp), %rdi
callq 0x126f0
jmp 0x12297
jmp 0x122eb
leaq -0x28(%rbp), %rdi
callq 0x12710
jmp 0x12252
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: SunriseFox[P]very-simple-c-compiler/./src/scope.cpp
// Function: Scope::insertSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Symbol*)
bool Scope::insertSymbol(const string &name, int lineno, Symbol *symbol)
{
    auto& current = scopeStack.front();
    for (const auto& n: current) {
        if(n.name == name)
            return false;
    }
    current.push_back(ScopeNode(lineno, name, symbol));
    if (currFunc) {
        funcTable[currFunc].push_back(symbol);
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12730
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x12760
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x12790
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x127c0
testb $0x1, %al
jne 0x1236c
jmp 0x123a6
leaq -0x40(%rbp), %rdi
callq 0x127f0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x12660
testb $0x1, %al
jne 0x12390
jmp 0x12399
movb $0x0, -0x1(%rbp)
jmp 0x12439
jmp 0x1239b
leaq -0x40(%rbp), %rdi
callq 0x12810
jmp 0x12359
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x120f0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x12830
jmp 0x123e1
leaq -0x80(%rbp), %rdi
callq 0x12870
leaq 0xf1c7(%rip), %rax      # 0x215b8
cmpq $0x0, (%rax)
je 0x12435
leaq 0xf1ca(%rip), %rdi      # 0x215c8
leaq 0xf1b3(%rip), %rsi      # 0x215b8
callq 0x12890
movq %rax, %rdi
leaq -0x28(%rbp), %rsi
callq 0x12970
jmp 0x12435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x12870
jmp 0x12447
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x3480
nopw %cs:(%rax,%rax)