LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tmtxt[P]microcontroller-emulation/mopsr500.cpp
// Function: mcontroller::MopsR500::executeAddValueToMemory(int)
void MopsR500::executeAddValueToMemory(int address){

		// check if the memory is not out of range
		if((address + 4) < this->getMemorySize()){
			// get the value to add
			unsigned char valueToAdd = this->getMemoryValueAtLocation(address + 1);

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

			// compute the destination address from the high and low byte of address
			int destinationAddress = (addressHighByte << 8) | addressLowByte;

			// add the valueToAdd to destination
			this->setMemoryValueAtLocation(destinationAddress,
										   this->getMemoryValueAtLocation(destinationAddress) + valueToAdd);
		
			// move the program counter to the fourth byte after the opcode
			this->setProgramCounter(address + 4);

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


		
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x18(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x5fd5
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %esi
addl $0x3, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xf(%rbp)
movzbl -0xe(%rbp), %eax
shll $0x8, %eax
movzbl -0xf(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %esi
callq 0x4df0
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movzbl -0xd(%rbp), %ecx
addl %ecx, %eax
movzbl %al, %edx
callq 0x4e50
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x4, %esi
callq 0x4dd0
movq 0x9010(%rip), %rdi      # 0xefc8
leaq 0x46ed(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8fea(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6003
movq 0x9014(%rip), %rdi      # 0xeff0
leaq 0x47cf(%rip), %rsi      # 0xa7b2
callq 0x31e0
movq %rax, %rdi
movq 0x8fc6(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: tmtxt[P]microcontroller-emulation/mopsr500.cpp
// Function: mcontroller::MopsR500::executeSubtractValueFromMemory(int)
void MopsR500::executeSubtractValueFromMemory(int address){

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

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

			// compute the destination address from the high and low byte of address
			int destinationAddress = (addressHighByte << 8) | addressLowByte;

			// subtract the valueToSubtract from destination
			this->setMemoryValueAtLocation(destinationAddress,
										   this->getMemoryValueAtLocation(destinationAddress) - valueToSubtract);

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

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x18(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x60e5
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %esi
addl $0x3, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xf(%rbp)
movzbl -0xe(%rbp), %eax
shll $0x8, %eax
movzbl -0xf(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %esi
callq 0x4df0
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movzbl -0xd(%rbp), %ecx
subl %ecx, %eax
movzbl %al, %edx
callq 0x4e50
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x4, %esi
callq 0x4dd0
movq 0x8f00(%rip), %rdi      # 0xefc8
leaq 0x45dd(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8eda(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6113
movq 0x8f04(%rip), %rdi      # 0xeff0
leaq 0x46bf(%rip), %rsi      # 0xa7b2
callq 0x31e0
movq %rax, %rdi
movq 0x8eb6(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: tmtxt[P]microcontroller-emulation/mopsr500.cpp
// Function: mcontroller::MopsR500::executeGoToAddress(int)
void MopsR500::executeGoToAddress(int address){

		if((address + 2) < this->getMemorySize()){
			// compute the address from the low and high byte
			// the memory address can be determined by (high byte << 8) | low byte
			unsigned char addressHighByte = this->getMemoryValueAtLocation(address + 1);
			unsigned char addressLowByte = this->getMemoryValueAtLocation(address + 2);
			int addressToGo = ((addressHighByte << 8) | addressLowByte);

			// check if the address is valid
			if(addressToGo >= 0 && addressToGo < this->getMemorySize()){
				// set the program counter point to the new address
				this->setProgramCounter(addressToGo);

				cout << "Message: Execution completed." << endl;
			} else {
				cerr << "Error: Invalid memory address." << endl;
				this->executeHalt(address);
			}
		

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x18(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x6204
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4df0
movb %al, -0xe(%rbp)
movzbl -0xd(%rbp), %eax
shll $0x8, %eax
movzbl -0xe(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x61d4
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0x61d4
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x4dd0
movq 0x8e11(%rip), %rdi      # 0xefc8
leaq 0x44ee(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8deb(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6202
movq 0x8e15(%rip), %rdi      # 0xeff0
leaq 0x451c(%rip), %rsi      # 0xa6fe
callq 0x31e0
movq %rax, %rdi
movq 0x8dc7(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
jmp 0x6232
movq 0x8de5(%rip), %rdi      # 0xeff0
leaq 0x45a0(%rip), %rsi      # 0xa7b2
callq 0x31e0
movq %rax, %rdi
movq 0x8d97(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: tmtxt[P]microcontroller-emulation/mopsr500.cpp
// Function: mcontroller::MopsR500::executeBranchRelative(int)
void MopsR500::executeBranchRelative(int address){

		if((address + 1) < this->getMemorySize()){
			
			// get the value from the next byte after the opcode and then add
			// convert it to signed int
			int valueToMove = (signed char)(this->getMemoryValueAtLocation(address + 1));

			if((address + valueToMove) >=0 && (address + valueToMove) < this->getMemorySize()){
				
				// move the program counter to the new location
				this->setProgramCounter(address + valueToMove);

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x14(%rbp), %eax
cmpl %ecx, %eax
jge 0x6310
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movsbl %al, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
cmpl $0x0, %eax
jl 0x62e0
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0x62e0
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
callq 0x4dd0
movq 0x8d05(%rip), %rdi      # 0xefc8
leaq 0x43e2(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8cdf(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x630e
movq 0x8d09(%rip), %rdi      # 0xeff0
leaq 0x4410(%rip), %rsi      # 0xa6fe
callq 0x31e0
movq %rax, %rdi
movq 0x8cbb(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
jmp 0x633e
movq 0x8cd9(%rip), %rdi      # 0xeff0
leaq 0x4494(%rip), %rsi      # 0xa7b2
callq 0x31e0
movq %rax, %rdi
movq 0x8c8b(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6350
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::Rotamola34HC22()
Rotamola34HC22::Rotamola34HC22() : Microcontroller(512){
		// print the message for user
		cout << "Message: 34HC22 connected!" << endl;
		
		// After init the memory, reset the microcontroller
		reset();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0x4c80
movq -0x28(%rbp), %rax
leaq 0x894f(%rip), %rcx      # 0xed58
movq %rcx, (%rax)
movq 0x8bb5(%rip), %rdi      # 0xefc8
leaq 0x43e6(%rip), %rsi      # 0xa800
callq 0x31e0
movq %rax, -0x20(%rbp)
jmp 0x6425
movq -0x20(%rbp), %rdi
movq 0x8b88(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6437
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x6446
addq $0x30, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x4d20
movq -0x10(%rbp), %rdi
callq 0x3360
nopw (%rax,%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::getStatusString[abi:cxx11]()
string Rotamola34HC22::getStatusString(){
		stringstream stream;
		stream << "Message: Current Program Counter location: " << hex << this->getProgramCounter() << endl;
		stream << "Message: A register value: " << hex << (int)(this->getA()) << endl;
		stream << "Message: B register value: " << hex << (int)(this->getB());
		return stream.str();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x1c8(%rbp)
movq %rdi, %rax
movq %rax, -0x1c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3150
leaq -0x188(%rbp), %rdi
leaq 0x40d1(%rip), %rsi      # 0xa5da
callq 0x31e0
movq %rax, -0x1b0(%rbp)
jmp 0x6517
movq -0x1b0(%rbp), %rdi
leaq -0x2105(%rip), %rsi     # 0x4420
callq 0x3090
movq %rax, -0x1d0(%rbp)
jmp 0x6533
movq -0x1b8(%rbp), %rdi
callq 0x4db0
movl %eax, -0x1d4(%rbp)
jmp 0x6547
movl -0x1d4(%rbp), %esi
movq -0x1d0(%rbp), %rdi
callq 0x3350
movq %rax, -0x1e0(%rbp)
jmp 0x6562
movq -0x1e0(%rbp), %rdi
movq 0x8a48(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6577
leaq -0x188(%rbp), %rdi
leaq 0x4296(%rip), %rsi      # 0xa81b
callq 0x31e0
movq %rax, -0x1e8(%rbp)
jmp 0x6593
movq -0x1e8(%rbp), %rdi
leaq -0x2181(%rip), %rsi     # 0x4420
callq 0x3090
movq %rax, -0x1f0(%rbp)
jmp 0x65af
movq -0x1b8(%rbp), %rdi
callq 0x66c0
movb %al, -0x1f1(%rbp)
jmp 0x65c3
movq -0x1f0(%rbp), %rdi
movb -0x1f1(%rbp), %al
movzbl %al, %esi
callq 0x3350
movq %rax, -0x200(%rbp)
jmp 0x65e1
movq -0x200(%rbp), %rdi
movq 0x89c9(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x65f6
leaq -0x188(%rbp), %rdi
leaq 0x4233(%rip), %rsi      # 0xa837
callq 0x31e0
movq %rax, -0x208(%rbp)
jmp 0x6612
movq -0x208(%rbp), %rdi
leaq -0x2200(%rip), %rsi     # 0x4420
callq 0x3090
movq %rax, -0x210(%rbp)
jmp 0x662e
movq -0x1b8(%rbp), %rdi
callq 0x66e0
movb %al, -0x211(%rbp)
jmp 0x6642
movq -0x210(%rbp), %rdi
movb -0x211(%rbp), %al
movzbl %al, %esi
callq 0x3350
jmp 0x6659
movq -0x1c8(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x31d0
jmp 0x666e
leaq -0x198(%rbp), %rdi
callq 0x3170
movq -0x1c0(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3170
movq -0x1a0(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeFromLocation(int)
void Rotamola34HC22::executeFromLocation(int address){
		// get the opcode
		unsigned char opcode = this->getMemoryValueAtLocation(address);

		// switch user to the right function
		switch(opcode){
		case 0x0C:				// move A to memory
			this->executeMoveAToMemory(address);
			break;
		case 0x37:				// load A with value
			this->executeLoadAWithValue(address);
			break;
		case 0x38:				// load B with value
			this->executeLoadBWithValue(address);
			break;
		case 0x53:				// increment A
			this->executeIncrementRegisterA(address);
			break;
		case 0x5A:				// branch always
			this->executeBranchAlways(address);
			break;
		case 0x5B:				// branch if A<B
			this->executeBranchIfALessThanB(address);
			break;
		case 0x5D:				// branch if less than A
			this->executeBranchIfLessThanA(address);
			break;
		case 0x64:				// halt opcode
			this->executeHalt(address);
			break;
		default:				// invalid opcode
			cerr << "Error: SIGOP. Invalid opcode. Program Counter = ";
			cerr << hex << this->getProgramCounter() << endl;
			break;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %esi
callq 0x4df0
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0xc, %eax
je 0x6836
jmp 0x67f0
movl -0x14(%rbp), %eax
subl $0x37, %eax
je 0x6847
jmp 0x67fa
movl -0x14(%rbp), %eax
subl $0x38, %eax
je 0x6858
jmp 0x6804
movl -0x14(%rbp), %eax
subl $0x53, %eax
je 0x6869
jmp 0x680e
movl -0x14(%rbp), %eax
subl $0x5a, %eax
je 0x687a
jmp 0x6818
movl -0x14(%rbp), %eax
subl $0x5b, %eax
je 0x6888
jmp 0x6822
movl -0x14(%rbp), %eax
subl $0x5d, %eax
je 0x6896
jmp 0x682c
movl -0x14(%rbp), %eax
subl $0x64, %eax
je 0x68a4
jmp 0x68b2
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6910
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6a50
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6b00
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6bb0
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6c60
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6d30
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6eb0
jmp 0x68ff
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
jmp 0x68ff
movq 0x8737(%rip), %rdi      # 0xeff0
leaq 0x3dbb(%rip), %rsi      # 0xa67b
callq 0x31e0
movq 0x8724(%rip), %rdi      # 0xeff0
leaq -0x24b3(%rip), %rsi     # 0x4420
callq 0x3090
movq -0x20(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x4db0
movq -0x28(%rbp), %rdi
movl %eax, %esi
callq 0x3350
movq %rax, %rdi
movq 0x86be(%rip), %rsi      # 0xefb8
callq 0x3220
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeMoveAToMemory(int)
void Rotamola34HC22::executeMoveAToMemory(int address){

		if((address + 3) < this->getMemorySize()){
					
			// 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()){
			
				// move the content of A to the destination address in memory
				this->setMemoryValueAtLocation(destinationAddress, this->getA());

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

				cout << "Message: Execution completed." << endl;
			} else {
				cerr << "Error: Invalid memory address." << endl;
				this->executeHalt(address);
			}

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x18(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x6a15
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4df0
movb %al, -0xe(%rbp)
movzbl -0xd(%rbp), %eax
shll $0x8, %eax
movzbl -0xe(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x69e5
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0x69e5
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0x66c0
movl -0x28(%rbp), %esi
movq -0x20(%rbp), %rdi
movzbl %al, %edx
callq 0x4e50
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x3, %esi
callq 0x4dd0
movq 0x8600(%rip), %rdi      # 0xefc8
leaq 0x3cdd(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x85da(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6a13
movq 0x8604(%rip), %rdi      # 0xeff0
leaq 0x3d0b(%rip), %rsi      # 0xa6fe
callq 0x31e0
movq %rax, %rdi
movq 0x85b6(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
jmp 0x6a43
movq 0x85d4(%rip), %rdi      # 0xeff0
leaq 0x3ca7(%rip), %rsi      # 0xa6ca
callq 0x31e0
movq %rax, %rdi
movq 0x8586(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeLoadAWithValue(int)
void Rotamola34HC22::executeLoadAWithValue(int address){

		if((address + 2) < this->getMemorySize()){
			// load value from the first byte after the opcode to A
			this->setA(this->getMemoryValueAtLocation(address + 1));

			// set the program counter the the second byte after opcode
			this->setProgramCounter(address + 2);

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x10(%rbp), %eax
cmpl %ecx, %eax
jge 0x6acc
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x18(%rbp), %rdi
movzbl %al, %esi
callq 0x6750
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4dd0
movq 0x8519(%rip), %rdi      # 0xefc8
leaq 0x3bf6(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x84f3(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6afa
movq 0x851d(%rip), %rdi      # 0xeff0
leaq 0x3bf0(%rip), %rsi      # 0xa6ca
callq 0x31e0
movq %rax, %rdi
movq 0x84cf(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
addq $0x20, %rsp
popq %rbp
retq
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeLoadBWithValue(int)
void Rotamola34HC22::executeLoadBWithValue(int address){

		if((address + 2) < this->getMemorySize()){
			// load value from the first byte after the opcode to B
			this->setB(this->getMemoryValueAtLocation(address + 1));

			// set the program counter the the second byte after opcode
			this->setProgramCounter(address + 2);

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x10(%rbp), %eax
cmpl %ecx, %eax
jge 0x6b7c
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x18(%rbp), %rdi
movzbl %al, %esi
callq 0x6770
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4dd0
movq 0x8469(%rip), %rdi      # 0xefc8
leaq 0x3b46(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8443(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6baa
movq 0x846d(%rip), %rdi      # 0xeff0
leaq 0x3b40(%rip), %rsi      # 0xa6ca
callq 0x31e0
movq %rax, %rdi
movq 0x841f(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
addq $0x20, %rsp
popq %rbp
retq
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeIncrementRegisterA(int)
void Rotamola34HC22::executeIncrementRegisterA(int address){

		if((address + 1) < this->getMemorySize()){
			// increare the value of A
			this->setA(this->getA() + 1);

			// move the program counter to the next byte
			this->setProgramCounter(address);

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x10(%rbp), %eax
cmpl %ecx, %eax
jge 0x6c29
movq -0x18(%rbp), %rdi
callq 0x66c0
movq -0x18(%rbp), %rdi
movzbl %al, %eax
addl $0x1, %eax
movzbl %al, %esi
callq 0x6750
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4dd0
movq 0x83bc(%rip), %rdi      # 0xefc8
leaq 0x3a99(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x8396(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6c57
movq 0x83c0(%rip), %rdi      # 0xeff0
leaq 0x3a93(%rip), %rsi      # 0xa6ca
callq 0x31e0
movq %rax, %rdi
movq 0x8372(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: tmtxt[P]microcontroller-emulation/rotamola34hc22.cpp
// Function: mcontroller::Rotamola34HC22::executeBranchAlways(int)
void Rotamola34HC22::executeBranchAlways(int address){

		if((address + 2) < this->getMemorySize()){
			// 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;

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

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

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x18(%rbp)
callq 0x4d90
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jge 0x6cf2
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %esi
addl $0x2, %esi
callq 0x4df0
movq -0x20(%rbp), %rdi
movb %al, -0xe(%rbp)
movzbl -0xd(%rbp), %eax
shll $0x8, %eax
movzbl -0xe(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
callq 0x4dd0
movq 0x82f3(%rip), %rdi      # 0xefc8
leaq 0x39d0(%rip), %rsi      # 0xa6ac
callq 0x31e0
movq %rax, %rdi
movq 0x82cd(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x6d20
movq 0x82f7(%rip), %rdi      # 0xeff0
leaq 0x39ca(%rip), %rsi      # 0xa6ca
callq 0x31e0
movq %rax, %rdi
movq 0x82a9(%rip), %rsi      # 0xefb8
callq 0x3220
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
callq 0x7630
leaq -0x29(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x3370
movq -0x98(%rbp), %rdx
leaq 0x378b(%rip), %rsi      # 0xa892
leaq -0x28(%rbp), %rdi
callq 0x4490
jmp 0x7112
movq -0xa0(%rbp), %rdi
leaq -0x13f0(%rip), %rdx     # 0x5d30
leaq -0x28(%rbp), %rsi
callq 0x72a0
jmp 0x712b
leaq -0x28(%rbp), %rdi
callq 0x3110
leaq -0x29(%rbp), %rdi
callq 0x3240
leaq -0x61(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x3370
movq -0xb0(%rbp), %rdx
leaq 0x373c(%rip), %rsi      # 0xa897
leaq -0x60(%rbp), %rdi
callq 0x4490
jmp 0x7166
movq -0xa0(%rbp), %rdi
leaq -0x1f54(%rip), %rdx     # 0x5220
leaq -0x60(%rbp), %rsi
callq 0x72a0
jmp 0x717f
leaq -0x60(%rbp), %rdi
callq 0x3110
leaq -0x61(%rbp), %rdi
callq 0x3240
leaq -0x89(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x3370
movq -0xb8(%rbp), %rdx
leaq 0x36ee(%rip), %rsi      # 0xa8a0
leaq -0x88(%rbp), %rdi
callq 0x4490
jmp 0x71c0
movq -0xa0(%rbp), %rdi
leaq -0xd5e(%rip), %rdx      # 0x6470
leaq -0x88(%rbp), %rsi
callq 0x72a0
jmp 0x71dc
leaq -0x88(%rbp), %rdi
callq 0x3110
leaq -0x89(%rbp), %rdi
callq 0x3240
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x7220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3110
leaq -0x29(%rbp), %rdi
callq 0x3240
jmp 0x728b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x724e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3110
leaq -0x61(%rbp), %rdi
callq 0x3240
jmp 0x728b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x727f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3110
leaq -0x89(%rbp), %rdi
callq 0x3240
movq -0xa8(%rbp), %rdi
callq 0x4540
movq -0x38(%rbp), %rdi
callq 0x3360
// File: 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 %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x70(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x7720
movq -0x68(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x7750
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x76f0
testb $0x1, %al
jne 0x737b
jmp 0x741a
movq 0x7c6e(%rip), %rdi      # 0xeff0
leaq 0x351e(%rip), %rsi      # 0xa8a7
callq 0x31e0
movq %rax, %rdi
movq 0x7c20(%rip), %rsi      # 0xefb8
callq 0x3220
movq 0x7c24(%rip), %rdi      # 0xefc8
leaq 0x3521(%rip), %rsi      # 0xa8cc
callq 0x31e0
movq -0x68(%rbp), %rsi
movq %rax, -0x88(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x7450
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x31c0
movq %rax, -0x78(%rbp)
jmp 0x73de
movq -0x78(%rbp), %rdi
movq 0x7bcf(%rip), %rsi      # 0xefb8
callq 0x3220
jmp 0x73f0
leaq -0x48(%rbp), %rdi
callq 0x3110
movq $0x0, -0x8(%rbp)
jmp 0x7435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3110
jmp 0x7442
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x7780
movq (%rax), %rax
movq %rax, -0x60(%rbp)
callq *-0x60(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3360
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x7860
movq -0x50(%rbp), %rdi
movb $0x0, -0x19(%rbp)
callq 0x32c0
movq -0x48(%rbp), %rdi
callq 0x78a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7750
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x78d0
testb $0x1, %al
jne 0x74be
jmp 0x750b
leaq -0x18(%rbp), %rdi
callq 0x7950
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x33b0
jmp 0x74d5
movq -0x50(%rbp), %rdi
leaq 0x2ec6(%rip), %rsi      # 0xa3a6
callq 0x3390
jmp 0x74e7
jmp 0x74e9
leaq -0x18(%rbp), %rdi
callq 0x7970
jmp 0x749e
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3110
jmp 0x7528
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x751e
movq -0x50(%rbp), %rdi
callq 0x3110
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x7860
movq -0x60(%rbp), %rdi
movb $0x0, -0x19(%rbp)
callq 0x7880
movq -0x58(%rbp), %rdi
callq 0x78a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rdi
callq 0x7750
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x78d0
testb $0x1, %al
jne 0x75b1
jmp 0x75ff
leaq -0x18(%rbp), %rdi
callq 0x7950
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x7900
movb %dl, -0x71(%rbp)
movq %rax, -0x70(%rbp)
jmp 0x75cf
movb -0x71(%rbp), %al
movq -0x70(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movb %al, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x7970
jmp 0x7591
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x79a0
jmp 0x761f
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x7612
movq -0x60(%rbp), %rdi
callq 0x79a0
movq -0x68(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3360
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x242f
movq -0x30(%rbp), %rdi
callq 0x2200
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2479
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2469
movq -0x38(%rbp), %rdi
movl $0x4, %esi
callq 0x2180
jmp 0x246b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2437
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x2490
movq -0x40(%rbp), %rdi
callq 0x2200
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x24ac
movq -0x48(%rbp), %rdi
movl $0x18, %esi
callq 0x2180
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x24c8
movq -0x50(%rbp), %rdi
movl $0x20, %esi
callq 0x2180
addq $0x50, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x20, %rdi
movq %rdi, -0x50(%rbp)
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
movq %rdx, -0x48(%rbp)
callq 0x21f0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x21f0
movl $0x18, %edi
callq 0x2170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x3820
jmp 0x2ce0
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x228(%rax)
movq 0x228(%rax), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x18, %esi
callq 0x2180
movq -0x30(%rbp), %rdi
callq 0x22a0
nop
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq 0x228(%rcx), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x228(%rcx), %rcx
imulq 0x10(%rcx), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2df7
movq $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x228(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2de7
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq -0x28(%rbp), %rcx
addq -0x20(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
addq $0x20, %rdi
movq -0x30(%rbp), %rsi
movl $0x4, %edx
callq 0x21f0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2d92
jmp 0x2de9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2d80
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
imulq -0x20(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
shlq $0x2, %rdx
imulq -0x20(%rbp), %rdx
callq 0x2140
movq -0x20(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x2f08
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
imulq -0x18(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rdx
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2ecc
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
callq 0x3c90
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
addq $0x20, %rdi
movq %rdi, -0x58(%rbp)
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
movq %rdx, -0x50(%rbp)
callq 0x21f0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x21f0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x21f0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x21f0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq $0x0, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x21f0
movl $0x20, %edi
callq 0x2170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x3a10
jmp 0x309d
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x228(%rax)
movq 0x228(%rax), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x20, %esi
callq 0x2180
movq -0x38(%rbp), %rdi
callq 0x22a0
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x228(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x31dd
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x20, %rdi
movq 0x20(%rax), %rax
addq -0x18(%rax), %rdi
callq 0x21e0
testb $0x1, %al
jne 0x3160
jmp 0x31ca
movq -0x30(%rbp), %rax
movq 0x228(%rax), %rax
movq 0x10(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq %rax, %rdi
addq $0x20, %rdi
movq -0x28(%rbp), %rsi
movq 0x228(%rax), %rax
movq 0x10(%rax), %rdx
shlq $0x2, %rdx
callq 0x21f0
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31cc
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3134
movq -0x30(%rbp), %rdi
callq 0x3a60
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq 0x4e5f(%rip), %rax      # 0x811a
movq %rax, -0x11(%rbp)
movb 0x4e5d(%rip), %al       # 0x8122
movb %al, -0x9(%rbp)
callq 0x3ad0
movq -0x28(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x30, %rdi
leaq -0x11(%rbp), %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x20(%rax), %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x28(%rax), %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
leaq -0x20(%rbp), %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x28(%rax), %rsi
addq $0x8, %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x28(%rax), %rsi
addq $0x10, %rsi
movl $0x8, %edx
callq 0x2210
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x28(%rax), %rsi
addq $0x18, %rsi
movl $0x8, %edx
callq 0x2210
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)