LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq %rcx, 0x2d0(%rsi)
pushq $0x20
popq %rsi
movq %rcx, %rax
cqto
idivq %rsi
movq %rax, 0x2d8(%r14)
pushq $0x40
popq %rsi
movq %rcx, %rax
cqto
idivq %rsi
movq %rax, 0x2e0(%r14)
movq %r14, %rdi
callq 0x1680e
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %r14, %rdi
callq 0x24afe
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x26(%rsp)
vmovups %ymm0, 0x10(%rsp)
cmpb $0x5b, %al
je 0x24bd6
movzbl %al, %eax
cmpl $0x7b, %eax
jne 0x24c09
movslq 0x6e0(%r14), %rax
testq %rax, %rax
je 0x24bbf
imulq $0x49c, %rax, %rax      # imm = 0x49C
cmpl $0x6c, 0x2b0(%r14,%rax)
je 0x24c09
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
vzeroupper
callq 0x1d8b2
jmp 0x24c09
movslq 0x6e0(%r14), %rax
testq %rax, %rax
je 0x24bf4
imulq $0x49c, %rax, %rax      # imm = 0x49C
cmpl $0x6c, 0x2b4(%r14,%rax)
je 0x24c09
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
vzeroupper
callq 0x204f8
addq $0xef00, %r14           # imm = 0xEF00
movq %rbx, %rdi
movq %r14, %rsi
vzeroupper
callq 0x96d80
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9f415(%rip), %rsi     # 0xc40d0
callq 0x13240
testq %rax, %rax
je 0x24da2
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x131a0
movq %rbx, %rdi
callq 0x130f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x13470
leaq 0x40(%r14), %rdx
movq %rsp, %rdi
pushq $0x40
popq %r15
movq %r15, %rsi
callq 0x13130
testl %eax, %eax
je 0x24d1e
leaq 0xda776(%rip), %rdi     # 0xff480
leaq 0x9f3c2(%rip), %rsi     # 0xc40d3
callq 0x8e220
movq %rax, %rdi
callq 0x8db00
movq (%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x13530
testq %rax, %rax
jne 0x24d53
leaq 0xda741(%rip), %rdi     # 0xff480
leaq 0x9f3bd(%rip), %rsi     # 0xc4103
callq 0x8e220
movq %rax, %rdi
callq 0x8db00
movl %r14d, %eax
andl $0x3f, %eax
subq %rax, %r15
addq %r12, %r14
xorl %eax, %eax
cmpq %rax, %r15
je 0x24d70
movb $0x64, (%r14,%rax)
incq %rax
jmp 0x24d61
movb $0x0, (%r14,%r15)
movq %rbx, %rdi
callq 0x13610
pushq $0x20
popq %rdi
callq 0x25f30
movq %rax, %rbx
movb $0x1, 0x18(%rax)
movq %r12, (%rax)
andq $0x0, 0x8(%rax)
movq %r12, %rdi
callq 0x13370
movq %rax, 0x10(%rbx)
jmp 0x24da4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
andq $-0x20, %rsp
subq $0xef80, %rsp           # imm = 0xEF80
leaq 0x9f04b(%rip), %rdi     # 0xc4196
callq 0x24cac
testq %rax, %rax
je 0x251d1
movq %rax, %rbx
leaq 0x9f079(%rip), %rsi     # 0xc41d8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x97020
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x16750
leaq 0x20(%rsp), %rdi
callq 0x945f0
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x24b22
leaq 0xda2e4(%rip), %rdi     # 0xff480
leaq 0x9f05a(%rip), %rsi     # 0xc41fd
callq 0x8e220
movq %rsp, %rsi
movq %rax, %rdi
callq 0x970f0
movq %rax, %rdi
callq 0x8db00
movq %rsp, %rdi
callq 0x945f0
leaq 0x40(%rsp), %rdi
callq 0x16938
xorl %eax, %eax
jmp 0x251ef
leaq 0xda2a8(%rip), %rdi     # 0xff480
leaq 0x9efe3(%rip), %rsi     # 0xc41c2
callq 0x8e220
movq %rax, %rdi
callq 0x8db00
pushq $-0x1
popq %rax
leaq -0x8(%rbp), %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x2521a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x945f0
jmp 0x25224
movq %rax, %rbx
jmp 0x25224
movq %rax, %rbx
movq %rsp, %rdi
callq 0x945f0
leaq 0x40(%rsp), %rdi
callq 0x16938
movq %rbx, %rdi
callq 0x13720
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
pushq $0x1
popq %rax
cmovgel %esi, %eax
decl %eax
movq %rax, (%rsp)
movl %esi, %ebp
xorl %r14d, %r14d
cmpq (%rsp), %r14
je 0x1249
movq %r14, %rax
movl %r14d, %ecx
movslq %ecx, %r15
cmpq %rax, %rbp
je 0x1206
movl (%rbx,%r15,4), %esi
movl %eax, %edx
cmpl (%rbx,%rax,4), %esi
jg 0x11ff
movl %ecx, %edx
incq %rax
movl %edx, %ecx
jmp 0x11ea
movq 0x2dcb(%rip), %rdi      # 0x3fd8
movl %r15d, %esi
callq 0x1080
movq %rax, %rdi
callq 0x1030
movl (%rbx,%r15,4), %r13d
leaq (%rbx,%r14,4), %rsi
leaq (%rbx,%r14,4), %r12
addq $0x4, %r12
subl %r14d, %r15d
movslq %r15d, %rdx
shlq $0x2, %rdx
movq %r12, %rdi
callq 0x1070
movl %r13d, -0x4(%r12)
incq %r14
jmp 0x11de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xdb8(%rip), %xmm0      # 0x2020
movaps %xmm0, 0x10(%rsp)
movaps 0xd9c(%rip), %xmm0      # 0x2010
movaps %xmm0, (%rsp)
movabsq $0x5700000001, %rax     # imm = 0x5700000001
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq 0x2d47(%rip), %rbx      # 0x3fd8
leaq 0xda0(%rip), %r14       # 0x2038
cmpq $0x28, %r15
je 0x12bb
movl (%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
addq $0x4, %r15
jmp 0x1298
movq 0x2d16(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
callq 0x1030
movq %rsp, %rdi
pushq $0xa
popq %rsi
callq 0x11bc
xorl %r15d, %r15d
leaq 0xd59(%rip), %r14       # 0x2038
cmpq $0x28, %r15
je 0x1302
movl (%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
addq $0x4, %r15
jmp 0x12df
movq 0x2ccf(%rip), %rdi      # 0x3fd8
callq 0x1030
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sumanishs[P]boost-edif-parser2/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    if(argc < 2){ 
        std::cout << "Usage:" << argv[0] << " <file name>" << std::endl;
        return 1;
    }   

    std::string file (argv[1]);
    EdifReader reader;
    clock_t start, end;
    
    start = clock();
    if(reader.Read(file)){
        std::cout << "Done...." << std::endl;
        end = clock();
        double time_taken = ((double)(end - start))/CLOCKS_PER_SEC;
        std::cout << "Time taken to parse the design: " << time_taken << "seconds" << std::endl;
        return 0;
    }   
    else {
        std::cout << "Failed...." << std::endl;
        end = clock();
        double time_taken = ((double)(end - start))/CLOCKS_PER_SEC;
        std::cout << "Execution time: " << time_taken << "seconds" << std::endl;
        return 1;
    }  
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
cmpl $0x1, %edi
jg 0x2da08
movq 0x24606(%rip), %rdi     # 0x51fd8
leaq 0xb62f(%rip), %rsi      # 0x39008
callq 0x5260
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x5260
leaq 0xb61f(%rip), %rsi      # 0x3900f
movq %rax, %rdi
callq 0x5260
movq %rax, %rdi
callq 0x54f8
pushq $0x1
popq %rbx
jmp 0x2db12
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0xbdf6
callq 0x51a0
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
movq %r14, %rsi
callq 0x59dc
testb %al, %al
je 0x2daa0
movq 0x2459a(%rip), %rdi     # 0x51fd8
leaq 0xb5d7(%rip), %rsi      # 0x3901c
callq 0x5260
movq %rax, %rdi
callq 0x54f8
callq 0x51a0
movq %rax, %r14
movq 0x24577(%rip), %rdi     # 0x51fd8
leaq 0xb5bd(%rip), %rsi      # 0x39025
callq 0x5260
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0xb583(%rip), %xmm0     # 0x39000
movq %rax, %rdi
callq 0x53f0
leaq 0xb5ba(%rip), %rsi      # 0x39046
movq %rax, %rdi
callq 0x5260
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x54f8
jmp 0x2db08
movq 0x24531(%rip), %rdi     # 0x51fd8
leaq 0xb5a0(%rip), %rsi      # 0x3904e
callq 0x5260
movq %rax, %rdi
callq 0x54f8
callq 0x51a0
movq %rax, %r14
movq 0x2450e(%rip), %rdi     # 0x51fd8
leaq 0xb588(%rip), %rsi      # 0x39059
callq 0x5260
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0xb51a(%rip), %xmm0     # 0x39000
movq %rax, %rdi
callq 0x53f0
leaq 0xb551(%rip), %rsi      # 0x39046
movq %rax, %rdi
callq 0x5260
movq %rax, %rdi
callq 0x54f8
pushq $0x1
popq %rbx
leaq 0x8(%rsp), %rdi
callq 0x5110
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x2db20
jmp 0x2db20
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5110
movq %rbx, %rdi
callq 0x5460
// File: /workspace/github_cpp_makefile_star2_O2/yaansz[P]just-a-terminal/terminal.cpp
// Function: BuiltInCommands::help(char**)
int BuiltInCommands::help(char** args) { 
    cout << "*****************" << endl; 
    cout << "List of builtins commands" << endl; 
     
     for (const auto &p : this->commands) { 
        cout << p.first << endl;
    }

    cout << "*****************" << endl; 

    return 0;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4a60(%rip), %r14      # 0x6fd0
leaq 0x1af6(%rip), %rsi      # 0x406d
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20f0
leaq 0x1a93(%rip), %rsi      # 0x4021
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20f0
movq 0x18(%rbx), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x25cc
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x2110
movq %rax, %r15
jmp 0x25a6
movq 0x49fd(%rip), %rdi      # 0x6fd0
leaq 0x1a93(%rip), %rsi      # 0x406d
callq 0x2190
movq %rax, %rdi
callq 0x20f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x36e4
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x2641
movq %r15, %rdi
movq %r14, %rsi
callq 0x2c78
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2cc8
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yaansz[P]just-a-terminal/terminal.cpp
// Function: execute(BuiltInCommands, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char**)
int execute(BuiltInCommands bic, const string cmd, char** args) 
{   
    int bic_return = bic.execute(cmd, args);
    // found in built in
    if(bic_return == 0) return 0;
    else if(bic_return == -1) return bic_return;

    #ifdef DEBUG
    cout << "bic_return: " << bic_return << endl;
    #endif

    pid_t pid = fork();
    
    if(pid == -1)
        cout << "Error to fork" << endl;

    // Running child proccess
    else if(pid == 0) {
        
        #ifdef DEBUG
        cout << "Path: " << std::filesystem::current_path() << endl; 
        cout << ":" << cmd.c_str() << ":" << endl;
        cout << ":" << args[1] << ":" << endl;
        #endif

        if(execvp(cmd.c_str(), args) < 0) {
            perror("error");
            cout << "Error to exec the command" << endl;
        }
        // Killing it 🤬😡😡😠
        exit(0);
    // Wait until the child process is killed
    } else {
        wait(NULL);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x2240
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2600
movl %eax, %r15d
leaq -0x40(%rbp), %rdi
callq 0x20e0
movl %r15d, %eax
incl %eax
cmpl $0x2, %eax
jae 0x26a7
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2080
cmpl $-0x1, %eax
je 0x26c1
testl %eax, %eax
je 0x26e1
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2210
jmp 0x2697
movq 0x4908(%rip), %rdi      # 0x6fd0
leaq 0x196c(%rip), %rsi      # 0x403b
callq 0x2190
movq %rax, %rdi
callq 0x20f0
xorl %r15d, %r15d
jmp 0x2697
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2130
testl %eax, %eax
jns 0x2717
leaq 0x1952(%rip), %rdi      # 0x4049
callq 0x2160
movq 0x48cd(%rip), %rdi      # 0x6fd0
leaq 0x1945(%rip), %rsi      # 0x404f
callq 0x2190
movq %rax, %rdi
callq 0x20f0
xorl %edi, %edi
callq 0x21f0
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorl %esi, %esi
movq %rsi, %rdx
cmpq %rsi, %rcx
je 0x2751
leaq 0x1(%rdx), %rsi
cmpb $0x20, (%rax,%rdx)
je 0x273f
xorl %eax, %eax
cmpq %rdx, %rcx
setbe %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, -0x30(%rbp)
movups %xmm0, (%rdi)
xorl %r13d, %r13d
leaq -0x50(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x22f0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x27a3
movq 0x8(%r15), %rbx
movq %rbx, %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21c0
cmpq $0x0, -0x48(%rbp)
je 0x27ca
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2cee
movq 0x8(%r14), %r13
addq %rbx, %r13
movq %r12, %rdi
callq 0x20e0
movq 0x8(%r15), %rax
cmpq %rax, %rbx
jae 0x27e7
cmpq %rax, %r13
jb 0x2788
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20e0
jmp 0x280b
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x2d2a
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/Wheatwizard[P]Waldo/main.cpp
// Function: main
int main(int argc, char** argv) {
	/*if (argc == 1) {
		std::cout << argv[0] << " takes 1 argument." << std::endl;
		std::cout << "Please pass the name of a file to read from." << std::endl;
	}*/
	 Reactor b(10, 10, 2);
	b.addWaldo("red", 0, 0);
	b.addWaldo("blue", 0, 0);
	b.addArrow(RIGHT, 0, 0, 0);
	b.addArrow(DOWN, 0, 9, 0);
	b.addArrow(LEFT, 9, 9, 0);
	b.addArrow(UP, 9, 0, 0);
	b.addInstruction(Instruction(BOND),0,1,0);
	b[1][1].setMat(BONDER);
	b[1][2].setMat(BONDER);
	Atom* one = new Atom(TRADITIONAL, 1);
	Atom* two = new Atom(TRADITIONAL, 1);	
	b[1][1].addAtom(one);
	b[1][2].addAtom(two);
	while (true) {
		b.advance(0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
leaq 0x30(%rsp), %rdi
pushq $0xa
popq %rdx
pushq $0x2
popq %rcx
movl %edx, %esi
callq 0x2edc
leaq 0x2c96(%rip), %rsi      # 0x5004
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2530
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x385c
leaq 0x10(%rsp), %rdi
callq 0x20a0
leaq 0x2c67(%rip), %rsi      # 0x5008
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2530
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x385c
leaq 0x10(%rsp), %rdi
callq 0x20a0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3914
leaq 0x30(%rsp), %rdi
pushq $0x4
popq %rsi
pushq $0x9
popq %rcx
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x3914
leaq 0x30(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x9
popq %rcx
movl %ecx, %edx
xorl %r8d, %r8d
callq 0x3914
leaq 0x30(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x9
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3914
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movl %ecx, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x389a
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x256c
addq $0x28, %rax
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x3fd8
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x256c
addq $0x50, %rax
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x3fd8
pushq $0x50
popq %rdi
callq 0x2150
movq %rax, %r15
pushq $0x1
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x259a
pushq $0x50
popq %rdi
callq 0x2150
movq %rax, %r14
pushq $0x1
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x259a
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x256c
addq $0x28, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x3cde
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x256c
addq $0x50, %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x3cde
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3684
jmp 0x24d9
jmp 0x251b
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r14, %rdi
jmp 0x24fd
jmp 0x251b
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r15, %rdi
callq 0x2160
jmp 0x251e
jmp 0x251b
jmp 0x251b
jmp 0x250c
jmp 0x251b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20a0
jmp 0x251e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x30ba
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rsi, %rax
movl (%rsi), %esi
cmpl (%rdx), %esi
jne 0x2681
movq %rdi, %rbx
movl 0x4(%rdx), %edx
addl 0x4(%rax), %edx
callq 0x259a
movq %rbx, %rax
popq %rbx
retq
pushq $0x4
popq %rdi
callq 0x20b0
movl $0xa, (%rax)
movq 0x690a(%rip), %rsi      # 0x8fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a3c
addq $0x10, %r14
cmpq $0x40, %r14
jne 0x26b0
xorl %eax, %eax
testl %ebp, %ebp
sete %al
leaq 0x1(,%rax,2), %rax
addq $0x8, %rbx
xorl %ecx, %ecx
cmpq $0x40, %rcx
je 0x26ff
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)
addq $0x10, %rcx
incq %rax
jmp 0x26d8
xorl %eax, %eax
cmpq $0x40, %rax
je 0x271d
movl 0x8(%rsp,%rax), %ecx
movl %ecx, 0x8(%rbx,%rax)
movq (%rsp,%rax), %rcx
movq %rcx, (%rbx,%rax)
addq $0x10, %rax
jmp 0x2701
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26a0
leaq 0x8(%r14), %r15
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x276f
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2766
movq %r12, %rax
xorq $0x2, %rax
shlq $0x4, %rax
cmpq %r14, 0x8(%rdi,%rax)
je 0x2766
movl %ebx, %esi
callq 0x2726
incq %r12
addq $0x10, %r15
jmp 0x273f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x8(%rdi), %r15
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x280a
movq %r12, %r14
shlq $0x4, %r14
addq %r15, %r14
cmpl $0x0, 0x8(%r14)
je 0x27dc
movq %r14, %rdi
callq 0x3a74
jmp 0x27cb
movl %r12d, %r13d
xorq $0x2, %r13
shlq $0x4, %r13
movq (%r14), %rdi
cmpl $0x0, 0x10(%rdi,%r13)
je 0x2800
addq %r13, %rdi
addq $0x8, %rdi
callq 0x3a74
jmp 0x27e7
callq 0x277c
incq %r12
jmp 0x27bb
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x277c
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x8
popq %rbp
leaq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
cmpq $0x48, %rbp
je 0x2923
movq (%r15,%rbp), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2bf0
testq %rax, %rax
jne 0x291d
movq (%r15,%rbp), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2c6c
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x28b0
movq %r13, %rdi
callq 0x2940
addq $0x10, %rbp
jmp 0x28d4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29f4
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
leal 0x1(%rdx), %eax
movl %eax, 0x10(%rdi)
movq %rsi, 0x28(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0x14(%rdi)
movl %edx, %eax
movq %rax, 0x40(%rsp)
leaq (,%rax,8), %rdi
callq 0x2030
movq %rbx, %r14
movq %rax, 0x18(%rbx)
movl %ebp, %r15d
movq %r15, %rbx
shlq $0x6, %rbx
leaq 0x8(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2030
movq %r15, (%rax)
movq %rax, 0x10(%rsp)
leaq 0x8(%rax), %r12
movl %ebp, %r15d
testl %ebp, %ebp
je 0x2f6c
negq %rbx
xorl %r13d, %r13d
movq %r12, %rbp
movq %rbp, %rdi
callq 0x409e
addq $-0x40, %r13
addq $0x40, %rbp
cmpq %r13, %rbx
jne 0x2f57
movq %r12, 0x20(%r14)
leaq 0x28(%r14), %rcx
movq %rcx, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
andq $0x0, 0x38(%r14)
movl 0x28(%rsp), %ecx
imulq $0x28, %rcx, %r13
leaq 0x8(%r13), %rax
movq %rax, 0x20(%rsp)
movq %rcx, 0x38(%rsp)
imulq $-0x28, %rcx, %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
cmpq 0x40(%rsp), %rbp
je 0x302b
movq 0x20(%rsp), %rdi
callq 0x2030
movq %rax, %rcx
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rax, (%rcx)
cmpl $0x0, 0x28(%rsp)
je 0x2ff6
movq 0x8(%rsp), %r12
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x3aa8
addq $-0x28, %rbx
addq $0x28, %r12
cmpq %rbx, 0x10(%rsp)
jne 0x2fdf
movq 0x18(%r14), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax,%rbp,8)
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x3023
movq 0x18(%r14), %rax
movq (%rax,%rbp,8), %rdi
addq %rbx, %rdi
movl %r15d, %esi
callq 0x3b18
addq $0x28, %rbx
jmp 0x3005
incq %rbp
jmp 0x2fa7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
testq %r13, %r13
je 0x305d
negq %r13
movq 0x10(%rsp), %rbx
addq $-0x38, %rbx
leaq (%rbx,%r13), %rdi
callq 0x20a0
addq $-0x40, %r13
jne 0x304e
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2210
jmp 0x30b1
jmp 0x30a4
movq %rax, %r15
testq %rbx, %rbx
je 0x3093
negq %rbx
movq 0x18(%rsp), %r14
addq $-0x20, %r14
leaq (%r14,%rbx), %rdi
callq 0x3ba0
addq $-0x28, %rbx
jne 0x3084
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2210
jmp 0x30a7
movq %rax, %r15
movq 0x30(%rsp), %rdi
callq 0x39b8
movq %r15, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %r15d, %r15d
movl 0x4(%rbx), %eax
cmpq %rax, %r15
jae 0x311b
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3116
movq -0x8(%r14), %r12
testq %r12, %r12
je 0x3102
leaq -0x28(%r14), %r13
imulq $0x28, %r12, %rbp
movq %r13, %rdi
addq %rbp, %rdi
callq 0x3ba0
addq $-0x28, %rbp
jne 0x30f1
addq $-0x8, %r14
imulq $0x28, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2210
incq %r15
jmp 0x30cb
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x3160
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x314d
addq $-0x40, %r12
movq %r15, %r13
shlq $0x6, %r13
leaq (%r12,%r13), %rdi
callq 0x20a0
addq $-0x40, %r13
jne 0x313e
shlq $0x6, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x316e
callq 0x2170
addq $0x28, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39b8
// File: /workspace/github_cpp_makefile_star2_O2/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::fuse()
void Reactor::fuse() {
	for (unsigned r = 0; r < getNumRows(); ++r) {
		for (unsigned c = 0; c < getNumCols()-1; ++c) {
			if (board[r][c].getMat() == FUSOR) {
				if (board[r][c+1].getMat() == TARGET) {
					//Fuse the Atom to the right
					if (board[r][c].getAtom()) {
						board[r][c].getAtom()->unbond();
						Atom newAtom = *board[r][c+1].getAtom() + *board[r][c].getAtom();
						delete board[r][c].getAtom();
						delete board[r][c+1].getAtom();
						board[r][c+1].addAtom(NULL);
						board[r][c+1].addAtom(&newAtom);
					}
				} else {
					throw 16;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0x4(%rbx), %eax
cmpq %rax, %r14
jae 0x350b
xorl %r15d, %r15d
movl (%rbx), %eax
decl %eax
cmpq %rax, %r15
jae 0x3503
movq 0x18(%rbx), %rax
imulq $0x28, %r15, %r13
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c2c
cmpl $0x3, %eax
jne 0x34fb
movq 0x18(%rbx), %rax
incq %r15
imulq $0x28, %r15, %r12
movq (%rax,%r14,8), %rdi
addq %r12, %rdi
callq 0x3c2c
cmpl $0x5, %eax
jne 0x351a
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c26
testq %rax, %rax
je 0x33eb
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c26
movq %rax, %rdi
callq 0x27a8
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r12, %rdi
callq 0x3c26
movq %rax, %rbp
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c26
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x2664
movq 0x18(%rbx), %rax
addq (%rax,%r14,8), %r13
movq %r13, %rdi
callq 0x3c26
movq %rax, %rdi
pushq $0x50
popq %r13
movq %r13, %rsi
callq 0x2160
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r12, %rdi
callq 0x3c26
movq %rax, %rdi
movq %r13, %rsi
callq 0x2160
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
addq %r12, %rdi
xorl %esi, %esi
callq 0x3cde
movq 0x18(%rbx), %rax
addq (%rax,%r14,8), %r12
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3cde
jmp 0x33eb
incq %r15
jmp 0x33eb
incq %r14
jmp 0x33dc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x20b0
movl $0x10, (%rax)
movq 0x5a71(%rip), %rsi      # 0x8fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Wheatwizard[P]Waldo/Reactor.cpp
// Function: Reactor::split()
void Reactor::split() {
	for (unsigned r = 0; r < getNumRows(); ++r) {
		for (unsigned c = 1; c < getNumCols(); ++c) {
			if (board[r][c].getMat() == FISSOR) {
				if (board[r][c-1].getMat() == TARGET) {
					//Fuse the Atom to the right
					if (board[r][c].getAtom()) {
						Atom* substrate = board[r][c].getAtom();
						unsigned total = substrate->getValue();
						if (total == 1) return;
						if (total%2) {
							//The Atom is not evenly divisible
							substrate->setValue(total/2+1);
						} else {
							//The Atom is evenly divisible
							substrate->setValue(total/2);
						}
						board[r][c-1].addAtom(new Atom(substrate->getVariety(), total/2));
					}
				} else {
					throw 16;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
movq %rdi, 0x8(%rsp)
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x363f
pushq $0x28
popq %r14
pushq $0x1
popq %r13
movl (%rbx), %eax
cmpq %rax, %r13
jae 0x3637
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq %r14, %rdi
callq 0x3c2c
cmpl $0x4, %eax
jne 0x362b
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%r14), %rdi
addq $-0x28, %rdi
callq 0x3c2c
cmpl $0x5, %eax
jne 0x364e
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq %r14, %rdi
callq 0x3c26
testq %rax, %rax
je 0x362b
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
addq %r14, %rdi
callq 0x3c26
movl 0x4(%rax), %ebp
cmpl $0x1, %ebp
je 0x363f
movq %rax, %r15
movq %r13, 0x10(%rsp)
movl %ebp, %eax
andl $0x1, %eax
shrl %ebp
addl %ebp, %eax
movl %eax, 0x4(%r15)
movq 0x18(%rbx), %rax
movq %r12, %rbx
movq (%rax,%r12,8), %r13
pushq $0x50
popq %rdi
callq 0x2150
movq %rax, %r12
movl (%r15), %esi
movq %rax, %rdi
movl %ebp, %edx
callq 0x259a
leaq (%r14,%r13), %rdi
addq $-0x28, %rdi
movq %r12, %rsi
callq 0x3cde
movq %rbx, %r12
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r13
incq %r13
addq $0x28, %r14
jmp 0x3567
incq %r12
jmp 0x3553
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x20b0
movl $0x10, (%rax)
movq 0x593d(%rip), %rsi      # 0x8fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21e0
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r12, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3706
movq %rdi, %rbx
xorl %r12d, %r12d
xorl %r14d, %r14d
movl %eax, %eax
cmpq %rax, %r14
jae 0x36fa
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
leaq (%rcx,%r12), %r15
movl 0x20(%rcx,%r12), %edx
movl 0x24(%rcx,%r12), %ecx
imulq $0x28, %rcx, %rdi
addq (%rax,%rdx,8), %rdi
movl %r14d, %esi
callq 0x3bce
movq %r15, %rdi
movl %eax, %esi
callq 0x4228
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3196
movq 0x20(%rbx), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x412c
incq %r14
movl 0x8(%rbx), %eax
addq $0x40, %r12
jmp 0x369d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x4
popq %rdi
callq 0x20b0
movl $0x7, (%rax)
movq 0x5885(%rip), %rsi      # 0x8fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
pushq $0x1
popq %rbp
movl %r14d, %r14d
movq 0x18(%r15), %rax
movl %ebx, %ecx
imulq $0x28, %rcx, %r13
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c26
testq %rax, %rax
je 0x37b0
movq 0x18(%r15), %rax
addq (%rax,%r14,8), %r13
movq %r13, %rdi
callq 0x3d0e
movq 0x28(%r12), %rax
testq %rax, %rax
jne 0x37a1
movq 0x48(%r12), %rax
testq %rax, %rax
jne 0x37a6
movq 0x18(%r12), %rax
movl %ebp, %ecx
testq %rax, %rax
jne 0x379a
movq 0x38(%r12), %rax
pushq $-0x1
popq %rcx
testq %rax, %rax
je 0x37b0
addl %ecx, %ebx
movq %rax, %r12
jmp 0x3742
pushq $-0x1
popq %rcx
jmp 0x37a8
movl %ebp, %ecx
addl %ecx, %r14d
movq %rax, %r12
jmp 0x373f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebx
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
pushq $0x1
popq %rbp
movl %r14d, %r14d
movq 0x18(%r15), %rax
movl %ebx, %ecx
imulq $0x28, %rcx, %r13
movq (%rax,%r14,8), %rdi
addq %r13, %rdi
callq 0x3c26
cmpq %r12, %rax
je 0x384d
movq 0x18(%r15), %rax
addq (%rax,%r14,8), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x3cde
movq 0x28(%r12), %rax
testq %rax, %rax
jne 0x383e
movq 0x48(%r12), %rax
testq %rax, %rax
jne 0x3843
movq 0x18(%r12), %rax
movl %ebp, %ecx
testq %rax, %rax
jne 0x3837
movq 0x38(%r12), %rax
pushq $-0x1
popq %rcx
testq %rax, %rax
je 0x384d
addl %ecx, %ebx
movq %rax, %r12
jmp 0x37dc
pushq $-0x1
popq %rcx
jmp 0x3845
movl %ebp, %ecx
addl %ecx, %r14d
movq %rax, %r12
jmp 0x37d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a85
decl %ecx
movl %ecx, 0x8(%rax)
je 0x3a86
retq
andq $0x0, (%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a9f
movl %edx, %ecx
decl %ecx
movl %ecx, 0x8(%rdi)
je 0x3aa0
retq
andq $0x0, (%rdi)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3b82
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
jne 0x3b82
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 0x20e0
movq %r15, 0x8(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
testl %ebp, %ebp
je 0x3b73
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq %r15, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15c5(%rip), %rdi      # 0x514e
leaq 0x15e5(%rip), %rsi      # 0x5175
leaq 0x15e7(%rip), %rcx      # 0x517e
pushq $0xa
popq %rdx
callq 0x20f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3c7d
movq 0x8(%rdi), %rax
movl %esi, %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x3c9a
movl %edx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x151e(%rip), %rdi      # 0x51a2
leaq 0x14ea(%rip), %rsi      # 0x5175
leaq 0x15be(%rip), %rcx      # 0x5250
pushq $0x2e
popq %rdx
callq 0x20f0
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %rbx
leaq 0x15d1(%rip), %rsi      # 0x527d
movq %rax, %rdi
callq 0x2070
movq 0x5335(%rip), %rsi      # 0x8ff0
movq 0x52fe(%rip), %rdx      # 0x8fc0
movq %rbx, %rdi
callq 0x21e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3fcd
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl %ecx, %r13d
testl %edx, %edx
je 0x3f29
leal -0x1(%r15), %esi
movq %r12, %rdi
callq 0x256c
imulq $0x28, %r13, %rcx
cmpl $0x1, 0x20(%rax,%rcx)
jne 0x3f29
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x3f29
addq $0x28, %rdi
callq 0x3a74
leal 0x1(%r15), %esi
cmpl 0x4(%r12), %esi
jae 0x3f5b
movq %r12, %rdi
callq 0x256c
imulq $0x28, %r13, %rcx
cmpl $0x1, 0x20(%rax,%rcx)
jne 0x3f5b
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x48(%rdi)
je 0x3f5b
addq $0x48, %rdi
callq 0x3a74
testl %r14d, %r14d
je 0x3f8e
movq %r12, %rdi
movl %r15d, %esi
callq 0x256c
leal -0x1(%r14), %ecx
imulq $0x28, %rcx, %rcx
cmpl $0x1, 0x20(%rax,%rcx)
jne 0x3f8e
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x38(%rdi)
je 0x3f8e
addq $0x38, %rdi
callq 0x3a74
incl %r14d
cmpl (%r12), %r14d
jae 0x3fcd
movq %r12, %rdi
movl %r15d, %esi
callq 0x256c
movl %r14d, %ecx
imulq $0x28, %rcx, %rcx
cmpl $0x1, 0x20(%rax,%rcx)
jne 0x3fcd
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x3fcd
addq $0x18, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3a74
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpl 0x8(%r14), %ebp
jae 0x4037
movq %r14, %rdi
movl %ebp, %esi
callq 0x3988
cmpb $0x1, 0x3c(%rax)
jne 0x4033
movb $0x0, 0x3c(%rax)
movb $0x1, %r15b
incl %ebp
jmp 0x4016
notb %r15b
andb $0x1, %r15b
movb %r15b, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x413b
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 0x416f
leaq 0x1160(%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 0x41a5
xorl %r15d, %r15d
cmpl 0x24(%r14), %r15d
movl $0x0, %ebp
sbbl %ebp, %ebp
jmp 0x41a5
movl 0x20(%r14), %eax
incl %eax
xorl %r15d, %r15d
cmpl 0x4(%rbx), %eax
setne %r15b
jmp 0x41a5
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 0x3726
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 0x37c0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3726
movq 0x30(%r15), %rdi
movl %ebx, %esi
callq 0x2726
movq 0x30(%r15), %rsi
movl 0x20(%r15), %edx
movl 0x24(%r15), %ecx
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x37c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x30(%rdi)
xorl %eax, %eax
movl %eax, %r14d
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
subq %rdi, %rax
sarq $0x6, %rax
cmpq %r14, %rax
jbe 0x426a
movq %r14, %rax
shlq $0x6, %rax
addq %rax, %rdi
movl 0x30(%rbx), %esi
callq 0x3684
leal 0x1(%r14), %eax
jmp 0x423c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/Wheatwizard[P]Waldo/Pipe.cpp
// Function: Pipe::advance()
void Pipe::advance() {
	//Move everything from the inQ to the outQ
	while (!inQ.empty()) {
		outQ.push(inQ.front());
		inQ.pop();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
movq 0x10(%rbx), %rsi
cmpq %rsi, 0x30(%rbx)
je 0x4713
movq %r14, %rdi
callq 0x471c
movq %rbx, %rdi
callq 0x49c8
jmp 0x46f7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop