LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::hasMoreAttributes(long&)
__attribute__((always_inline)) bool QueryProcessor::hasMoreAttributes(long& pos) {
    // if current character is blank, skip this character until meeting a non-blank character
    while (mRecord[pos] == ' ') ++pos;
    ++pos;
    while (mRecord[pos] == ' ') {
        ++pos;
    }
    if (mRecord[pos] == '}') {
        return false;
    }
    if (mRecord[pos] == ',') ++pos;
    while (mRecord[pos] == ' ' || mRecord[pos] == '\n') ++pos; 
    return true;
}

// Assembly:
movq 0x2c8(%rdi), %rax
movq (%rsi), %rdx
cmpb $0x20, (%rax,%rdx)
jne 0x19d19
leaq 0x1(%rdx), %rcx
movq %rcx, (%rsi)
cmpb $0x20, 0x1(%rax,%rdx)
movq %rcx, %rdx
je 0x19d06
jmp 0x19d1c
movq %rdx, %rcx
incq %rcx
movq %rcx, (%rsi)
movb (%rax,%rcx), %dl
incq %rcx
cmpb $0x20, %dl
je 0x19d1f
cmpb $0x7d, %dl
je 0x19d52
cmpb $0x2c, %dl
je 0x19d3c
decq %rcx
jmp 0x19d3f
movq %rcx, (%rsi)
movzbl (%rax,%rcx), %edi
cmpl $0x20, %edi
je 0x19d4d
cmpl $0xa, %edi
jne 0x19d52
incq %rcx
jmp 0x19d3c
cmpb $0x7d, %dl
setne %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::runQuery[abi:cxx11](Record*)
string QueryProcessor::runQuery(Record* rec) {
    setRecordText(rec->text + rec->rec_start_pos, rec->rec_length);
    init();
    long cur_pos = 0;
    char ch = getNextNonEmptyCharacter(cur_pos);
    bitmap bm;
    if (ch == '{' && qa.typeExpectedInObj() != NONE)
        object(cur_pos, bm);
    else if(ch == '[' && qa.typeExpectedInArr() != NONE)
        array(cur_pos, bm);
    return mOutput;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rax
movq 0x10(%rdx), %rcx
addq 0x8(%rdx), %rax
movq %rax, 0x2c8(%rsi)
leaq 0x1f(%rcx), %rax
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rax
cmovnsq %rcx, %rdx
movq %rcx, 0x2d0(%rsi)
sarq $0x5, %rax
movq %rax, 0x2d8(%rsi)
sarq $0x6, %rdx
movq %rdx, 0x2e0(%rsi)
vbroadcastf128 0x9f8c6(%rip), %ymm0 # ymm0 = mem[0,1,0,1]
vbroadcastsd 0x9f86d(%rip), %ymm1 # 0xc5040
vmovaps %ymm0, 0x120(%rsi)
vmovaps %ymm1, 0x100(%rsi)
vbroadcastsd 0x9f85c(%rip), %ymm0 # 0xc5048
vmovaps %ymm0, 0x140(%rsi)
vbroadcastsd 0x9f853(%rip), %ymm0 # 0xc5050
vmovaps %ymm0, 0x160(%rsi)
vbroadcastsd 0x9f84a(%rip), %ymm0 # 0xc5058
vbroadcastsd 0x9f849(%rip), %ymm1 # 0xc5060
vmovaps %ymm0, 0x180(%rsi)
vmovaps %ymm1, 0x1a0(%rsi)
vbroadcastsd 0x9f838(%rip), %ymm0 # 0xc5068
vmovaps %ymm0, 0x1c0(%rsi)
vbroadcastsd 0x9f82f(%rip), %ymm0 # 0xc5070
vmovaps %ymm0, 0x1e0(%rsi)
vbroadcastsd 0x9f826(%rip), %ymm0 # 0xc5078
vbroadcastsd 0x9f825(%rip), %ymm1 # 0xc5080
vmovaps %ymm0, 0x200(%rsi)
vmovaps %ymm1, 0x220(%rsi)
vxorps %xmm1, %xmm1, %xmm1
vmovaps %xmm1, 0x240(%rsi)
movabsq $0x5555555555555555, %rax # imm = 0x5555555555555555
movq %rax, 0x250(%rsi)
movabsq $-0x5555555555555556, %rax # imm = 0xAAAAAAAAAAAAAAAA
movq %rax, 0x258(%rsi)
xorl %eax, %eax
movq %rax, 0x88(%rsi)
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x281(%rsi)
vmovups %ymm0, 0x278(%rsi)
vmovaps %xmm1, 0x2b0(%rsi)
movq %rax, 0x2c0(%rsi)
movq $-0x1, 0x270(%rsi)
movq %rax, 0x2a8(%rsi)
movq %rax, 0xef08(%rsi)
movq 0xef00(%rsi), %rcx
movb $0x0, (%rcx)
movq %rax, 0x8(%rsp)
movq 0x2c8(%rsi), %rcx
movb (%rcx), %al
cmpb $0x20, %al
jne 0x2590c
xorl %edx, %edx
movb 0x1(%rcx,%rdx), %al
incq %rdx
cmpb $0x20, %al
je 0x258fc
movq %rdx, 0x8(%rsp)
vmovups %ymm0, 0x26(%rsp)
vmovups %ymm0, 0x10(%rsp)
cmpb $0x5b, %al
je 0x25959
movzbl %al, %eax
cmpl $0x7b, %eax
jne 0x2598c
movslq 0x6e0(%r14), %rax
testq %rax, %rax
je 0x25942
imulq $0x49c, %rax, %rax      # imm = 0x49C
cmpl $0x6c, 0x2b0(%r14,%rax)
je 0x2598c
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
vzeroupper
callq 0x1dbb6
jmp 0x2598c
movslq 0x6e0(%r14), %rax
testq %rax, %rax
je 0x25977
imulq $0x49c, %rax, %rax      # imm = 0x49C
cmpl $0x6c, 0x2b4(%r14,%rax)
je 0x2598c
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
vzeroupper
callq 0x20908
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0xef00(%r14), %rsi
movq 0xef08(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
vzeroupper
callq 0x259ba
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/RecordLoader.cpp
// Function: RecordLoader::loadSingleRecord(char*)
Record* RecordLoader::loadSingleRecord(char* file_path) {
    unsigned long size;
    FILE* fp = fopen (file_path,"rb");
    if (fp == NULL) {
        return NULL;
    }
    fseek (fp, 0, SEEK_END);
    size = ftell(fp);
    rewind(fp);
    void* p;
    if (posix_memalign(&p, 64, (size + MAX_PAD)*sizeof(char)) != 0) {
        cout<<"Fail to allocate memory space for input record."<<endl;
    }
    char* record_text = (char*) p;
    size_t load_size = fread (record_text, 1, size, fp);
    if (load_size == 0) {
        cout<<"Fail to load the input record into memory"<<endl;
    }
    int remain = 64 - (size % 64);
    int counter = 0;
    // pad the input data where its size can be divided by 64
    while (counter < remain)
    {
        record_text[size+counter] = 'd';
        counter++;
    }
    record_text[size+counter]='\0';
    fclose(fp);
    // only one single record
    Record* record = new Record();
    record->text = record_text;
    record->rec_start_pos = 0;
    record->rec_length = strlen(record_text);
    return record;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9f69b(%rip), %rsi     # 0xc50fa
callq 0x13240
testq %rax, %rax
je 0x25ba1
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x131a0
movq %rbx, %rdi
callq 0x130f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x13470
leaq 0x40(%r14), %rdx
movq %rsp, %rdi
movl $0x40, %esi
callq 0x13130
testl %eax, %eax
je 0x25ae9
leaq 0xd99d2(%rip), %r15     # 0xff480
leaq 0x9f648(%rip), %rsi     # 0xc50fd
movl $0x2f, %edx
movq %r15, %rdi
callq 0x8ec40
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6fd90
movsbl %al, %esi
movq %r15, %rdi
callq 0x8e740
movq %rax, %rdi
callq 0x8dd10
movq (%rsp), %r15
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x13530
testq %rax, %rax
jne 0x25b48
leaq 0xd9974(%rip), %r12     # 0xff480
leaq 0x9f61a(%rip), %rsi     # 0xc512d
movl $0x29, %edx
movq %r12, %rdi
callq 0x8ec40
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x6fd90
movsbl %al, %esi
movq %r12, %rdi
callq 0x8e740
movq %rax, %rdi
callq 0x8dd10
movl %r14d, %r12d
andl $0x3f, %r12d
movl $0x40, %edx
subl %r12d, %edx
addq %r15, %r14
movq %r14, %rdi
movl $0x64, %esi
callq 0x130e0
subq %r12, %r14
movb $0x0, 0x40(%r14)
movq %rbx, %rdi
callq 0x13610
movl $0x20, %edi
callq 0x26e80
movq %rax, %rbx
movb $0x1, 0x18(%rax)
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
movq %r15, %rdi
callq 0x13370
movq %rax, 0x10(%rbx)
jmp 0x25ba3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/example/example2.cpp
// Function: main
int main() {
    char* file_path = "../dataset/bestbuy_sample_large_record.json";
    Record* rec = RecordLoader::loadSingleRecord(file_path);
    if (rec == NULL) {
        cout<<"record loading fails."<<endl;
        return -1;
    }

    QueryProcessor processor("$.products[*].categoryPath[1:3].name");
    string output = processor.runQuery(rec);
    cout<<"matches are: "<<output<<endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
andq $-0x20, %rsp
subq $0xef80, %rsp           # imm = 0xEF80
leaq 0x9f245(%rip), %rdi     # 0xc51c0
callq 0x25a50
testq %rax, %rax
je 0x26054
movq %rax, %rbx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9f266(%rip), %rsi     # 0xc5202
leaq 0x9f283(%rip), %rdx     # 0xc5226
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x260e8
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x165d8
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x25fcc
callq 0x26180
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x25772
leaq 0xd949d(%rip), %rdi     # 0xff480
leaq 0x9f23d(%rip), %rsi     # 0xc5227
movl $0xd, %edx
callq 0x8ec40
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xd947c(%rip), %rdi     # 0xff480
callq 0x8ec40
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6fd90
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8e740
movq %rax, %rdi
callq 0x8dd10
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26046
callq 0x26180
leaq 0x40(%rsp), %rdi
callq 0x16972
xorl %eax, %eax
jmp 0x2609b
leaq 0xd9425(%rip), %rbx     # 0xff480
leaq 0x9f18a(%rip), %rsi     # 0xc51ec
movl $0x15, %edx
movq %rbx, %rdi
callq 0x8ec40
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6fd90
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8e740
movq %rax, %rdi
callq 0x8dd10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x260d5
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x260df
callq 0x26180
jmp 0x260df
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x260d5
callq 0x26180
leaq 0x40(%rsp), %rdi
callq 0x16972
movq %rbx, %rdi
callq 0x13720
nop
// File: /workspace/github_cpp_makefile_star2_O3/eschwabe[P]interview-practice/src/stablesort.cpp
// Function: stablesort(int*, int)
void stablesort(int array[], int length) {
    for(int idx = 0; idx < length-1; idx++) {
        int target = idx;
        for(int tidx = idx; tidx < length; tidx++) {
            if( array[target] > array[tidx] ) {
                target = tidx;
            }
        }
        std::cout << target << std::endl;
        int val = array[target];
        memmove(array+idx+1, array+idx, (target-idx)*sizeof(int));
        array[idx] = val;
    }
}

// Assembly:
cmpl $0x2, %esi
jl 0x129f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r13d
decl %ebx
xorl %r15d, %r15d
movl %r15d, %ebp
movq %r15, %rax
cmpq %r13, %r15
jae 0x1223
movslq %ebp, %rcx
movl (%r14,%rcx,4), %edx
movl %eax, %ecx
cmpl (%r14,%rax,4), %edx
jg 0x1219
movl %ebp, %ecx
incq %rax
movl %ecx, %ebp
cmpq %rax, %r13
jne 0x1208
movq 0x2dae(%rip), %rdi      # 0x3fd8
movl %ebp, %esi
callq 0x10a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movslq %ebp, %rax
movl (%r14,%rax,4), %ebp
leaq (%r14,%r15,4), %rsi
leaq (%r14,%r15,4), %r12
addq $0x4, %r12
subl %r15d, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
movq %r12, %rdi
callq 0x1090
movl %ebp, -0x4(%r12)
incq %r15
cmpq %rbx, %r15
jne 0x11fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eschwabe[P]interview-practice/src/stablesort.cpp
// Function: main
int main()
{
    int array[10] = {3,4,5,23,7,21,4,7,1,87};
    for(auto a : array) {
        std::cout << a << " ";
    }
    std::cout << std::endl;
    stablesort(array, 10);
    for(auto a : array) {
        std::cout << a << " ";
    }
    std::cout << std::endl;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movaps 0xd70(%rip), %xmm0      # 0x2020
movaps %xmm0, 0x10(%rsp)
movaps 0xd54(%rip), %xmm0      # 0x2010
movaps %xmm0, (%rsp)
movabsq $0x5700000001, %rax     # imm = 0x5700000001
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq 0x2cff(%rip), %rbx      # 0x3fd8
leaq 0xd58(%rip), %r14       # 0x2038
movl (%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x10a0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
addq $0x4, %r15
cmpq $0x28, %r15
jne 0x12e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %rsp, %rdi
movl $0xa, %esi
callq 0x11dc
xorl %r15d, %r15d
leaq 0xcf4(%rip), %r14       # 0x2038
movl (%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x10a0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1070
addq $0x4, %r15
cmpq $0x28, %r15
jne 0x1344
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/yaansz[P]just-a-terminal/terminal.cpp
// Function: BuiltInCommands::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char**)
int BuiltInCommands::execute(const string cmd, char** args) 
{
    if(this->commands.find(cmd) != this->commands.end()) {
        #ifdef DEBUG
        cout << "Executing command: " << cmd << endl;
        #endif
        return this->commands.at(cmd)(args);
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x3c76
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x27d5
movq %r15, %rdi
movq %r14, %rsi
callq 0x3202
movq %rbx, -0x20(%rbp)
cmpq $0x0, 0x10(%rax)
je 0x27e5
leaq -0x20(%rbp), %rsi
movq %rax, %rdi
callq *0x18(%rax)
jmp 0x27da
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O3/yaansz[P]just-a-terminal/terminal.cpp
// Function: blank(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int blank(string str) {
    const char * cstr = str.c_str();
    
    for(int i = 0; i < str.length(); i++) {
        if (cstr[i] != ' ')
            return 0;
    }
    return 1;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x2938
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
xorl %eax, %eax
cmpb $0x20, (%rdx)
jne 0x2936
movl $0x1, %eax
movq %rax, %rsi
cmpq %rax, %rcx
je 0x292e
leaq 0x1(%rsi), %rax
cmpb $0x20, (%rdx,%rsi)
je 0x291c
xorl %eax, %eax
cmpq %rsi, %rcx
setbe %al
popq %rbp
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/yaansz[P]just-a-terminal/terminal.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<string> split(const string& str, const string& delim)
{
    vector<string> tokens;
    size_t prev = 0, pos = 0;
    do
    {
        pos = str.find(delim, prev);
        if (pos == string::npos) pos = str.length();
        string token = str.substr(prev, pos-prev);
        if (!token.empty()) tokens.push_back(token);
        prev = pos + delim.length();
    }
    while (pos < str.length() && prev < str.length());
    return tokens;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
xorl %r13d, %r13d
leaq -0x50(%rbp), %r12
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x22d0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x298d
movq 0x8(%r15), %rbx
movq %rbx, %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21d0
cmpq $0x0, -0x48(%rbp)
je 0x29b4
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3260
movq 0x8(%r14), %r13
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x29d1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21c0
movq 0x8(%r15), %rax
cmpq %rax, %rbx
jae 0x29e2
addq %rbx, %r13
cmpq %rax, %r13
jb 0x296e
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2a16
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x2a16
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x32ac
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Atom.cpp
// Function: Atom::operator+(Atom&) const
Atom Atom::operator+(Atom& other) const {
	if (this->type == other.type) {
		return Atom(this->type, this->value + other.value);
	} else {
		//TODO throw an error
		throw 10; // this should stop it from generating a warning
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl (%rsi), %eax
cmpl (%rdx), %eax
jne 0x2708
movq %rdi, %rbx
movl 0x4(%rdx), %ecx
addl 0x4(%rsi), %ecx
movl %eax, (%rdi)
movl %ecx, 0x4(%rdi)
leaq 0x8(%rdi), %r14
xorl %r15d, %r15d
leaq (%r14,%r15), %rdi
callq 0x3bf0
addq $0x10, %r15
cmpq $0x40, %r15
jne 0x26e4
movq $0x0, 0x48(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movl $0x4, %edi
callq 0x2090
movl $0xa, (%rax)
movq 0x5881(%rip), %rsi      # 0x7fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Atom.cpp
// Function: Atom::roll(Rotation)
void Atom::roll(Rotation direction) {
	Bond bonds_copy[4];
	unsigned diff = 3;
	if (direction) {
		diff = 1;
	}
	for (unsigned i = 0; i < 4; ++i) {
		bonds_copy[(i+diff)%4] = bonds[i];
	}
	for (unsigned i = 0; i < 4; ++i) {
		bonds[i] = bonds_copy[i];
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
callq 0x3bf0
addq $0x10, %r14
cmpq $0x40, %r14
jne 0x273a
xorl %eax, %eax
testl %ebp, %ebp
sete %al
leaq 0x1(,%rax,2), %rax
addq $0x8, %rbx
xorl %ecx, %ecx
movl %eax, %edx
andl $0x3, %edx
shll $0x4, %edx
movl 0x8(%rbx,%rcx), %esi
movl %esi, 0x8(%rsp,%rdx)
movq (%rbx,%rcx), %rsi
movq %rsi, (%rsp,%rdx)
incq %rax
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0x2762
xorl %eax, %eax
movl 0x8(%rsp,%rax), %ecx
movl %ecx, 0x8(%rbx,%rax)
movq (%rsp,%rax), %rcx
movq %rcx, (%rbx,%rax)
addq $0x10, %rax
cmpq $0x40, %rax
jne 0x2789
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Atom.cpp
// Function: Atom::rotate(Rotation)
void Atom::rotate(Rotation direction) {
	//I think there might be a better way to do this algorithm
	//Roll this (the root)
	roll(direction);
	for (unsigned i = 0; i < 4; ++i) {
		if (bonds[i].getAtom() //Check that there is a bond to a non-Null atom
		    &&
		    bonds[i].getAtom()->getBond((i+2)%4).getAtom() != this //Check that the other atom has not been rotated as well
		) {
			//recurse
			bonds[i].getAtom()->rotate(direction);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x272a
leaq 0x8(%r14), %r15
xorl %r12d, %r12d
movq (%r15), %rdi
testq %rdi, %rdi
je 0x27e6
movq %r12, %rax
xorq $0x2, %rax
shlq $0x4, %rax
cmpq %r14, 0x8(%rdi,%rax)
je 0x27e6
movl %ebx, %esi
callq 0x27ac
incq %r12
addq $0x10, %r15
cmpq $0x4, %r12
jne 0x27c5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Atom.cpp
// Function: Atom::unbond()
void Atom::unbond() {
	//Iterate through all the bonds
	for (unsigned i = 0; i < 4; ++i) {
		//Zero out the bond
		while (bonds[i].isValid()) {
			--bonds[i];
		}
		//Zero out the complement of the bond
		while (bonds[i].getAtom()->bonds[(i+2)%4].isValid()) {
			--bonds[i].getAtom()->bonds[(i+2)%4];
		}
		//Tell the conected atom to clean itself
		bonds[i].getAtom()->cleanBonds();
	}
	//Clean this atom
	this->cleanBonds();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rbx
xorl %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %r14
cmpl $0x0, 0x8(%rbx,%rax)
je 0x285e
movq %r14, %rdi
callq 0x3c32
cmpl $0x0, 0x8(%r14)
jne 0x284f
movl %r15d, %r13d
xorq $0x2, %r13
movq (%r14), %r12
shlq $0x4, %r13
cmpl $0x0, 0x10(%r12,%r13)
je 0x2892
leaq (%r12,%r13), %rdi
addq $0x8, %rdi
callq 0x3c32
movq (%r14), %r12
leaq (%r12,%r13), %rdi
addq $0x8, %rdi
cmpl $0x0, 0x8(%rdi)
jne 0x287c
addq $0x8, %r12
xorl %r14d, %r14d
leaq (%r12,%r14), %rdi
callq 0x3c0c
addq $0x10, %r14
cmpq $0x40, %r14
jne 0x2899
incq %r15
cmpq $0x4, %r15
jne 0x283d
xorl %r14d, %r14d
leaq (%rbx,%r14), %rdi
callq 0x3c0c
addq $0x10, %r14
cmpq $0x40, %r14
jne 0x28b8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Atom.cpp
// Function: Atom::getMolecule(Atom*, std::unordered_set<Atom*, std::hash<Atom*>, std::equal_to<Atom*>, std::allocator<Atom*>>&)
std::unordered_set<Atom*> Atom::getMolecule(Atom* root, std::unordered_set<Atom*>& found) {
	for (unsigned b = 0; b < 4; ++b) {
		if (found.end() == found.find(bonds[b].getAtom())) {
			found.insert(bonds[b].getAtom());
			getMolecule(bonds[b].getAtom(), found);
		}
	}
	return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x8, %r13d
movq %rsp, %r12
leaq 0x10(%rsp), %rbp
movq (%r15,%r13), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2c0c
testq %rax, %rax
jne 0x29e0
movq (%r15,%r13), %rax
movq %rax, 0x8(%rsp)
movq %r14, (%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x2c68
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2970
movq %rbp, %rdi
callq 0x2a34
addq $0x10, %r13
cmpq $0x48, %r13
jne 0x2995
xorl %eax, %eax
movq %rax, (%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rcx
movq %rcx, 0x18(%rbx)
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2aae
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::Reactor(unsigned int, unsigned int, unsigned int)
Reactor:: Reactor(unsigned width, unsigned height, unsigned num_waldos)
	: w(width), h(height), waldo_num(num_waldos), sensorx(height+1), sensory(width+1),
	   board(new Tile*[height]), waldos(new Waldo[num_waldos]) {
	for (unsigned i = 0; i < height; ++i) {
		board[i] = new Tile[width];
		for (unsigned j = 0; j < width; ++j) {
			board[i][j].initialize(num_waldos);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r13d
movl %edx, %r12d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
leal 0x1(%r12), %eax
movl %eax, 0x10(%rdi)
movq %rsi, 0x10(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0x14(%rdi)
movl %edx, %eax
movq %rax, 0x40(%rsp)
leaq (,%rax,8), %rdi
callq 0x2030
movq %rbx, %r15
movq %rax, 0x18(%rbx)
movl %r13d, %r14d
movq %r14, %rbx
shlq $0x6, %rbx
leaq 0x8(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2030
movq %rax, %rbp
movq %r14, (%rax)
movl %r13d, 0x1c(%rsp)
testl %r13d, %r13d
je 0x2f93
negq %rbx
movl $0x8, %r13d
movq %rbp, %rdi
addq %r13, %rdi
callq 0x42c6
leaq (%rbx,%r13), %rax
addq $0x40, %rax
addq $0x40, %r13
cmpq $0x8, %rax
jne 0x2f76
addq $0x8, %rbp
movq %rbp, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
movq $0x0, 0x38(%r15)
testl %r12d, %r12d
je 0x3073
leaq 0x28(%r15), %rax
movq %rax, 0x30(%rsp)
movl 0x10(%rsp), %eax
movq %rax, 0x38(%rsp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,4), %r14
leaq (%rax,%rax,4), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq %r14, %r13
negq %r13
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
callq 0x2030
movq %rax, %rcx
leaq 0x8(%rax), %r12
movq 0x38(%rsp), %rax
movq %rax, (%rcx)
cmpl $0x0, 0x10(%rsp)
je 0x305d
movq %rcx, 0x20(%rsp)
movq %r12, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x3c68
addq $-0x28, %rbx
addq $0x28, %r12
cmpq %rbx, %r13
jne 0x3013
movq 0x18(%r15), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax,%rbp,8)
cmpl $0x0, 0x10(%rsp)
je 0x3065
xorl %ebx, %ebx
movq 0x18(%r15), %rax
movq (%rax,%rbp,8), %rdi
addq %rbx, %rdi
movl 0x1c(%rsp), %esi
callq 0x3cdc
addq $0x28, %rbx
cmpq %rbx, %r14
jne 0x303e
jmp 0x3065
movq 0x18(%r15), %rax
movq %r12, (%rax,%rbp,8)
incq %rbp
cmpq 0x40(%rsp), %rbp
jne 0x2fe7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30a7
movq %rax, %r14
cmpq $0x8, %r13
je 0x3098
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2211
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x21e0
jmp 0x30e8
movq %rax, %r14
jmp 0x30de
movq %rax, %r14
testq %rbx, %rbx
je 0x30cf
negq %rbx
movq 0x20(%rsp), %r15
addq $-0x20, %r15
leaq (%r15,%rbx), %rdi
callq 0x3d66
addq $-0x28, %rbx
jne 0x30c0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x21e0
movq 0x30(%rsp), %rdi
callq 0x3b90
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::~Reactor()
Reactor::~ Reactor() {
	for (unsigned i = 0; i < h; ++i) {
		delete [] board[i];
	}
	delete [] waldos;
	delete [] board;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0x3164
xorl %r15d, %r15d
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %r14
testq %r14, %r14
je 0x315a
movq -0x8(%r14), %r12
testq %r12, %r12
je 0x313f
leaq -0x28(%r14), %r13
leaq (,%r12,8), %rax
leaq (%rax,%rax,4), %rbp
movq %r13, %rdi
addq %rbp, %rdi
callq 0x3d66
addq $-0x28, %rbp
jne 0x312e
addq $-0x8, %r14
leaq (%r12,%r12,4), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x21e0
movl 0x4(%rbx), %eax
incq %r15
movl %eax, %ecx
cmpq %rcx, %r15
jb 0x3108
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x31b9
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x31a6
addq $-0x30, %r12
movq %r15, %r13
shlq $0x6, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x31a0
movq (%rax), %rsi
incq %rsi
callq 0x2140
addq $-0x40, %r13
jne 0x3187
shlq $0x6, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x31c7
callq 0x2150
addq $0x28, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3b90
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::advance(unsigned int)
void Reactor::advance(unsigned cycle) {
	if (init_waldos != waldo_num) throw 7;
	//Iterate through the waldos in priority order 
	for (unsigned i = 0; i < waldo_num; ++i) {
		//Redirect
		waldos[i].setDirection(board[waldos[i].getRow()][waldos[i].getCol()].getArrow(i));
		//Perform instruction
		handleInstruction(i);
		//Move the Waldo
		waldos[i].move(*this);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0xc(%rdi), %eax
cmpl 0x8(%rdi), %eax
jne 0x381a
testl %eax, %eax
je 0x380e
movq %rdi, %rbx
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
leaq (%rcx,%r12), %r15
movl 0x20(%rcx,%r12), %edx
movl 0x24(%rcx,%r12), %ecx
leaq (%rcx,%rcx,4), %rdi
shlq $0x3, %rdi
addq (%rax,%rdx,8), %rdi
movl %r14d, %esi
callq 0x3d96
movq %r15, %rdi
movl %eax, %esi
callq 0x446c
movq %rbx, %rdi
movl %r14d, %esi
callq 0x31f0
movq 0x20(%rbx), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x4370
incq %r14
movl 0x8(%rbx), %eax
addq $0x40, %r12
cmpq %rax, %r14
jb 0x37b1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x4, %edi
callq 0x2090
movl $0x7, (%rax)
movq 0x476f(%rip), %rsi      # 0x7fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::popAtom(Atom*, unsigned int, unsigned int)
void Reactor::popAtom(Atom* root, unsigned row, unsigned col) {
	if (board[row][col].getAtom()) {
		board[row][col].removeAtom();
		if (root->getBond(UP).getAtom()) {
			popAtom(root->getBond(UP).getAtom(), row-1, col);
		}
		else if (root->getBond(DOWN).getAtom()) {
			popAtom(root->getBond(DOWN).getAtom(), row+1, col);
		}
		else if (root->getBond(RIGHT).getAtom()) {
			popAtom(root->getBond(RIGHT).getAtom(), row, col+1);
		}
		else if (root->getBond(LEFT).getAtom()) {
			popAtom(root->getBond(LEFT).getAtom(), row, col-1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, (%rsp)
movl %edx, %r13d
movq 0x18(%rdi), %rax
movl %ecx, %ebp
leaq (,%rbp,4), %rdi
addq %rbp, %rdi
shlq $0x3, %rdi
addq (%rax,%r13,8), %rdi
callq 0x3df2
testq %rax, %rax
je 0x392c
movq %r14, %r12
movq 0x18(%r15), %rax
leaq (,%rbp,4), %rdi
addq %rbp, %rdi
shlq $0x3, %rdi
addq (%rax,%r13,8), %rdi
callq 0x3ee2
movq 0x28(%r12), %r14
testq %r14, %r14
jne 0x38f2
movq 0x48(%r12), %r14
testq %r14, %r14
jne 0x38f9
movq 0x18(%r12), %r14
movl $0x1, %eax
testq %r14, %r14
jne 0x38ce
movq 0x38(%r12), %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x392c
addl %eax, %ebx
movq 0x18(%r15), %rax
leaq (%rbx,%rbx,4), %rdi
shlq $0x3, %rdi
addq (%rax,%r13,8), %rdi
callq 0x3df2
movq %rbx, %rbp
movq %r14, %r12
testq %rax, %rax
jne 0x3880
jmp 0x392c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x38fe
movl $0x1, %eax
movq (%rsp), %r13
addl %eax, %r13d
movq 0x18(%r15), %rax
movl %ebx, %ebp
leaq (,%rbp,4), %rdi
addq %rbp, %rdi
shlq $0x3, %rdi
addq (%rax,%r13,8), %rdi
callq 0x3df2
movq %r13, (%rsp)
jmp 0x3874
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::dropAtom(Atom*, unsigned int, unsigned int)
void Reactor::dropAtom(Atom* root, unsigned row, unsigned col) {
	if (board[row][col].getAtom() != root) {
		board[row][col].addAtom(root);
		if (root->getBond(UP).getAtom()) {
			dropAtom(root->getBond(UP).getAtom(), row-1, col);
		}
		else if (root->getBond(DOWN).getAtom()) {
			dropAtom(root->getBond(DOWN).getAtom(), row+1, col);
		}
		else if (root->getBond(RIGHT).getAtom()) {
			dropAtom(root->getBond(RIGHT).getAtom(), row, col+1);
		}
		else if (root->getBond(LEFT).getAtom()) {
			dropAtom(root->getBond(LEFT).getAtom(), row, col-1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, (%rsp)
movl %edx, %ebp
movq 0x18(%rdi), %rax
movl %ecx, %ebx
leaq (%rbx,%rbx,4), %rdi
shlq $0x3, %rdi
addq (%rax,%rbp,8), %rdi
callq 0x3df2
cmpq %r12, %rax
je 0x3a17
movq %r12, %r13
movq 0x18(%r15), %rax
leaq (%rbx,%rbx,4), %rdi
shlq $0x3, %rdi
addq (%rax,%rbp,8), %rdi
movq %r13, %rsi
callq 0x3eb0
movq 0x28(%r13), %r12
testq %r12, %r12
jne 0x39e4
movq 0x48(%r13), %r12
testq %r12, %r12
jne 0x39eb
movq 0x18(%r13), %r12
movl $0x1, %eax
testq %r12, %r12
jne 0x39bf
movq 0x38(%r13), %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r12, %r12
je 0x3a17
addl %eax, %r14d
movq 0x18(%r15), %rax
leaq (%r14,%r14,4), %rdi
shlq $0x3, %rdi
addq (%rax,%rbp,8), %rdi
callq 0x3df2
movq %r14, %rbx
movq %r12, %r13
cmpq %r12, %rax
jne 0x3979
jmp 0x3a17
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x39f0
movl $0x1, %eax
movq (%rsp), %rbp
addl %eax, %ebp
movq 0x18(%r15), %rax
movl %r14d, %ebx
leaq (%rbx,%rbx,4), %rdi
shlq $0x3, %rdi
addq (%rax,%rbp,8), %rdi
callq 0x3df2
movq %rbp, (%rsp)
jmp 0x396d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Bond.cpp
// Function: Bond::operator--()
Bond& Bond::operator--() {
	if (strength > 0) {
		--strength;
		update();
	}
	return *this;
}

// Assembly:
movq %rdi, %rax
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x3c43
decl %ecx
movl %ecx, 0x8(%rax)
je 0x3c44
retq
movq $0x0, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Bond.cpp
// Function: Bond::operator--(int)
Bond Bond::operator--(int) {
	if (strength > 0) {
		Bond copy(*this);
		--strength;
		update();
		return copy;
	}
	return *this;
}

// Assembly:
movl 0x8(%rdi), %edx
movq (%rdi), %rax
testl %edx, %edx
je 0x3c5f
movl %edx, %ecx
decl %ecx
movl %ecx, 0x8(%rdi)
je 0x3c60
retq
movq $0x0, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Tile.cpp
// Function: Tile::initialize(unsigned int)
void Tile::initialize(unsigned waldo_max) {
	assert(arrows == NULL && instructions == NULL);
	waldos = waldo_max;
	arrows = new Direction[waldo_max]();
	instructions = new Instruction[waldo_max];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
jne 0x3d46
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
jne 0x3d46
movl %esi, %ebp
movl %esi, (%rbx)
movl %esi, %r14d
shlq $0x2, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20c0
movq %r15, 0x8(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
testl %ebp, %ebp
je 0x3d37
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20c0
movq %r15, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1401(%rip), %rdi      # 0x514e
leaq 0x1421(%rip), %rsi      # 0x5175
leaq 0x1423(%rip), %rcx      # 0x517e
movl $0xa, %edx
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Tile.cpp
// Function: Tile::setArrow(unsigned int, Direction)
void Tile::setArrow(unsigned waldo, Direction end_state) {
	assert(waldo < this->waldos);
	if (arrows[waldo]) {
		throw std::runtime_error("Attempted to assign arrow where one existed");
	}
	arrows[waldo] = end_state;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl %esi, (%rdi)
jbe 0x3e4b
movq 0x8(%rdi), %rax
movl %esi, %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x3e6a
movl %edx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1350(%rip), %rdi      # 0x51a2
leaq 0x131c(%rip), %rsi      # 0x5175
leaq 0x13f0(%rip), %rcx      # 0x5250
movl $0x2e, %edx
callq 0x20d0
movl $0x10, %edi
callq 0x2090
movq %rax, %rbx
leaq 0x13ff(%rip), %rsi      # 0x527d
movq %rax, %rdi
callq 0x2070
movq 0x4163(%rip), %rsi      # 0x7ff0
movq 0x412c(%rip), %rdx      # 0x7fc0
movq %rbx, %rdi
callq 0x21b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Tile.cpp
// Function: Tile::debond(Reactor&, unsigned int, unsigned int)
void Tile::debond( Reactor& board, unsigned row, unsigned col) {
	//TODO Implement reprioritization of atoms
	//(Once we figure out how the hell it works)
	if (mat != BONDER) return;
	if (row > 0 && board[row-1][col].mat == BONDER) {
		Bond& bond = atom->getBond(UP);
		if (bond.getAtom()) {
			--bond;
		}
	}
	if (row+1 < board.getNumRows() && board[row+1][col].mat == BONDER) {
		Bond& bond = atom->getBond(DOWN);
		if (bond.getAtom()) {
			--bond;
		}
	}
	if (col > 0 && board[row][col-1].mat == BONDER) {
		Bond& bond = atom->getBond(LEFT);
		if (bond.getAtom()) {
			--bond;
		}
	}
	if (col+1 < board.getNumCols() && board[row][col+1].mat == BONDER) {
		Bond& bond = atom->getBond(RIGHT);
		if (bond.getAtom()) {
			--bond;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, 0x20(%rdi)
jne 0x41a6
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, %r13d
testl %edx, %edx
je 0x40f1
leal -0x1(%r12), %eax
cmpl %eax, 0x4(%r15)
jbe 0x41b0
movq 0x18(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
cmpl $0x1, 0x20(%rax,%rcx,8)
jne 0x40f1
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x40f1
addq $0x28, %rdi
callq 0x3c32
leal 0x1(%r12), %eax
cmpl 0x4(%r15), %eax
jae 0x412c
movq 0x18(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
cmpl $0x1, 0x20(%rax,%rcx,8)
jne 0x412c
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x48(%rdi)
je 0x412c
addq $0x48, %rdi
callq 0x3c32
movl %r12d, %r13d
testl %r14d, %r14d
je 0x4165
cmpl %r12d, 0x4(%r15)
jbe 0x41b0
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rax
leal -0x1(%r14), %ecx
leaq (%rcx,%rcx,4), %rcx
cmpl $0x1, 0x20(%rax,%rcx,8)
jne 0x4165
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x38(%rdi)
je 0x4165
addq $0x38, %rdi
callq 0x3c32
incl %r14d
cmpl (%r15), %r14d
jae 0x41a6
cmpl %r12d, 0x4(%r15)
jbe 0x41b0
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rax
movl %r14d, %ecx
leaq (%rcx,%rcx,4), %rcx
cmpl $0x1, 0x20(%rax,%rcx,8)
jne 0x41a6
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x41a6
addq $0x18, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3c32
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xe56(%rip), %rdi       # 0x500d
leaq 0xe64(%rip), %rsi       # 0x5022
leaq 0xe69(%rip), %rcx       # 0x502e
movl $0x32, %edx
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Waldo.cpp
// Function: Waldo::sync(Reactor&)
void Waldo::sync( Reactor& board) {
	bool unsync = false;
	for ( unsigned i = 0; i < board.getNumWaldos(); ++i ) {
		Waldo& waldo = board.getWaldo(i);
		if (waldo.paused) {
			unsync = true;
			waldo.paused = false;
		}
	}
	this->paused = !unsync;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rsi)
je 0x423c
movq %rsi, %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x3b60
cmpb $0x1, 0x3c(%rax)
jne 0x422b
movb $0x0, 0x3c(%rax)
movb $0x1, %r15b
incl %ebp
cmpl 0x8(%r14), %ebp
jb 0x4214
notb %r15b
andb $0x1, %r15b
jmp 0x423f
movb $0x1, %r15b
movb %r15b, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Waldo.cpp
// Function: Waldo::move(Reactor&, Direction)
void Waldo::move( Reactor& board, Direction direction) {
	if (paused) return;
	int dr = 0, dc = 0;
	switch (direction) {
		case DOWN :
			dr = (r+1 != board.getNumRows());
			break;
		case UP :
			dr = -(r != 0);
			break;
		case RIGHT :
			dc = (c+1 != board.getNumCols());
			break;
		case LEFT :
			dc = -(c != 0);
			break;
		case NO_DIRECTION :
			break;
	}
	//Pop current molecule off the board
	board.popAtom(holding, r, c);	
	//Move Waldo
	r += dr;
	c += dc;
	//Put Molecule on the board
	board.dropAtom(holding, r, c);
}

// Assembly:
cmpb $0x0, 0x3c(%rdi)
je 0x437f
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
decl %edx
cmpl $0x3, %edx
ja 0x43b3
leaq 0xf1c(%rip), %rax       # 0x52b8
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x24(%r14), %eax
incl %eax
xorl %ebp, %ebp
cmpl (%rbx), %eax
setne %bpl
xorl %r15d, %r15d
jmp 0x43e9
xorl %r15d, %r15d
cmpl 0x24(%r14), %r15d
movl $0x0, %ebp
sbbl %ebp, %ebp
jmp 0x43e9
movl 0x20(%r14), %eax
incl %eax
xorl %r15d, %r15d
cmpl 0x4(%rbx), %eax
setne %r15b
jmp 0x43e9
xorl %ebp, %ebp
cmpl 0x20(%r14), %ebp
movl $0x0, %r15d
sbbl %r15d, %r15d
movq 0x30(%r14), %rsi
movl 0x20(%r14), %edx
movl 0x24(%r14), %ecx
movq %rbx, %rdi
callq 0x383c
addl 0x20(%r14), %r15d
movl %r15d, 0x20(%r14)
addl 0x24(%r14), %ebp
movl %ebp, 0x24(%r14)
movq 0x30(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x393c
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Waldo.cpp
// Function: Waldo::rotate(Reactor&, Rotation)
void Waldo::rotate( Reactor& board, Rotation direction) {
	//Pop the current molecule off the board
	board.popAtom(holding, r, c);
	//Rotate the molecule
	holding->rotate(direction);
	//Put the molecule on the board
	board.dropAtom(holding, r, c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rdi), %rsi
movl 0x20(%rdi), %edx
movl 0x24(%rdi), %ecx
movq %r14, %rdi
callq 0x383c
movq 0x30(%r15), %rdi
movl %ebx, %esi
callq 0x27ac
movq 0x30(%r15), %rsi
movl 0x20(%r15), %edx
movl 0x24(%r15), %ecx
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x393c
nop
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Environment.cpp
// Function: Environment::advance()
void Environment::advance() {
	++cycles;
	for (unsigned i = 0; i < reactors.size(); ++i) {
		reactors[i].advance(cycles);
	}
	for (unsigned i = 0; i < pipes.size(); ++i) {
		pipes[i].advance();
	}
}

// Assembly:
incl 0x30(%rdi)
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x4551
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
xorl %edi, %edi
shlq $0x6, %rdi
addq %rax, %rdi
movl 0x30(%rbx), %esi
callq 0x3794
movl %ebp, %edi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
incl %ebp
cmpq %rdi, %rcx
ja 0x4525
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Wheatwizard[P]Waldo/Well.cpp
// Function: Well::pop()
Capsule Well::pop() {
	Capsule result = *locationMarker;
	++locationMarker;
	//I should probably make a Well iterator
	if (locationMarker == loopPath.end() || locationMarker == startPath.end()) {
		locationMarker = loopPath.begin();
	}
	return result;
}

// Assembly:
movq %rdi, %rax
movq 0x30(%rsi), %rcx
movups (%rcx), %xmm0
movups %xmm0, (%rdi)
addq $0x10, %rcx
movq %rcx, 0x30(%rsi)
cmpq 0x20(%rsi), %rcx
je 0x4d6a
cmpq 0x8(%rsi), %rcx
je 0x4d6a
retq
movq 0x18(%rsi), %rcx
movq %rcx, 0x30(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/gogakoreli[P]snake/snake.cpp
// Function: Snake::update_movement()
void Snake::update_movement(void)
{
    pair<int, int> movement_part;
    enum Direction direction = get_direction();
    switch (direction)
    {
    case West:
        movement_part = make_pair(snake_head.first, snake_head.second - 1);
        break;
    case North:
        movement_part = make_pair(snake_head.first - 1, snake_head.second);
        break;
    case East:
        movement_part = make_pair(snake_head.first, snake_head.second + 1);
        break;
    case South:
        movement_part = make_pair(snake_head.first + 1, snake_head.second);
        break;
    }
    snake_head = movement_part;
    snake_parts.push_back(movement_part);
    food_eaten = snake_head.first == snake_food.first && snake_head.second == snake_food.second;
    if (food_eaten)
    {
        length++;
    }
    else
    {
        pair<int, int> tail = snake_parts.front();
        snake_world_array[tail.first][tail.second]--;
        snake_parts.erase(snake_parts.begin());
    }
    int head_value = ++snake_world_array[snake_head.first][snake_head.second];
    if (head_value > 1)
    {
        is_dead = true;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, -0x20(%rbp)
leaq 0x30(%rdi), %r14
movq %r14, %rdi
callq 0x1080
movl 0x50(%rbx), %r15d
movq %r14, %rdi
callq 0x1180
cmpq $0x3, %r15
ja 0x186d
leaq 0x8c0(%rip), %rax       # 0x2024
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %ecx
decl %ecx
jmp 0x1793
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %ecx
incl %ecx
jmp 0x1793
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %ecx
incl %eax
jmp 0x1793
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %ecx
decl %eax
movl %eax, -0x20(%rbp)
movl %ecx, -0x1c(%rbp)
movl %eax, 0x18(%rbx)
movl %ecx, 0x1c(%rbx)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x17b7
movq -0x20(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x17c3
leaq -0x20(%rbp), %rdx
movq %rbx, %rdi
callq 0x1880
movl 0x18(%rbx), %ecx
movl 0x1c(%rbx), %eax
movl 0x58(%rbx), %edx
xorl %ecx, %edx
movl 0x5c(%rbx), %esi
xorl %eax, %esi
orl %edx, %esi
sete 0x20(%rbx)
jne 0x17e0
incl 0x24(%rbx)
jmp 0x183f
movq (%rbx), %rax
movslq (%rax), %rcx
movslq 0x4(%rax), %rdx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
addq %rbx, %rcx
decl 0x60(%rcx,%rdx,4)
leaq 0x8(%rax), %rsi
movq 0x8(%rbx), %rcx
cmpq %rcx, %rsi
je 0x1831
movq %rcx, %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
testq %rdx, %rdx
jle 0x1831
incq %rdx
addq $0xc, %rax
movq -0x4(%rax), %rsi
movq %rsi, -0xc(%rax)
decq %rdx
addq $0x8, %rax
cmpq $0x1, %rdx
ja 0x181c
addq $-0x8, %rcx
movq %rcx, 0x8(%rbx)
movl 0x18(%rbx), %ecx
movl 0x1c(%rbx), %eax
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
addq %rbx, %rcx
cltq
movl 0x60(%rcx,%rax,4), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x60(%rcx,%rax,4)
testl %edx, %edx
jle 0x1862
movb $0x1, 0x21(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x1799
// File: /workspace/github_cpp_makefile_star2_O3/gogakoreli[P]snake/input.cpp
// Function: get_input()
enum Direction get_input()
{
    enum Direction result = East;
    char user_input = getchar();
    switch (user_input)
    {
    case 'a':
        result = West;
        break;
    case 'w':
        result = North;
        break;
    case 'd':
        result = East;
        break;
    case 's':
        result = South;
        break;
    default:
        result = Error;
        cout << "Incorrect button clicked(" << user_input << ")" << endl;
        break;
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x1150
movl %eax, %ebx
movsbl %bl, %eax
cmpl $0x72, %eax
jg 0x1a4e
cmpl $0x61, %eax
je 0x1ad6
cmpl $0x64, %eax
jne 0x1a63
movl $0x2, %eax
jmp 0x1adf
cmpl $0x73, %eax
je 0x1ada
cmpl $0x77, %eax
jne 0x1a63
movl $0x1, %eax
jmp 0x1adf
movq 0x256e(%rip), %r14      # 0x3fd8
leaq 0x5dd(%rip), %rsi       # 0x204e
movl $0x19, %edx
movq %r14, %rdi
callq 0x1130
leaq -0x11(%rbp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x1130
movq %rax, %rbx
leaq 0x5cd(%rip), %rsi       # 0x2068
movl $0x1, %edx
movq %rax, %rdi
callq 0x1130
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1adf
xorl %eax, %eax
jmp 0x1adf
movl $0x3, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gogakoreli[P]snake/snake_map.cpp
// Function: SnakeMap::update_snake_food(bool)
void SnakeMap::update_snake_food(bool force_update)
{
    if (snake->food_eaten || force_update)
    {
        while (true)
        {
            int random_i = rand() % MAP_WIDTH;
            int random_j = rand() % MAP_HEIGHT;
            if (map_array[random_i][random_j] == MAP_CHAR)
            {
                snake_food = make_pair(random_i, random_j);
                snake->set_snake_food(snake_food);
                snake->food_eaten = false;
                break;
            }
        }
    }
}

// Assembly:
movq 0x198(%rdi), %rax
orb 0x20(%rax), %sil
cmpb $0x1, %sil
jne 0x1bfc
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
callq 0x1040
movslq %eax, %r15
imulq $0x66666667, %r15, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x23, %rax
addl %ecx, %eax
shll $0x2, %eax
leal (%rax,%rax,4), %eax
subl %eax, %r15d
callq 0x1040
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %r15d, %rcx
movslq %eax, %rdx
leaq (%rcx,%rcx,4), %rcx
leaq (%r14,%rcx,4), %rcx
cmpb $0x2e, (%rdx,%rcx)
jne 0x1b76
movl %r15d, (%rbx)
movl %eax, 0x4(%rbx)
movq 0x198(%rbx), %rdi
movq (%rbx), %rsi
callq 0x1876
movq 0x198(%rbx), %rax
movb $0x0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop