LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::identifier()
ASTNode * Parser::identifier() {
    /*
        Terminal
    */
    if (t.type != TokenType::T_IDENT) {
        reject("Expected identifier");
    }

    IdentifierNode * node = new IdentifierNode();
    node->name = t.stringVal;

    next();
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x9, 0x18(%rax)
je 0x11ede
leaq -0x29(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3530
movq -0x58(%rbp), %rdx
leaq 0x1262e(%rip), %rsi     # 0x244b0
leaq -0x28(%rbp), %rdi
callq 0x33f0
jmp 0x11e8d
movq -0x50(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x11650
jmp 0x11e9c
leaq -0x28(%rbp), %rdi
callq 0x31d0
leaq -0x29(%rbp), %rdi
callq 0x3350
jmp 0x11ede
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x11ed3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x31d0
leaq -0x29(%rbp), %rdi
callq 0x3350
jmp 0x11f42
movl $0x40, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
callq 0x14340
jmp 0x11ef9
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x18, %rsi
addq $0x8, %rsi
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
callq 0x3040
movq -0x50(%rbp), %rdi
callq 0x114b0
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x32c0
movq -0x38(%rbp), %rdi
callq 0x3520
nopl (%rax,%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::parameterList()
ASTNode * Parser::parameterList() {
    /*
        "(" [<parameter> {"," <parameter> }] ")"
    */
    ASTNode * node = new ASTNode(AST_PARAMETERLIST);

    expect(T_LPAREN);

    if(t.type != T_RPAREN) {
        // We have one or more parameters
        node->children.push_back(parameter());

        // Consume the rest of the params
        while(t.type == T_COMMA) {
            expect(T_COMMA);
            node->children.push_back(parameter());
        }
    }

    
    expect(T_RPAREN);

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl $0x7, %esi
callq 0x14270
jmp 0x11f84
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x4, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x11bc0
movq -0x50(%rbp), %rax
cmpl $0x5, 0x18(%rax)
je 0x12033
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
callq 0x127b0
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
movq -0x50(%rbp), %rax
cmpl $0xa, 0x18(%rax)
jne 0x12031
movq -0x50(%rbp), %rdi
movl $0xa, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x11bc0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
callq 0x127b0
movq -0x60(%rbp), %rdi
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x14310
jmp 0x11fd4
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
jmp 0x12051
jmp 0x12033
movq -0x50(%rbp), %rdi
movl $0x5, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x11bc0
movq -0x10(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3520
nopw (%rax,%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::functionBody()
ASTNode * Parser::functionBody() {
    /*
        "{" { <statement> } "}
    */
    ASTNode * node = new ASTNode(AST_FUNCTIONBODY);
    expect(T_LCURLY);

    // 0 or more statements
    while (t.type != T_RCURLY) {
        node->children.push_back(statement());
    }
    
    expect(T_RCURLY);

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movl $0x10, %esi
callq 0x14270
jmp 0x12094
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x6, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x11bc0
movq -0x40(%rbp), %rax
cmpl $0x7, 0x18(%rax)
je 0x120f9
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
callq 0x12120
movq -0x48(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
jmp 0x120b0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
jmp 0x12117
movq -0x40(%rbp), %rdi
movl $0x7, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x11bc0
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3520
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::parameter()
ASTNode * Parser::parameter() {
    /*
        <typeSpecifier> <identifier>
    */
    ASTNode * node = new ASTNode(AST_PARAMETER);

    node->children.push_back(type());
    node->children.push_back(identifier());

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movl $0x8, %esi
callq 0x14270
jmp 0x127e4
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
callq 0x11d30
movq -0x50(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
callq 0x11e50
movq -0x48(%rbp), %rdi
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x14310
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
movq -0x18(%rbp), %rdi
callq 0x3520
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::variableDeclaration()
ASTNode * Parser::variableDeclaration() {
    /*
        <identifier> [ "[" <number> "]" ]
    */
    ASTNode * node = new ASTNode(AST_VARDECLARATION);

    node->children.push_back(identifier());

    // Check if its an array
    if(t.type == T_LSQUARE) {
        expect(T_LSQUARE);
        node->children.push_back(number());
        expect(T_RSQUARE);
    }

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl $0xf, %esi
callq 0x14270
jmp 0x12894
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
callq 0x11e50
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
movq -0x50(%rbp), %rax
cmpl $0xc, 0x18(%rax)
jne 0x12933
movq -0x50(%rbp), %rdi
movl $0xc, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x11bc0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
callq 0x12950
movq -0x60(%rbp), %rdi
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x14310
movq -0x50(%rbp), %rdi
movl $0xd, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x11bc0
jmp 0x12933
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
jmp 0x1293d
movq -0x10(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::number()
ASTNode * Parser::number() {
    /*
        Terminal
    */
    NumberNode * node = new NumberNode();
    node->value = t.intVal;

    expect(T_INTVALUE);
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x28, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
callq 0x14460
jmp 0x1297f
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x40(%rdi), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movl $0xf, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x11bc0
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 0x32c0
movq -0x18(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::assignment()
ASTNode * Parser::assignment() {
    /*
        <identifier> ["[" <arrayIndex> "]"] "=" <expression>
    */
    ASTNode * node = new ASTNode(AST_ASSIGNMENT);

    node->children.push_back(identifier());

    // Check if its an array
    if (t.type == T_LSQUARE) {
        expect(T_LSQUARE);
        node->children.push_back(arrayIndex());
        expect(T_RSQUARE);
    }

    expect(T_ASSIGN);
    node->children.push_back(expression());
    expect(T_SEMI);

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movl $0xa, %esi
callq 0x14270
jmp 0x12dc7
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x68(%rbp)
callq 0x11e50
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
movq -0x60(%rbp), %rax
cmpl $0xc, 0x18(%rax)
jne 0x12e66
movq -0x60(%rbp), %rdi
movl $0xc, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x11bc0
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x70(%rbp)
callq 0x12ed0
movq -0x70(%rbp), %rdi
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x14310
movq -0x60(%rbp), %rdi
movl $0xd, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x11bc0
jmp 0x12e66
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
jmp 0x12ec1
movq -0x60(%rbp), %rdi
movl $0x0, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x11bc0
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
callq 0x129d0
movq -0x78(%rbp), %rdi
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x14310
movq -0x60(%rbp), %rdi
movl $0x3, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x11bc0
movq -0x10(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3520
nopw (%rax,%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::arrayIndex()
ASTNode * Parser::arrayIndex() {
    /*
        <expression>
    */
    ASTNode * node = new ASTNode(AST_ARRAYINDEX);

    node->children.push_back(expression());

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movl $0x11, %esi
callq 0x14270
jmp 0x12f04
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
callq 0x129d0
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x14310
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
movq -0x18(%rbp), %rdi
callq 0x3520
nopw (%rax,%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::character()
ASTNode * Parser::character() {
    /*
        Terminal
    */
   CharNode * node = new CharNode();
   node->value = t.charVal;
   
   expect(T_CHARVALUE);
   return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x28, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
callq 0x14480
jmp 0x12f8f
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movb 0x44(%rdi), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x20(%rax)
movl $0x11, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x11bc0
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 0x32c0
movq -0x18(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/parser.cpp
// Function: Parser::op()
ASTNode * Parser::op() {
    /*
        Terminal
        "+" | "-" etc.
    */
    OpNode * node = new OpNode();

    switch(t.type) {
        case T_PLUS: {
            node->operation = "+";
            break;
        }
        case T_MINUS: {
            node->operation = "-";
            break;
        }
        default: {
            reject("Operation not supported");
        }
    }

    next();
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x40, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x14420
jmp 0x1300f
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movl 0x18(%rax), %eax
movl %eax, -0x5c(%rbp)
subl $0x1, %eax
je 0x1304c
jmp 0x13028
movl -0x5c(%rbp), %eax
subl $0x2, %eax
je 0x13062
jmp 0x13078
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x32c0
jmp 0x130fb
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
leaq 0x1108f(%rip), %rsi     # 0x240ea
callq 0x33e0
jmp 0x130bc
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
leaq 0x1155b(%rip), %rsi     # 0x245cc
callq 0x33e0
jmp 0x130bc
leaq -0x41(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x3530
movq -0x68(%rbp), %rdx
leaq 0x114b9(%rip), %rsi     # 0x24549
leaq -0x40(%rbp), %rdi
callq 0x33f0
jmp 0x1309b
movq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x11650
jmp 0x130aa
leaq -0x40(%rbp), %rdi
callq 0x31d0
leaq -0x41(%rbp), %rdi
callq 0x3350
movq -0x58(%rbp), %rdi
callq 0x114b0
movq -0x10(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x130f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31d0
leaq -0x41(%rbp), %rdi
callq 0x3350
movq -0x18(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::SymbolTable()
SymbolTable::SymbolTable()
: currentScopeId (0) {
    intDescriptor = new STTypeDescriptor(VT_INT);
    charDescriptor = new STTypeDescriptor(VT_CHAR);
    boolDescriptor = new STTypeDescriptor(VT_BOOL);

    universe = new STEntry(ST_HEAD, 0);
    currentScope = universe;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, 0x10(%rax)
movl $0xc, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x1be20
jmp 0x1b6bf
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0xc, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movl $0x2, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x1be20
jmp 0x1b6ef
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0xc, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movl $0x3, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x1be20
jmp 0x1b71f
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x58, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
xorl %edx, %edx
movl %edx, %esi
callq 0x1be50
jmp 0x1b74a
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq (%rax), %rcx
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x32c0
jmp 0x1b7bc
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x32c0
jmp 0x1b7bc
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x32c0
jmp 0x1b7bc
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x32c0
movq -0x10(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::addEntry(STEntryType, VarType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SymbolTable::addEntry(STEntryType entryType, VarType varType, std::string varName) {
    STEntry * scopeIterator = currentScope;
    while (scopeIterator->next != nullptr) {
        if (scopeIterator->next->name == varName) {
            std::cout << "Object name already exists in scope: " << varName << std::endl;
            return; 
        } else {
            scopeIterator = scopeIterator->next;
        }
    }
    STTypeDescriptor * typeDescriptor = new STTypeDescriptor(varType);
    STEntry * newEntry = new STEntry();
    newEntry->name = varName;
    newEntry->entryType = entryType;
    newEntry->scopeId = currentScopeId;
    newEntry->typeDescriptor = typeDescriptor;
    scopeIterator->next = newEntry;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rcx, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1b8e1
movq -0x50(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x38, %rdi
callq 0x1bea0
testb $0x1, %al
jne 0x1b8a0
jmp 0x1b8d3
movq 0x19721(%rip), %rdi     # 0x34fc8
leaq 0x8e94(%rip), %rsi      # 0x24742
callq 0x32e0
movq -0x50(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
movq 0x196ef(%rip), %rsi     # 0x34fb8
callq 0x3330
jmp 0x1b96e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1b87a
movl $0xc, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movl -0x10(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x1be20
jmp 0x1b903
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x58, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
callq 0x1bf30
jmp 0x1b926
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
callq 0x3040
movq -0x48(%rbp), %rax
movl -0xc(%rbp), %edx
movq -0x40(%rbp), %rcx
movl %edx, (%rcx)
movl 0x10(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%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 0x32c0
jmp 0x1b9a0
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x32c0
movq -0x30(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::openScope(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SymbolTable::openScope(std::string scopeName) {
    currentScopeId++;
    STEntry * oldScope = currentScope;
    currentScope = new STEntry(ST_HEAD, currentScopeId);
    currentScope->name = scopeName;
    
    // Fix references
    currentScope->parentScope = oldScope;
    oldScope->childScopes.push_back(currentScope);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl 0x10(%rax), %ecx
incl %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x58, %edi
callq 0x3300
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x30(%rbp)
movl 0x10(%rax), %edx
xorl %esi, %esi
callq 0x1be50
jmp 0x1bb00
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
addq $0x38, %rdi
callq 0x3040
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rcx
movq 0x8(%rsi), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
addq $0x8, %rsi
callq 0x1bf70
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x32c0
movq -0x20(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::lookup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
STEntry * SymbolTable::lookup(std::string name) {
    STEntry * head = currentScope;
    STEntry * currentEntry;
    while (head != nullptr) {
         currentEntry = head->next;
         while (currentEntry != nullptr) {
             if (currentEntry->name == name) {
                 return currentEntry;
             }
             currentEntry = currentEntry->next;
         }
         if(head == universe) {
             break;
         }

        head = head->parentScope;
    }
    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1bc1a
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1bbfd
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
callq 0x1bea0
testb $0x1, %al
jne 0x1bbe5
jmp 0x1bbef
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1bc22
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x1bbc7
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq (%rcx), %rax
jne 0x1bc0c
jmp 0x1bc1a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1bbb4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::lookupScope(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
STEntry * SymbolTable::lookupScope(std::string functionName) {
    STEntry * head = universe;
    for (auto & child : universe->childScopes) {
        if (child->name == functionName) {
            return child;
        }
    }
    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq (%rax), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x198a0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x19900
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x198d0
testb $0x1, %al
jne 0x1bc87
jmp 0x1bcc8
leaq -0x30(%rbp), %rdi
callq 0x19990
movq -0x48(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
addq $0x38, %rdi
callq 0x1bea0
testb $0x1, %al
jne 0x1bcae
jmp 0x1bcbb
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1bcd0
jmp 0x1bcbd
leaq -0x30(%rbp), %rdi
callq 0x199c0
jmp 0x1bc74
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: taurheim[P]AgNES/symbolTable.cpp
// Function: SymbolTable::print()
void SymbolTable::print() {
    STEntry * head = currentScope;
    STEntry * currentEntry;
    std::cout << "innerScope" << std::endl;
    while (head != nullptr) {
        std::cout << "| " << std::endl;
        std::cout << "[ Head ]";
        currentEntry = head->next;
        while (currentEntry != nullptr) {
            std::cout << " -> ";
            std::cout << " [ " << currentEntry->name << " ] ";
            currentEntry = currentEntry->next;
         }
         std::cout << " -> guard " << std::endl;
         head = head->parentScope;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0x192c9(%rip), %rdi     # 0x34fc8
leaq 0x8a62(%rip), %rsi      # 0x24768
callq 0x32e0
movq %rax, %rdi
movq 0x192a3(%rip), %rsi     # 0x34fb8
callq 0x3330
cmpq $0x0, -0x10(%rbp)
je 0x1bdf3
movq 0x1929c(%rip), %rdi     # 0x34fc8
leaq 0x889e(%rip), %rsi      # 0x245d1
callq 0x32e0
movq %rax, %rdi
movq 0x19276(%rip), %rsi     # 0x34fb8
callq 0x3330
movq 0x1927a(%rip), %rdi     # 0x34fc8
leaq 0x8a1e(%rip), %rsi      # 0x24773
callq 0x32e0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1bdc0
movq 0x19254(%rip), %rdi     # 0x34fc8
leaq 0x8a01(%rip), %rsi      # 0x2477c
callq 0x32e0
movq 0x19241(%rip), %rdi     # 0x34fc8
leaq 0x89f3(%rip), %rsi      # 0x24781
callq 0x32e0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
addq $0x38, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x89d8(%rip), %rsi      # 0x24785
callq 0x32e0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1bd66
movq 0x19201(%rip), %rdi     # 0x34fc8
leaq 0x89bb(%rip), %rsi      # 0x24789
callq 0x32e0
movq %rax, %rdi
movq 0x191db(%rip), %rsi     # 0x34fb8
callq 0x3330
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1bd1a
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: taurheim[P]AgNES/irGenerator.cpp
// Function: IRGenerator::generate[abi:cxx11]()
std::list<TAC> IRGenerator::generate() {
    // Go to main by default

    // Generate the rest of the code
    genTAC(root);
    printIRCode(intermediateCode);
    return intermediateCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq (%rdi), %rsi
callq 0x1c4c0
movq -0x48(%rbp), %rsi
addq $0x10, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x8360
movq -0x40(%rbp), %rdi
callq 0x1c5c0
jmp 0x1c47b
leaq -0x28(%rbp), %rdi
callq 0x8420
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdi
addq $0x10, %rsi
callq 0x8360
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8420
movq -0x30(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/irGenerator.cpp
// Function: IRGenerator::genTAC(ASTNode*)
void IRGenerator::genTAC(ASTNode * node) {
    switch(node->nodeType) {
        case AST_EXPRESSION:
            {
                genTACExpression(node);
                break;
            }
        case AST_STATEMENT:
            {
                genTACStatement(node);
                break;
            }
        case AST_FUNCTION:
            {
                genTACFunction(node);
                break;
            }
        case AST_DECLARATION:
            {
                genTACDeclaration(node);
                break;
            }
        default:
            {
                for(auto child : node->children) {
                    genTAC(child);
                }
            }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x9, %eax
ja 0x1c54f
movq -0x58(%rbp), %rax
leaq 0x829d(%rip), %rcx      # 0x24794
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x1cae0
leaq -0x30(%rbp), %rdi
callq 0x31d0
jmp 0x1c5b2
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1ce40
jmp 0x1c5b2
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1de20
jmp 0x1c5b2
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1e160
jmp 0x1c5b2
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x14e60
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x14ed0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x14e90
testb $0x1, %al
jne 0x1c588
jmp 0x1c5b0
leaq -0x40(%rbp), %rdi
callq 0x14f70
movq -0x60(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
callq 0x1c4c0
leaq -0x40(%rbp), %rdi
callq 0x14f90
jmp 0x1c575
jmp 0x1c5b2
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: taurheim[P]AgNES/irGenerator.cpp
// Function: IRGenerator::genTACDeclaration(ASTNode*)
void IRGenerator::genTACDeclaration(ASTNode * declaration) {
    TypeNode * typeNode = (TypeNode *)declaration->children[0];
    auto child = declaration->children.begin() + 1;
    while (child != declaration->children.end()) {
        IdentifierNode * id = (IdentifierNode *)((*child)->children[0]);
        intermediateCode.push_back({ IR_DECLARATION, id->name, varTypeToString[typeNode->varType] });
        child++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19310
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x14e60
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19330
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x14ed0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x14e90
testb $0x1, %al
jne 0x1e1e0
jmp 0x1e2f8
leaq -0x20(%rbp), %rdi
callq 0x14f70
movq (%rax), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19310
movq %rax, %rcx
movq -0xc0(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x38(%rbp)
addq $0x10, %rax
movq %rax, -0xe0(%rbp)
movl $0xc, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movq -0x38(%rbp), %rsi
addq $0x20, %rsi
callq 0x3140
leaq -0x78(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
leaq 0x17354(%rip), %rdi     # 0x355a8
callq 0x197c0
movq %rax, -0xc8(%rbp)
jmp 0x1e262
movq -0xc8(%rbp), %rsi
movq -0xd0(%rbp), %rdi
callq 0x3140
jmp 0x1e277
leaq -0x58(%rbp), %rdi
callq 0x3410
movq -0xe0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1e430
jmp 0x1e295
leaq -0xa0(%rbp), %rdi
callq 0x94e0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x19370
movq %rax, -0xb8(%rbp)
jmp 0x1e1b9
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
callq 0x31d0
jmp 0x1e301
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x94e0
jmp 0x1e301
addq $0xe0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::generate[abi:cxx11]()
std::string CodeGenerator::generate() {
    // Make it easy to tell when our code starts
    code << "; Code begins now" << nl;
    code << "NOP" << nl << "NOP" << nl << "NOP" << nl;
    // First set up our stack
    initializeStack();

    // Now run through the code line by line
    for (auto & tac : intermediateCode) {
        generateCodeFromTAC(tac);
    }
    return code.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
addq $0x80, %rdi
leaq 0x5607(%rip), %rsi      # 0x24934
callq 0x32e0
movq -0xb0(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0xb0(%rbp), %rdi
addq $0x80, %rdi
leaq 0x55f0(%rip), %rsi      # 0x24946
callq 0x32e0
movq -0xb0(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
leaq 0x55d2(%rip), %rsi      # 0x24946
callq 0x32e0
movq -0xb0(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
leaq 0x55b4(%rip), %rsi      # 0x24946
callq 0x32e0
movq -0xb0(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0xb0(%rbp), %rdi
callq 0x1f4a0
movq -0xb0(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1e700
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xca00
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1e730
testb $0x1, %al
jne 0x1f3ee
jmp 0x1f45e
leaq -0x20(%rbp), %rdi
callq 0x1e4b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0xccd0
movq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x1f570
jmp 0x1f427
leaq -0x98(%rbp), %rdi
callq 0x94e0
leaq -0x20(%rbp), %rdi
callq 0x1e760
jmp 0x1f3db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x94e0
jmp 0x1f488
movq -0xc0(%rbp), %rdi
movq -0xb0(%rbp), %rsi
addq $0x80, %rsi
callq 0x3310
movq -0xb8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::initializeStack()
void CodeGenerator::initializeStack() {
    // The stack should start with one "fake" item on it - the old FP, to which the current FP points
    code << "; Initialize the stack" << nl;
    code << "LDA #$FF" << nl;
    code << "STA " << cSP << nl;
    code << "STA " << cFP << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x80, %rdi
leaq 0x5535(%rip), %rsi      # 0x249f7
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x5529(%rip), %rsi      # 0x24a0e
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x550f(%rip), %rsi      # 0x24a17
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x54dc(%rip), %rsi      # 0x24a17
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::allocateGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void CodeGenerator::allocateGlobal(std::string name, std::string type) {
    code << "; global " << name << nl;
    int address = currentGlobalOffset;
    loadConstIntoA(0);
    storeAIntoGlobal(address);
    globalToAddressMap[name] = address;
    currentGlobalOffset++; //Will vary depending on type in the future
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x80, %rdi
leaq 0x4e1d(%rip), %rsi      # 0x24b9b
callq 0x32e0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x28(%rbp), %rdi
movl 0x294(%rdi), %eax
movl %eax, -0x1c(%rbp)
xorl %esi, %esi
callq 0x21600
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x21570
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0x21b90
movl -0x2c(%rbp), %edx
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl %edx, (%rcx)
movl 0x294(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x294(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::generateBranchOnCondition(TAC, bool)
void CodeGenerator::generateBranchOnCondition(TAC tac, bool condition) {
    code << "; branch if " << tac.first << " is " << condition << nl;
    CodeVar var = lookup(tac.first);
    loadLocalIntoA(var.value);
    code << "CMP #" << condition << nl;
    code << "BEQ " << tac.second << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rsi, -0x78(%rbp)
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
subq $-0x80, %rdi
leaq 0x3f49(%rip), %rsi      # 0x24ada
callq 0x32e0
movq -0x78(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
movq %rsi, -0x70(%rbp)
callq 0x32a0
movq %rax, %rdi
leaq 0x3f33(%rip), %rsi      # 0x24ae7
callq 0x32e0
movq %rax, %rdi
movzbl -0x11(%rbp), %esi
andl $0x1, %esi
callq 0x3540
movq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x70(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x3140
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x21250
movq %rax, -0x58(%rbp)
jmp 0x20bf8
movq -0x58(%rbp), %rax
movq %rax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31d0
movq -0x68(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x214d0
movq -0x68(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3ec5(%rip), %rsi      # 0x24aec
callq 0x32e0
movq %rax, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x3540
movq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x68(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3e98(%rip), %rsi      # 0x24af2
callq 0x32e0
movq -0x78(%rbp), %rsi
movq %rax, %rdi
addq $0x28, %rsi
callq 0x32a0
movq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31d0
movq -0x48(%rbp), %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::generatePushParam(TAC)
void CodeGenerator::generatePushParam(TAC tac) {
    CodeVar param = lookup(tac.first);
    code << "; push param " << tac.first << nl;
    loadLocalIntoA(param.value);
    pushAToStack();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3140
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x21250
movq %rax, -0x50(%rbp)
jmp 0x20d80
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31d0
movq -0x60(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3d54(%rip), %rsi      # 0x24af7
callq 0x32e0
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x32a0
movq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x60(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x214d0
movq -0x60(%rbp), %rdi
callq 0x211b0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31d0
movq -0x40(%rbp), %rdi
callq 0x3520
nopl (%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::generateSubroutineCall(TAC)
void CodeGenerator::generateSubroutineCall(TAC tac) {
    code << "; push FP, call, restore FP" << nl;

    // Push cFP to stack
    code << "LDA " << cFP << nl;
    pushAToStack();
    
    // Set cFP to cSP
    code << "LDA " << cSP << nl;
    code << "STA " << cFP << nl;

    // Call function
    code << "JSR " << tac.first << nl;

    // Restore FP
    popStackToA();
    code << "STA " << cFP << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x80, %rdi
leaq 0x3c6a(%rip), %rsi      # 0x24b24
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3c63(%rip), %rsi      # 0x24b40
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
callq 0x211b0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3c27(%rip), %rsi      # 0x24b40
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3acb(%rip), %rsi      # 0x24a17
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3bc6(%rip), %rsi      # 0x24b45
callq 0x32e0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
callq 0x21110
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3a5c(%rip), %rsi      # 0x24a17
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::generateEndFunc(TAC)
void CodeGenerator::generateEndFunc(TAC tac) {
    code << "; endFunc" << nl;
    int paramSize = stoi(tac.first);

    // Deallocate space for locals
    deallocateStackSpace(paramSize);

    code << "RTS" << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x80, %rdi
leaq 0x3b77(%rip), %rsi      # 0x24b91
callq 0x32e0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x21c70
movq -0x20(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
callq 0x21780
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
leaq 0x38f6(%rip), %rsi      # 0x24958
callq 0x32e0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::popStackToA()
void CodeGenerator::popStackToA() {
    // X <- cSP
    code << "LDX " << cSP << nl;

    // A <- M[cSP]
    code << "LDA $0,X" << nl;

    // cSP++
    code << "INC " << cSP << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x80, %rdi
leaq 0x38ea(%rip), %rsi      # 0x24a1c
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x38bc(%rip), %rsi      # 0x24a21
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x38a2(%rip), %rsi      # 0x24a2a
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::pushAToStack()
void CodeGenerator::pushAToStack() {
    // cSP--
    code << "DEC " << cSP << nl;
    
    // X <- cSP
    code << "LDX " << cSP << nl;

    // M[$0 + $cSP] <- A
    // This effectively means we put the new item at the stack pointer in memory
    code << "STA $0,X" << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x80, %rdi
leaq 0x385d(%rip), %rsi      # 0x24a2f
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3817(%rip), %rsi      # 0x24a1c
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0x37fc(%rip), %rsi      # 0x24a34
callq 0x32e0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::loadLocalIntoA(int)
void CodeGenerator::loadLocalIntoA(int offset){
    // Locals are located below the frame pointer in memory
    /*
        [ Locals ]
        [ FP ]
        [ Params ]
    */
    // X <- cFP
    code << "LDX " << cFP << nl;
    
    // Subtracting is the same as adding 255 - num
    // e.g. we want to load cFP - 3
    // cFP = $F9
    // cFP = $F9 - $3 = 0xF6
    // $F9 + $FC = 0xF6
    // $FD = $FF - $3 = 255 - 3 = 252
    int adjustedOffset = 256 - offset;
    code << "LDA " << adjustedOffset << ",X" << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x80, %rdi
leaq 0x3527(%rip), %rsi      # 0x24a1c
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
movl $0x100, %eax            # imm = 0x100
subl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
addq $0x80, %rdi
leaq 0x360d(%rip), %rsi      # 0x24b40
callq 0x32e0
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3500
movq %rax, %rdi
leaq 0x34da(%rip), %rsi      # 0x24a27
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::storeAIntoLocal(int)
void CodeGenerator::storeAIntoLocal(int offset) {
    // Locals are below the frame pointer in memory
    // Offset can't be 0 - locals start at 1
    code << "LDX " << cFP << nl;
    int adjustedOffset = 256 - offset;
    code << "STA " << adjustedOffset << ",X" << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x80, %rdi
leaq 0x33a7(%rip), %rsi      # 0x24a1c
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
movl $0x100, %eax            # imm = 0x100
subl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
addq $0x80, %rdi
leaq 0x3364(%rip), %rsi      # 0x24a17
callq 0x32e0
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3500
movq %rax, %rdi
leaq 0x335a(%rip), %rsi      # 0x24a27
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: taurheim[P]AgNES/codeGenerator.cpp
// Function: CodeGenerator::deallocateStackSpace(int)
void CodeGenerator::deallocateStackSpace(int size) {
    if (size == 0) return;
    loadConstIntoA(size);
    code << "CLC" << nl; //Set stupid carry
    code << "ADC " << cSP << nl;
    code << "STA " << cSP << nl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x217a2
jmp 0x21837
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x21600
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x32fc(%rip), %rsi      # 0x24abc
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x33c2(%rip), %rsi      # 0x24ba5
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
leaq 0x3201(%rip), %rsi      # 0x24a17
callq 0x32e0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x32a0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)