LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3400
movq (%r14), %rsi
pushq $0x14
popq %rdx
movq %r15, %rdi
callq 0x3040
movl (%rbx), %eax
movl 0x4(%rbx), %r15d
subl %eax, %r15d
incl %r15d
addl %eax, %eax
movl %eax, 0xc(%rsp)
xorl %r14d, %r14d
testl %r15d, %r15d
cmovlel %r14d, %r15d
leaq 0x18(%rsp), %r12
leaq 0x3da2(%rip), %r13      # 0x92ba
movl %r14d, %eax
movl 0xc(%rsp), %ecx
shrl %cl, %eax
testl %eax, %eax
jne 0x55a2
movq %r12, %rdi
leaq 0x3d83(%rip), %rsi      # 0x92b2
callq 0x3220
movq %rax, %rdi
movl %r14d, %esi
callq 0x3410
movq %rax, %rdi
leaq 0x3e65(%rip), %rsi      # 0x93ae
callq 0x3220
movq %r14, 0x10(%rsp)
imulq $0x18, %r14, %rbp
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x5586
movq 0x328(%rbx), %rax
movq (%rax,%rbp), %rax
movl (%rax,%r14,4), %esi
movq %r12, %rdi
callq 0x3190
movq %rax, %rdi
movq %r13, %rsi
callq 0x3220
incq %r14
jmp 0x555a
movq %r12, %rdi
leaq 0x3ad6(%rip), %rsi      # 0x9066
callq 0x3220
movq 0x10(%rsp), %r14
incq %r14
jmp 0x5518
leaq 0x18(%rsp), %rdi
callq 0x3350
leaq 0x18(%rsp), %rdi
callq 0x3370
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55ce
jmp 0x55ce
jmp 0x55ce
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3370
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %ebp
movl 0x4(%rdi), %r13d
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x3400
movq (%r14), %rsi
pushq $0x14
popq %rdx
movq %r15, %rdi
callq 0x3040
movl (%rbx), %ecx
movq %rbx, %r14
movl 0x4(%rbx), %eax
subl %ecx, %eax
incl %eax
leaq 0x24(%rsp), %rsi
movl %eax, (%rsi)
addl %ecx, %ecx
pushq $0x1
popq %rax
shll %cl, %eax
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3310
leaq 0x28(%rsp), %rdi
leaq 0x14(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x3310
subl %ebp, %r13d
incl %r13d
addl %ebp, %ebp
movl %ebp, 0xc(%rsp)
xorl %edx, %edx
testl %r13d, %r13d
cmovlel %edx, %r13d
leaq 0x10(%rsp), %r15
pushq $0x4
popq %r12
movl %edx, %eax
movl 0xc(%rsp), %ecx
shrl %cl, %eax
testl %eax, %eax
jne 0x56c4
movq %rdx, 0x18(%rsp)
imulq $0x18, %rdx, %rbp
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x56ba
movq 0x328(%r14), %rax
movq (%rax,%rbp), %rax
movl (%rax,%rbx,4), %eax
movl %eax, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3310
incq %rbx
jmp 0x568e
movq 0x18(%rsp), %rdx
incq %rdx
jmp 0x5677
leaq 0x28(%rsp), %rdi
callq 0x3350
leaq 0x28(%rsp), %rdi
callq 0x3370
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x56ee
jmp 0x56ee
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3370
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::readHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::readHashLenTable(string filename)
{
	std::ifstream f;
	f.open(filename.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 tableWidth = (unsigned int)(curr[0]);

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

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

		for(int i=0; i<tableHeight; i++)
			for(int j=0; j<tableWidth; j++)
			{
				int curr[1];
				f.read((char*)(&curr), sizeof(int));
				hashLenTable[i][j] = (unsigned int)(curr[0]);
			}

		this->hashLenTable = hashLenTable;
		f.close();
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x3270
movq (%r14), %rsi
pushq $0xc
popq %rdx
movq %r15, %rdi
callq 0x3160
leaq 0xd8(%rsp), %rdi
callq 0x30b0
testb %al, %al
je 0x583f
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3330
leaq 0x60(%rsp), %rdi
leaq 0x14(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32c0
movl 0x14(%rsp), %r14d
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32c0
movl 0x10(%rsp), %r15d
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x63ce
movq %rbx, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %r15, 0x20(%rsp)
movq %r15, %rsi
callq 0x6420
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x6cb8
xorl %eax, %eax
leaq 0x60(%rsp), %r13
pushq $0x4
popq %rbp
cmpq 0x20(%rsp), %rax
je 0x5815
movq %rax, 0x28(%rsp)
imulq $0x18, %rax, %r15
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x580b
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x32c0
movl 0x30(%rsp), %eax
movq 0x48(%rsp), %rcx
movq (%rcx,%r15), %rcx
movl %eax, (%rcx,%rbx,4)
incq %rbx
jmp 0x57e3
movq 0x28(%rsp), %rax
incq %rax
jmp 0x57d1
movq 0x18(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
leaq 0x48(%rsp), %rsi
callq 0x6476
leaq 0x60(%rsp), %rdi
callq 0x3090
leaq 0x48(%rsp), %rdi
callq 0x63ac
leaq 0x60(%rsp), %rdi
callq 0x30c0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6cb8
jmp 0x5884
jmp 0x5872
jmp 0x5872
jmp 0x5872
jmp 0x5877
movq %rax, %rbx
jmp 0x5884
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x63ac
leaq 0x60(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
andl $0x0, (%r12)
andq $0x0, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x71e2
xorl %edx, %edx
leaq 0xc(%rsp), %r15
movb (%rbx), %cl
addb %cl, %cl
movl %edx, %eax
shrl %cl, %eax
testl %eax, %eax
jne 0x5958
movq %rdx, 0x10(%rsp)
imulq $0x18, %rdx, %rbp
xorl %r13d, %r13d
movl 0x4(%rbx), %eax
subl (%rbx), %eax
incl %eax
cmpq %rax, %r13
jae 0x594e
movq 0x328(%rbx), %rax
movq (%rax,%rbp), %rax
movl (%rax,%r13,4), %eax
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x7210
cmpq %r12, %rax
je 0x5932
movq %r14, %rdi
movq %r15, %rsi
callq 0x6554
incq (%rax)
jmp 0x5944
movq %r14, %rdi
movq %r15, %rsi
callq 0x6554
movq $0x1, (%rax)
incq %r13
cmpl $0x1, 0xc(%rsp)
jne 0x58f3
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x58db
addq $0x8, %rbx
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x66b2
leaq 0x18(%rsp), %rdi
callq 0x665a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5986
jmp 0x5986
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x665a
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
movq 0x80(%rdi), %r15
addq $0x70, %rbx
pushq $-0x1
popq %rbp
cmpq %rbx, %r15
je 0x5bf2
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x65a2
movsd (%rax), %xmm0
ucomisd (%rsp), %xmm0
jb 0x5be5
cvttsd2si 0x28(%r15), %ebp
movq %r15, %rdi
callq 0x31a0
movq %rax, %r15
jmp 0x5bc3
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
je 0x6064
movq %rsi, %r15
movl 0x8(%rsi), %eax
testl %eax, %eax
je 0x6064
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movl %eax, (%rsi)
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x3310
movq 0x18(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5ff6
movq 0x20(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5ff6
movq 0x28(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5ff6
movq 0x30(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5ff6
jmp 0x6077
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x3310
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x3400
movq (%r14), %rsi
pushq $0x14
popq %rdx
movq %r15, %rdi
callq 0x3040
movl (%rbx), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl 0x4(%rbx), %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3310
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x3310
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movb (%rbx), %cl
addb %cl, %cl
movl %r15d, %eax
shrl %cl, %eax
testl %eax, %eax
jne 0x610e
movq 0x320(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5ff6
incq %r15
jmp 0x60e6
leaq 0x10(%rsp), %rdi
callq 0x3350
leaq 0x10(%rsp), %rdi
callq 0x3370
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6133
jmp 0x6133
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3370
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1c(%rsp), %r12
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x32c0
movl (%r12), %r12d
testl %r12d, %r12d
je 0x6279
movq %rbx, 0x8(%rsp)
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
movq %rax, %rsi
leaq 0x30(%rsp), %r13
andq $0x0, (%r13)
leaq 0x28(%rsp), %rbp
andq $0x0, (%rbp)
leaq 0x20(%rsp), %rbx
andq $0x0, (%rbx)
movq %r15, %rdi
movq %r14, %rdx
callq 0x6148
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x6148
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x6148
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6148
leaq 0x10(%rsp), %rax
movq (%rax), %r14
movq (%r13), %r15
movq (%rbp), %r13
movq (%rbx), %rbx
movq %rbx, %xmm0
movq %r13, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r15, %xmm0
movq %r14, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
por %xmm1, %xmm2
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
movmskps %xmm2, %eax
xorl $0xf, %eax
je 0x624d
pushq $0x38
popq %rdi
callq 0x3230
leaq 0x7adc(%rip), %rcx      # 0xdd10
movq %rcx, (%rax)
movl %r12d, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r15, 0x20(%rax)
movq %r13, 0x28(%rax)
movq %rbx, 0x30(%rax)
jmp 0x6271
pushq $0x40
popq %rdi
callq 0x3230
movl %r12d, 0x8(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x18(%rax)
movdqu %xmm0, 0x28(%rax)
leaq 0x7ae2(%rip), %rcx      # 0xdd50
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3270
movq (%r14), %rsi
pushq $0xc
popq %rdx
movq %r15, %rdi
callq 0x3160
leaq 0x80(%rsp), %rdi
callq 0x30b0
testb %al, %al
je 0x6375
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3330
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32c0
movl 0x4(%rsp), %ebp
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
pushq $0x4
popq %rdx
callq 0x32c0
movl (%rsp), %eax
movl %ebp, (%rbx)
movl %eax, 0x4(%rbx)
addl %ebp, %ebp
pushq $0x1
popq %r15
movl %ebp, %ecx
shll %cl, %r15d
leaq (,%r15,8), %r14
movq %r14, %rdi
callq 0x3030
movq %rax, 0x320(%rbx)
xorl %eax, %eax
cmpq %rax, %r15
je 0x6343
movq 0x320(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x632d
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
cmpq %r12, %r14
je 0x636b
movq 0x320(%rbx), %rsi
addq %r12, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6148
addq $0x8, %r12
jmp 0x634b
leaq 0x8(%rsp), %rdi
callq 0x3090
leaq 0x8(%rsp), %rdi
callq 0x30c0
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6397
jmp 0x6397
jmp 0x6397
jmp 0x6397
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x10, %rsp
leaq -0x1(%rbp), %rax
movb %sil, (%rax)
movq %rax, %rsi
callq 0x3a86
testq %rax, %rax
je 0x3a3d
movb 0x9(%rax), %al
jmp 0x3a3f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, -0x38(%rbp)
leaq 0xb464(%rip), %rdi      # 0xf330
callq 0x4d2c
leaq -0x70(%rbp), %r15
leaq 0xb41c(%rip), %r13      # 0xf2f8
leaq 0xd47d(%rip), %r14      # 0x11360
leaq -0x29(%rbp), %r12
movb 0xd46c(%rip), %al       # 0x11359
testb $0x1, %al
jne 0x3fea
movq %r15, %rdi
callq 0x31f0
testl %eax, %eax
je 0x3fac
movl -0x70(%rbp), %eax
cmpl $0x301, %eax            # imm = 0x301
je 0x3f7a
cmpl $0x300, %eax            # imm = 0x300
je 0x3f27
cmpl $0x100, %eax            # imm = 0x100
jne 0x3ef5
movb $0x1, %al
xchgb %al, 0xd434(%rip)       # 0x11359
jmp 0x3ef5
movl -0x5c(%rbp), %edi
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
setae %al
leal -0x61(%rdi), %ecx
cmpl $0x6, %ecx
setae %cl
testb %cl, %al
jne 0x3ef5
callq 0x33b0
movq %rax, %rbx
movsbl (%rax), %esi
movq %r13, %rdi
callq 0x3a66
movb 0xd401(%rip), %al       # 0x1135a
testb $0x1, %al
jne 0x3ef5
movb (%rbx), %al
movb %al, -0x29(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x41ce
movb $0x1, %al
xchgb %al, 0xd3e5(%rip)       # 0x1135a
jmp 0x3ef5
movl -0x5c(%rbp), %edi
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
setae %al
leal -0x61(%rdi), %ecx
cmpl $0x6, %ecx
setae %cl
testb %cl, %al
jne 0x3ef5
callq 0x33b0
movsbl (%rax), %esi
movq %r13, %rdi
callq 0x3a46
jmp 0x3ef5
movb 0xd3a6(%rip), %al       # 0x11358
testb $0x1, %al
je 0x3fdd
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0xb36c(%rip), %rsi      # 0xf330
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3ff9
movq %rbx, %rdi
callq 0x3090
xorl %eax, %eax
xchgb %al, 0xd37b(%rip)       # 0x11358
pushq $0x5
popq %rdi
callq 0x3240
jmp 0x3ee7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
leaq -0x2028(%rbp), %r14
movq %r14, %rdi
callq 0x4d60
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x40
popq %rsi
pushq $0x20
popq %rcx
movq %r14, %rdi
movl %ecx, %edx
movl $0x100, %r8d            # imm = 0x100
xorl %r9d, %r9d
callq 0x3320
movq %rax, %r14
testq %rax, %rax
je 0x40b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3400
movq %rax, %r13
movq %r14, %rdi
callq 0x3300
leaq -0x2020(%rbp), %rcx
movl %r12d, -0x8(%rcx)
movl %r15d, -0x4(%rcx)
leaq -0x201c(%rbp), %r15
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %r8
callq 0x31e0
imull $0xa, (%r15), %eax
movl %eax, (%r15)
imull $0xa, -0x4(%r15), %eax
movl %eax, -0x4(%r15)
leaq -0x2028(%rbp), %rcx
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x3370
testq %r14, %r14
setne %al
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2000(%rdi), %r14
movq %r14, %rdi
callq 0x4db0
leaq 0x4450(%rip), %rsi      # 0x919c
movq %rbx, %rdi
callq 0x4dc6
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3270
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2000(%rsi), %r15
movq %r15, %rdi
callq 0x4db0
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3290
movq %r15, %rdi
callq 0x3270
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1010(%rbp), %r14
leaq 0x10(%rbp), %r15
leaq 0xa7f7(%rip), %r13      # 0x11359
leaq -0x30(%rbp), %r12
movb (%r13), %al
testb $0x1, %al
jne 0x6b8e
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6948
movq $0xf, -0x30(%rbp)
movq %r12, %rdi
callq 0x83d2
jmp 0x6b66
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: main
int main() {
    // C-style array
    int my_array[5] = {1, 2, 3, 4, 5};

    // Pass the array to a function
    func(my_array);

    return 0;
}

// Assembly:
subq $0x18, %rsp
movaps 0xe69(%rip), %xmm0      # 0x2010
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movl $0x5, 0x10(%rdi)
callq 0x11c0
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: void func<int, 5>(int (&) [5])
void func(T (&a)[N]) {
#if 1
    for(int i = 0; i < N; i++) {
        std::cout << a[i] << std::endl;
    }
#else
    // Here N stores the correct size information for the array
    // Basically N is equal to sizeof(my_array)/sizeof(my_array[0]) so the next code will work as expected:
    for(int i = 0; i < N; ++i) {
        a[i] = a[i] + i;
    }
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x2e06(%rip), %r14      # 0x3fd8
cmpq $0x5, %r15
je 0x11f1
movl (%rbx,%r15,4), %esi
movq %r14, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
incq %r15
jmp 0x11d2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: PortalFlow(portal_t*)
void            PortalFlow(portal_t* p)
{
    threaddata_t    data;
    unsigned        i;

    if (p->status != stat_working)
        Error("PortalFlow: reflowed");

    p->visbits = (byte*)calloc(1, g_bitbytes);

    memset(&data, 0, sizeof(data));
    data.leafvis = p->visbits;
    data.base = p;

    data.pstack_head.head = &data.pstack_head;
    data.pstack_head.portal = p;
    data.pstack_head.source = p->winding;
    data.pstack_head.portalplane = &p->plane;
    for (i = 0; i < g_bitlongs; i++)
    {
        ((long*)data.pstack_head.mightsee)[i] = ((long*)p->mightsee)[i];
    }
    RecursiveLeafFlow(p->leaf, &data, &data.pstack_head);

#ifdef ZHLT_NETVIS
    p->fromclient = g_clientid;
#endif
    p->status = stat_done;
#ifdef ZHLT_NETVIS
    Flag_VIS_DONE_PORTAL(g_visportalindex);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x14f8, %rsp           # imm = 0x14F8
movq %rdi, %rbx
cmpl $0x1, 0x20(%rdi)
je 0xaf49
leaq 0x84b6(%rip), %rdi      # 0x133f8
xorl %eax, %eax
callq 0x795f
leaq 0x2092858(%rip), %rax   # 0x209d7a8
movl (%rax), %esi
pushq $0x1
popq %rdi
callq 0x3160
movq %rax, %r15
movq %rax, 0x28(%rbx)
leaq 0x18(%rsp), %r14
xorl %r12d, %r12d
movl $0x14e0, %edx           # imm = 0x14E0
movq %r14, %rdi
xorl %esi, %esi
callq 0x3120
movq %r15, -0x10(%r14)
movq %rbx, -0x8(%r14)
movq %r14, 0x1000(%r14)
movq %rbx, 0x1010(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x1018(%r14)
movq %rbx, 0x14c8(%r14)
leaq 0x2092805(%rip), %rax   # 0x209d7ac
movl (%rax), %eax
cmpq %rax, %r12
jae 0xafc0
movq 0x30(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x18(%rsp,%r12,8)
incq %r12
jmp 0xafa9
movl 0x10(%rbx), %edi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0xafe6
movl $0x2, 0x20(%rbx)
addq $0x14f8, %rsp           # imm = 0x14F8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: SimpleFlood(unsigned char*, int, unsigned char*, unsigned int*)
static void     SimpleFlood(byte* const srcmightsee, const int leafnum, byte* const portalsee, unsigned int* const c_leafsee)
{
    unsigned        i;
    leaf_t*         leaf;
    portal_t*       p;

    {
        const unsigned  offset = leafnum >> 3;
        const unsigned  bit = (1 << (leafnum & 7));
    
        if (srcmightsee[offset] & bit)
        {
            return;
        }
        else
        {
            srcmightsee[offset] |= bit;
        }
    }

    (*c_leafsee)++;
    leaf = &g_leafs[leafnum];

    for (i = 0; i < leaf->numportals; i++)
    {
        p = leaf->portals[i];
        if (!portalsee[p - g_portals])
        {
            continue;
        }
        SimpleFlood(srcmightsee, p->leaf, portalsee, c_leafsee);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %eax
sarl $0x3, %eax
movl %esi, %ecx
andb $0x7, %cl
pushq $0x1
popq %rdx
shll %cl, %edx
movzbl (%rdi,%rax), %ecx
movl %esi, %edi
andl $0x7, %edi
btl %edi, %ecx
jae 0xb5a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orb %cl, %dl
movb %dl, (%r15,%rax)
movq (%rsp), %rax
incl (%rax)
leaq 0x20921c8(%rip), %rax   # 0x209d780
movslq %esi, %rcx
imulq $0x810, %rcx, %r12      # imm = 0x810
addq (%rax), %r12
xorl %r13d, %r13d
leaq 0x20921a9(%rip), %rbp   # 0x209d778
pushq $0x48
popq %rbx
movl (%r12), %eax
cmpq %rax, %r13
jae 0xb596
movq 0x10(%r12,%r13,8), %rcx
movq %rcx, %rax
subq (%rbp), %rax
cqto
idivq %rbx
cmpb $0x0, (%r14,%rax)
je 0xb605
movl 0x10(%rcx), %esi
movq %r15, %rdi
movq %r14, %rdx
movq (%rsp), %rcx
callq 0xb564
incq %r13
jmp 0xb5d2
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: FreeStackWinding(winding_t const*, pstack_s*)
inline static void     FreeStackWinding(const winding_t* const w, pstack_t* const stack)
{
    int             i;

    i = w - stack->windings;

    if (i < 0 || i > 2)
        return;                                            // not from local

    if (stack->freewindings[i])
        Error("FreeStackWinding: allready free");
    stack->freewindings[i] = 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
subq %rsi, %rdi
leaq -0x1028(%rdi), %rax
movl $0x188, %ecx            # imm = 0x188
cqto
idivq %rcx
movq %rax, %r14
cmpl $0x2, %r14d
ja 0xcc9c
movq %rsi, %rbx
andl $0x3, %r14d
cmpb $0x0, 0x14c0(%rsi,%r14)
je 0xcc93
leaq 0x6820(%rip), %rdi      # 0x134ac
xorl %eax, %eax
callq 0x795f
movb $0x1, 0x14c0(%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: SaveVisData(char const*)
void		SaveVisData(const char *filename)
{
	int i;
	FILE *fp = fopen(filename, "wb");

	if(!fp)
		return;

	SafeWrite(fp, g_dvisdata, (vismap_p - g_dvisdata));

	// BUG BUG BUG!
	// Leaf offsets need to be saved too!!!!
	for(i = 0; i < g_numleafs; i++)
	{
		SafeWrite(fp, &g_dleafs[i].visofs, sizeof(int));
	}

	fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x4688(%rip), %rsi      # 0x11916
callq 0x32b0
testq %rax, %rax
je 0xd2f9
movq %rax, %rbx
movl 0x20e052f(%rip), %edx   # 0x20ed7d0
leaq 0x15038(%rip), %rsi     # 0x222e0
subl %esi, %edx
movq %rax, %rdi
callq 0x71cd
leaq 0xa15067(%rip), %r14    # 0xa22320
addq $0x4, %r14
xorl %r15d, %r15d
leaq 0xa1504d(%rip), %r12    # 0xa22314
pushq $0x4
popq %rbp
movslq (%r12), %rax
cmpq %rax, %r15
jge 0xd2e9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x71cd
incq %r15
addq $0x1c, %r14
jmp 0xd2ca
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: VisLeafnumForPoint(float const*)
int        VisLeafnumForPoint(const vec3_t point)
{
    int             nodenum;
    vec_t           dist;
    dnode_t*        node;
    dplane_t*       plane;

    nodenum = 0;
    while (nodenum >= 0)
    {
        node = &g_dnodes[nodenum];
        plane = &g_dplanes[node->planenum];
        dist = DotProduct(point, plane->normal) - plane->dist;
        if (dist >= 0.0)
        {
            nodenum = node->children[0];
        }
        else
        {
            nodenum = node->children[1];
        }
    }

    return -nodenum - 2;
}

// Assembly:
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0x8(%rdi), %xmm2
xorl %edx, %edx
leaq 0x10b4f47(%rip), %rax   # 0x10c2260
leaq 0xaf4f30(%rip), %rcx    # 0xb02250
xorps %xmm3, %xmm3
testl %edx, %edx
js 0xd373
movl %edx, %edx
imulq $0x18, %rdx, %rdx
leaq (%rax,%rdx), %rsi
movslq (%rax,%rdx), %rdx
imulq $0x14, %rdx, %rdx
movss 0x4(%rcx,%rdx), %xmm4
mulss %xmm1, %xmm4
movss (%rcx,%rdx), %xmm5
mulss %xmm0, %xmm5
addss %xmm4, %xmm5
movss 0x8(%rcx,%rdx), %xmm4
mulss %xmm2, %xmm4
addss %xmm5, %xmm4
subss 0xc(%rcx,%rdx), %xmm4
xorl %edx, %edx
ucomiss %xmm3, %xmm4
setb %dl
movswl 0x4(%rsi,%rdx,2), %edx
jmp 0xd323
pushq $-0x2
popq %rax
subl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: LeafThread(int)
static void     LeafThread(int unused)
{
    portal_t*       p;

    while (1)
    {
        if (!(p = GetNextPortal()))
        {
            return;
        }

        PortalFlow(p);

        Verbose("portal:%4i  mightsee:%4i  cansee:%4i\n", (int)(p - g_portals), p->nummightsee, p->numcansee);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
pushq $0x48
popq %r12
leaq 0x55f6(%rip), %rbx      # 0x14002
callq 0x8a18
cmpl $-0x1, %eax
je 0xea9b
callq 0x8c3c
movq 0x208ed52(%rip), %rax   # 0x209d778
movl 0x208ed44(%rip), %ecx   # 0x209d770
addl %ecx, %ecx
testl %ecx, %ecx
cmovlel %r15d, %ecx
movl $0x1869f, %edx          # imm = 0x1869F
xorl %r14d, %r14d
subl $0x1, %ecx
jb 0xea59
movl 0x38(%rax), %esi
cmpl %edx, %esi
jae 0xea53
cmpl $0x0, 0x20(%rax)
cmoveq %rax, %r14
cmovel %esi, %edx
addq $0x48, %rax
jmp 0xea3c
testq %r14, %r14
je 0xeaa7
movl $0x1, 0x20(%r14)
callq 0x8c4d
movq %r14, %rdi
callq 0xaf24
movq %r14, %rax
subq 0x208ecfb(%rip), %rax   # 0x209d778
cqto
idivq %r12
movl 0x38(%r14), %edx
movl 0x3c(%r14), %ecx
movq %rbx, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x7db6
jmp 0xea0c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8c4d
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromBounds(BoundingBox const&)
UINT32 Zones::getZoneFromBounds(const BoundingBox& bounds)
{
    UINT32 x;
    for (x=0; x<m_ZoneCount; x++)
    {
        if (m_ZoneBounds[x].testSuperset(bounds))
        {
            return x;
        }
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %r12d, %r12d
movl 0x8(%r15), %eax
cmpq %rax, %r12
jae 0xeb17
movq 0x20(%r15), %rsi
addq %r13, %rsi
movq %r14, %rdi
callq 0xefbe
testb %al, %al
jne 0xeb14
incq %r12
addq $0x18, %r13
jmp 0xeaef
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromWinding(Winding const&)
UINT32 Zones::getZoneFromWinding(const Winding& winding)
{
    UINT32          x;
    BoundingBox     bounds;

    for (x=0; x<winding.m_NumPoints; x++)
    {
        bounds.add(winding.m_Points[x]);
    }

    return getZoneFromBounds(bounds);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movaps 0x46b2(%rip), %xmm0     # 0x131f0
movq %rsp, %r15
movaps %xmm0, (%r15)
movsd 0x46b3(%rip), %xmm0     # 0x13200
movsd %xmm0, 0x10(%r15)
xorl %r12d, %r12d
xorl %r13d, %r13d
movl 0x8(%r14), %eax
cmpq %rax, %r13
jae 0xeb7a
movq 0x10(%r14), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0xaeca
incq %r13
addq $0xc, %r12
jmp 0xeb59
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xead8
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/zones.h
// Function: Zones::Zones(unsigned int)
Zones(UINT32 ZoneCount)
    {
        m_ZoneCount = ZoneCount + 1;    // Zone 0 is used for all points outside all nodes
        m_ZoneVisMatrix = new bool[m_ZoneCount * m_ZoneCount];
        memset(m_ZoneVisMatrix, 0, sizeof(bool) * m_ZoneCount * m_ZoneCount);
        m_ZonePtrs = new bool*[m_ZoneCount];
        m_ZoneBounds = new BoundingBox[m_ZoneCount];

        UINT32 x;
        bool* dstPtr = m_ZoneVisMatrix;
        bool** srcPtr = m_ZonePtrs;
        for (x=0; x<m_ZoneCount; x++, srcPtr++, dstPtr += m_ZoneCount)
        {
            *srcPtr = dstPtr;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r14
leaq 0x9e9c(%rip), %rax      # 0x18d80
movq %rax, (%rdi)
leal 0x1(%r12), %r13d
movl %r13d, 0x8(%rdi)
movl %r13d, %edi
imull %edi, %edi
callq 0x3040
movq %rax, %rbx
movq %rax, 0x10(%r14)
movq %r13, %rdx
imulq %r13, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3120
leaq (,%r13,8), %rdi
callq 0x3040
movq %rax, %r15
movq %rax, 0x18(%r14)
imulq $0x18, %r13, %rbp
leaq 0x8(%rbp), %rdi
callq 0x3040
leaq 0x8(%rax), %rcx
movq %r13, (%rax)
incl %r12d
je 0xef65
xorl %edx, %edx
movaps 0x42a7(%rip), %xmm0     # 0x131f0
movsd 0x42af(%rip), %xmm1     # 0x13200
movups %xmm0, 0x8(%rax,%rdx)
movsd %xmm1, 0x18(%rax,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rbp
jne 0xef51
movq %rcx, 0x20(%r14)
xorl %eax, %eax
cmpl %eax, %r13d
je 0xef7c
movq %rbx, (%r15,%rax,8)
addq %r13, %rbx
incq %rax
jmp 0xef6b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/boundingbox.h
// Function: BoundingBox::testSubset(BoundingBox const&) const
bool testSubset(const BoundingBox& other) const
    {
        if (
                (m_Mins[0] >= other.m_Mins[0]) &&
                (m_Maxs[0] <= other.m_Maxs[0]) &&
                (m_Mins[1] >= other.m_Mins[1]) &&
                (m_Maxs[1] <= other.m_Maxs[1]) &&
                (m_Mins[2] >= other.m_Mins[2]) &&
                (m_Maxs[2] <= other.m_Maxs[2])
           )
        {
            return true;
        }
        return false;
    }

// Assembly:
movss (%rdi), %xmm0
ucomiss (%rsi), %xmm0
jb 0xf000
movss 0xc(%rsi), %xmm0
ucomiss 0xc(%rdi), %xmm0
jb 0xf000
movss 0x4(%rdi), %xmm0
ucomiss 0x4(%rsi), %xmm0
jb 0xf000
movss 0x10(%rsi), %xmm0
ucomiss 0x10(%rdi), %xmm0
jb 0xf000
movss 0x8(%rdi), %xmm0
ucomiss 0x8(%rsi), %xmm0
jb 0xf000
movss 0x14(%rsi), %xmm0
movb $0x1, %al
ucomiss 0x14(%rdi), %xmm0
jae 0xf002
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::Proxy()
Proxy() : 
		logger { "log.txt" },
		cache { LRUCache(CACHE_SIZE) }
	{
		// error shouldn't happen in the constructor
		// but if it does, release all the resouces allocated and exit the process
		constructServer();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x6949(%rip), %rsi      # 0xa020
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x386c
leaq 0x8(%rbx), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x38a8
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x250(%rbx), %r15
movq %r15, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3914
leaq 0x690c(%rip), %rax      # 0xa028
movq %rax, 0x2a8(%rbx)
movq %rbx, %rdi
callq 0x394e
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x3ac4
movq %r14, %rdi
callq 0x3ade
jmp 0x375c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3150
jmp 0x375c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::run()
void run()
	{
		unsigned client_id = 0; // id to mark different 

		// (1) wait until an request of sending arrives
		// (2) every time a client fd is caught, create a new thread to handle the request
		while(true)
		{ 
			std::string client_ip;
			int client_fd = acceptConnection(client_ip);
			if(client_fd == -1) // request error
			{
				continue;
			}
			std::thread thd(&Proxy::handleRequest, this, client_id, client_fd, client_ip);
			thd.detach();

			// assign every request/thread a unique id
			client_id = (client_id == INT_MAX) ? 0 : ++client_id;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %rsp, %rax
andl $0x0, (%rax)
leaq 0x38(%rsp), %r13
leaq 0x28(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x4(%rsp), %r14
xorl %ebp, %ebp
movq %r13, 0x28(%rsp)
andq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3e76
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
je 0x3808
leaq 0x708(%rip), %rax       # 0x3ec4
movq %rax, 0x18(%rsp)
andq $0x0, 0x20(%rsp)
movq %rbx, 0x8(%rsp)
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x46fc
movq %r12, %rdi
callq 0x34a0
movl (%rsp), %eax
leal 0x1(%rax), %ecx
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovel %ebp, %ecx
movl %ecx, (%rsp)
movq %r12, %rdi
callq 0x47a2
movq %r15, %rdi
callq 0x3150
jmp 0x3791
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x47a2
jmp 0x3829
jmp 0x3826
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::acceptConnection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int acceptConnection(std::string & client_ip)
    {
    	// keep waiting until a client request
        struct sockaddr_storage socket_addr;
        socklen_t socket_addr_len = sizeof(socket_addr);
        int accept_fd = accept(socket_fd, (struct sockaddr *)&socket_addr, &socket_addr_len); // accept() implements blocking accept
        if(accept_fd == -1) 
        {
            return -1;
        }

        // get the client ip
        struct sockaddr_in * temp = (struct sockaddr_in *)&socket_addr;
  		client_ip = inet_ntoa(temp->sin_addr);

        return accept_fd;
    }

// Assembly:
pushq %rbp
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x80, (%rdx)
movl 0x2b4(%rdi), %edi
leaq 0x8(%rsp), %rsi
callq 0x30d0
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x3eb8
movl 0xc(%rsp), %edi
callq 0x3130
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3500
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::acceptRequest(int)
Request acceptRequest(int fd)
	{
		// receive port number of the current player
		std::vector<char> buffer(BUFFER_SIZE, '\0');
	    int len = recv(fd, &buffer.data()[0], BUFFER_SIZE, 0);
	    if(len == -1)
	    {
	        throw ProxyException("In acceptRequest(), server receive request error");
	    }
	    buffer[len] = '\0';

	    // get current time for request
	    time_t cur = time(NULL);
	    tm * tm = localtime(&cur);
	    char * dt = asctime(tm);
	    std::string cur_time(dt);

	    // extract HTTP action and url from request
	    Request request(cur_time, buffer, len);
	    parser.parseRequest(request);
	    return request;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %rcx
movl $0x10000, %esi          # imm = 0x10000
movq %r15, %rdi
callq 0x563e
movq (%r15), %rsi
movl $0x10000, %edx          # imm = 0x10000
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x30e0
movq %rax, %r15
cmpl $-0x1, %r15d
je 0x489a
movslq %r15d, %rax
movq 0x18(%rsp), %rcx
movb $0x0, (%rcx,%rax)
xorl %edi, %edi
callq 0x32e0
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x3250
movq %rax, %rdi
callq 0x3110
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x386c
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x569c
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
movq %rbx, %rdi
movl %r15d, %ecx
callq 0x56e6
leaq 0x50(%rsp), %rdi
callq 0x3dda
movq %r14, %rdi
movq %rbx, %rsi
callq 0x57f8
leaq 0x30(%rsp), %rdi
callq 0x3150
leaq 0x18(%rsp), %rdi
callq 0x3dda
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x3190
movq %rax, %rbx
leaq 0x58d1(%rip), %rsi      # 0xa17d
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x386c
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x55e8
xorl %ebp, %ebp
leaq 0xb434(%rip), %rsi      # 0xfd08
leaq 0xd43(%rip), %rdx       # 0x561e
movq %rbx, %rdi
callq 0x3490
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x3150
testb %bpl, %bpl
jne 0x48fa
jmp 0x4934
movq %rax, %r14
movq %rbx, %rdi
callq 0x3240
jmp 0x4934
movq %rax, %r14
movq %rbx, %rdi
callq 0x49c4
jmp 0x4923
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x3dda
jmp 0x4923
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x3150
jmp 0x4934
jmp 0x4931
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x3dda
movq %r14, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/./Logger.hpp
// Function: Logger::log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void log(const std::string & content)
	{
		// protect against data race
		std::unique_lock<std::mutex> lck(mtx);

		// open the file in append mode if closed
		if(!out.is_open())
		{
			out.open(path, std::ofstream::out | std::ofstream::app);
		}

		out << content << std::endl;
		out.close();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %rdi
movq %r15, %rsi
callq 0x5cd6
leaq 0x48(%r15), %rbx
leaq 0xb8(%r15), %rdi
callq 0x3090
testb %al, %al
jne 0x4ae8
addq $0x28, %r15
pushq $0x11
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32c0
movq %rax, %rdi
callq 0x3180
movq %rbx, %rdi
callq 0x33e0
movq %rsp, %rdi
callq 0x5cec
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5cec
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::handleGetPost(int, int, int, Request const&)
void handleGetPost(int client_id, int client_fd, int server_fd, const Request & request)
	{
		try
		{
			sendRequest(server_fd, request);
			getResponse(client_id, client_fd, server_fd, request);
		}
		catch(std::exception & e)
		{
			throw e;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl %ecx, %esi
movq %r8, %rdx
callq 0x9a40
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x9afc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x55d8
movq %rbx, %rdi
callq 0x3100
pushq $0x8
popq %rdi
callq 0x3190
movq 0xa9fd(%rip), %rcx      # 0xffb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xaa0f(%rip), %rsi      # 0xffd0
movq 0xaa28(%rip), %rdx      # 0xfff0
movq %rax, %rdi
callq 0x3490
movq %rax, %rbx
callq 0x3470
movq %rbx, %rdi
callq 0x34b0
movq %rax, %rdi
callq 0x3b8d