// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::buildMapHeuristic(std::vector<std::vector<Block, std::allocator<Block>>, std::allocator<std::vector<Block, std::allocator<Block>>>>&, std::vector<unsigned long, std::allocator<unsigned long>>&)
std::vector<std::vector<std::pair<bool, std::vector<size_t>>>>
FileHandler::buildMapHeuristic(std::vector<std::vector<Block>> &input, std::vector<size_t> &parityDist)
{
	//Initialization
	std::vector<std::vector<std::pair<bool, std::vector<size_t>>>> ret;
	ret.resize(inFiles.size());

	size_t maxCalls = input.at(0).size();
	std::vector<std::vector<Block>::iterator> iterators;
	for (auto &in : input)
	{
		iterators.push_back(in.begin());
		maxCalls = std::min(in.size(), maxCalls);
	}
	size_t curMin = -1;
	bool interestingStart=false;
	bool interestingEnd=false;
	std::vector<size_t> pushMe;

	std::vector<std::vector<size_t>> parityDistribution;
	for (size_t i = 0; i < inFiles.size(); ++i)
	{
		std::vector<size_t> tmp;
		for (size_t j = 0; j < inFiles.size(); ++j)
		{
			tmp.push_back(0);
		}
		parityDistribution.push_back(tmp);
	}
	while (maxCalls != 0)
	{
		maxCalls--;
		curMin = -1;
		for (auto &in : iterators)
		{
			curMin = std::min(curMin, (*in).startAdress);
		}
		interestingStart = true;
		pushMe.clear();
		size_t num=0;
		for (auto &in : iterators)
		{
			if ((*in).startAdress == curMin)
			{}
			else if ((*in).startAdress == curMin+1)
			{
				pushMe.push_back(num);
			}
			else
			{
				interestingStart=false;
			}
			++num;
		}
		if (interestingStart == true && (!(pushMe.empty())))
		{
			std::pair<bool, std::vector<size_t>> entry;
			entry = std::make_pair(true, pushMe);
			size_t modOp = (curMin) % inFiles.size();
			ret.at(modOp).push_back(entry);
		}

		//If an interesting start was found
		if (interestingStart == true)
		{
			size_t sAdress = curMin;
			curMin = -1;
			for (auto &in : iterators)
				curMin = std::min(curMin, (*in).entropies.size());
			for (size_t i = 1; i < curMin; ++i)
			{
				size_t pos=0;
				size_t par=0;
				float highest=0.0f;
				size_t en = (sAdress+i)%inFiles.size();
				for (auto &in : iterators)
				{
					if ((*in).startAdress == sAdress)
					{
						if ((*in).entropies.at(i) > highest)
						{
							highest = (*in).entropies.at(i);
							par = pos;
						}
					}
					else
					{
						if ((*in).entropies.at(i-1) > highest)
						{
							highest = (*in).entropies.at(i-1);
							par = pos;
						}
					}
					++pos;
				}
				parityDistribution.at(en).at(par) = parityDistribution.at(en).at(par)+1;
			}
		}

		curMin = -1;
		for (auto &in : iterators)
		{
			curMin = std::min(curMin, (*in).endAdress);
		}
		interestingEnd = true;
		pushMe.clear();
		num=0;
		for (auto &in : iterators)
		{
			if ((*in).endAdress == curMin)
			{
				pushMe.push_back(num);
				++in;
			}
			else if ((*in).endAdress == curMin+1)
			{
				++in;
			}
			else
			{
				interestingEnd=false;
			}
			++num;
		}

		//If an interesting end was found
		if (interestingEnd == true && pushMe.size()<inFiles.size())
		{
			std::pair<bool, std::vector<size_t>> entry;
			entry = std::make_pair(false, pushMe);
			size_t modOp = (curMin) % inFiles.size();
			ret.at(modOp).push_back(entry);
		}
	}

	//Build the hashMap
	std::map<std::vector<size_t>, size_t> hashMap;
	bool schlonz = true;
	for (size_t i = 0; i < ret.size();)
	{
		hashMap.clear();
		for (size_t j = 0; j < ret.at(i).size(); ++j)
		{
			if (ret.at(i).at(j).first == schlonz)
			{
				if (hashMap.find(ret.at(i).at(j).second) == hashMap.end())
				{
					hashMap.insert(std::pair<std::vector<size_t>, size_t>(ret.at(i).at(j).second, 0));
				}
				hashMap.at(ret.at(i).at(j).second) += 1;
			}
		}
		if (hashMap.size() == 1 && hashMap.begin()->first.size() > 1)
		{
			for (size_t j = 0; j < ret.at(i).size();)
			{
				if (ret.at(i).at(j).first == schlonz)
				{
					ret.at(i).erase(ret.at(i).begin()+j);
					continue;
				}
				++j;
			}
		}
		//Kill also all unnecessary entries
		for (std::map<std::vector<size_t>, size_t>::iterator j = hashMap.begin(); j != hashMap.end();)
		{
			bool killMe = false;
			for (std::map<std::vector<size_t>, size_t>::iterator x = j; x != hashMap.end();)
			{
				if (x == j)
				{
					++x;
					continue;
				}
				if (j->first.size() == x->first.size())
				{
					if (j->second >= x->second)
					{
						if (j->second == x->second)
							killMe = true;
						for (size_t kill = 0; kill < ret.at(i).size();)
						{
							if (ret.at(i).at(kill).first == schlonz && ret.at(i).at(kill).second == x->first)
							{
								ret.at(i).erase(ret.at(i).begin()+kill);
								continue;
							}
							++kill;
						}
						x = hashMap.erase(x);
						continue;
					}
					else
					{
						killMe = true;
					}
				}
				++x;
			}
			if (killMe == true)
			{
				for (size_t kill = 0; kill < ret.at(i).size();)
				{
					if (ret.at(i).at(kill).first == schlonz && ret.at(i).at(kill).second == j->first)
					{
						ret.at(i).erase(ret.at(i).begin()+kill);
						continue;
					}
					++kill;
				}
				j = hashMap.erase(j);
				continue;
			}
			++j;
		}
		if (schlonz == true)
		{
			schlonz = false;
		}
		else
		{
			schlonz = true;
			++i;
		}
	}

	//Parity distribution is estimated
	for (size_t i = 0; i < inFiles.size(); ++i)
	{
		size_t bestFit = 0;
		size_t highestScore=0;
		for (size_t j = 0; j < inFiles.size(); ++j)
		{
			//std::cout << parityDistribution.at(i).at(j) << "\t";
			if (parityDistribution.at(i).at(j) > highestScore)
			{
				highestScore = parityDistribution.at(i).at(j);
				bestFit = j;
			}
		}
		parityDist.push_back(bestFit);
		//std::cout << std::endl;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0xe0(%rsp)
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rbp
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x48(%rsi), %rsi
subq 0x40(%rbx), %rsi
sarq $0x3, %rsi
callq 0xe132
movq %rbx, 0x28(%rsp)
movq (%r14), %rbx
movq 0x8(%r14), %r12
movq %r12, %rax
subq %rbx, %rax
movq %rbp, 0x8(%rsp)
je 0xbcd2
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %r13 # imm = 0x6DB6DB6DB6DB6DB7
imulq %r13, %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x50(%rsp), %r15
movq (%rbx), %rax
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0xb013
movq 0x50(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xa8(%rsp)
jmp 0xb01e
movq %r14, %rdi
movq %r15, %rdx
callq 0x1097a
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
imulq %r13, %rax
movq 0x20(%rsp), %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
movq %rcx, 0x20(%rsp)
addq $0x18, %rbx
cmpq %r12, %rbx
jne 0xafe6
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %eax, %eax
movq %rax, 0x40(%rsp)
movq %rax, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movq 0x28(%rsp), %rcx
movq 0x48(%rcx), %rax
cmpq 0x40(%rcx), %rax
je 0xb133
xorl %ebx, %ebx
leaq 0xc0(%rsp), %r14
leaq 0x50(%rsp), %r12
leaq 0x80(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x48(%rcx), %rax
cmpq 0x40(%rcx), %rax
je 0xb0fc
xorl %r15d, %r15d
movq $0x0, 0x80(%rsp)
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0xb0d8
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x58(%rsp)
jmp 0xb0e3
movq %r12, %rdi
movq %r13, %rdx
callq 0x10ab8
incq %r15
movq 0x28(%rsp), %rcx
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
sarq $0x3, %rax
cmpq %rax, %r15
jb 0xb0ae
movq %r14, %rdi
movq %r12, %rsi
callq 0xe45a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xb116
callq 0x5390
incq %rbx
movq 0x28(%rsp), %rcx
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
sarq $0x3, %rax
cmpq %rax, %rbx
jb 0xb090
cmpq $0x0, 0x20(%rsp)
je 0xb63e
movq 0xa0(%rsp), %rbx
movq 0xa8(%rsp), %r14
movq $-0x1, %r12
cmpq %r14, %rbx
je 0xb175
movq %rbx, %rax
movq (%rax), %rcx
movq 0x18(%rcx), %rcx
cmpq %r12, %rcx
cmovbq %rcx, %r12
addq $0x8, %rax
cmpq %r14, %rax
jne 0xb15e
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0xb186
movq %rax, 0x38(%rsp)
movq $0x0, 0x48(%rsp)
cmpq %r14, %rbx
je 0xb1f8
leaq 0x1(%r12), %r15
movb $0x1, %r13b
movq (%rbx), %rax
movq 0x18(%rax), %rax
cmpq %r12, %rax
je 0xb1e0
cmpq %r15, %rax
jne 0xb1cc
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xb1d1
movq 0x48(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rsp)
jmp 0xb1e0
xorl %r13d, %r13d
jmp 0xb1e0
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0xeba6
incq 0x48(%rsp)
addq $0x8, %rbx
cmpq %r14, %rbx
jne 0xb19c
testb $0x1, %r13b
je 0xb453
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0xb307
movb $0x0, 0x50(%rsp)
leaq 0x58(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movb $0x1, 0x80(%rsp)
leaq 0x88(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0xe6ae
movq 0x28(%rsp), %rbx
movb 0x80(%rsp), %al
movb %al, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movups 0x88(%rsp), %xmm0
movq 0x98(%rsp), %rax
movq %rdi, 0x88(%rsp)
movups 0x60(%rsp), %xmm1
movups %xmm0, 0x58(%rsp)
movq %rax, 0x68(%rsp)
movups %xmm1, 0x90(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
testq %rdi, %rdi
je 0xb29a
callq 0x5390
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xb2ac
callq 0x5390
movq 0x48(%rbx), %rcx
subq 0x40(%rbx), %rcx
sarq $0x3, %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
movq (%rbp), %rcx
movq 0x8(%rbp), %rax
subq %rcx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rax
cmpq %rdx, %rax
jbe 0xbcaa
leaq (%rdx,%rdx,2), %rax
leaq (%rcx,%rax,8), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe2f2
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xb307
callq 0x5390
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %r9
cmpq %r9, %rdi
je 0xb349
movq $-0x1, %rcx
movq %rdi, %rax
movq (%rax), %rdx
movq 0x8(%rdx), %r10
subq (%rdx), %r10
sarq $0x2, %r10
cmpq %rcx, %r10
cmovaeq %rcx, %r10
addq $0x8, %rax
movq %r10, %rcx
cmpq %r9, %rax
jne 0xb326
jmp 0xb350
movq $-0x1, %r10
cmpq $0x2, %r10
jb 0xb453
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rcx
subq 0x40(%rax), %rcx
sarq $0x3, %rcx
movq %rcx, 0x10(%rsp)
movq 0xc0(%rsp), %rbx
movq 0xc8(%rsp), %r11
subq %rbx, %r11
sarq $0x3, %r11
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r11
movl $0x1, %r14d
leaq (%r14,%r12), %rax
xorl %edx, %edx
divq 0x10(%rsp)
movl $0x0, %esi
cmpq %r9, %rdi
je 0xb418
leaq -0x1(%r14), %rax
xorps %xmm0, %xmm0
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %esi, %esi
movq (%rdi,%r15,8), %rcx
movq (%rcx), %rbp
movq 0x8(%rcx), %r8
subq %rbp, %r8
sarq $0x2, %r8
cmpq %r12, 0x18(%rcx)
jne 0xb3e9
cmpq %r14, %r8
jbe 0xbc21
movss (%rbp,%r14,4), %xmm1
jmp 0xb3f9
cmpq %rax, %r8
jbe 0xbc24
movss -0x4(%rbp,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jbe 0xb404
movaps %xmm1, %xmm0
movq %r15, %rsi
incq %r15
leaq (%rdi,%r13), %rcx
addq $0x8, %rcx
addq $0x8, %r13
cmpq %r9, %rcx
jne 0xb3bf
cmpq %rdx, %r11
jbe 0xbc6a
leaq (%rdx,%rdx,2), %rdx
movq (%rbx,%rdx,8), %rax
movq 0x8(%rbx,%rdx,8), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
movq 0x8(%rsp), %rbp
jbe 0xbc65
incq (%rax,%rsi,8)
incq %r14
cmpq %r10, %r14
jne 0xb39b
movq 0xa0(%rsp), %rbx
movq 0xa8(%rsp), %r12
movq $-0x1, %r14
cmpq %r12, %rbx
je 0xb489
movq %rbx, %rax
movq (%rax), %rcx
movq 0x28(%rcx), %rcx
cmpq %r14, %rcx
cmovbq %rcx, %r14
addq $0x8, %rax
cmpq %r12, %rax
jne 0xb472
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
movq 0x28(%rsp), %r15
je 0xb49f
movq %rax, 0x38(%rsp)
movq $0x0, 0x48(%rsp)
cmpq %r12, %rbx
je 0xb51f
leaq 0x1(%r14), %r13
movb $0x1, %r15b
movq (%rbx), %rax
movq 0x28(%rax), %rcx
cmpq %r14, %rcx
jne 0xb4df
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xb4e9
movq 0x48(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rsp)
jmp 0xb4f8
cmpq %r13, %rcx
je 0xb4fb
xorl %r15d, %r15d
jmp 0xb502
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0xeba6
movq (%rbx), %rax
addq $0x38, %rax
movq %rax, (%rbx)
incq 0x48(%rsp)
addq $0x8, %rbx
cmpq %r12, %rbx
jne 0xb4b4
testb $0x1, %r15b
movq 0x28(%rsp), %r15
je 0xb633
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
movq 0x48(%r15), %rcx
subq 0x40(%r15), %rcx
cmpq %rcx, %rax
jae 0xb633
xorl %ecx, %ecx
movb %cl, 0x50(%rsp)
leaq 0x58(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movb %cl, 0x80(%rsp)
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0xe6ae
movb 0x80(%rsp), %al
movb %al, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movups 0x88(%rsp), %xmm0
movq 0x98(%rsp), %rax
movq %rdi, 0x88(%rsp)
movups 0x60(%rsp), %xmm1
movups %xmm0, 0x58(%rsp)
movq %rax, 0x68(%rsp)
movups %xmm1, 0x90(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
testq %rdi, %rdi
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
je 0xb5d0
callq 0x5390
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xb5e2
callq 0x5390
movq 0x48(%r15), %rcx
subq 0x40(%r15), %rcx
sarq $0x3, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq (%rbp), %rcx
movq 0x8(%rbp), %rax
subq %rcx, %rax
sarq $0x3, %rax
imulq %rbx, %rax
cmpq %rdx, %rax
jbe 0xbcbe
leaq (%rdx,%rdx,2), %rax
leaq (%rcx,%rax,8), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe2f2
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xb633
callq 0x5390
decq 0x20(%rsp)
jne 0xb13f
leaq 0x58(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x8(%rbp), %rax
cmpq (%rbp), %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
je 0xbac6
movb $0x1, %r14b
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
callq 0x10d6c
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq %rbx, %rdx
jbe 0xbc54
movb %r14b, 0x7(%rsp)
andb $0x1, %r14b
movb %r14b, 0x20(%rsp)
movl $0x8, %r14d
leaq (%rbx,%rbx,2), %r13
xorl %r15d, %r15d
movq (%rax,%r13,8), %rsi
movq 0x8(%rax,%r13,8), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r15
jae 0xb7da
movb 0x20(%rsp), %al
cmpb %al, -0x8(%rsi,%r14)
jne 0xb7b2
addq %r14, %rsi
leaq 0x50(%rsp), %rdi
callq 0x10d9a
leaq 0x58(%rsp), %rcx
cmpq %rcx, %rax
jne 0xb76d
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq %rbx, %rdx
leaq 0x80(%rsp), %rdi
jbe 0xbc99
movq (%rax,%r13,8), %rsi
movq 0x8(%rax,%r13,8), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0xbc96
addq %r14, %rsi
callq 0xe6ae
movq $0x0, 0x98(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x10e8e
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xb76d
callq 0x5390
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq %rbx, %rdx
jbe 0xbc54
movq (%rax,%r13,8), %rsi
movq 0x8(%rax,%r13,8), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0xbc51
addq %r14, %rsi
leaq 0x50(%rsp), %rdi
callq 0xe486
incq (%rax)
incq %r15
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $0x20, %r14
cmpq %rbx, %rdx
ja 0xb6b9
jmp 0xbc54
movq %rbx, 0x10(%rsp)
cmpq $0x1, 0x78(%rsp)
leaq 0x58(%rsp), %r15
jne 0xb857
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rcx
subq 0x20(%rax), %rcx
cmpq $0x9, %rcx
jb 0xb857
xorl %ebx, %ebx
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq 0x10(%rsp), %rdx
jbe 0xbc83
movq (%rax,%r13,8), %rsi
movq 0x8(%rax,%r13,8), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rbx
jae 0xb857
movq %rbx, %rcx
shlq $0x5, %rcx
movb 0x20(%rsp), %dl
cmpb %dl, (%rsi,%rcx)
jne 0xb852
leaq (%rax,%r13,8), %rdi
addq %rcx, %rsi
callq 0x110e4
jmp 0xb801
incq %rbx
jmp 0xb801
movq 0x68(%rsp), %rbp
cmpq %r15, %rbp
movq 0x10(%rsp), %rbx
je 0xba92
movl $0x0, 0x1c(%rsp)
movq %rbp, %r14
cmpq %rbp, %r14
jne 0xb88f
movq %r14, %rdi
callq 0x5270
movq %rax, %r14
cmpq %r15, %rax
jne 0xb875
jmp 0xb9b9
movq 0x28(%rbp), %rax
subq 0x20(%rbp), %rax
movq 0x28(%r14), %rcx
subq 0x20(%r14), %rcx
cmpq %rcx, %rax
jne 0xb968
movq 0x38(%r14), %rax
movb $0x1, %bl
cmpq %rax, 0x38(%rbp)
jb 0xb96e
movl 0x1c(%rsp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovel %eax, %ecx
movl %ecx, 0x1c(%rsp)
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %rdx
subq %rbx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq 0x10(%rsp), %rdx
jbe 0xbc0e
movq (%rbx,%r13,8), %r15
movq 0x8(%rbx,%r13,8), %rax
subq %r15, %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0xb981
movq %r12, %rax
shlq $0x5, %rax
movb 0x20(%rsp), %cl
cmpb %cl, (%r15,%rax)
jne 0xb960
addq %rax, %r15
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rcx
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0xb960
cmpq %rdi, %rax
je 0xb94f
callq 0x53f0
testl %eax, %eax
jne 0xb960
leaq (%rbx,%r13,8), %rdi
movq %r15, %rsi
callq 0x110e4
jmp 0xb8ce
incq %r12
jmp 0xb8ce
movl 0x1c(%rsp), %eax
movl %eax, %ebx
movq %r14, %rdi
callq 0x5270
movq %rax, %r14
movl %ebx, %eax
movl %eax, 0x1c(%rsp)
jmp 0xb9ab
movq %r14, %rdi
callq 0x5270
movq %rax, %r15
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x1115c
movq %r15, %r14
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x58(%rsp), %r15
cmpq %r15, %r14
movq 0x10(%rsp), %rbx
jne 0xb875
testb $0x1, 0x1c(%rsp)
je 0xba57
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %rdx
subq %rbx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq 0x10(%rsp), %rdx
jbe 0xbbfb
movq (%rbx,%r13,8), %r14
movq 0x8(%rbx,%r13,8), %rax
subq %r14, %rax
sarq $0x5, %rax
cmpq %rax, %r15
jae 0xba64
movq %r15, %rax
shlq $0x5, %rax
movb 0x20(%rsp), %cl
cmpb %cl, (%r14,%rax)
jne 0xba4f
addq %rax, %r14
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rcx
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0xba4f
cmpq %rdi, %rax
je 0xba3e
callq 0x53f0
testl %eax, %eax
jne 0xba4f
leaq (%rbx,%r13,8), %rdi
movq %r14, %rsi
callq 0x110e4
jmp 0xb9c7
incq %r15
jmp 0xb9c7
movq %rbp, %rdi
callq 0x5270
movq %rax, %rbp
jmp 0xba89
movq %rbp, %rdi
callq 0x5270
movq %rax, %r14
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x1115c
movq %r14, %rbp
movq 0x10(%rsp), %rbx
leaq 0x58(%rsp), %r15
cmpq %r15, %rbp
jne 0xb86a
movb 0x7(%rsp), %cl
movl %ecx, %eax
xorb $0x1, %al
notb %cl
andb $0x1, %cl
movzbl %cl, %ecx
addq %rcx, %rbx
movq 0x8(%rsp), %rbp
movq 0x8(%rbp), %rcx
subq (%rbp), %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
movl %eax, %r14d
cmpq %rcx, %rbx
jb 0xb678
movq 0x28(%rsp), %rbx
movq 0x48(%rbx), %rax
subq 0x40(%rbx), %rax
je 0xbbae
sarq $0x3, %rax
xorl %r14d, %r14d
leaq 0x80(%rsp), %r12
movq $0x0, 0x80(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0xbc40
leaq (%r14,%r14,2), %rdx
movq (%rsi,%rdx,8), %rcx
movq 0x8(%rsi,%rdx,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %rdx
je 0xbc3d
movq (%rcx,%rsi,8), %r8
cmpq %rdi, %r8
jbe 0xbb5f
movq %rsi, 0x80(%rsp)
movq %r8, %rdi
incq %rsi
cmpq %rsi, %rax
jne 0xbb42
movq 0xe0(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xbb8e
movq 0x80(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xbb96
movq %r12, %rdx
callq 0xeba6
incq %r14
movq 0x48(%rbx), %rax
subq 0x40(%rbx), %rax
sarq $0x3, %rax
cmpq %rax, %r14
jb 0xbae8
leaq 0x50(%rsp), %rdi
callq 0xe74a
leaq 0xc0(%rsp), %rdi
callq 0xe510
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbbd4
callq 0x5390
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xbbe6
callq 0x5390
movq %rbp, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9cc7(%rip), %rdi      # 0x158c9
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x5570
leaq 0x9cb4(%rip), %rdi      # 0x158c9
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x5570
movq %r14, %rax
leaq 0x9c9e(%rip), %rdi      # 0x158c9
movq %rax, %rsi
movq %r8, %rdx
xorl %eax, %eax
movq 0x8(%rsp), %rbp
callq 0x5570
movq %rsi, %r14
leaq 0x9c82(%rip), %rdi      # 0x158c9
movq %r14, %rsi
xorl %eax, %eax
callq 0x5570
movq %r15, %rbx
leaq 0x9c6e(%rip), %rdi      # 0x158c9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5570
movq %rdx, %r11
jmp 0xbc72
movq %rdx, %rsi
movq 0x8(%rsp), %rbp
leaq 0x9c50(%rip), %rdi      # 0x158c9
movq %r11, %rdx
xorl %eax, %eax
callq 0x5570
leaq 0x9c3f(%rip), %rdi      # 0x158c9
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x5570
movq %r15, %rbx
leaq 0x9c29(%rip), %rdi      # 0x158c9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5570
leaq 0x9c18(%rip), %rdi      # 0x158c9
movq %rdx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5570
leaq 0x9c04(%rip), %rdi      # 0x158c9
movq %rdx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5570
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
leaq 0x9bde(%rip), %rdi      # 0x158c9
xorl %esi, %esi
xorl %eax, %eax
callq 0x5570
movq %rax, %r14
movq 0x8(%rsp), %rbp
jmp 0xbdc4
movq %rax, %r14
jmp 0xbdc4
jmp 0xbd15
jmp 0xbd15
jmp 0xbd15
jmp 0xbd74
jmp 0xbd15
jmp 0xbd15
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xbd27
callq 0x5390
movq 0x8(%rsp), %rbp
jmp 0xbd96
movq %rax, %r14
jmp 0xbdb2
jmp 0xbd54
jmp 0xbd7d
jmp 0xbd7d
jmp 0xbd74
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xbd8c
callq 0x5390
jmp 0xbd8c
jmp 0xbd74
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xbd96
callq 0x5390
jmp 0xbd96
jmp 0xbd74
jmp 0xbd74
jmp 0xbd74
jmp 0xbd74
jmp 0xbd7d
jmp 0xbd74
movq %rax, %r14
jmp 0xbd8c
jmp 0xbd84
jmp 0xbd84
movq %rax, %r14
jmp 0xbd96
jmp 0xbd84
movq %rax, %r14
movq 0x8(%rsp), %rbp
leaq 0x50(%rsp), %rdi
callq 0xe74a
leaq 0xc0(%rsp), %rdi
callq 0xe510
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xbdb2
callq 0x5390
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xbdc4
callq 0x5390
movq %rbp, %rdi
callq 0xe3a6
movq %r14, %rdi
callq 0x5650