LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: TreeNode::TreeNode(unsigned int)
TreeNode::TreeNode(unsigned int locNum) {
	this->locNum = locNum;
	A = NULL;
	C = NULL;
	G = NULL;
	T = NULL;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
leaq 0x14ba3(%rip), %rcx     # 0x1acf8
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0xc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq $0x0, 0x30(%rax)
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: TreeNode::deleteChildren()
void TreeNode::deleteChildren() {

	if (A != NULL) {
		delete A;
		A = NULL;
	}

	if (C != NULL) {
		delete C;
		C = NULL;
	}

	if (G != NULL) {
		delete G;
		G = NULL;
	}

	if (T != NULL) {
		delete T;
		T = NULL;
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x18(%rax)
je 0x64b6
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x64a9
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x64ee
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x64e1
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6526
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x6519
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x655e
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6551
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x30(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::HashTree(unsigned int, unsigned int)
HashTree::HashTree(unsigned int hashLength, unsigned int fullLength) {
	this->hashLength = hashLength;
	this->fullLength = fullLength;

	root = new TreeNode*[1 << (2 * hashLength)];

	for (int i = 0; i < 1 << (2 * hashLength); i++)
		root[i] = NULL;

	checkdb = NULL;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movl %edx, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
movq %rdi, 0x20(%rsp)
callq 0xa3f0
movq 0x38(%rsp), %rdi
addq $0x38, %rdi
movq %rdi, 0x28(%rsp)
callq 0xa3f0
movq 0x38(%rsp), %rdi
addq $0x68, %rdi
movq %rdi, 0x30(%rsp)
callq 0xa400
movq 0x38(%rsp), %rdi
addq $0xa8, %rdi
movq %rdi, 0x40(%rsp)
callq 0x10990
jmp 0x68e7
movq 0x38(%rsp), %rdi
addq $0x318, %rdi            # imm = 0x318
movq %rdi, 0x18(%rsp)
callq 0x12690
jmp 0x68ff
movq 0x38(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
movq %rdi, 0x8(%rsp)
callq 0xa410
movq 0x38(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x58(%rsp), %ecx
movl %ecx, 0x4(%rax)
movb 0x5c(%rsp), %cl
addb %cl, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x3030
movq %rax, 0x10(%rsp)
jmp 0x6946
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x320(%rax)
movl $0x0, 0x48(%rsp)
movl 0x48(%rsp), %eax
movl 0x5c(%rsp), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x69e0
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rax
movslq 0x48(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x695f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x69ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x69f5
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0xa420
movq 0x18(%rsp), %rdi
callq 0x12820
jmp 0x69f5
movq 0x38(%rsp), %rax
movq $0x0, 0x310(%rax)
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x109f0
movq 0x30(%rsp), %rdi
callq 0xa480
movq 0x28(%rsp), %rdi
callq 0xa490
movq 0x20(%rsp), %rdi
callq 0xa490
movq 0x50(%rsp), %rdi
callq 0x3590
nopw (%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::~HashTree()
HashTree::~HashTree() {
	for (int i = 0; i < 1 << (2 * hashLength); i++) {
		if (root[i] != NULL) {
			delete root[i];
			root[i] = NULL;
		}
	}

	if (checkdb != NULL) {
		delete[] checkdb;
		checkdb = NULL;
	}

	if (root != NULL) {
		delete[] root;
		root = NULL;
	}
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x40(%rsp), %rcx
movl 0x4c(%rsp), %eax
movl (%rcx), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x6ad3
movq 0x40(%rsp), %rax
movq 0x320(%rax), %rax
movslq 0x4c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x6ac1
movq 0x40(%rsp), %rax
movq 0x320(%rax), %rax
movslq 0x4c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x6aa8
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rsp), %rax
movq 0x320(%rax), %rax
movslq 0x4c(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x6ac3
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x6a4b
movq 0x40(%rsp), %rax
cmpq $0x0, 0x310(%rax)
je 0x6b82
movq 0x40(%rsp), %rax
movq 0x310(%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x6b72
movq 0x30(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x18(%rsp)
movq -0x8(%rcx), %rax
movq %rax, 0x20(%rsp)
imulq $0x268, %rax, %rdx      # imm = 0x268
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x28(%rsp)
je 0x6b58
movq 0x28(%rsp), %rdi
addq $-0x268, %rdi           # imm = 0xFD98
movq %rdi, 0x10(%rsp)
callq 0x109f0
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x6b2e
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
imulq $0x268, %rax, %rsi      # imm = 0x268
addq $0x8, %rsi
callq 0x35f0
movq 0x40(%rsp), %rax
movq $0x0, 0x310(%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, 0x320(%rax)
je 0x6bc2
movq 0x40(%rsp), %rax
movq 0x320(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6bb2
movq 0x8(%rsp), %rdi
callq 0x33e0
movq 0x40(%rsp), %rax
movq $0x0, 0x320(%rax)
movq 0x40(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
callq 0xa420
movq 0x40(%rsp), %rdi
addq $0x318, %rdi            # imm = 0x318
callq 0x12820
movq 0x40(%rsp), %rdi
addq $0xa8, %rdi
callq 0x109f0
movq 0x40(%rsp), %rdi
addq $0x68, %rdi
callq 0xa480
movq 0x40(%rsp), %rdi
addq $0x38, %rdi
callq 0xa490
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xa490
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::checkDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int, unsigned int)
void HashTree::checkDouble(string& DNA, unsigned int chrNum, unsigned int location) {
	bool leaf = true;

	if (DNA.find('M') != string::npos) {
		int pos = DNA.find('M');
		DNA[pos] = 'A';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'C';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'M';

		leaf = false;
	}

	if (DNA.find('R') != string::npos) {
		int pos = DNA.find('R');
		DNA[pos] = 'A';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'G';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'R';

		leaf = false;
	}

	//Add DNA to database unless we have resolved all cases
	if (leaf)
		addEntry(DNA, chrNum, location);

}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x1, 0x1f(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33f0
cmpq $-0x1, %rax
je 0x7a52
movq 0x28(%rsp), %rdi
movl $0x4d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33f0
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x3620
movq 0x8(%rsp), %rdi
movb $0x41, (%rax)
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x7990
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x3620
movq 0x8(%rsp), %rdi
movb $0x43, (%rax)
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x7990
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x3620
movb $0x4d, (%rax)
movb $0x0, 0x1f(%rsp)
movq 0x28(%rsp), %rdi
movl $0x52, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33f0
cmpq $-0x1, %rax
je 0x7aef
movq 0x28(%rsp), %rdi
movl $0x52, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33f0
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x3620
movq 0x8(%rsp), %rdi
movb $0x41, (%rax)
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x7990
movq 0x28(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x3620
movq 0x8(%rsp), %rdi
movb $0x47, (%rax)
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x7990
movq 0x28(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x3620
movb $0x52, (%rax)
movb $0x0, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
je 0x7b0d
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x6c30
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::frequency()
unsigned int HashTree::frequency() {
	if (queryCursor == NULL)
		return 0;
	else
		return queryCursor->getLocNum();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x348(%rax)
jne 0x8226
movl $0x0, 0x14(%rsp)
jmp 0x823a
movq (%rsp), %rax
movq 0x348(%rax), %rdi
callq 0x6690
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::estimateFreqLength(unsigned int, unsigned int)
unsigned int HashTree::estimateFreqLength(unsigned int hash, unsigned int freqThreshold/*, string DNA*/) {
	assert(hash < static_cast<unsigned int>(1 << (2 * hashLength) ) );

	TreeNode* base = root[hash];

	if (base == NULL || base->getLocNum() <= freqThreshold)
		return static_cast<unsigned int>(hashLength);

	unsigned long long freqSum = 0;
	freqSum = estimateFreqLengthHelper(base, freqThreshold, freqSum, hashLength/*, DNA*/);

	return (freqSum - 1) / base->getLocNum() + 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x24(%rsp), %eax
movl (%rcx), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jae 0x82a2
jmp 0x82c1
leaq 0xb146(%rip), %rdi      # 0x133ef
leaq 0xb0a9(%rip), %rsi      # 0x13359
movl $0x1dc, %edx            # imm = 0x1DC
leaq 0xb16c(%rip), %rcx      # 0x13428
callq 0x31d0
movq 0x8(%rsp), %rax
movq 0x320(%rax), %rax
movl 0x24(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x82f2
movq 0x18(%rsp), %rdi
callq 0x6690
cmpl 0x20(%rsp), %eax
ja 0x82ff
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0x8354
movq 0x8(%rsp), %rdi
movq $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rsi
movl 0x20(%rsp), %edx
movq 0x10(%rsp), %rcx
movl (%rdi), %r8d
callq 0x8360
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
subq $0x1, %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x6690
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
addq $0x1, %rax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::estimateFreqLengthHelper(TreeNode*, unsigned int, unsigned long long, unsigned int)
unsigned long long HashTree::estimateFreqLengthHelper(TreeNode* node, unsigned int freqThreshold, unsigned long long freqSum, unsigned int curLength/*, string DNA*/) {
	if (node == NULL) {
		//cout << DNA << " curLength: " << curLength << " NULL." << endl;
		return freqSum;
	}

	if (node->getLocNum() <= freqThreshold || node->isLeaf() ) {
		//cout << DNA << " curLength: " << curLength << " frequency: " << node->getLocNum() << endl;
		return freqSum + (unsigned long long) curLength * node->getLocNum();
	}

	freqSum = estimateFreqLengthHelper(node->getA(), freqThreshold, freqSum, curLength + 1/*, DNA + 'A'*/);
	freqSum = estimateFreqLengthHelper(node->getC(), freqThreshold, freqSum, curLength + 1/*, DNA + 'C'*/);
	freqSum = estimateFreqLengthHelper(node->getG(), freqThreshold, freqSum, curLength + 1/*, DNA + 'G'*/);
	freqSum = estimateFreqLengthHelper(node->getT(), freqThreshold, freqSum, curLength + 1/*, DNA + 'T'*/);

	return freqSum;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x839d
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x84ba
movq 0x30(%rsp), %rdi
callq 0x6690
cmpl 0x2c(%rsp), %eax
jbe 0x83be
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x83be
jmp 0x83f8
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %eax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
callq 0x6690
movq (%rsp), %rcx
movl %eax, %edx
movq 0x8(%rsp), %rax
movl %edx, %edx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
jmp 0x84ba
movq 0x30(%rsp), %rdi
callq 0x66a0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x8360
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66b0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x8360
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66c0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x8360
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66d0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x8360
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::averageFreqDepth(unsigned int, unsigned int)
unsigned int HashTree::averageFreqDepth(unsigned int hash, unsigned int depth)
{
	assert(hash < static_cast<unsigned int>(1 << (2 * hashLength) ) );

	TreeNode* base = root[hash];

	if (base == NULL)
		return 0;

	unsigned long long weightedSum = 0;
	weightedSum = averageFreqDepthHelp(base, depth, weightedSum, 0);

	return weightedSum / base->getLocNum();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x24(%rsp), %eax
movl (%rcx), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jae 0x8502
jmp 0x8521
leaq 0xaee6(%rip), %rdi      # 0x133ef
leaq 0xae49(%rip), %rsi      # 0x13359
movl $0x1fe, %edx            # imm = 0x1FE
leaq 0xaf52(%rip), %rcx      # 0x1346e
callq 0x31d0
movq 0x8(%rsp), %rax
movq 0x320(%rax), %rax
movl 0x24(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x854c
movl $0x0, 0x34(%rsp)
jmp 0x8599
movq 0x8(%rsp), %rdi
movq $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rsi
movl 0x20(%rsp), %edx
movq 0x10(%rsp), %rcx
xorl %r8d, %r8d
callq 0x85b0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x6690
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::averageFreqDepthHelp(TreeNode*, unsigned int, unsigned long long, unsigned int)
unsigned long long HashTree::averageFreqDepthHelp(TreeNode* node, unsigned int depth, unsigned long long weightedSum, unsigned int currDepth/*, string DNA*/) {
	if (node == NULL) {
		return weightedSum;
	}

	if(currDepth == depth || (node->isLeaf() && currDepth < depth))
	{
		unsigned long long freq =  node->getLocNum();
		return freq * freq + weightedSum;
	}
	else
	{
		weightedSum = averageFreqDepthHelp(node->getA(), depth, weightedSum, currDepth + 1/*, DNA + 'A'*/);
		weightedSum = averageFreqDepthHelp(node->getC(), depth, weightedSum, currDepth + 1/*, DNA + 'C'*/);
		weightedSum = averageFreqDepthHelp(node->getG(), depth, weightedSum, currDepth + 1/*, DNA + 'G'*/);
		weightedSum = averageFreqDepthHelp(node->getT(), depth, weightedSum, currDepth + 1/*, DNA + 'T'*/);
	}

	return weightedSum;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x85ed
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x86ff
movl 0x1c(%rsp), %eax
cmpl 0x2c(%rsp), %eax
je 0x8612
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x8608
jmp 0x863d
movl 0x1c(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0x863d
movq 0x30(%rsp), %rdi
callq 0x6690
movl %eax, %eax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
imulq 0x10(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x86ff
movq 0x30(%rsp), %rdi
callq 0x66a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x85b0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x85b0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66c0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x85b0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x66d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x2c(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
addl $0x1, %r8d
callq 0x85b0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::calculateLenToFreqTable()
void HashTree::calculateLenToFreqTable()
{
	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);

	vector< vector<unsigned int> > hashLenTable (tableHeight, vector<unsigned>(tableWidth));

	for(int i = 0; i < static_cast<int>(tableHeight); i++)
		for(int j=0; j<tableWidth; j++)
			hashLenTable[i][j] = averageFreqDepth(i, j);

	this->hashLenTable = hashLenTable;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movl (%rax), %edx
movl 0x4(%rax), %ecx
subl %edx, %ecx
incl %ecx
movl %ecx, 0x8c(%rsp)
movb (%rax), %cl
addb %cl, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x88(%rsp)
movl 0x88(%rsp), %eax
movq %rax, 0x20(%rsp)
movl 0x8c(%rsp), %eax
movq %rax, 0x28(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xa4a0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0xa4b0
jmp 0x878b
leaq 0x43(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xa530
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rcx
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xa540
jmp 0x87b5
leaq 0x43(%rsp), %rdi
callq 0xa5c0
leaq 0x58(%rsp), %rdi
callq 0xa5d0
leaq 0x57(%rsp), %rdi
callq 0xa630
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x88(%rsp), %eax
jge 0x88b6
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jae 0x88a4
movq 0x18(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
callq 0x84d0
movl %eax, 0xc(%rsp)
jmp 0x881d
movslq 0x3c(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0xa640
movq %rax, %rdi
movslq 0x38(%rsp), %rsi
callq 0xa660
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x87f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x887e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x43(%rsp), %rdi
callq 0xa5c0
leaq 0x58(%rsp), %rdi
callq 0xa5d0
leaq 0x57(%rsp), %rdi
callq 0xa630
jmp 0x88e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xa420
jmp 0x88e0
jmp 0x88a6
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x87db
movq 0x18(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
leaq 0x70(%rsp), %rsi
callq 0xa680
jmp 0x88ce
leaq 0x70(%rsp), %rdi
callq 0xa420
addq $0x98, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x3590
nopw (%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::printHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::printHashLenTable(string filename)
{
	std::ofstream f;
	f.open(filename.c_str(), ios::out | ios::binary);

	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);
	if(&hashLenTable != NULL)
	{
		for(int i = 0; i < static_cast<int>(tableHeight); i++)
		{
			f << "Index: " << i << " ";
			for(int j = 0; j < static_cast<int>(tableWidth); j++)
			{
				f << hashLenTable[i][j] << "\t";
			}
			f << "\n";
		}
	}
	else
		cout << "Empty table. " << endl;

	f.close();
}

// Assembly:
subq $0x268, %rsp            # imm = 0x268
movq %rsi, 0x28(%rsp)
movq %rdi, 0x260(%rsp)
movq %rsi, 0x258(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x3540
movq 0x28(%rsp), %rdi
callq 0x3130
movq %rax, 0x30(%rsp)
movl $0x10, %edi
movl $0x4, %esi
callq 0xa940
movl %eax, 0x38(%rsp)
jmp 0x8947
movl 0x38(%rsp), %edx
movq 0x30(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x3050
jmp 0x895c
movq 0x20(%rsp), %rax
movl 0x4(%rax), %ecx
subl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x48(%rsp)
movl (%rax), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, 0x44(%rsp)
addq $0x328, %rax            # imm = 0x328
cmpq $0x0, %rax
je 0x8a8f
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x8a8d
leaq 0xab07(%rip), %rsi      # 0x134b2
leaq 0x58(%rsp), %rdi
callq 0x32a0
movq %rax, 0x18(%rsp)
jmp 0x89bc
movq 0x18(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x3570
movq %rax, 0x10(%rsp)
jmp 0x89d1
movq 0x10(%rsp), %rdi
leaq 0xaaeb(%rip), %rsi      # 0x134c8
callq 0x32a0
jmp 0x89e4
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x48(%rsp), %eax
jge 0x8a68
movq 0x20(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
movslq 0x40(%rsp), %rsi
callq 0xa640
movq %rax, %rdi
movslq 0x3c(%rsp), %rsi
callq 0xa660
movl (%rax), %esi
leaq 0x58(%rsp), %rdi
callq 0x3420
movq %rax, 0x8(%rsp)
jmp 0x8a2c
movq 0x8(%rsp), %rdi
leaq 0xaa82(%rip), %rsi      # 0x134ba
callq 0x32a0
jmp 0x8a3f
jmp 0x8a41
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x89ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x3490
jmp 0x8ada
leaq 0xa5f7(%rip), %rsi      # 0x13066
leaq 0x58(%rsp), %rdi
callq 0x32a0
jmp 0x8a7b
jmp 0x8a7d
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x8996
jmp 0x8abc
movq 0x12532(%rip), %rdi     # 0x1afc8
leaq 0xaa1f(%rip), %rsi      # 0x134bc
callq 0x32a0
movq %rax, (%rsp)
jmp 0x8aa8
movq (%rsp), %rdi
movq 0x12505(%rip), %rsi     # 0x1afb8
callq 0x32f0
jmp 0x8aba
jmp 0x8abc
leaq 0x58(%rsp), %rdi
callq 0x3470
jmp 0x8ac8
leaq 0x58(%rsp), %rdi
callq 0x3490
addq $0x268, %rsp            # imm = 0x268
retq
movq 0x50(%rsp), %rdi
callq 0x3590
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::storeHashLenTable(string filename)
{
	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);

	if(&hashLenTable == NULL)
		cout << "Empty table. " << endl;

	std::ofstream f;
	f.open(filename.c_str(), ios::out | ios::binary);

	int hl[] = {(int)(fullLength - hashLength + 1)};
	int fl[] = {(int)(1 << (2 * hashLength))};

	f.write((char*)&hl, sizeof(int));
	f.write((char*)&fl, sizeof(int));

	for(int i = 0; i < static_cast<int>(tableHeight); i++)
		for(int j = 0; j < static_cast<int>(tableWidth); j++)
		{
			int h[] = {(int)(hashLenTable[i][j])};
			f.write((char*)&h, sizeof(int));
		}
	f.close();
}

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %rsi, 0x10(%rsp)
movq %rdi, 0x250(%rsp)
movq %rsi, 0x248(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x4(%rax), %ecx
subl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x244(%rsp)
movl (%rax), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, 0x240(%rsp)
addq $0x328, %rax            # imm = 0x328
cmpq $0x0, %rax
jne 0x8b6a
movq 0x12479(%rip), %rdi     # 0x1afc8
leaq 0xa966(%rip), %rsi      # 0x134bc
callq 0x32a0
movq %rax, %rdi
movq 0x12453(%rip), %rsi     # 0x1afb8
callq 0x32f0
leaq 0x40(%rsp), %rdi
callq 0x3540
movq 0x10(%rsp), %rdi
callq 0x3130
movq %rax, (%rsp)
movl $0x10, %edi
movl $0x4, %esi
callq 0xa940
movl %eax, 0xc(%rsp)
jmp 0x8b97
movl 0xc(%rsp), %edx
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x3050
jmp 0x8bab
movq 0x18(%rsp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
subl %edx, %ecx
incl %ecx
movl %ecx, 0x30(%rsp)
movb (%rax), %cl
addb %cl, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x2c(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x8be2
leaq 0x40(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x8bf8
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x240(%rsp), %eax
jge 0x8ca0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x244(%rsp), %eax
jge 0x8c8e
movq 0x18(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
movslq 0x28(%rsp), %rsi
callq 0xa640
movq %rax, %rdi
movslq 0x24(%rsp), %rsi
callq 0xa660
movl (%rax), %eax
movl %eax, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x8c65
jmp 0x8c67
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x8c19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x3490
jmp 0x8cbe
jmp 0x8c90
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x8c00
leaq 0x40(%rsp), %rdi
callq 0x3470
jmp 0x8cac
leaq 0x40(%rsp), %rdi
callq 0x3490
addq $0x258, %rsp            # imm = 0x258
retq
movq 0x38(%rsp), %rdi
callq 0x3590
nopl (%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::calculateFreqMap()
void HashTree::calculateFreqMap()
{
	/*
	 * Map which stores <freq, numfreq > pairs
	 */
	map <unsigned int, unsigned long long> freqMap;
	unsigned int cfreq;
	freqMap.clear();
	if(&hashLenTable != NULL)
	{
		unsigned int counter = 0;
		/* Iterate through the table */
		for(int i = 0; i < 1 << (2 * hashLength); i++)
		{
			for(int j = 0; j < (fullLength - hashLength + 1); j++)
			{
				counter++;

				cfreq = hashLenTable[i][j];
				/* Increase counter */
				if (freqMap.find(cfreq) == freqMap.end())
					freqMap[cfreq] = 1;
				else
					freqMap[cfreq]++;

				/* We only want the first element with frequency 1
				   since we are guaranteed the rest are 1. */
				if(cfreq == 1)
					break;
			}
		}
		this->freqMap = freqMap;
	}
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xa3f0
leaq 0x50(%rsp), %rdi
callq 0xa960
movq 0x18(%rsp), %rax
addq $0x328, %rax            # imm = 0x328
cmpq $0x0, %rax
je 0x9190
movl $0x0, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x18(%rsp), %rcx
movl 0x44(%rsp), %eax
movl (%rcx), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x9179
movl $0x0, 0x40(%rsp)
movq 0x18(%rsp), %rdx
movl 0x40(%rsp), %eax
movl 0x4(%rdx), %ecx
subl (%rdx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x9167
movq 0x18(%rsp), %rdi
movl 0x48(%rsp), %eax
incl %eax
movl %eax, 0x48(%rsp)
addq $0x328, %rdi            # imm = 0x328
movslq 0x44(%rsp), %rsi
callq 0xa640
movq %rax, %rdi
movslq 0x40(%rsp), %rsi
callq 0xa660
movl (%rax), %eax
movl %eax, 0x4c(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0xa990
movq %rax, 0x10(%rsp)
jmp 0x90bd
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xa9c0
movq %rax, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xa970
testb $0x1, %al
jne 0x90eb
jmp 0x9129
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0xa9f0
movq %rax, 0x8(%rsp)
jmp 0x9101
movq 0x8(%rsp), %rax
movq $0x1, (%rax)
jmp 0x914c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xa490
jmp 0x91a2
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0xa9f0
movq %rax, (%rsp)
jmp 0x913e
movq (%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0x1, 0x4c(%rsp)
jne 0x9155
jmp 0x9167
jmp 0x9157
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x905b
jmp 0x9169
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x9035
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
leaq 0x50(%rsp), %rsi
callq 0xaae0
jmp 0x918e
jmp 0x9190
leaq 0x50(%rsp), %rdi
callq 0xa490
addq $0x88, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x3590
nopl (%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::initTreeGetRoot()
int HashTree::initTreeGetRoot()
{
	if(&prefixSumFreqMap != NULL)
	{
		start_pos = 0;
		end_pos = 1;
		return searchCDFFreqMap((start_pos + end_pos)/2);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x38, %rax
cmpq $0x0, %rax
je 0x9603
movq 0x8(%rsp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, 0x98(%rdi)
movsd 0x9d63(%rip), %xmm0     # 0x13338
movsd %xmm0, 0xa0(%rdi)
movsd 0x98(%rdi), %xmm0
addsd 0xa0(%rdi), %xmm0
movsd 0x9d3b(%rip), %xmm1     # 0x13330
divsd %xmm1, %xmm0
callq 0x9610
addq $0x18, %rsp
retq
ud2
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::searchCDFFreqMap(double)
int HashTree::searchCDFFreqMap(double val)
{
	int ret_freq = -1;
	for(map<unsigned int, double>::iterator i = cdfFreqMap.begin(); i != cdfFreqMap.end(); i++)
	{
		if(val <= cdfFreqMap[i->first])
		{
			ret_freq = i->second;
		}
	}
	return ret_freq;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movsd %xmm0, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
addq $0x68, %rdi
callq 0xace0
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rdi
addq $0x68, %rdi
callq 0xad30
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xad10
testb $0x1, %al
jne 0x9667
jmp 0x96d1
movq 0x10(%rsp), %rax
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
addq $0x68, %rax
movq %rax, (%rsp)
leaq 0x28(%rsp), %rdi
callq 0xad60
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xabc0
movsd 0x8(%rsp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x96b9
leaq 0x28(%rsp), %rdi
callq 0xad60
cvttsd2si 0x8(%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0x96bb
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0xad80
movq %rax, 0x18(%rsp)
jmp 0x963f
movl 0x34(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeTreeHelp(TreeNode*, std::basic_ofstream<char, std::char_traits<char>>&)
void HashTree::storeTreeHelp(TreeNode * toOut, ofstream &f)
{
	if (toOut == NULL || toOut -> getLocNum() == 0)
	{
		int c[] = {0};
		f.write((char*)(&c), sizeof(int));
	}
	else
	{
		int c[] = {(int) toOut->getLocNum()};
		f.write((char*)&c, sizeof(int));
		storeTreeHelp(toOut->getA(), f);
		storeTreeHelp(toOut->getC(), f);
		storeTreeHelp(toOut->getG(), f);
		storeTreeHelp(toOut->getT(), f);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x9e33
movq 0x18(%rsp), %rdi
callq 0x6690
cmpl $0x0, %eax
jne 0x9e5d
leaq 0xc(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x3170
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x9eeb
movq 0x18(%rsp), %rdi
callq 0x6690
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
movq 0x18(%rsp), %rdi
callq 0x66a0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x9e00
movq 0x18(%rsp), %rdi
callq 0x66b0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x9e00
movq 0x18(%rsp), %rdi
callq 0x66c0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x9e00
movq 0x18(%rsp), %rdi
callq 0x66d0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x9e00
addq $0x28, %rsp
retq
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::storeTree(string dbName)
{
	std::ofstream f;
	f.open(dbName.c_str(),ios::out | ios::binary);

	int hl[] = {(int) hashLength};
	int fl[] = {(int) fullLength};

	f.write((char*)&hl, sizeof(int));
	f.write((char*)&fl, sizeof(int));

	for (int toPrint=0; toPrint< 1 << (2 * hashLength); toPrint++)
	{
		storeTreeHelp(root[toPrint], f);
	}
	f.close();
}

// Assembly:
subq $0x248, %rsp            # imm = 0x248
movq %rsi, 0x8(%rsp)
movq %rdi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
movq 0x240(%rsp), %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0x3540
movq 0x8(%rsp), %rdi
callq 0x3130
movq %rax, 0x10(%rsp)
movl $0x10, %edi
movl $0x4, %esi
callq 0xa940
movl %eax, 0x1c(%rsp)
jmp 0x9f46
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x3050
jmp 0x9f5b
movq (%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0x28(%rsp)
movl 0x4(%rax), %eax
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x9f82
leaq 0x38(%rsp), %rdi
leaq 0x24(%rsp), %rsi
movl $0x4, %edx
callq 0x3410
jmp 0x9f98
movl $0x0, 0x20(%rsp)
movq (%rsp), %rcx
movl 0x20(%rsp), %eax
movl (%rcx), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0xa002
movq (%rsp), %rdi
movq 0x320(%rdi), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x38(%rsp), %rdx
callq 0x9e00
jmp 0x9fd9
jmp 0x9fdb
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x9fa0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x3490
jmp 0xa020
leaq 0x38(%rsp), %rdi
callq 0x3470
jmp 0xa00e
leaq 0x38(%rsp), %rdi
callq 0x3490
addq $0x248, %rsp            # imm = 0x248
retq
movq 0x30(%rsp), %rdi
callq 0x3590
nopw (%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::readBinaryTree(TreeNode*&, std::basic_ifstream<char, std::char_traits<char>>&)
void HashTree::readBinaryTree(TreeNode *&p, ifstream &fin) {
	//TODO: handle exceptions
	int curr[1];
	fin.read((char*)curr, sizeof(int));
	unsigned int currNum = (unsigned int)(curr[0]);
	if(currNum == 0)
		return;
	else
	{
		TreeNode *a = NULL;
		TreeNode *c = NULL;
		TreeNode *g = NULL;
		TreeNode *t = NULL;

		readBinaryTree(a, fin);
		readBinaryTree(c, fin);
		readBinaryTree(g, fin);
		readBinaryTree(t, fin);
		if (a == NULL && c == NULL && g == NULL && t == NULL) {
			p = new LeafNode(currNum);
		}
		else {
			p = new TreeNode(currNum);
			p->setA(a);
			p->setC(c);
			p->setG(g);
			p->setT(t);
		}
	}
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
movl $0x4, %edx
callq 0x33c0
movl 0x4c(%rsp), %eax
movl %eax, 0x48(%rsp)
cmpl $0x0, 0x48(%rsp)
jne 0xa075
jmp 0xa1f2
movq 0x10(%rsp), %rdi
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x50(%rsp), %rdx
leaq 0x40(%rsp), %rsi
callq 0xa030
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x38(%rsp), %rsi
callq 0xa030
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rsi
callq 0xa030
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x28(%rsp), %rsi
callq 0xa030
cmpq $0x0, 0x40(%rsp)
jne 0xa15d
cmpq $0x0, 0x38(%rsp)
jne 0xa15d
cmpq $0x0, 0x30(%rsp)
jne 0xa15d
cmpq $0x0, 0x28(%rsp)
jne 0xa15d
movl $0x40, %edi
callq 0x32b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movl 0x48(%rsp), %esi
callq 0x6720
jmp 0xa129
movq 0x8(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
jmp 0xa1f0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x40, %esi
callq 0x32c0
jmp 0xa1f7
movl $0x38, %edi
callq 0x32b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
movl 0x48(%rsp), %esi
callq 0x6140
jmp 0xa17c
movq (%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x65e0
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0x6600
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x6620
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x6640
jmp 0xa1f0
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x38, %esi
callq 0x32c0
jmp 0xa1f7
jmp 0xa1f2
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x3590
nopw %cs:(%rax,%rax)
// File: CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::loadTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::loadTree(string dbName)
{
	std::ifstream f;
	f.open(dbName.c_str(),ios::in | ios::binary);
	if(f.is_open())
	{
		f.seekg(0, ios::beg);

		int curr[1];
		f.read((char*)(&curr), sizeof(int));
		unsigned int hashLength = (unsigned int)(curr[0]);

		int curr2[1];
		f.read((char*)(&curr2), sizeof(int));
		unsigned int fullLength = (unsigned int)(curr2[0]);

		this->hashLength = hashLength;
		this->fullLength = fullLength;

		unsigned int tbsize = 1 << (2 * hashLength);
		this->root = new TreeNode*[tbsize];

		for (int i = 0; i < tbsize; i++)
			this->root[i] = NULL;

		for(int i = 0; i < tbsize; i++)
		{
			readBinaryTree(this->root[i], f);
		}

		f.close();
	}
}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movq %rsi, 0x20(%rsp)
movq %rdi, 0x270(%rsp)
movq %rsi, 0x268(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x3350
movq 0x20(%rsp), %rdi
callq 0x3130
movq %rax, 0x28(%rsp)
movl $0x8, %edi
movl $0x4, %esi
callq 0xa940
movl %eax, 0x34(%rsp)
jmp 0xa267
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x31c0
jmp 0xa27c
leaq 0x60(%rsp), %rdi
callq 0x34f0
movb %al, 0x17(%rsp)
jmp 0xa28c
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xa299
jmp 0xa3d1
xorl %edx, %edx
movl %edx, %esi
leaq 0x60(%rsp), %rdi
callq 0x3440
jmp 0xa2a9
leaq 0x60(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl $0x4, %edx
callq 0x33c0
jmp 0xa2bf
movl 0x50(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0x4, %edx
callq 0x33c0
jmp 0xa2dd
movq 0x18(%rsp), %rax
movl 0x48(%rsp), %ecx
movl %ecx, 0x44(%rsp)
movl 0x4c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x44(%rsp), %ecx
movl %ecx, 0x4(%rax)
movb 0x4c(%rsp), %cl
addb %cl, %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x40(%rsp)
movl 0x40(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x3030
movq %rax, 0x8(%rsp)
jmp 0xa31e
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x320(%rax)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jae 0xa381
movq 0x18(%rsp), %rax
movq 0x320(%rax), %rax
movslq 0x3c(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0xa337
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x30e0
jmp 0xa3e3
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
cmpl 0x40(%rsp), %eax
jae 0xa3c3
movq 0x18(%rsp), %rdi
movq 0x320(%rdi), %rax
movslq 0x38(%rsp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq 0x60(%rsp), %rdx
callq 0xa030
jmp 0xa3b4
jmp 0xa3b6
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0xa389
leaq 0x60(%rsp), %rdi
callq 0x30b0
jmp 0xa3cf
jmp 0xa3d1
leaq 0x60(%rsp), %rdi
callq 0x30e0
addq $0x278, %rsp            # imm = 0x278
retq
movq 0x58(%rsp), %rdi
callq 0x3590
nopl (%rax)
// File: AnthonyCalandra[P]chip8-emu/src/keypad.cc
// Function: Keypad::isPressed(char)
bool Keypad::isPressed(const char keyCode) {
  auto keyState = this->keymap.find(keyCode);
  if (keyState == this->keymap.end()) {
    return false;
  } else {
    return keyState->second;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
leaq -0x11(%rbp), %rsi
callq 0x4d30
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x4d90
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4d60
testb $0x1, %al
jne 0x4ca7
jmp 0x4cad
movb $0x0, -0x1(%rbp)
jmp 0x4cbe
leaq -0x20(%rbp), %rdi
callq 0x4dc0
movb 0x1(%rax), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: AnthonyCalandra[P]chip8-emu/src/sdlutils.cc
// Function: gameLoop(SDL_Window*, SDL_Renderer*)
void gameLoop(SDL_Window* window, SDL_Renderer* renderer) {
  SDL_Event event;
  buffer.clear();
  while (!quit) {
    while (SDL_PollEvent(&event)) {
      if (event.type == SDL_QUIT) {
        quit = true;
      }

      if (event.type == SDL_KEYDOWN) {
        SDL_Keycode keyCode = event.key.keysym.sym;
        if (isChip8KeyEvent(keyCode)) {
          const char* keyName = SDL_GetKeyName(keyCode);
          keypad.pressedDown(keyName[0]);
          if (!keySent) {
            keyPressPromise.set_value(keyName[0]);
            keySent = true;
          }
        }
      } else if (event.type == SDL_KEYUP) {
        SDL_Keycode keyCode = event.key.keysym.sym;
        if (isChip8KeyEvent(keyCode)) {
          const char* keyName = SDL_GetKeyName(keyCode);
          keypad.pressedUp(keyName[0]);
        }
      }
    }

    if (drawFlag) {
      renderTexture(renderer, buffer, 0, 0);
      SDL_RenderPresent(renderer);
      drawFlag = false;
    }

    SDL_Delay(5);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x25fb9(%rip), %rdi     # 0x2c380
callq 0xa2e0
leaq 0x27fd6(%rip), %rdi     # 0x2e3a9
callq 0x68b0
xorb $-0x1, %al
testb $0x1, %al
jne 0x63e3
jmp 0x651c
jmp 0x63e5
leaq -0x48(%rbp), %rdi
callq 0x4220
cmpl $0x0, %eax
je 0x64d0
cmpl $0x100, -0x48(%rbp)     # imm = 0x100
jne 0x6411
leaq 0x27fa2(%rip), %rdi     # 0x2e3a9
movl $0x1, %esi
callq 0x6940
cmpl $0x300, -0x48(%rbp)     # imm = 0x300
jne 0x648b
movl -0x34(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %edi
callq 0x6970
testb $0x1, %al
jne 0x642e
jmp 0x6489
movl -0x4c(%rbp), %edi
callq 0x4410
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
leaq 0x25f03(%rip), %rdi     # 0x2c348
movsbl (%rax), %esi
callq 0x4d00
leaq 0x27f56(%rip), %rdi     # 0x2e3aa
callq 0x68b0
testb $0x1, %al
jne 0x6487
movq -0x58(%rbp), %rax
movb (%rax), %al
movb %al, -0x59(%rbp)
leaq 0x27f43(%rip), %rdi     # 0x2e3b0
leaq -0x59(%rbp), %rsi
callq 0x69b0
leaq 0x27f2d(%rip), %rdi     # 0x2e3aa
movl $0x1, %esi
callq 0x6940
jmp 0x6489
jmp 0x64cb
cmpl $0x301, -0x48(%rbp)     # imm = 0x301
jne 0x64c9
movl -0x34(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %edi
callq 0x6970
testb $0x1, %al
jne 0x64a8
jmp 0x64c7
movl -0x60(%rbp), %edi
callq 0x4410
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
leaq 0x25e89(%rip), %rdi     # 0x2c348
movsbl (%rax), %esi
callq 0x4cd0
jmp 0x64c9
jmp 0x64cb
jmp 0x63e5
leaq 0x27ed1(%rip), %rdi     # 0x2e3a8
callq 0x68b0
testb $0x1, %al
jne 0x64e2
jmp 0x650d
movq -0x10(%rbp), %rdi
leaq 0x25e93(%rip), %rsi     # 0x2c380
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x6530
movq -0x10(%rbp), %rdi
callq 0x40a0
leaq 0x27ea2(%rip), %rdi     # 0x2e3a8
xorl %esi, %esi
callq 0x6940
movl $0x5, %edi
callq 0x4290
jmp 0x63cc
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: AnthonyCalandra[P]chip8-emu/src/sdlutils.cc
// Function: renderTexture(SDL_Renderer*, VideoBuffer&, unsigned int, unsigned int)
bool renderTexture(SDL_Renderer* renderer, VideoBuffer& buffer, unsigned int x, unsigned int y) {
  std::size_t depth = sizeof(VideoBufferPixelType) * 8;
  std::size_t pitch = chip8ScreenWidth * sizeof(VideoBufferPixelType);
  SDL_Surface* surface = SDL_CreateRGBSurfaceFrom((void*) buffer.getBuffer().data(), chip8ScreenWidth, chip8ScreenHeight, depth, pitch, 0, 0, 0, 0);
  SDL_Texture* texture = nullptr;
  if (surface != nullptr) {
    texture = SDL_CreateTextureFromSurface(renderer, surface);
    SDL_FreeSurface(surface);
    if (surface == nullptr) {
      return false;
    }
  } else {
    return false;
  }

  SDL_Rect dst;
  dst.x = x;
  dst.y = y;
  SDL_QueryTexture(texture, NULL, NULL, &dst.w, &dst.h);
  dst.h *= 10;
  dst.w *= 10;
  SDL_RenderCopy(renderer, texture, nullptr, &dst);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2070, %rsp           # imm = 0x2070
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq $0x20, -0x28(%rbp)
movq $0x100, -0x30(%rbp)     # imm = 0x100
movq -0x18(%rbp), %rsi
leaq -0x2038(%rbp), %rdi
callq 0xa330
leaq -0x2038(%rbp), %rdi
callq 0x6a60
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %eax, %r8d
movl $0x40, %esi
movl $0x20, %edx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x4370
movq %rax, -0x38(%rbp)
movq $0x0, -0x2040(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x65f0
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x4460
movq %rax, -0x2040(%rbp)
movq -0x38(%rbp), %rdi
callq 0x4350
cmpq $0x0, -0x38(%rbp)
jne 0x65ee
movb $0x0, -0x1(%rbp)
jmp 0x666a
jmp 0x65f6
movb $0x0, -0x1(%rbp)
jmp 0x666a
movl -0x1c(%rbp), %eax
movl %eax, -0x2050(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x204c(%rbp)
movq -0x2040(%rbp), %rdi
leaq -0x2050(%rbp), %rcx
addq $0x8, %rcx
leaq -0x2050(%rbp), %r8
addq $0xc, %r8
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x4210
imull $0xa, -0x2044(%rbp), %eax
movl %eax, -0x2044(%rbp)
imull $0xa, -0x2048(%rbp), %eax
movl %eax, -0x2048(%rbp)
movq -0x10(%rbp), %rdi
movq -0x2040(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x2050(%rbp), %rcx
callq 0x43e0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x2070, %rsp           # imm = 0x2070
popq %rbp
retq
nopl (%rax,%rax)
// File: AnthonyCalandra[P]chip8-emu/src/videobuffer.cc
// Function: VideoBuffer::clear()
void VideoBuffer::clear() {
  this->mutex.lock();
  // Fill with black pixels.
  this->buffer.fill(fillColor);
  this->mutex.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x2000, %rdi           # imm = 0x2000
callq 0xa450
movq -0x10(%rbp), %rdi
leaq 0x11ed1(%rip), %rsi     # 0x1c1dc
callq 0xa480
movq -0x10(%rbp), %rdi
addq $0x2000, %rdi           # imm = 0x2000
callq 0xa4c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: AnthonyCalandra[P]chip8-emu/src/videobuffer.cc
// Function: VideoBuffer::getBuffer()
VideoBufferType VideoBuffer::getBuffer() {
  this->mutex.lock();
  VideoBufferType copyBuffer = this->buffer;
  this->mutex.unlock();
  return copyBuffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x2000, %rdi           # imm = 0x2000
callq 0xa450
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x42e0
movq -0x18(%rbp), %rdi
addq $0x2000, %rdi           # imm = 0x2000
callq 0xa4c0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: AnthonyCalandra[P]chip8-emu/src/cpu.cc
// Function: executeChipCpu(Registers, MemoryStore, Stack)
void executeChipCpu(Registers registers, MemoryStore memory, Stack stack) {
  while (!quit) {
    performCpuCycle(registers, memory, stack);
    // Sleep for about 60 times a second.
    std::this_thread::sleep_for(std::chrono::milliseconds(15));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
leaq 0x1010(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x1cabf(%rip), %rdi     # 0x2e3a9
callq 0x68b0
xorb $-0x1, %al
testb $0x1, %al
jne 0x118f7
jmp 0x11927
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x114a0
movl $0xf, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x17f30
leaq -0x10(%rbp), %rdi
callq 0x17e80
jmp 0x118e3
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)