LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeBranchIfALessThanB(int)
void Rotamola34HC22::executeBranchIfALessThanB(int address){

		if((address + 3) < this->getMemorySize()){
			
			// compare the value of A and B
			if(this->getA() < this->getB()){

				// get the high byte and low byte address of the destination address
				unsigned char addressHighByte = this->getMemoryValueAtLocation(address + 1);
				unsigned char addressLowByte = this->getMemoryValueAtLocation(address + 2);

				// compute the destination address
				int destinationAddress = (addressHighByte << 8) | addressLowByte;

				if(destinationAddress >= 0 && destinationAddress < this->getMemorySize()){
					


					// set the program counter to the new address
					this->setProgramCounter(destinationAddress);

					cout << "Message: Execution completed." << endl;

				} else {
					cout << "Error: Invalid memory address." << endl;
					this->executeHalt(address);
				}
			
			} else {
			
				// set the program counter to the third byte after the opcode
				this->setProgramCounter(address + 3);
				cout << "Message: Execution completed." << endl;
			}
			
		} else {
			cerr << "Error: SIGWEED. Program executed past top of memory" << endl;
			this->executeHalt(address);
		}

	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x3(%r14), %ebp
callq 0x2fca
cmpl %eax, %ebp
jge 0x4301
movb 0x1c(%rbx), %al
cmpb 0x1d(%rbx), %al
jae 0x42d8
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x2fd6
movl %eax, %ebp
addl $0x2, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2fd6
movzbl %bpl, %ecx
shll $0x8, %ecx
movzbl %al, %ebp
orl %ecx, %ebp
movq %rbx, %rdi
callq 0x2fca
cmpl %eax, %ebp
jge 0x4325
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2fd2
movq 0x4cdf(%rip), %rdi      # 0x8fc8
leaq 0x13bc(%rip), %rsi      # 0x56ac
callq 0x2170
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20b0
movq 0x4ce8(%rip), %rdi      # 0x8ff0
leaq 0x13bb(%rip), %rsi      # 0x56ca
callq 0x2170
movq %rax, %rdi
callq 0x20b0
popq %rbx
popq %r14
popq %rbp
jmp 0x43f0
movq 0x4c9c(%rip), %rdi      # 0x8fc8
leaq 0x13cb(%rip), %rsi      # 0x56fe
jmp 0x430f
nop
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeBranchIfLessThanA(int)
void Rotamola34HC22::executeBranchIfLessThanA(int address){

		if((address + 4) < this->getMemorySize()){
			
			// get the value to compare to A
			unsigned char comparisonValue = this->getMemoryValueAtLocation(address + 1);

			// compare A and comparisonValue
			if(comparisonValue < this->getA()){

				// get the high byte and low byte address of the destination address
				unsigned char addressHighByte = this->getMemoryValueAtLocation(address + 2);
				unsigned char addressLowByte = this->getMemoryValueAtLocation(address + 3);

				// compute the destination address
				int destinationAddress = (addressHighByte << 8) | addressLowByte;

				if(destinationAddress >=0 && destinationAddress < this->getMemorySize()){
					
					// set the program counter to the new address
					this->setProgramCounter(destinationAddress);
					cout << "Message: Execution completed." << endl;
				} else {
					cout << "Error: Invalid memory address." << endl;
					this->executeHalt(address);
				}

			
			} else {

				// set the program counter to the the fourth byte after the opcode
				this->setProgramCounter(address + 4);

				cout << "Message: Execution completed." << endl;
			
			}
		} else {
			cerr << "Error: SIGWEED. Program executed past top of memory" << endl;
			this->executeHalt(address);
		}

	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x4(%r14), %ebp
callq 0x2fca
cmpl %eax, %ebp
jge 0x43bc
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x2fd6
cmpb 0x1c(%rbx), %al
jae 0x4393
leal 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x2fd6
movl %eax, %ebp
addl $0x3, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2fd6
movzbl %bpl, %ecx
shll $0x8, %ecx
movzbl %al, %ebp
orl %ecx, %ebp
movq %rbx, %rdi
callq 0x2fca
cmpl %eax, %ebp
jge 0x43e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2fd2
movq 0x4c24(%rip), %rdi      # 0x8fc8
leaq 0x1301(%rip), %rsi      # 0x56ac
callq 0x2170
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20b0
movq 0x4c2d(%rip), %rdi      # 0x8ff0
leaq 0x1300(%rip), %rsi      # 0x56ca
callq 0x2170
movq %rax, %rdi
callq 0x20b0
popq %rbx
popq %r14
popq %rbp
jmp 0x43f0
movq 0x4be1(%rip), %rdi      # 0x8fc8
leaq 0x1310(%rip), %rsi      # 0x56fe
jmp 0x43ca
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/microcontrollerfactory.cpp
// Function: mcontroller::MicrocontrollerFactory::MicrocontrollerFactory()
MicrocontrollerFactory::MicrocontrollerFactory(){

		// Init all available micrcontrollers here so that later when there are
		// more microcontroller classes, just add them here
		this->addMicrocontroller("R500", MopsR500::create);
		this->addMicrocontroller("PIC32F42", MacrochipPIC32F42::create);
		this->addMicrocontroller("34HC22", Rotamola34HC22::create);
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x1443(%rip), %rsi      # 0x5892
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2e26
leaq -0xbab(%rip), %rdx      # 0x38ba
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x4526
leaq 0x48(%rsp), %rdi
callq 0x20a0
leaq 0x1414(%rip), %rsi      # 0x5897
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2e26
leaq -0x125f(%rip), %rdx     # 0x323a
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x4526
leaq 0x28(%rsp), %rdi
callq 0x20a0
leaq 0x13e9(%rip), %rsi      # 0x58a0
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2e26
leaq -0x77f(%rip), %rdx      # 0x3d4e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4526
leaq 0x8(%rsp), %rdi
callq 0x20a0
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x450c
jmp 0x4513
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x450c
jmp 0x4513
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x20a0
jmp 0x4516
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e62
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/microcontrollerfactory.cpp
// Function: mcontroller::MicrocontrollerFactory::createMicrocontroller(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Microcontroller* MicrocontrollerFactory::createMicrocontroller(string name){


		// check if the create function is exist
		if(this->createFunctionMap.find(name) == this->createFunctionMap.end()){
			// not exist
			// notify user
			cerr << "Error: Invalid Microcontroller type." << endl;
			cout << "Message: Valid types of Microcontroller are "
				 << this->getAvailableMicrocontrollersString()
				 << endl;
			return 0;
		} else {
			// exist
			// get the create function from the map
			createFunction* createFn = this->createFunctionMap[name];			
			return createFn();
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x49d2
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x45ad
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4708
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *(%rax)
movq 0x4a3c(%rip), %rdi      # 0x8ff0
leaq 0x12ec(%rip), %rsi      # 0x58a7
callq 0x2170
movq %rax, %rdi
callq 0x20b0
movq 0x49f9(%rip), %rdi      # 0x8fc8
leaq 0x12f6(%rip), %rsi      # 0x58cc
callq 0x2170
movq %rax, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4626
movq %r14, %rdi
movq %r15, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20b0
movq %rsp, %rdi
callq 0x20a0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/microcontrollerfactory.cpp
// Function: mcontroller::MicrocontrollerFactory::getAvailableMicrocontrollersString[abi:cxx11]()
string MicrocontrollerFactory::getAvailableMicrocontrollersString(){
		// get the iterator
		map<string, createFunction*>::iterator it;

		// the return string
		string microcontrollerString;

		// iterate through the map
		for (it = this->createFunctionMap.begin(); it != this->createFunctionMap.end(); ++it){
			// get the key and then append to the string
			microcontrollerString.append(it->first);
			microcontrollerString.append(" ");
		}

		return microcontrollerString;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x18(%rsi), %r12
addq $0x8, %r14
leaq 0xd53(%rip), %r15       # 0x53a6
cmpq %r14, %r12
je 0x467d
leaq 0x20(%r12), %rsi
movq %rbx, %rdi
callq 0x22c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22a0
movq %r12, %rdi
callq 0x20f0
movq %rax, %r12
jmp 0x4653
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/tmtxt[P]microcontroller-emulation/microcontrollerfactory.cpp
// Function: mcontroller::MicrocontrollerFactory::getAvailableMicrocontrollersSet[abi:cxx11]()
set<string> MicrocontrollerFactory::getAvailableMicrocontrollersSet(){
		// get the iterator
		map<string, createFunction*>::iterator it;

		// the return set
		set<string> microcontrollerSet;

		// iterate through the map
		for (it = this->createFunctionMap.begin(); it != this->createFunctionMap.end(); ++it){
			// insert the key to the set
			microcontrollerSet.insert(it->first);
		}

		return microcontrollerSet;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rsi, %r14
movq 0x18(%rsi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x46eb
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x4c90
movq %r15, %rdi
callq 0x20f0
movq %rax, %r15
jmp 0x46cd
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x476e
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/stevedonovan[P]outstreams/reader-lineinfo.cpp
// Function: main
int main()
{
    outs.sep(' ');
    Reader rdr("instream.cpp");
    string tok;
    while (rdr(tok)) {
        if (tok == "Reader::getlineinfo") {
            // Reader::LineInfo Reader::getlineinfo (long p) {
            string type, mname;
            rdr (type)(mname);
            outs("type")(type,"q")(",")("name")(mname,"q")();
            break;
        }
    }
    auto pos = rdr.getlineinfo();
    outs("line")(pos.line)("column")(pos.column)();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
leaq 0x4ce1(%rip), %rdi      # 0x7230
pushq $0x20
popq %rsi
callq 0x3ad4
leaq 0x1ad4(%rip), %rsi      # 0x4032
leaq 0x1bc5(%rip), %rdx      # 0x412a
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x2856
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %r14
leaq 0x1ab0(%rip), %r15      # 0x403f
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2d62
movq %rax, %rdi
callq 0x29c6
testb %al, %al
je 0x2673
movq %r14, %rdi
movq %r15, %rsi
callq 0x2763
testb %al, %al
je 0x258f
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x2d62
movq %rsp, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x2d62
leaq 0x4c2e(%rip), %rdi      # 0x7230
leaq 0x1a4a(%rip), %rsi      # 0x4053
xorl %edx, %edx
callq 0x2770
movq 0x20(%rsp), %rsi
leaq 0x1a3c(%rip), %rdx      # 0x4058
movq %rax, %rdi
callq 0x2770
leaq 0x1a2f(%rip), %rsi      # 0x405a
movq %rax, %rdi
xorl %edx, %edx
callq 0x2770
leaq 0x1a20(%rip), %rsi      # 0x405c
movq %rax, %rdi
xorl %edx, %edx
callq 0x2770
movq (%rsp), %rsi
leaq 0x1a07(%rip), %rdx      # 0x4058
movq %rax, %rdi
callq 0x2770
movq %rax, %rdi
callq 0x3b16
movq %rsp, %rdi
callq 0x2298
leaq 0x20(%rsp), %rdi
callq 0x2298
leaq 0x60(%rsp), %rdi
pushq $-0x1
popq %rsi
callq 0x32f8
movq %rax, %rbx
leaq 0x4ba6(%rip), %rdi      # 0x7230
leaq 0x19d0(%rip), %rsi      # 0x4061
xorl %edx, %edx
callq 0x2770
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x2782
leaq 0x19bb(%rip), %rsi      # 0x4066
movq %rax, %rdi
xorl %edx, %edx
callq 0x2770
shrq $0x20, %rbx
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x2782
movq %rax, %rdi
callq 0x3b16
leaq 0x40(%rsp), %rdi
callq 0x2298
leaq 0x60(%rsp), %rdi
callq 0x2976
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2298
leaq 0x20(%rsp), %rdi
callq 0x2298
jmp 0x270c
jmp 0x2709
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2298
leaq 0x60(%rsp), %rdi
callq 0x2976
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/main.cpp
// Function: cleanup(TrainingFileData*, QueryFileData*, float*, float**)
void cleanup(TrainingFileData* training_file_data, QueryFileData* query_file_data, float* training_points, float** query_points) {
    delete[] training_points;

    for (std::size_t i = 0; i < query_file_data->num_points; ++i) {
        delete query_points[i];
    }

    delete[] query_points;

    delete training_file_data;
    delete query_file_data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x230b
movq %rdx, %rdi
callq 0x2130
xorl %r13d, %r13d
pushq $0x4
popq %r12
cmpq 0x8(%rbx), %r13
jae 0x2329
movq (%r15,%r13,8), %rdi
movq %r12, %rsi
callq 0x2110
incq %r13
jmp 0x2312
testq %r15, %r15
je 0x2336
movq %r15, %rdi
callq 0x2130
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2110
pushq $0x20
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/main.cpp
// Function: main
int main(int argc, char** argv) {
    if (argc != 4) {
        printf("Error: Invalid number of arguments (got %d, expected 44)\n", argc);

        return 1;
    }

    std::string training_file_name = argv[1];
    if (!file_exists(training_file_name)) {
        printf("Error: Could not find training file <%s>\n", training_file_name.c_str());

        return 1;
    }

    std::string query_file_name = argv[2];
    if (!file_exists(query_file_name)) {
        printf("Error: Could not find query file <%s>\n", query_file_name.c_str());

        return 1;
    }

    std::string result_file_name = argv[3];

    TrainingFileProcessor training_file_processor(training_file_name);
    QueryFileProcessor query_file_processor(query_file_name);

    runNearestNeighbors(training_file_processor, query_file_processor, result_file_name);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
cmpl $0x4, %edi
jne 0x2670
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x28(%rsp), %r14
leaq 0xc8(%rsp), %rdx
movq %r14, %rdi
callq 0x2dac
movq %r14, %rdi
callq 0x2de7
testb %al, %al
je 0x2685
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x2dac
leaq 0x8(%rsp), %rdi
callq 0x2de7
testb %al, %al
je 0x269d
movq 0x18(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x2dac
leaq 0x88(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2160
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x2e08
leaq 0x88(%rsp), %rdi
callq 0x20a0
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2160
leaq 0x2f8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2e52
leaq 0x68(%rsp), %rdi
callq 0x20a0
leaq 0x48(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x2160
leaq 0xc8(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x2355
leaq 0x48(%rsp), %rdi
callq 0x20a0
leaq 0x2f8(%rsp), %rdi
callq 0x2e9c
leaq 0xc8(%rsp), %rdi
callq 0x2e9c
leaq 0xa8(%rsp), %rdi
callq 0x20a0
xorl %ebx, %ebx
jmp 0x26b3
movl %edi, %esi
leaq 0x29df(%rip), %rdi      # 0x5058
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %rbx
jmp 0x26c7
movq 0x28(%rsp), %rsi
leaq 0x2a01(%rip), %rdi      # 0x5092
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %rbx
jmp 0x26bd
movq 0x8(%rsp), %rsi
leaq 0x2a13(%rip), %rdi      # 0x50bc
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %rbx
leaq 0x8(%rsp), %rdi
callq 0x20a0
leaq 0x28(%rsp), %rdi
callq 0x20a0
movl %ebx, %eax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20a0
jmp 0x26e6
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0x2e9c
jmp 0x2707
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20a0
jmp 0x2707
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x2e9c
jmp 0x272b
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20a0
jmp 0x272b
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20a0
leaq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x274c
movq %rax, %rbx
jmp 0x2738
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/fileprocessor/TrainingFileProcessor.hpp
// Function: TrainingFileProcessor::readTrainingFileHeader()
TrainingFileData* readTrainingFileHeader() {
        char file_type[8];
        this->input_stream.read(reinterpret_cast<char *>(&file_type), 8);

        std::size_t file_id = 0;
        this->input_stream.read(reinterpret_cast<char *>(&file_id), 8);

        std::size_t num_points = 0;
        this->input_stream.read(reinterpret_cast<char *>(&num_points), 8);

        std::size_t num_dimensions = 0;
        this->input_stream.read(reinterpret_cast<char *>(&num_dimensions), 8);

        this->file_data = new TrainingFileData(file_id, num_points, num_dimensions);

        return static_cast<TrainingFileData*>(this->file_data);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x20(%rsp), %rsi
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2120
leaq 0x18(%rsp), %r12
andq $0x0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2120
leaq 0x10(%rsp), %r13
andq $0x0, (%r13)
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2120
leaq 0x8(%rsp), %rbp
andq $0x0, (%rbp)
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x2120
pushq $0x18
popq %rdi
callq 0x2100
movq (%r12), %rcx
movq (%r13), %rdx
movq (%rbp), %rsi
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq %rsi, 0x10(%rax)
movq %rax, 0x228(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/fileprocessor/FileProcessor.hpp
// Function: FileProcessor::readPoints1D()
float* readPoints1D() {
        std::size_t num_points = this->file_data->num_points;
        float* points = new float[num_points * this->file_data->num_dimensions];

        for (std::size_t i = 0; i < num_points; ++i) {
            for (std::size_t j = 0; j < this->file_data->num_dimensions; ++j) {
                float* f = points + ((num_points * j) + i);

                this->input_stream.read(
                    (char*) f,
                    sizeof(float)
                );
            }
        }

        return points;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x228(%rdi), %rbp
movq 0x8(%rbp), %r14
movq 0x10(%rbp), %rax
imulq %r14, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %r12d, %r12d
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x2030
movq %rax, %r13
leaq 0x20(%rbx), %r15
movq %r14, 0x10(%rsp)
leaq (,%r14,4), %r14
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %r12
je 0x28ac
movq %r12, 0x20(%rsp)
movq %r13, 0x18(%rsp)
xorl %r12d, %r12d
cmpq 0x10(%rbp), %r12
jae 0x2899
movq %r15, %rdi
movq %r13, %rsi
pushq $0x4
popq %rdx
callq 0x2120
incq %r12
movq 0x228(%rbx), %rbp
addq %r14, %r13
jmp 0x2876
movq 0x20(%rsp), %r12
incq %r12
movq 0x18(%rsp), %r13
addq $0x4, %r13
jmp 0x2862
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KDTree.hpp
// Function: hpyc::KDTree<float>::KDTree(float*, unsigned long, unsigned long)
KDTree(ItemT* np_array_in, const std::size_t num_points_in, const std::size_t num_dimensions_in):
        np_array(np_array_in),
        num_points(num_points_in),
        num_dimensions(num_dimensions_in)
    {
        // TODO get rid of this copy? Need to work out whether the user is okay w/ sacrificing their existing array.
        this->np_array = new ItemT[num_points_in * num_dimensions_in];
        std::memcpy(this->np_array, np_array_in, sizeof(ItemT) * num_points_in * num_dimensions_in);

        // Create a column-major representation for compatibility with implemented Quickselect method.
        this->nodes = new ItemT*[num_dimensions_in];

        for (std::size_t i = 0; i < num_dimensions_in; ++i) {
            this->nodes[i] = np_array_in + (i * num_points_in);
        }

        this->buildTree(0, num_points_in, 0);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, (%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %rcx, %rax
imulq %rdx, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %r13d, %r13d
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x2030
movq %rax, (%r14)
leaq (,%rbx,4), %rbp
movq %rbp, %rdx
imulq %r15, %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x20e0
movq %r15, %rax
shrq $0x3d, %rax
leaq (,%r15,8), %rcx
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, 0x8(%r14)
cmpq %r13, %r15
je 0x2962
movq 0x8(%r14), %rax
movq %r12, (%rax,%r13,8)
incq %r13
addq %rbp, %r12
jmp 0x294d
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2faa
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/fileprocessor/QueryFileProcessor.hpp
// Function: QueryFileProcessor::readQueryFileHeader()
QueryFileData* readQueryFileHeader() {
        char file_type[8];
        this->input_stream.read(reinterpret_cast<char *>(&file_type), 8);

        std::size_t file_id = 0;
        this->input_stream.read(reinterpret_cast<char *>(&file_id), 8);

        std::size_t num_points = 0;
        this->input_stream.read(reinterpret_cast<char *>(&num_points), 8);

        std::size_t num_dimensions = 0;
        this->input_stream.read(reinterpret_cast<char *>(&num_dimensions), 8);

        std::size_t num_neighbors = 0;
        this->input_stream.read(reinterpret_cast<char *>(&num_neighbors), 8);

        this->file_data = new QueryFileData(file_id, num_points, num_dimensions, num_neighbors);

        return static_cast<QueryFileData*>(this->file_data);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r15
leaq 0x20(%rsp), %rsi
pushq $0x8
popq %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x2120
movq %rsp, %rsi
andq $0x0, (%rsi)
movq %r15, %rdi
movq %r12, %rdx
callq 0x2120
leaq 0x18(%rsp), %r13
andq $0x0, (%r13)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2120
leaq 0x10(%rsp), %rbp
andq $0x0, (%rbp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2120
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2120
pushq $0x20
popq %rdi
callq 0x2100
movq %rsp, %rcx
movq (%rcx), %rcx
movq (%r13), %rdx
movq (%rbp), %rsi
movq (%r14), %rdi
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq %rsi, 0x10(%rax)
movq %rdi, 0x18(%rax)
movq %rax, 0x228(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/fileprocessor/FileProcessor.hpp
// Function: FileProcessor::readPointsRowCol()
float** readPointsRowCol() {
        std::size_t num_points = this->file_data->num_points;

        float** points = new float*[num_points];

        for (std::size_t i = 0; i < num_points; i++) {
            if (this->input_stream) {
                float* f = new float[this->file_data->num_dimensions];

                this->input_stream.read(
                    (char*) f,
                    this->file_data->num_dimensions * sizeof(float)
                );

                points[i] = (f);
            }
        }

        this->close();

        return points;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x228(%rdi), %rax
movq 0x8(%rax), %r13
movq %r13, %rax
shrq $0x3d, %rax
leaq (,%r13,8), %rcx
xorl %ebp, %ebp
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, (%rsp)
leaq 0x20(%rbx), %r15
cmpq %rbp, %r13
je 0x2ae5
movq 0x20(%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x40(%rbx,%rax)
jne 0x2ae0
movq 0x228(%rbx), %r14
movq 0x10(%r14), %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x2030
movq %rax, %r12
movq 0x10(%r14), %rdx
shlq $0x2, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x2120
movq (%rsp), %rax
movq %r12, (%rax,%rbp,8)
incq %rbp
jmp 0x2a85
movq %rbx, %rdi
callq 0x2eb2
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/ResultsFileWriter.hpp
// Function: ResultsFileWriter::writeFileHeader()
void writeFileHeader() {
        char file_type[] = "RESULT\0\0";
        auto file_id = this->generateFileID();
        this->results_file.write(reinterpret_cast<const char*>(&file_type), 8);
        this->results_file.write(reinterpret_cast<const char*>(&this->training_file_data->file_id), 8);
        this->results_file.write(reinterpret_cast<const char*>(&this->query_file_data->file_id), 8);
        this->results_file.write(reinterpret_cast<const char*>(&file_id), 8);
        this->results_file.write(reinterpret_cast<const char*>(&(this->query_file_data->num_points)), 8);
        this->results_file.write(reinterpret_cast<const char*>(&(this->query_file_data->num_dimensions)), 8);
        this->results_file.write(reinterpret_cast<const char*>(&(this->query_file_data->num_neighbors)), 8);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movabsq $0x544c55534552, %rax   # imm = 0x544C55534552
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
callq 0x2ed6
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
leaq 0x30(%rbx), %r14
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2140
movq 0x20(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2140
movq 0x28(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2140
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2140
movq 0x28(%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2140
movq 0x28(%rbx), %rsi
addq $0x10, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2140
movq 0x28(%rbx), %rsi
addq $0x18, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2140
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KDTree.hpp
// Function: hpyc::KDTree<float>::nearestNeighborsSearch(float const*, unsigned long, unsigned long*, double*) const
void KDTree<ItemT>::nearestNeighborsSearch(const ItemT* query_point, const std::size_t num_neighbors, std::size_t* indices, double* distances) const {
    KNNQueue<ItemT> queue(query_point, num_neighbors, this->num_dimensions);

    this->nearestNeighborsSearch(query_point, 0, this->num_points, 0, queue);
        queue.sortArray();

    for (std::size_t i = num_neighbors; i > 0; --i) {
        indices[i - 1] = queue.array[i - 1].index;
        distances[i - 1] = queue.array[i - 1].distance_from_queried_point;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x18(%rdi), %rcx
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x3b2e
movq 0x10(%r13), %rcx
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0x3b94
leaq 0x8(%rsp), %rdi
callq 0x3d3c
movq 0x30(%rsp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x8, %rax
subq $0x1, %r15
jb 0x2c90
movq -0x8(%rax), %rcx
movq %rcx, (%r14,%r15,8)
movsd (%rax), %xmm0
movsd %xmm0, (%rbx,%r15,8)
addq $-0x10, %rax
jmp 0x2c72
leaq 0x8(%rsp), %rdi
callq 0x3d50
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d50
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/ResultsFileWriter.hpp
// Function: void ResultsFileWriter::writeQueryResults<float>(hpyc::KDTree<float>&, unsigned long*)
void writeQueryResults(hpyc::KDTree<ItemT>& tree, std::size_t* indices) {
        ItemT* point_to_write = new ItemT[this->query_file_data->num_dimensions];

        for (std::size_t i = 0; i < this->query_file_data->num_neighbors; i++) {
            tree.readPointAt(point_to_write, indices[i]);

            this->results_file.write(
                reinterpret_cast<char*>(&(point_to_write)),
                sizeof(ItemT) * this->query_file_data->num_dimensions
            );
        }

        delete[] point_to_write;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %r12
movq 0x10(%r12), %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %ebp, %ebp
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x2030
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x30(%r15), %r13
movq (%rsp), %rsi
cmpq 0x18(%r12), %rbp
jae 0x2d3c
movq (%rbx,%rbp,8), %rdx
movq %r14, %rdi
callq 0x3d5e
movq 0x28(%r15), %rax
movq 0x10(%rax), %rdx
shlq $0x2, %rdx
movq %r13, %rdi
movq %rsp, %rsi
callq 0x2140
incq %rbp
movq 0x28(%r15), %r12
jmp 0x2d05
testq %rsi, %rsi
je 0x2d49
movq %rsi, %rdi
callq 0x2130
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/ResultsFileWriter.hpp
// Function: ResultsFileWriter::generateFileID()
std::size_t generateFileID() {
        std::ifstream urandom("/dev/urandom", std::ios::in|std::ios::binary);
        std::size_t rand = 0;

        if (urandom) {
            urandom.read(reinterpret_cast<char*>(&rand), 8);
            urandom.close();
        }

        return 69;
//        return rand;
    }

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
leaq 0x21fe(%rip), %rsi      # 0x50e3
leaq 0x8(%rsp), %rbx
pushq $0xc
popq %rdx
movq %rbx, %rdi
callq 0x21d0
andq $0x0, (%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x2f22
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x2120
leaq 0x8(%rsp), %rdi
callq 0x2050
leaq 0x8(%rsp), %rdi
callq 0x2060
pushq $0x45
popq %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KDTree.hpp
// Function: hpyc::KDTree<float>::buildTree(unsigned long, unsigned long, unsigned int)
void KDTree<ItemT>::buildTree(const std::size_t subarray_begin, const std::size_t subarray_end, const unsigned int depth) {
    std::size_t range = subarray_end - subarray_begin;

    // Base case - If there is one element left, it is already sorted and thus in its correct position.
    if (range == 1) { return; }

    // Base case - If there are two elements left, they will be in their correct positions if they are sorted.
    else if (range == 2) {
        if (this->nodes[depth][subarray_begin] > this->nodes[depth][subarray_begin + 1]) {
            this->swap(subarray_begin, subarray_begin + 1);
        }

        return;
    }

    else if (range == 3) {
        AdaptiveCacheAwareBlockquickselect<ItemT> qs(this->nodes, this->num_dimensions, depth);
        qs.sort3(subarray_begin);

        return;
    }

    // Partition the current subarray around the median at the current dimension.
    AdaptiveCacheAwareBlockquickselect<ItemT> qs(this->nodes, this->num_dimensions, depth);
    qs.nth_element(subarray_begin, subarray_end, (range / 2));

    unsigned int new_depth = (depth + 1) & (-1 + (depth == this->num_dimensions - 1));

    // Build left subtree (all elements left of the median)
    this->buildTree(subarray_begin, subarray_begin + (range / 2), new_depth);

    // Build right subtree (all elements right of the median)
    this->buildTree(subarray_begin + (range / 2) + 1, subarray_end, new_depth);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
subq %rsi, %r12
cmpq $0x1, %r12
je 0x3094
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x3, %r12
je 0x3013
cmpq $0x2, %r12
jne 0x3032
movq 0x8(%r14), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
movss (%rax,%rbx,4), %xmm0
ucomiss 0x4(%rax,%rbx,4), %xmm0
jbe 0x3094
leaq 0x1(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30a4
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movq %rsp, %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movl %ebp, 0x10(%rdi)
movq %rbx, %rsi
callq 0x30d6
jmp 0x3094
movq %rdx, %r15
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movq %rsp, %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movl %ebp, 0x10(%rdi)
shrq %r12
movq %rbx, %rsi
movq %r12, %rcx
callq 0x311e
movl %ebp, %eax
incl %ebp
movq 0x18(%r14), %rcx
decq %rcx
xorl %r13d, %r13d
cmpq %rax, %rcx
cmovnel %ebp, %r13d
leaq (%r12,%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl %r13d, %ecx
callq 0x2faa
leaq (%r12,%rbx), %rsi
incq %rsi
movq %r14, %rdi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x2faa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KDTree.hpp
// Function: hpyc::KDTree<float>::swap(unsigned long, unsigned long)
inline void swap(std::size_t index1, std::size_t index2) {
        for (std::size_t i = 0; i < this->num_dimensions; ++i) {
            std::swap(
                this->nodes[i][index1],
                this->nodes[i][index2]
            );
        }
    }

// Assembly:
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rcx
xorl %edi, %edi
cmpq %rcx, %rdi
jae 0x30d4
movq (%rax,%rdi,8), %r8
movss (%r8,%rsi,4), %xmm0
movss (%r8,%rdx,4), %xmm1
movss %xmm1, (%r8,%rsi,4)
movss %xmm0, (%r8,%rdx,4)
incq %rdi
jmp 0x30ae
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/../quickselect/AdaptiveCacheAwareBlockquickselect.hpp
// Function: hpyc::AdaptiveCacheAwareBlockquickselect<float, 64ul, 64ul>::swap(unsigned long, unsigned long)
inline void swap(const std::size_t index1, const std::size_t index2) {
        for (std::size_t i = 0; i < this->num_dimensions; ++i) {
            std::swap(
                this->nodes[i][index1],
                this->nodes[i][index2]
            );
        }
    }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorl %edi, %edi
cmpq %rcx, %rdi
jae 0x327f
movq (%rax,%rdi,8), %r8
movss (%r8,%rsi,4), %xmm0
movss (%r8,%rdx,4), %xmm1
movss %xmm1, (%r8,%rsi,4)
movss %xmm0, (%r8,%rdx,4)
incq %rdi
jmp 0x3259
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/../quickselect/AdaptiveCacheAwareBlockquickselect.hpp
// Function: hpyc::AdaptiveCacheAwareBlockquickselect<float, 64ul, 64ul>::medianOf3(unsigned long, unsigned long)
inline std::size_t medianOf3(const std::size_t begin, const std::size_t end) {
        this->compareAndSwap(begin, begin + ((end - begin) / 2));
        this->compareAndSwap(begin + ((end - begin) / 2), end - 1);
        this->compareAndSwap(begin, begin + ((end - begin) / 2));

        this->swap(begin + 1, begin + ((end - begin) / 2));

        return begin + 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq %rdx, %r14
subq %rsi, %r14
shrq %r14
addq %rsi, %r14
movq %r14, %rdx
callq 0x3236
decq %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3236
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3236
incq %rbx
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3250
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/../quickselect/AdaptiveCacheAwareBlockquickselect.hpp
// Function: hpyc::AdaptiveCacheAwareBlockquickselect<float, 64ul, 64ul>::dynamicBlockPartition(unsigned long, unsigned long, unsigned long)
inline std::size_t dynamicBlockPartition(std::size_t pivot, std::size_t unpartitioned_range_begin, std::size_t last_unpartitioned_item) {
        alignas(64) std::size_t* left_buffer = new std::size_t[((last_unpartitioned_item - unpartitioned_range_begin + 1) >> 1u) + 1];
        alignas(64) std::size_t* right_buffer = new std::size_t[((last_unpartitioned_item - unpartitioned_range_begin + 1) >> 1u) + 1];

        pivot = dynamicBlockPartition(pivot, unpartitioned_range_begin, last_unpartitioned_item, left_buffer, right_buffer);

        delete[] left_buffer;
        delete[] right_buffer;

        return pivot;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rax
subq %rdx, %rax
incq %rax
movq %rax, %rcx
andq $-0x2, %rcx
movabsq $0x3ffffffffffffffd, %rdx # imm = 0x3FFFFFFFFFFFFFFD
cmpq %rdx, %rax
leaq 0x8(,%rcx,4), %rax
pushq $-0x1
popq %r13
cmovbeq %rax, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, %rbp
movq %r13, %rdi
callq 0x2030
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %rbp, %r8
movq %rax, %r9
callq 0x395c
movq %rax, %rbx
movq %rbp, %rdi
callq 0x2130
movq %r13, %rdi
callq 0x2130
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KNNQueue.hpp
// Function: hpyc::KNNQueue<float>::registerAsNeighbor(unsigned long)
void KNNQueue<ItemT>::registerAsNeighbor(std::size_t index) {
    double distance_from_query = distanceBetween(this->query_point, this->potential_neighbor, this->num_dimensions);

    this->array[current_size].index = index;
    this->array[this->current_size].distance_from_queried_point = distance_from_query;

    // Swap the new neighbor with the neighbor at i=0 if its distance from the query point is greater.
    std::swap(
        this->array[0],
        this->array[this->current_size & (0 - (this->array[0].distance_from_queried_point < this->array[current_size].distance_from_queried_point))]
    );

    ++this->current_size;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
movq 0x18(%r14), %rdx
callq 0x40ea
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
movq %rax, %rdx
shlq $0x4, %rdx
movq %rbx, (%rcx,%rdx)
movsd %xmm0, 0x8(%rcx,%rdx)
xorl %edx, %edx
ucomisd 0x8(%rcx), %xmm0
cmovaq %rax, %rdx
shlq $0x4, %rdx
movups (%rcx), %xmm0
movaps %xmm0, (%rsp)
movups (%rcx,%rdx), %xmm0
movups %xmm0, (%rcx)
movaps (%rsp), %xmm0
movups %xmm0, (%rcx,%rdx)
incq 0x20(%r14)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KNNQueue.hpp
// Function: hpyc::KNNQueue<float>::registerAsNeighborIfCloser(unsigned long)
void KNNQueue<ItemT>::registerAsNeighborIfCloser(std::size_t index) {
    // If the priority queue is at capacity and the potential neighbor is closer to the query point than the current
    // furthest neighbor, remove the furthest neighbor from the priority queue and push the potential neighbor.
    double distance_from_query = distanceBetween(this->query_point, this->potential_neighbor, this->num_dimensions);

    if (this->closerThanFarthestNeighbor(distance_from_query)) {
        this->array[0].index = index;
        this->array[0].distance_from_queried_point = distance_from_query;

        this->siftDownRoot();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
callq 0x40ea
movq 0x28(%rbx), %rax
movsd 0x8(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3f84
movq %r14, (%rax)
movsd %xmm0, 0x8(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4112
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KNNQueue.hpp
// Function: double hpyc::distanceBetween<float>(float const*, float const*, unsigned long)
inline double distanceBetween(const ItemT* p1, const ItemT* p2, const std::size_t size) {
    double distance = 0.0;

    for (std::size_t i = 0; i < size; ++i) {
        double diff = p2[i] - p1[i];
        distance += (diff * diff);
    }

    return distance;
}

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rdx
je 0x4110
movss (%rsi,%rax,4), %xmm1
subss (%rdi,%rax,4), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x40f0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cfiutak1[P]HPyC-KD-Tree/./utils/filewriter/../../src/kdtree/KNNQueue.hpp
// Function: hpyc::KNNQueue<float>::siftDownRoot()
void KNNQueue<ItemT>::siftDownRoot() {
    std::size_t index = 0;
    std::size_t first_index_without_both_children = this->current_size / 2 - (this->current_size % 2 == 0);

    while (index < first_index_without_both_children) {
        std::size_t left_child = 2 * index + 1;
        std::size_t larger_child = left_child + (this->array[left_child] < this->array[left_child + 1]);
        std::size_t swap_destination = index + ((larger_child - index) & (0 - (this->array[index] < this->array[larger_child])));

        if (index == swap_destination) { return; }

        std::swap(
            this->array[index],
            this->array[swap_destination]
        );

        index = swap_destination;
    }

    // Special case for when the index only has one child.
    if (index == first_index_without_both_children && (this->current_size % 2 == 0)) {
        std::size_t left_child = 2 * index + 1;
        std::size_t swap_destination = index + ((left_child - index) & (0 - (this->array[index] < this->array[left_child])));

        std::swap(
            this->array[index],
            this->array[swap_destination]
        );
    }
}

// Assembly:
movq 0x20(%rdi), %rax
movl %eax, %ecx
notl %ecx
shrq %rax
andl $0x1, %ecx
subq %rcx, %rax
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x41b2
leaq 0x1(,%rdx,2), %rsi
movq 0x28(%rdi), %rcx
movq %rdx, %r8
shlq $0x5, %r8
shlq $0x4, %rsi
movsd 0x28(%rcx,%r8), %xmm0
xorl %r8d, %r8d
ucomisd 0x8(%rcx,%rsi), %xmm0
seta %r8b
leaq (%r8,%rdx,2), %rsi
incq %rsi
movq %rdx, %r8
shlq $0x4, %r8
movq %rsi, %r9
shlq $0x4, %r9
movsd 0x8(%rcx,%r9), %xmm0
ucomisd 0x8(%rcx,%r8), %xmm0
ja 0x4181
movq %rdx, %rsi
cmpq %rsi, %rdx
je 0x4202
addq %rcx, %r8
movq %rsi, %rdx
shlq $0x4, %rdx
movups (%r8), %xmm0
movaps %xmm0, -0x18(%rsp)
movups (%rcx,%rdx), %xmm0
movups %xmm0, (%r8)
movaps -0x18(%rsp), %xmm0
movups %xmm0, (%rcx,%rdx)
movq %rsi, %rdx
jmp 0x4125
jne 0x4202
testb $0x1, 0x20(%rdi)
jne 0x4202
leaq 0x1(,%rax,2), %rcx
movq 0x28(%rdi), %rdx
movq %rax, %rsi
shlq $0x4, %rsi
movq %rcx, %rdi
shlq $0x4, %rdi
movsd 0x8(%rdx,%rdi), %xmm0
ucomisd 0x8(%rdx,%rsi), %xmm0
cmovaq %rcx, %rax
shlq $0x4, %rax
movups (%rdx,%rsi), %xmm0
movaps %xmm0, -0x18(%rsp)
movups (%rdx,%rax), %xmm0
movups %xmm0, (%rdx,%rsi)
movaps -0x18(%rsp), %xmm0
movups %xmm0, (%rdx,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/token.cpp
// Function: tokenBoolean::tokenBoolean(int, int, char*)
tokenBoolean::tokenBoolean(int l, int c, char* val){
    line = l;
    column = c;
    
    if ( strcmp(val,"true") == 0 ){
        value = true;
    } else {
        value = false;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
leaq 0x1c514(%rip), %rsi     # 0x23004
movq %rcx, %rdi
callq 0x63f0
testl %eax, %eax
sete 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/token.cpp
// Function: tokenConstant::tokenConstant(int, int, char*, int)
tokenConstant::tokenConstant(int l, int c, char* id, int t){
    line = l;
    column = c;
    
    ident = string(id);
    type = t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdi), %r15
movb $0x0, 0x18(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rcx, %rsi
callq 0x6d6c
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x6390
movq %r12, %rdi
callq 0x65c8
movl %ebx, 0x28(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x65c8
movq %rbx, %rdi
callq 0x6530
// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/dump.cpp
// Function: AST_variable_declaration::dump(std::ostream&, int)
void AST_variable_declaration::dump(ostream &strm, int indentation){
    
    AST_declaration::dump(strm, indentation);
    
    strm << "Declaration: " << sym->getName()
         << " ("
         << types.types[ sym->getType() ]->name
         << ") [offset "
         << sym->offset
         << "] ";
    
    if ( value != 0 ){
        strm << "initialized with" << endl;
        value->dump(strm, indentation+1);
    } else {
        strm << "unitialized" << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6f54
leaq 0x1c4db(%rip), %rsi     # 0x23493
movq %rbx, %rdi
callq 0x62b0
movq %rax, %r15
movq 0x98(%r14), %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x13efa
movq %r15, %rdi
movq %r12, %rsi
callq 0x62a0
leaq 0x1c508(%rip), %rsi     # 0x234ef
movq %rax, %rdi
callq 0x62b0
movq %rax, %r15
movq 0x98(%r14), %rdi
callq 0x13f0c
cltq
leaq 0x31401(%rip), %rcx     # 0x38408
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x62a0
leaq 0x1c480(%rip), %rsi     # 0x234a1
movq %rax, %rdi
callq 0x62b0
movq 0x98(%r14), %rcx
movl 0x34(%rcx), %esi
movq %rax, %rdi
callq 0x61e0
leaq 0x1c46a(%rip), %rsi     # 0x234ac
movq %rax, %rdi
callq 0x62b0
movq %rsp, %rdi
callq 0x65c8
cmpq $0x0, 0xa0(%r14)
je 0x7088
leaq 0x1c44c(%rip), %rsi     # 0x234af
movq %rbx, %rdi
callq 0x62b0
movq %rax, %rdi
callq 0x6130
movq 0xa0(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movq %rbx, %rsi
movl %ebp, %edx
callq *(%rax)
jmp 0x709f
leaq 0x1c431(%rip), %rsi     # 0x234c0
movq %rbx, %rdi
callq 0x62b0
movq %rax, %rdi
callq 0x6130
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x65c8
movq %rbx, %rdi
callq 0x6530
nop