LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/justinjo[P]Pacman/boulder.cpp
// Function: Boulder::Boulder()
Boulder::Boulder()
{
        /* keep randomly choosing a location until we find a location and size
         * that doesn't overlap the middle */
        do {
                top_left_r = random_int(0, ROWS-1);
                top_left_c = random_int(0, COLS-1);
                height = random_int(MIN_BOULDER_HEIGHT, MAX_BOULDER_HEIGHT);
                width  = random_int(MIN_BOULDER_WIDTH, MAX_BOULDER_WIDTH);
        } while ( overlaps_middle() );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %r12
pushq $0x5
popq %r13
pushq $0x6
popq %r14
pushq $0xf
popq %r15
xorl %edi, %edi
pushq $0x14
popq %rsi
callq 0x3493
movl %eax, (%rbx)
xorl %edi, %edi
pushq $0x3c
popq %rsi
callq 0x3493
movl %eax, 0x4(%rbx)
movl %r12d, %edi
movl %r13d, %esi
callq 0x3493
movl %eax, 0x8(%rbx)
movl %r14d, %edi
movl %r15d, %esi
callq 0x3493
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x371e
testb %al, %al
jne 0x36cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/justinjo[P]Pacman/boulder.cpp
// Function: Boulder::place_on_board(char (*) [61])
void Boulder::place_on_board(char board[ROWS][COLS])
{
        for (int r = top_left_r; r <= top_left_r + height; r++) {
                for (int c = top_left_c; c <= top_left_c + width; c++) {
                        if (r < ROWS && c < COLS) {
                                board[r][c] = BOULDER;
                        }
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
movslq %edx, %rax
imulq $0x3d, %rax, %rcx
addq %rsi, %rcx
movslq 0x8(%rdi), %rsi
movslq %edx, %rdx
addq %rsi, %rdx
cmpq %rdx, %rax
jg 0x37b0
movl 0x4(%rdi), %esi
movslq %esi, %rdx
movslq 0xc(%rdi), %r8
movslq %esi, %r9
addq %r8, %r9
cmpq %r9, %rdx
jg 0x37a5
cmpq $0x15, %rax
setge %r8b
cmpq $0x3d, %rdx
setge %r9b
orb %r8b, %r9b
jne 0x37a0
movb $0x58, (%rcx,%rdx)
movl 0x4(%rdi), %esi
incq %rdx
jmp 0x3775
incq %rax
movl (%rdi), %edx
addq $0x3d, %rcx
jmp 0x3760
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/allardlamberink[P]fritz-curl/fritz-curl.cpp
// Function: getmd5sum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string getmd5sum(string inpstr)
{
	unsigned char digest[MD5_DIGEST_LENGTH];
	char inpa[inpstr.size()];
	strcpy(inpa, inpstr.c_str());

	MD5((unsigned char*)&inpa, strlen(inpa), (unsigned char*)&digest);
	char mdString[33];
	for(int i = 0; i < 16; i++)
		sprintf(&mdString[i*2], "%02x", (unsigned int)digest[i]);

	return string(mdString);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %rsp, %r12
movq 0x8(%rsi), %rax
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x41d0
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4370
leaq -0x70(%rbp), %r14
leaq 0xa8c8(%rip), %r15      # 0xf020
xorl %r13d, %r13d
cmpq $0x10, %r13
je 0x477d
movzbl -0x40(%rbp,%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4460
incq %r13
addq $0x2, %r14
jmp 0x475b
leaq -0x70(%rbp), %rsi
leaq -0x29(%rbp), %rdx
movq %rbx, %rdi
callq 0x6058
movq %r12, %rsp
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/allardlamberink[P]fritz-curl/fritz-curl.cpp
// Function: getXmlProp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string getXmlProp(string xmlstring, string xpath)
{
	string retval = "Error reading XML property";

	//// Read the XML config string into the property tree. Catch any exception
	try {
		ptree pt;
		stringstream xmlstream; xmlstream << xmlstring;
		read_xml(xmlstream, pt);
		retval = pt.get<std::string>(xpath);
	}
	catch (std::exception &e)
	{
		std::cout << "Error reading xml property: " << e.what() << "\n";
	}
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xa5b0(%rip), %rsi      # 0xf0ba
leaq -0x218(%rbp), %rdx
callq 0x6058
leaq -0x40(%rbp), %rdi
callq 0x6194
leaq -0x218(%rbp), %rdi
callq 0x4160
leaq -0x208(%rbp), %rdi
movq %r15, %rsi
callq 0x4150
leaq -0x218(%rbp), %rdi
leaq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0x61f6
leaq -0x70(%rbp), %rdi
pushq $0x2e
popq %rdx
movq %r14, %rsi
callq 0x6266
leaq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x623c
leaq -0x90(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4270
movq %r14, %rdi
callq 0x44c0
leaq -0x70(%rbp), %rdi
callq 0x44c0
leaq -0x218(%rbp), %rdi
callq 0x41a0
leaq -0x40(%rbp), %rdi
callq 0x6288
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x44c0
jmp 0x4bec
jmp 0x4be6
movq %rdx, %r15
movq %rax, %r14
jmp 0x4bf8
movq %rdx, %r15
movq %rax, %r14
jmp 0x4c01
movq %rax, %r14
movq %r14, %rdi
callq 0x42e0
movq %rdx, %r15
movq %rax, %r14
leaq -0x218(%rbp), %rdi
callq 0x41a0
leaq -0x40(%rbp), %rdi
callq 0x6288
cmpl $0x1, %r15d
jne 0x4c62
movq %r14, %rdi
callq 0x4070
movq %rax, %r14
movq 0x123af(%rip), %rdi     # 0x16fc8
leaq 0xa4b5(%rip), %rsi      # 0xf0d5
callq 0x42a0
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x42a0
leaq 0xa91a(%rip), %rsi      # 0xf55d
movq %rax, %rdi
callq 0x42a0
callq 0x4340
jmp 0x4ba7
movq %rax, %r14
jmp 0x4c62
movq %rax, %r14
callq 0x4340
movq %rbx, %rdi
callq 0x44c0
jmp 0x4bde
movq %rax, %rdi
callq 0x62b5
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::getNextToken()
Token Scanner::getNextToken() {
    Token sym;
    while (std::isspace(ch) && !input.eof()) getChar(); // skip to next non-whitespace character
    if (std::isalpha(ch)) {
        // Identifier
        sym = identifyKeyword();
    } else if (std::isdigit(ch)) {
        // Number
        sym = identifyNumber();  
    } else if (ch == '\'') {
        // Char
        sym = identifyChar();
    } else if (input.eof()) {
        sym = { T_EOF_TOKEN };
    } else {
        sym = identifySpecialToken();
    }
    return sym;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movsbl 0x10(%r15), %r12d
movl %r12d, %edi
callq 0x3070
testl %eax, %eax
je 0x7016
movq (%r15), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
jne 0x7016
movq %r15, %rdi
callq 0x6f94
jmp 0x6fea
movl %r12d, %edi
callq 0x3380
testl %eax, %eax
je 0x7030
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x70e6
jmp 0x7079
leal -0x30(%r12), %eax
cmpl $0x9, %eax
ja 0x7048
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x71cc
jmp 0x7079
cmpb $0x27, %r12b
jne 0x705c
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x723e
jmp 0x7079
movq (%r15), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
jne 0x709e
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x730e
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x7814
leaq -0x48(%rbp), %rdi
callq 0x3140
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %r14
movl $0xb, -0x8(%r14)
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x7814
movq %r14, %rdi
jmp 0x7089
jmp 0x70d3
jmp 0x70d3
jmp 0x70d3
jmp 0x70d3
movq %rax, %rbx
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::identifyKeyword()
Token Scanner::identifyKeyword() {
    std::string word;
    while (std::isalpha(ch)) { // create string... TODO: include numeric
        word += ch;
        getChar();
    }
    auto search = stringToToken.find(word);
    if (search == stringToToken.end()) {
        Token identToken;
        identToken.type = TokenType::T_IDENT;
        identToken.stringVal = word;
        return identToken;
    } else {
        return { search->second };
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rax)
leaq -0x40(%rbp), %r15
movsbl 0x10(%r14), %r12d
movl %r12d, %edi
callq 0x3380
testl %eax, %eax
je 0x7135
movq %r15, %rdi
movl %r12d, %esi
callq 0x31f0
movq %r14, %rdi
callq 0x6f94
jmp 0x710f
leaq 0x111dc(%rip), %rdi     # 0x18318
leaq -0x40(%rbp), %rsi
callq 0x7fe0
leaq 0x111d4(%rip), %rcx     # 0x18320
cmpq %rcx, %rax
je 0x7169
movl 0x40(%rax), %eax
movl %eax, (%rbx)
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
jmp 0x7190
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x8(%rbx), %r14
movb $0x0, 0x18(%rbx)
movl $0x9, (%rbx)
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x3180
leaq -0x40(%rbp), %rdi
callq 0x3140
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x3140
jmp 0x71bb
jmp 0x71b8
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::identifyNumber()
Token Scanner::identifyNumber() {
    Token numberToken;
    numberToken.type = TokenType::T_INTVALUE;
    numberToken.intVal = 0;

    // Go through all the digits to get the full number
    while (std::isdigit(ch)) {
        numberToken.intVal = (numberToken.intVal * 10) + (ch - '0');
        getChar();
    }

    return numberToken;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movl $0xf, (%rdi)
andl $0x0, 0x28(%rdi)
movsbl 0x10(%r15), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x721d
imull $0xa, 0x28(%r14), %ecx
addl %eax, %ecx
movl %ecx, 0x28(%r14)
movq %r15, %rdi
callq 0x6f94
jmp 0x71fb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::identifyChar()
Token Scanner::identifyChar() {
    if(ch != '\'') {
        reject("Char must begin with \"'\"");
    }

    getChar();
    Token charToken;
    charToken.type = TokenType::T_CHARVALUE;
    charToken.charVal = ch;
    getChar();

    if(ch != '\'') {
        reject("Char can only be of length 1, expected \"'\"");
    }
    getChar();

    return charToken;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
cmpb $0x27, 0x10(%rsi)
jne 0x729e
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6f94
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
movl $0x11, (%rbx)
movb 0x10(%r14), %al
movb %al, 0x2c(%rbx)
movq %r14, %rdi
callq 0x6f94
cmpb $0x27, 0x10(%r14)
jne 0x72bb
movq %r14, %rdi
callq 0x6f94
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8fe4(%rip), %rsi      # 0x10289
leaq -0x58(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3110
leaq -0x58(%rbp), %rsi
callq 0x73f6
leaq 0x8fe0(%rip), %rsi      # 0x102a2
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3110
leaq -0x38(%rbp), %rsi
callq 0x73f6
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x3140
jmp 0x72f9
jmp 0x72f6
movq %rax, %r14
leaq -0x58(%rbp), %rdi
jmp 0x7300
movq %rax, %r14
jmp 0x7305
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::identifySpecialToken()
Token Scanner::identifySpecialToken() {
    char firstChar = ch;
    getChar();
    switch (firstChar) {
        case '<': {
            if (ch == '=') {
                getChar();
                return Token(T_LESSEQUAL);
            }
        }
        case '>': {
            if (ch == '=') {
                getChar();
                return Token(T_GREATEREQUAL);
            }
        }
        case '&': {
            if (ch == '&') {
                getChar();
                return Token(T_AND);
            }
        }
        case '|' : {
            if (ch == '|') {
                getChar();
                return Token(T_OR);
            }
        }
        default: {
           break;
        }
    }
    auto search = charToToken.find(firstChar);
    if (search == charToToken.end()) {
        std::cerr << "Invalid character!";
        exit(1);
    } 
    return { search->second };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x10(%rsi), %r15d
movb %r15b, -0x19(%rbp)
movq %rsi, %rdi
callq 0x6f94
cmpl $0x26, %r15d
je 0x7375
cmpl $0x3c, %r15d
je 0x734d
cmpl $0x3e, %r15d
je 0x7361
cmpl $0x7c, %r15d
jne 0x739a
movb 0x10(%r14), %al
jmp 0x7389
movb 0x10(%r14), %al
cmpb $0x3d, %al
jne 0x7379
movq %r14, %rdi
callq 0x6f94
pushq $0x1a
jmp 0x7397
movb 0x10(%r14), %al
cmpb $0x3d, %al
jne 0x7379
movq %r14, %rdi
callq 0x6f94
pushq $0x1b
jmp 0x7397
movb 0x10(%r14), %al
cmpb $0x26, %al
jne 0x7389
movq %r14, %rdi
callq 0x6f94
pushq $0x1c
jmp 0x7397
cmpb $0x7c, %al
jne 0x739a
movq %r14, %rdi
callq 0x6f94
pushq $0x1d
popq %rax
jmp 0x73b9
leaq 0x10f47(%rip), %rdi     # 0x182e8
leaq -0x19(%rbp), %rsi
callq 0x806a
leaq 0x10f3f(%rip), %rcx     # 0x182f0
cmpq %rcx, %rax
je 0x73da
movl 0x24(%rax), %eax
movl %eax, (%rbx)
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10c0f(%rip), %rdi     # 0x17ff0
leaq 0x8e8e(%rip), %rsi      # 0x10276
callq 0x3230
pushq $0x1
popq %rdi
callq 0x3290
nop
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/scanner.cpp
// Function: Scanner::scan[abi:cxx11]()
std::list<Token> Scanner::scan() {
    std::cout << "Scanning...\n";
    getChar();

    std::list<Token> tokenList;
    while (true) {
        Token t = getNextToken();
        tokenList.push_back(t);

        if (t.type == T_EOF_TOKEN) break;
    }

    if (debug) {
        std::cout << "Scanner output: \n\t";
        for (auto const & i : tokenList) {
            std::cout << tokenToStr(i) << " ";
        }
        std::cout << std::endl;
    }

    return tokenList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %r14
movq %rdi, %r13
movq 0x10b81(%rip), %rdi     # 0x17fc8
leaq 0x8e7f(%rip), %rsi      # 0x102cd
callq 0x3230
movq %r14, %rdi
callq 0x6f94
movq %r13, 0x8(%r13)
movq %r13, (%r13)
andq $0x0, 0x10(%r13)
leaq -0x1f8(%rbp), %r12
leaq -0x200(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6fc0
movq %r13, %rdi
movq %r15, %rsi
callq 0x7848
movl -0x200(%rbp), %ebx
movq %r12, %rdi
callq 0x3140
cmpl $0xb, %ebx
jne 0x7476
cmpb $0x1, 0x11(%r14)
jne 0x75eb
movq 0x10b17(%rip), %rdi     # 0x17fc8
leaq 0x8e22(%rip), %rsi      # 0x102da
callq 0x3230
leaq -0x58(%rbp), %r15
leaq -0x78(%rbp), %r12
movq %r13, %rbx
movq (%rbx), %rbx
cmpq %r13, %rbx
je 0x75df
leaq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x7858
leaq 0x10e61(%rip), %rdi     # 0x18348
movq %r15, %rsi
callq 0x7958
movq %rax, %r14
leaq 0x10e57(%rip), %rax     # 0x18350
cmpq %rax, %r14
je 0x754a
leaq -0x200(%rbp), %rdi
callq 0x31b0
addq $0x28, %r14
leaq -0x1f0(%rbp), %rdi
movq %r14, %rsi
callq 0x3210
movl -0x58(%rbp), %eax
cmpl $0x9, %eax
je 0x7562
cmpl $0xf, %eax
jne 0x7590
leaq -0x1f0(%rbp), %rdi
leaq 0x9138(%rip), %rsi      # 0x10670
callq 0x3230
movl -0x30(%rbp), %esi
movq %rax, %rdi
callq 0x33d0
jmp 0x7581
movq %r12, %rdi
leaq 0x8d99(%rip), %rsi      # 0x102ed
leaq -0x200(%rbp), %rdx
callq 0x3110
jmp 0x75ab
leaq -0x1f0(%rbp), %rdi
leaq 0x9100(%rip), %rsi      # 0x10670
callq 0x3230
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x3210
movq %rax, %rdi
leaq 0x8d7b(%rip), %rsi      # 0x10306
callq 0x3230
movq %r12, %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x3370
leaq -0x200(%rbp), %rdi
callq 0x31c0
movq 0x10a16(%rip), %rdi     # 0x17fc8
movq %r12, %rsi
callq 0x3210
movq %rax, %rdi
leaq 0x9296(%rip), %rsi      # 0x1085a
callq 0x3230
movq %r12, %rdi
callq 0x3140
leaq -0x50(%rbp), %rdi
callq 0x3140
jmp 0x74c8
movq 0x109e2(%rip), %rdi     # 0x17fc8
callq 0x3150
movq %r13, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7617
jmp 0x7617
movq %rax, %r15
leaq -0x78(%rbp), %rdi
callq 0x3140
jmp 0x7633
movq %rax, %r15
jmp 0x7633
movq %rax, %r15
jmp 0x763c
movq %rax, %r15
movq %r12, %rdi
jmp 0x7637
movq %rax, %r15
leaq -0x200(%rbp), %rdi
callq 0x31c0
leaq -0x50(%rbp), %rdi
callq 0x3140
movq %r13, %rdi
callq 0x6090
movq %r15, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::parse()
ASTNode * Parser::parse() {
    std::cout << "Parsing..." << std::endl;
    root = program();
    std::cout << std::endl;
    printAST(root);
    return root;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0xfdb7(%rip), %r14      # 0x17fc8
leaq 0x81ea(%rip), %rsi      # 0x10402
movq %r14, %rdi
callq 0x3230
movq %rax, %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x82a0
movq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x3150
movq 0x10(%rbx), %r15
leaq 0x8286(%rip), %rsi      # 0x104cd
movq %r14, %rdi
callq 0x3230
leaq 0x8095(%rip), %rsi      # 0x102eb
leaq -0x40(%rbp), %r14
leaq -0x19(%rbp), %rdx
movq %r14, %rdi
callq 0x3110
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x932a
leaq -0x40(%rbp), %rdi
callq 0x3140
movq 0x10(%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::program()
ASTNode * Parser::program() {
    /*
        {<function> | <declaration>}

        Lookahead:
        <type> <identifier>
            ";" -> declaration
            "(" -> function
    */

    ASTNode * node = new ASTNode(AST_PROGRAM);

    while (t.type != T_EOF_TOKEN) {
        TokenType decider = lookahead(2);

        ASTNode * childNode;

        if(decider == T_LPAREN) {
            childNode = function();
        } else {
            childNode = declaration();
            expect(T_SEMI);
        }

        node->children.push_back(childNode);
    }

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movq %rax, -0x40(%rbp)
movl $0x1, (%rax)
pushq $0x2
popq %r12
leaq -0x38(%rbp), %r13
leaq -0x2c(%rbp), %r14
cmpl $0xb, 0x18(%rbx)
je 0x832e
movq %rbx, %rdi
movl %r12d, %esi
callq 0x85e6
movq %rbx, %rdi
cmpl $0x4, %eax
jne 0x8306
callq 0x8620
movq %rax, -0x38(%rbp)
jmp 0x8321
callq 0x86c4
movq %rax, -0x38(%rbp)
movl $0x3, -0x2c(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x875c
movq %r15, %rdi
movq %r13, %rsi
callq 0x9976
jmp 0x82e2
movq -0x40(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::next()
void Parser::next() {
    if (t.type == T_EOF_TOKEN) {
        reject("Unexpected EOF");
        return;
    }
    std::advance(tokenIterator, 1);
    t = *tokenIterator;

    std::cout << tokenToStr(t) << " ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
cmpl $0xb, 0x18(%rdi)
je 0x83cb
leaq 0x18(%rbx), %r14
leaq 0x8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0xa420
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x9934
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7858
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x84dd
movq 0xfc30(%rip), %rdi      # 0x17fc8
leaq -0x38(%rbp), %rsi
callq 0x3210
leaq 0x84b2(%rip), %rsi      # 0x1085a
movq %rax, %rdi
callq 0x3230
leaq -0x38(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %rdi
callq 0x3140
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x803b(%rip), %rsi      # 0x1040d
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3110
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x841c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
jmp 0x840e
movq %rax, %rbx
jmp 0x8413
movq %rax, %rbx
jmp 0x840a
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/./util/tokenUtil.h
// Function: tokenToStr[abi:cxx11](Token)
static std::string tokenToStr(Token t) {
    auto search = tokenToStrMap.find(t.type);
    if (search == tokenToStrMap.end()) {
        return "TOKEN_UTIL_MISSING_TOKEN";
    } else {
        std::stringstream outputString;
        outputString << search->second;
        switch(t.type) {
            case T_INTVALUE:
                outputString << "(" << t.intVal << ")";
                break;
            case T_IDENT:
                outputString << "(" << t.stringVal << ")";
                break;
        }

        return outputString.str();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xfeb4(%rip), %rdi      # 0x183b0
callq 0x7958
movq %rax, %r12
leaq 0xfead(%rip), %rax      # 0x183b8
cmpq %rax, %r12
je 0x855c
leaq -0x1a8(%rbp), %rdi
callq 0x31b0
leaq -0x198(%rbp), %r15
addq $0x28, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3210
movl (%r14), %eax
cmpl $0x9, %eax
je 0x8574
cmpl $0xf, %eax
jne 0x85a1
leaq 0x812a(%rip), %rsi      # 0x10670
movq %r15, %rdi
callq 0x3230
movl 0x28(%r14), %esi
movq %rax, %rdi
callq 0x33d0
jmp 0x8592
leaq 0x7d8a(%rip), %rsi      # 0x102ed
leaq -0x1a8(%rbp), %rdx
movq %rbx, %rdi
callq 0x3110
jmp 0x85bc
leaq 0x80f5(%rip), %rsi      # 0x10670
movq %r15, %rdi
callq 0x3230
addq $0x8, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x3210
leaq 0x7d6d(%rip), %rsi      # 0x10306
movq %rax, %rdi
callq 0x3230
leaq -0x190(%rbp), %rsi
movq %rbx, %rdi
callq 0x3370
leaq -0x1a8(%rbp), %rdi
callq 0x31c0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
callq 0x31c0
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::function()
ASTNode * Parser::function() {
    /*
        <type> <identifier> <parameterList> <functionBody>
    */
    ASTNode * node = new ASTNode(AST_FUNCTION);

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

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %rbx
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x2, (%rax)
movq %r14, %rdi
callq 0x881c
leaq -0x28(%rbp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movq %r14, %rdi
callq 0x88aa
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movq %r14, %rdi
callq 0x8944
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movq %r14, %rdi
callq 0x89f6
movq %rax, (%r12)
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
callq 0xa5a2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::declaration()
ASTNode * Parser::declaration() {
    /*
        This could be extended to include forward declarations of functions. 
        For now, we only support forward declarations of variables.
        <type> <variableDeclaration> { "," variableDeclaration }
    */
    ASTNode * node = new ASTNode(AST_DECLARATION);
    node->children.push_back(type());
    node->children.push_back(variableDeclaration());

    while (t.type == T_COMMA) {
        next();
        node->children.push_back(variableDeclaration());
    }
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x3, (%rax)
movq %rbx, %rdi
callq 0x881c
leaq -0x28(%rbp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movq %rbx, %rdi
callq 0x8e76
movq %rax, (%r12)
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
callq 0xa5a2
cmpl $0xa, 0x18(%rbx)
jne 0x874c
movq %rbx, %rdi
callq 0x8342
movq %rbx, %rdi
callq 0x8e76
movq %rax, -0x28(%rbp)
movq %r15, %rdi
movq %r12, %rsi
jmp 0x8725
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::expect(TokenType const&)
void Parser::expect(const TokenType & type) {
    if (t.type != type) {
        std::string err("Expected: ");
        std::string nodeString;
        auto search = tokenToStrMap.find(type);
        if (search != tokenToStrMap.end()) {
            nodeString = search->second;
        } else {
            nodeString = "NOTFOUND";
        }
        err.append(nodeString);
        reject(err);
    } else {
        // Consume
        next();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl 0x18(%rdi), %eax
cmpl (%rsi), %eax
jne 0x8781
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8342
movq %rsi, %r14
leaq 0x7cd2(%rip), %rsi      # 0x1045d
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3110
leaq -0x20(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xfc01(%rip), %rdi      # 0x183b0
movq %r14, %rsi
callq 0x7958
leaq 0xfbfa(%rip), %rcx      # 0x183b8
cmpq %rcx, %rax
jne 0x87d5
leaq 0x7c9e(%rip), %rsi      # 0x10468
leaq -0x30(%rbp), %rdi
callq 0x3430
jmp 0x87e5
addq $0x28, %rax
leaq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x3180
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3440
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x841c
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3140
leaq -0x50(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/taurheim[P]AgNES/parser.cpp
// Function: Parser::type()
ASTNode * Parser::type() {
    /*
        Terminal
    */
    TypeNode * node = new TypeNode();
    switch(t.type) {
        case T_INT: {
            node->varType = VT_INT;
            break;
        }
        case T_CHAR: {
            node->varType = VT_CHAR;
            break;
        }
        default: {
            reject("Type not recognized");
        }
    }

    next();
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x3250
movq %rax, %r14
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movl $0x6, (%rax)
movl 0x18(%rbx), %eax
cmpl $0xe, %eax
je 0x8858
cmpl $0x10, %eax
jne 0x8873
pushq $0x2
jmp 0x885a
pushq $0x1
popq %rax
movl %eax, 0x20(%r14)
movq %rbx, %rdi
callq 0x8342
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7bb6(%rip), %rsi      # 0x10430
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
callq 0x841c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpl $0x9, 0x18(%rdi)
jne 0x890e
pushq $0x40
popq %rdi
callq 0x3250
movq %rax, %r14
andq $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0x4, (%rax)
addq $0x30, %rax
movq %rax, 0x20(%r14)
andq $0x0, 0x28(%r14)
leaq 0x20(%r14), %rdi
movb $0x0, 0x30(%r14)
leaq 0x20(%rbx), %rsi
callq 0x3180
movq %rbx, %rdi
callq 0x8342
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7b07(%rip), %rsi      # 0x1041c
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
callq 0x841c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movl $0x7, (%rax)
leaq -0x28(%rbp), %rsi
movl $0x4, (%rsi)
movq %rbx, %rdi
callq 0x875c
cmpl $0x5, 0x18(%rbx)
jne 0x89ad
leaq -0x28(%rbp), %rsi
movl $0x5, (%rsi)
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
addq $0x8, %r15
movq %rbx, %rdi
callq 0x8e00
leaq -0x28(%rbp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
cmpl $0xa, 0x18(%rbx)
jne 0x898b
movl $0xa, -0x28(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x875c
movq %rbx, %rdi
callq 0x8e00
movq %rax, -0x28(%rbp)
jmp 0x89c4
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movl $0x10, (%rax)
leaq -0x28(%rbp), %r12
movl $0x6, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x875c
cmpl $0x7, 0x18(%rbx)
je 0x8a5f
movq %rbx, %rdi
callq 0x8a82
movq %rax, -0x28(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
jmp 0x8a40
leaq -0x28(%rbp), %rsi
movl $0x7, (%rsi)
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %rbx
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x8, (%rax)
movq %r14, %rdi
callq 0x881c
leaq -0x28(%rbp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movq %r14, %rdi
callq 0x88aa
movq %rax, (%r12)
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
callq 0xa5a2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0xf, (%rax)
movq %rbx, %rdi
callq 0x88aa
leaq -0x28(%rbp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0xa5a2
cmpl $0xc, 0x18(%rbx)
jne 0x8f08
leaq -0x28(%rbp), %r12
movl $0xc, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x875c
movq %rbx, %rdi
callq 0x8f18
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movl $0xd, (%r12)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x3250
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x5, (%rax)
movl 0x40(%rbx), %eax
movl %eax, 0x20(%r14)
leaq -0x14(%rbp), %rsi
movl $0xf, (%rsi)
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0xa, (%rax)
movq %rbx, %rdi
callq 0x88aa
leaq -0x28(%rbp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0xa5a2
cmpl $0xc, 0x18(%rbx)
jne 0x9186
leaq -0x28(%rbp), %r12
movl $0xc, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x875c
movq %rbx, %rdi
callq 0x91d6
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movl $0xd, (%r12)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x875c
leaq -0x28(%rbp), %r12
andl $0x0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x875c
movq %rbx, %rdi
callq 0x8f68
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa5a2
movl $0x3, (%r12)
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x3250
movq %rax, %r14
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x11, (%rax)
movq %rbx, %rdi
callq 0x8f68
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0xa5a2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x3250
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x12, (%rax)
movb 0x44(%rbx), %al
movb %al, 0x20(%r14)
leaq -0x14(%rbp), %rsi
movl $0x11, (%rsi)
movq %rbx, %rdi
callq 0x875c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
pushq $0x40
popq %rdi
callq 0x3250
movq %rax, %r14
andq $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0xd, (%rax)
addq $0x30, %rax
movq %rax, 0x20(%r14)
andq $0x0, 0x28(%r14)
movb $0x0, 0x30(%r14)
movl 0x18(%rbx), %eax
cmpl $0x1, %eax
je 0x92cd
cmpl $0x2, %eax
jne 0x92f4
leaq 0x726d(%rip), %rsi      # 0x10538
jmp 0x92d4
leaq 0x6e16(%rip), %rsi      # 0x100ea
movq %r14, %rdi
addq $0x20, %rdi
callq 0x3430
movq %rbx, %rdi
callq 0x8342
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x71ba(%rip), %rsi      # 0x104b5
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
callq 0x841c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
andl $0x0, 0x10(%rdi)
pushq $0xc
popq %r14
movq %r14, %rdi
callq 0x3250
movq $0x1, (%rax)
andl $0x0, 0x8(%rax)
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x3250
movq $0x2, (%rax)
andl $0x0, 0x8(%rax)
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x3250
movq $0x3, (%rax)
andl $0x0, 0x8(%rax)
movq %rax, 0x28(%rbx)
pushq $0x58
popq %rdi
callq 0x3250
andq $0x0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x28(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x30(%rax)
leaq 0x48(%rax), %rcx
movq %rcx, 0x38(%rax)
andq $0x0, 0x40(%rax)
movb $0x0, 0x48(%rax)
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq (%r15), %r15
movq 0x10(%r15), %rdi
addq $0x10, %r15
testq %rdi, %rdi
je 0xb5ce
addq $0x38, %rdi
movq %rbx, %rsi
callq 0xb937
testb %al, %al
je 0xb57a
movq 0xca27(%rip), %rdi      # 0x17fc8
leaq 0x50cb(%rip), %rsi      # 0x10673
callq 0x3230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3210
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3150
pushq $0xc
popq %rdi
callq 0x3250
movl %r13d, -0x2c(%rbp)
movq %rax, %r13
movl %r12d, (%rax)
andq $0x0, 0x4(%rax)
pushq $0x58
popq %rdi
callq 0x3250
movq %rax, %r12
andq $0x0, 0x10(%rax)
addq $0x20, %rax
movq %rax, 0x28(%r12)
movq %rax, 0x20(%r12)
andq $0x0, 0x30(%r12)
leaq 0x38(%r12), %rdi
leaq 0x48(%r12), %rax
movq %rax, 0x38(%r12)
andq $0x0, 0x40(%r12)
movb $0x0, 0x48(%r12)
movq %rbx, %rsi
callq 0x3180
movl -0x2c(%rbp), %eax
movl %eax, (%r12)
movl 0x10(%r14), %eax
movl %eax, 0x4(%r12)
movq %r13, 0x8(%r12)
movq %r12, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl 0x10(%rdi), %r13d
incl %r13d
movl %r13d, 0x10(%rdi)
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %r12
pushq $0x58
popq %rdi
callq 0x3250
andl $0x0, (%rax)
movl %r13d, 0x4(%rax)
andq $0x0, 0x10(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x28(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x30(%rax)
leaq 0x48(%rax), %rcx
movq %rcx, 0x38(%rax)
andq $0x0, 0x40(%rax)
leaq 0x38(%rax), %rdi
movb $0x0, 0x48(%rax)
movq %rax, 0x8(%rbx)
movq %r15, %rsi
callq 0x3180
movq 0x8(%rbx), %rax
movq %r12, 0x18(%rax)
addq $0x20, %r12
movq %r12, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb95a
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rax
movq (%rax), %r12
testq %r12, %r12
je 0xb7f1
movq %r12, %r15
movq 0x10(%r15), %r15
testq %r15, %r15
je 0xb7e7
leaq 0x38(%r15), %rdi
movq %rbx, %rsi
callq 0xb937
testb %al, %al
je 0xb7cc
jmp 0xb7f4
leaq 0x18(%r12), %rax
cmpq (%r14), %r12
jne 0xb7c1
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq (%rdi), %r15
addq $0x20, %r15
xorl %ebx, %ebx
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0xb83d
movq 0x10(%r12), %rdi
addq $0x38, %rdi
movq %r14, %rsi
callq 0xb937
testb %al, %al
je 0xb81a
movq 0x10(%r12), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r12
movq 0xc765(%rip), %rbx      # 0x17fc8
leaq 0x4e2f(%rip), %rsi      # 0x10699
movq %rbx, %rdi
callq 0x3230
movq %rax, %rdi
callq 0x3150
leaq 0x4e2c(%rip), %r13      # 0x106ad
leaq 0x4e2a(%rip), %r14      # 0x106b2
leaq 0x4e27(%rip), %r15      # 0x106b6
testq %r12, %r12
je 0xb91e
movq %rbx, %rdi
leaq 0x4c9b(%rip), %rsi      # 0x1053d
callq 0x3230
movq %rax, %rdi
callq 0x3150
movq %rbx, %rdi
leaq 0x4deb(%rip), %rsi      # 0x106a4
callq 0x3230
movq %r12, -0x30(%rbp)
movq 0x10(%r12), %r12
movq %rbx, %rdi
testq %r12, %r12
je 0xb8fc
movq %r13, %rsi
callq 0x3230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3230
leaq 0x38(%r12), %rsi
movq %rax, %rdi
callq 0x3210
movq %rax, %rdi
movq %r15, %rsi
callq 0x3230
jmp 0xb8c2
leaq 0x4db7(%rip), %rsi      # 0x106ba
callq 0x3230
movq %rax, %rdi
callq 0x3150
movq -0x30(%rbp), %r12
movq 0x18(%r12), %r12
jmp 0xb88f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop