// File: /workspace/github_cpp_makefile_star2_O3/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::estimateStripeMap(bool)
std::vector<std::vector<mapEntry>> FileHandler::estimateStripeMap(bool isRaid5)
{
	//Lambda function, which is done by threads
	auto lambda = [&] (size_t id) -> std::vector<Block>
	{
		//Initialization
		std::vector<Block> blocks;
		FileReader *me = inFiles.at(id);
		const size_t CHECKS = 400;
		me->reset();
		const int checkSize=1;
		bool checkGapSize = false;
		size_t startBlock=0,endBlock=0;
		bool zeroStart=false, zeroEnd=false;
		size_t blockSize = mStripeSize;
		size_t gap = mStripeSize - (checkSize * me->getBlockSize());
		gap -= (checkSize * me->getBlockSize());
		Block pushMe;
		size_t outputCounter = 0;
		while (true)
		{
			//Output
			if (outputCounter == 0)
			{
				std::string wr = "Thread ";
				wr += std::to_string(id);
				wr += " working \t";
				wr += me->getRelativePos();
				printf("\r%s\t%6lu",wr.c_str(), blocks.size());
				fflush(stdout);
			}
			outputCounter = (outputCounter + 1) % 25000;
			if (blocks.size() > CHECKS)
				break;

			//Error
			if (me->findFirstNonemptyBlock() == -1)
			{
				break;
			}

			//Get adress and check the gap
			size_t adress = me->getCurrentAdress();
			if (checkGapSize == true)
			{
				size_t tmp = adress;
				if (tmp >= endBlock-checkSize*me->getBlockSize())
				{
					pushMe.zeroFirst = zeroStart;
					pushMe.zeroLast = zeroEnd;
					pushMe.startAdress = startBlock/blockSize;
					pushMe.endAdress = endBlock/blockSize;
					blocks.push_back(pushMe);
					startBlock = adress;
				}
				if (startBlock % blockSize != 0)
				{
					startBlock -= me->getBlockSize();
					zeroStart=true;
				}
				else
				{
					zeroStart=false;
				}
			}
			else
			{
				startBlock = adress;
				if (startBlock % blockSize != 0)
				{
					startBlock -= me->getBlockSize();
					zeroStart=true;
				}
				else
				{
					zeroStart=false;
				}
			}

			//Calculate entropy and check if it's relevant
			pushMe.entropies.clear();
			pushMe.entropies.push_back(me->calcEntropyOfCurrentBlock());
			while (me->newBlock()==true)
			{
				//Output
				if (outputCounter == 0)
				{
					std::string wr = "Thread ";
					wr += std::to_string(id);
					wr += " working \t";
					wr += me->getRelativePos();
					printf("\r%s\t%6lu",wr.c_str(), blocks.size());
					fflush(stdout);
				}
				outputCounter = (outputCounter + 1) % 25000;
				if (blocks.size() > CHECKS)
					break;
				float f = me->calcEntropyOfCurrentBlock();
				if (f == 0.0f)
					break;
				pushMe.entropies.push_back(f);
			}

			endBlock = me->getCurrentAdress();
			if (endBlock % blockSize != 0)
			{
				endBlock += me->getBlockSize();
				zeroEnd=true;
			}
			else
			{
				zeroEnd=false;
			}
			if (endBlock - startBlock < checkSize*me->getBlockSize())
			{
				checkGapSize = false;
			}
			else
			{
				checkGapSize = true;
			}
		}
		me->reset();
		return blocks;
	}; //lambda function end

	//Initialization to start threads
	unsigned int NUM_THREADS = inFiles.size();
	std::vector<std::pair<size_t, float>> entropies;
	std::vector<std::future<std::vector<Block>>> futureResults(inFiles.size());
	std::vector<std::vector<Block>> results(inFiles.size());
	for (size_t i = 0; i < NUM_THREADS; ++i)
	{
		inFiles.at(i)->setBlockSize(mStripeSize);
		futureResults[i] = std::async(std::launch::async, lambda, i);
	}
	for (size_t i = 0; i < NUM_THREADS; ++i)
	{
		results.at(i) = futureResults.at(i).get();
		inFiles.at(i)->setBlockSize(mStripeSize);
	}
	std::cout << std::endl;
	std::cout << "\tEntropie calculation finished" << std::endl;

	std::vector<std::vector<std::pair<bool, std::vector<size_t>>>> map;
	map.resize(results.size());

	//Build the heuristic with the modulo operation and the block begins and ends
	std::vector<size_t> parityDist;
	std::vector<std::vector<std::pair<bool, std::vector<size_t>>>> entropyMat = buildMapHeuristic(results, parityDist);

	//Initializing the resulting stripingMap
	std::vector<std::vector<mapEntry>> stripingMap;
	std::vector<std::pair<size_t, size_t>> referenceCounters;
	std::pair<size_t,size_t> c;
	size_t revC = results.size()-2;
	if (isRaid5==false)
		revC++;
	for (size_t i = 0; i < results.size(); ++i)
	{
		referenceCounters.push_back(std::pair<size_t,size_t>(0,revC));
	}
	for (size_t j = 0; j < results.size(); ++j)
	{
		std::vector<mapEntry> b;
		for (size_t i = 0; i < results.size(); ++i)
		{
			if (isRaid5 == true)
			{
				if (parityDist.at(j) == i)
				{
					b.push_back(mapEntry(true,-2));
				}
				else
				{
					b.push_back(mapEntry(false, -1));
				}
			}
			else
			{
				b.push_back(mapEntry(false, -1));
			}
		}
		stripingMap.push_back(b);
		if (isRaid5==false)
			break;

	}

	std::vector<size_t> posValues;
	if (isRaid5 == true)
	{
		posValues = std::vector<size_t>(results.size(), results.size()-1);
	}
	else
	{
		posValues = std::vector<size_t>(1, results.size());
	}

	//Sort, if it is Raid0 for the later algorithm
	if (isRaid5 == false)
	{
		for (size_t i = 1; i < entropyMat.size();)
		{
			for (size_t j = 0; j < entropyMat.at(i).size(); ++j)
			{
				entropyMat.at(0).push_back(entropyMat.at(i).at(j));
			}
			entropyMat.erase(entropyMat.begin()+i);
		}
	}

	//*
	// * DEBUG OUTPUT - do not delete me
	// *
/*	std::cout << std::endl;
	for (auto in : entropyMat)
	{
		std::cout << "Begin" << std::endl;
		for (auto in2 : in)
		{
			if (in2.first == true)
			{
				for (auto in3 : in2.second)
				{
					std::cout << in3 << ";";
				}
				std::cout << " ";
			}
		}
		std::cout << std::endl;
		std::cout << "End" << std::endl;
		for (auto in2 : in)
		{
			if (in2.first == false)
			{
				for (auto in3 : in2.second)
				{
					std::cout << in3 << ";";
				}
				std::cout << " ";
			}
		}
		std::cout << std::endl;
	}
	std::cout << std::endl;
*/

	float probability = 1.0f;
	//left = 1, right = 2
	int leftRight = 0;
	//asymm = 1, symm = 2
	int asymm_symm = 0;

	//In this loop we determine the striping map out of the map heuristic, we built earlier
	while (probability > 0.5f)
	{
		size_t entropyMatRunner=0;
		//*
		// * DEBUG OUTPUT - do not delete me
		// *
/*		for (auto &in : stripingMap)
		{
			std::cout << std::setw(10) << " ";
			for (auto &it : in)
			{
				if (it.isParity)
				{
					std::cout << std::setw(4) << "P";
				}
				else
				{
					std::cout << std::setw(4) << std::to_string(it.dataBlock);
				}
			}
			std::cout << std::endl;
		}
		std::cout << std::endl << std::endl;
		std::cout << std::to_string(probability) << std::endl;
*/		//Debug output -end

		size_t lineC=0;
		for (auto &in : entropyMat)
		{
			//We have to rerun each vec at least all images times
			//Possible-vec is size of all images, each entry representing one image
			//pair.first for begin-block, pair.second for end-block
			std::vector<std::pair<size_t, size_t>> possible(results.size(), std::pair<size_t,size_t>(0,0));
			std::pair<size_t, size_t> occCounter(0,0);
			for (auto &moduloEntry : in)
			{
				if (moduloEntry.second.size()>0)
				{
					if (moduloEntry.first == true)
					{
						++occCounter.first;
					}
					else
					{
						++occCounter.second;
					}
				}
				for (auto &modVecEntry : moduloEntry.second)
				{
					if (moduloEntry.first == true)
					{
						++possible.at(modVecEntry).first;
					}
					else
					{
						++possible.at(modVecEntry).second;
					}
				}
			}

			//Check if the probability is high enough to determine the entry
			for (size_t entry = 0; entry < results.size(); ++entry)
			{
				short begin=-1;
				if (possible.at(entry).first == 0 && possible.at(entry).second == 0)
					continue;
				if (occCounter.second > occCounter.first)
				{
					if ((float)possible.at(entry).second/(float)occCounter.second >= probability)
					{
						begin = 0;
					}
				}
				else if (begin == -1 && occCounter.first>0)
				{
					if ((float)possible.at(entry).first/(float)occCounter.first >= probability)
					{
						begin = 1;
					}
				}
				if (begin != -1)
				{
					//We found something
					possible.at(entry).first = 0;
					possible.at(entry).second = 0;
					stripingMap.at(entropyMatRunner).at(entry).isParity = false;
					if (begin == 1)
					{
						stripingMap.at(entropyMatRunner).at(entry).dataBlock = referenceCounters.at(entropyMatRunner).first++;
					}
					else
					{
						stripingMap.at(entropyMatRunner).at(entry).dataBlock = referenceCounters.at(entropyMatRunner).second--;
					}
					--posValues.at(entropyMatRunner);

					//Evrything fine, kill each entry in line because we found an entry
					for (auto &moduloEntry : in)
					{
						if (posValues.at(entropyMatRunner) == 0)
						{
							moduloEntry.second.clear();
						}
						for (size_t burn = 0; burn < moduloEntry.second.size();)
						{
							if (moduloEntry.second.at(burn) == entry)
							{
								moduloEntry.second.erase(moduloEntry.second.begin()+burn);
							}
							else
							{
								++burn;
							}
						}
					}
					probability = 1.0f;
					break;
				}
			}
			if (posValues.at(entropyMatRunner) == 1)
			{
				for (size_t i = 0; i < stripingMap.at(entropyMatRunner).size(); ++i)
				{
					if (stripingMap.at(entropyMatRunner).at(i).dataBlock == -1)
					{
						stripingMap.at(entropyMatRunner).at(i).dataBlock = referenceCounters.at(entropyMatRunner).first++;
						posValues.at(entropyMatRunner) = 0;
						for (auto &moduloEntry : in)
							moduloEntry.second.clear();
						break;
					}
				}
			}
			++lineC;
			++entropyMatRunner;
		}
		probability -= 0.05f;

		//Another approach, only for Raid5; Depends on left-right and symm-asymm builds
		if (isRaid5 == true)
		{
			int curNum = -1;
			for (size_t i = 1; i < stripingMap.size(); ++i)
			{
				for (size_t j = 0; j < stripingMap.at(i).size(); ++j)
				{
					if (stripingMap.at(i).at(j).isParity == true)
					{
						//Get upper datablocknum
						int tmp = stripingMap.at(i-1).at(j).dataBlock;
						if (tmp != -1)
						{
							if (curNum == -1)
							{
								curNum = tmp;
							}
							else //we found a block
							{
								if (tmp > curNum)
								{
									asymm_symm = 1;
									leftRight = 2;
								}
								else if (tmp < curNum)
								{
									asymm_symm = 1;
									leftRight = 1;
								}
								else
								{
									asymm_symm = 2;
									if (tmp == 0)
									{
										leftRight = 2;
									}
									else if (tmp == (int)(inFiles.size()-1))
									{
										leftRight = 1;
									}
									else
									{
										std::cerr << "Error in stripingMap building algorithm" << std::endl;
										return std::vector<std::vector<mapEntry>>();
									}
								}
							}
						}
					}
				}
			}
		}
		if (leftRight != 0 && asymm_symm != 0)
			break;
	}

	//Error, should not happen
	if (leftRight == 0 && asymm_symm == 0 && isRaid5 == true)
	{
		std::cerr << "Couldnt determine stripemap type" << std::endl;
		return std::vector<std::vector<mapEntry>>();
	}

	//Build resulting Stripemap from the found information
	if (isRaid5 == true)
	{
		std::vector<size_t> order;
		if (leftRight == 2)
		{
			for (size_t i = 0; i < parityDist.size(); ++i)
			{
				order.push_back(parityDist.at(i));
			}
		}
		else
		{
			for (size_t i = 0; i < parityDist.size(); ++i)
			{
				order.push_back(parityDist.at(parityDist.size()-(i+1)));
			}
		}

		//Fill the stripemap
		for (size_t i = 0; i < stripingMap.size(); ++i)
		{
			size_t counter;
			if (asymm_symm == 1)
			{
				counter = 0;
			}
			else
			{
				if (leftRight == 1)
				{
					counter = i;
				}
				else
				{
					counter = inFiles.size()-(i-1);
				}
			}
			for (size_t j = 0; j < stripingMap.at(i).size(); ++j)
			{
				if (stripingMap.at(i).at(order.at(j)).isParity == false)
				{
					stripingMap.at(i).at(order.at(j)).dataBlock = counter;
					counter = (counter+1)%(inFiles.size()-1);
				}
			}
		}
	}
	//Else, ask user
	userStripeMapInteraction(stripingMap);
	return stripingMap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl %edx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, 0xb8(%rsp)
movq 0x48(%rsi), %r14
subq 0x40(%rsi), %r14
sarq $0x3, %r14
leaq 0x130(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
movq %r14, %rsi
callq 0xd6fa
movq 0x48(%rbx), %rsi
movq %rbx, 0x30(%rsp)
subq 0x40(%rbx), %rsi
sarq $0x3, %rsi
leaq 0x48(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0xd770
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
andq %rax, %r14
movq %r14, 0x40(%rsp)
movq 0x30(%rsp), %rcx
je 0x9a92
movl $0x8, %ebp
xorl %ebx, %ebx
xorl %r15d, %r15d
movq 0x40(%rcx), %rax
movq 0x48(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0xa8a1
movq (%rax,%r15,8), %rdi
movq 0x60(%rcx), %rsi
callq 0x1095e
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movl $0x58, %edi
callq 0x53d0
movq %rax, %r12
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r12)
leaq 0x130ca(%rip), %rax     # 0x1c900
movq %rax, (%r12)
leaq 0x10(%r12), %r13
movq %rbx, 0x18(%r12)
movl %ebx, 0x20(%r12)
movb $0x0, 0x24(%r12)
movl %ebx, 0x28(%r12)
movq %rbx, 0x30(%r12)
movl %ebx, 0x38(%r12)
leaq 0x130eb(%rip), %rax     # 0x1c950
movq %rax, 0x10(%r12)
movl $0x30, %edi
callq 0x53d0
movq %rax, %r14
movq %rax, %rdi
callq 0xf0da
movq %r14, 0x40(%r12)
movq %r15, 0x48(%r12)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%r12)
movq $0x0, 0x60(%rsp)
movl $0x20, %edi
callq 0x53d0
leaq 0x130fb(%rip), %rcx     # 0x1c9a8
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
leaq 0x32ef(%rip), %rcx      # 0xcbaa
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq %rax, 0x80(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0x5340
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x98f6
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x30(%r12)
jne 0xa8b2
movq 0x60(%rsp), %rax
movq %rax, 0x30(%r12)
movq %r13, 0xe0(%rsp)
movq %r12, 0xe8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xf646
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x9943
callq 0xde06
movq 0x130(%rsp), %rax
movaps 0xc0(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0xc0(%rsp)
movq (%rax,%rbp), %rdi
movups %xmm0, -0x8(%rax,%rbp)
testq %rdi, %rdi
je 0x9971
callq 0xde06
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x9983
callq 0xde06
incq %r15
addq $0x10, %rbp
cmpq %r15, 0x40(%rsp)
movq 0x30(%rsp), %rcx
jne 0x97e3
movl $0x10, %ebx
xorl %r14d, %r14d
leaq 0x60(%rsp), %r12
leaq 0xe0(%rsp), %r13
xorl %r15d, %r15d
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0xa8b7
addq %r14, %rsi
movq %r12, %rdi
callq 0xd7ee
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0xa8c8
movq (%rax,%rbx), %rcx
movaps 0x60(%rsp), %xmm0
movups -0x10(%rax,%rbx), %xmm1
movups %xmm0, -0x10(%rax,%rbx)
movq 0x70(%rsp), %rdx
movq %rdx, (%rax,%rbx)
movaps %xmm1, 0xe0(%rsp)
movq %rcx, 0xf0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movq %r13, %rdi
callq 0xd85c
movq %r12, %rdi
callq 0xd85c
movq 0x30(%rsp), %rcx
movq 0x40(%rcx), %rax
movq 0x48(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0xa8d9
movq (%rax,%r15,8), %rdi
movq 0x60(%rcx), %rsi
callq 0x1095e
incq %r15
addq $0x10, %r14
addq $0x18, %rbx
cmpq %r15, 0x40(%rsp)
jne 0x99bc
movq 0x13517(%rip), %rdi     # 0x1cfb0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x134fc(%rip), %rdi     # 0x1cfb0
callq 0x5040
movq %rax, %rdi
callq 0x5260
movq 0x134e8(%rip), %rbx     # 0x1cfb0
leaq 0xb311(%rip), %rsi      # 0x14de0
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x5450
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x134b6(%rip), %rdi     # 0x1cfb0
callq 0x5040
movq %rax, %rdi
callq 0x5260
xorps %xmm0, %xmm0
leaq 0xe0(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x50(%rsp), %rsi
subq 0x48(%rsp), %rsi
sarq $0x3, %rsi
imulq %rbp, %rsi
callq 0xd8a2
leaq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0xc0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq 0x30(%rsp), %rsi
callq 0xaaec
movq 0x50(%rsp), %r14
movq 0x48(%rsp), %rcx
xorl %esi, %esi
movq %r14, %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq %rsi, 0x90(%rsp)
movq %rsi, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
subq %rcx, %rax
je 0x9d7f
sarq $0x3, %rax
imulq %rbp, %rax
movzbl 0x8(%rsp), %r12d
notq %r12
addq %rax, %r12
xorl %r13d, %r13d
leaq 0x100(%rsp), %rbx
leaq 0x10(%rsp), %r15
movq $0x0, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq 0x108(%rsp), %rsi
cmpq 0x110(%rsp), %rsi
je 0x9bf0
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x108(%rsp)
jmp 0x9bfb
movq %rbx, %rdi
movq %r15, %rdx
callq 0xf93a
incq %r13
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %rax
movq %rax, %rsi
subq %r14, %rsi
sarq $0x3, %rsi
imulq %rbp, %rsi
cmpq %rsi, %r13
jb 0x9bbd
cmpq %r14, %rax
je 0x9d7f
xorl %ebx, %ebx
leaq 0x80(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xa0(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpq %r14, %rax
je 0x9d34
xorl %r14d, %r14d
cmpb $0x0, 0x8(%rsp)
je 0x9cab
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0xa84e
cmpq (%rax,%rbx,8), %r14
jne 0x9cd7
movb $0x1, 0xa0(%rsp)
movl $0xfffffffe, 0xa4(%rsp) # imm = 0xFFFFFFFE
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x9cf6
movq %r12, %rdi
movq %r13, %rdx
callq 0xfa72
jmp 0x9d07
movb $0x0, 0xa0(%rsp)
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x9cf6
movq %r12, %rdi
movq %r13, %rdx
callq 0xfa72
jmp 0x9d07
movb $0x0, 0xa0(%rsp)
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x9d27
movq 0xa0(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x18(%rsp)
movq 0x50(%rsp), %rax
subq 0x48(%rsp), %rax
incq %r14
sarq $0x3, %rax
imulq %rbp, %rax
cmpq %rax, %r14
jb 0x9c58
jmp 0x9d34
movq %r12, %rdi
movq %r13, %rdx
callq 0xfa72
jmp 0x9d07
movq %r15, %rdi
movq %r12, %rsi
callq 0xd91e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9d4e
callq 0x5390
cmpb $0x0, 0x8(%rsp)
je 0xa4f4
incq %rbx
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %rax
movq %rax, %rsi
subq %r14, %rsi
sarq $0x3, %rsi
imulq %rbp, %rsi
cmpq %rsi, %rbx
jb 0x9c3b
jmp 0x9d8d
movq %r14, %rbx
cmpb $0x0, 0x8(%rsp)
je 0xa4fe
leaq -0x1(%rsi), %rax
leaq 0xa0(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0xd94a
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x30(%rsp), %rdi
subq %r15, %r13
sarq $0x3, %r13
movss 0xac87(%rip), %xmm0     # 0x14a50
movq $0x0, 0x78(%rsp)
movl $0x0, 0x4(%rsp)
movq %r15, 0x40(%rsp)
movq %r13, 0x120(%rsp)
ucomiss 0xac66(%rip), %xmm0     # 0x14a54
jbe 0xa3fb
movss %xmm0, 0x3c(%rsp)
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %rax
movq %rax, 0x128(%rsp)
cmpq %rax, %r14
je 0xa274
xorl %ebx, %ebx
movq 0x50(%rsp), %rsi
subq 0x48(%rsp), %rsi
sarq $0x3, %rsi
imulq %rbp, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0xdaa2
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0x9ee2
movq %r12, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
movss 0x3c(%rsp), %xmm3
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %r9
cmpq %r8, %r9
je 0x9ed7
movzbl (%rdi), %r10d
addq %r10, %rax
movq %r10, %rdx
xorq $0x1, %rdx
addq %rdx, %rcx
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %rdx
subq %r11, %rdx
sarq $0x4, %rdx
movq (%r8), %rsi
testb %r10b, %r10b
je 0x9eb7
cmpq %rsi, %rdx
jbe 0xa7de
shlq $0x4, %rsi
addq %r11, %rsi
jmp 0x9ecb
cmpq %rsi, %rdx
jbe 0xa7de
shlq $0x4, %rsi
addq %r11, %rsi
addq $0x8, %rsi
incq (%rsi)
addq $0x8, %r8
cmpq %r9, %r8
jne 0x9e9d
addq $0x20, %rdi
cmpq %r13, %rdi
jne 0x9e6e
jmp 0x9eec
xorl %eax, %eax
xorl %ecx, %ecx
movss 0x3c(%rsp), %xmm3
movq 0x50(%rsp), %rdx
subq 0x48(%rsp), %rdx
je 0xa17c
testq %rax, %rax
js 0x9f0b
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x9f25
movq %rax, %rsi
shrq %rsi
movl %eax, %edi
andl $0x1, %edi
orq %rsi, %rdi
xorps %xmm0, %xmm0
cvtsi2ss %rdi, %xmm0
addss %xmm0, %xmm0
testq %rcx, %rcx
js 0x9f31
cvtsi2ss %rcx, %xmm1
jmp 0x9f48
movq %rcx, %rsi
shrq %rsi
movl %ecx, %edi
andl $0x1, %edi
orq %rsi, %rdi
cvtsi2ss %rdi, %xmm1
addss %xmm1, %xmm1
sarq $0x3, %rdx
imulq %rbp, %rdx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
sarq $0x4, %rsi
cmpq $0x1, %rdx
adcq $0x0, %rdx
addq $0x8, %rdi
xorl %ebp, %ebp
cmpq %rbp, %rsi
je 0xa7ec
movq -0x8(%rdi), %r8
testq %r8, %r8
jne 0x9f87
cmpq $0x0, (%rdi)
je 0x9ff3
cmpq %rax, %rcx
jbe 0x9f9e
movq (%rdi), %r8
testq %r8, %r8
js 0x9fb2
xorps %xmm2, %xmm2
cvtsi2ss %r8, %xmm2
jmp 0x9fcb
testq %rax, %rax
je 0x9ff3
testq %r8, %r8
js 0x9fd1
xorps %xmm2, %xmm2
cvtsi2ss %r8, %xmm2
jmp 0x9fea
movq %r8, %r9
shrq %r9
andl $0x1, %r8d
orq %r9, %r8
xorps %xmm2, %xmm2
cvtsi2ss %r8, %xmm2
addss %xmm2, %xmm2
divss %xmm1, %xmm2
jmp 0x9fee
movq %r8, %r9
shrq %r9
andl $0x1, %r8d
orq %r9, %r8
xorps %xmm2, %xmm2
cvtsi2ss %r8, %xmm2
addss %xmm2, %xmm2
divss %xmm0, %xmm2
ucomiss %xmm3, %xmm2
jae 0xa008
incq %rbp
addq $0x10, %rdi
cmpq %rbp, %rdx
jne 0x9f6f
jmp 0xa17c
xorps %xmm0, %xmm0
movups %xmm0, -0x8(%rdi)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
cmpq %rbx, %rdx
jbe 0xa849
leaq (%rbx,%rbx,2), %rdx
movq (%rdi,%rdx,8), %rsi
movq 0x8(%rdi,%rdx,8), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
cmpq %rbp, %rdx
jbe 0xa888
movb $0x0, (%rsi,%rbp,8)
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
cmpq %rax, %rcx
jbe 0xa09a
cmpq %rbx, %rdx
jbe 0xa849
movq %rbx, %rax
shlq $0x4, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq $-0x1, %rax
jmp 0xa0b2
cmpq %rbx, %rdx
jbe 0xa849
movq %rbx, %rax
shlq $0x4, %rax
addq %rax, %rdi
movl $0x1, %eax
movq (%rdi), %rcx
addq %rcx, %rax
movq %rax, (%rdi)
movl %ecx, 0x4(%rsi,%rbp,8)
cmpq %rbx, 0x120(%rsp)
jbe 0xa878
movq (%r15,%rbx,8), %rax
decq %rax
movq %rax, (%r15,%rbx,8)
movss 0xa970(%rip), %xmm3     # 0x14a50
cmpq %r13, %r12
je 0xa17c
testq %rax, %rax
je 0xa144
movq 0x8(%r12), %rax
movq 0x10(%r12), %rdx
cmpq %rax, %rdx
je 0xa158
xorl %r15d, %r15d
cmpq %rbp, (%rax,%r15,8)
jne 0xa12b
leaq (%rax,%r15,8), %rdi
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0xa120
subq %rsi, %rdx
callq 0x55d0
movq 0x10(%r12), %rdx
addq $-0x8, %rdx
movq %rdx, 0x10(%r12)
jmp 0xa12e
incq %r15
movq 0x8(%r12), %rax
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jb 0xa100
jmp 0xa158
movq 0x8(%r12), %rax
movq 0x10(%r12), %rdx
cmpq %rax, %rdx
je 0xa0f8
movq %rax, 0x10(%r12)
addq $0x20, %r12
cmpq %r13, %r12
je 0xa16f
movq 0x40(%rsp), %rax
movq (%rax,%rbx,8), %rax
jmp 0xa0e9
movss 0xa8d9(%rip), %xmm3     # 0x14a50
movq 0x40(%rsp), %r15
movq 0x120(%rsp), %r13
cmpq %r13, %rbx
je 0xa824
movss %xmm3, 0x3c(%rsp)
cmpq $0x1, (%r15,%rbx,8)
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
jne 0xa1ef
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %rbx, %rdx
jbe 0xa838
leaq (%rbx,%rbx,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rdx
subq %rax, %rdx
je 0xa1ef
sarq $0x3, %rdx
xorl %ecx, %ecx
cmpl $-0x1, 0x4(%rax,%rcx,8)
je 0xa215
incq %rcx
cmpq %rcx, %rdx
jne 0xa1e0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xa1fe
callq 0x5390
incq %rbx
addq $0x18, %r14
cmpq 0x128(%rsp), %r14
jne 0x9e1d
jmp 0xa274
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
cmpq %rbx, %rdx
jbe 0xa838
movq %rbx, %rdx
shlq $0x4, %rdx
movq (%rsi,%rdx), %rdi
leaq 0x1(%rdi), %r8
movq %r8, (%rsi,%rdx)
movl %edi, 0x4(%rax,%rcx,8)
movq $0x0, (%r15,%rbx,8)
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0xa1ef
movq 0x8(%rax), %rdx
cmpq %rdx, 0x10(%rax)
je 0xa26e
movq %rdx, 0x10(%rax)
addq $0x20, %rax
jmp 0xa25b
movss 0x3c(%rsp), %xmm0
addss 0xa7d6(%rip), %xmm0     # 0x14a58
cmpb $0x0, 0x8(%rsp)
je 0xa386
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq $0x2, %rdx
jb 0xa386
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rdi
subq 0x40(%rax), %rdi
shrq $0x3, %rdi
decl %edi
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl $0x1, %r8d
cmpq %rdx, %r8
je 0xa890
leaq (%r8,%r8,2), %rax
movq (%rcx,%rax,8), %r10
movq 0x8(%rcx,%rax,8), %r11
subq %r10, %r11
je 0xa37a
sarq $0x3, %r11
leaq (%rcx,%rax,8), %rbx
xorl %esi, %esi
cmpb $0x1, (%r10,%rsi,8)
jne 0xa351
movq -0x18(%rbx), %r14
movq -0x10(%rbx), %rax
subq %r14, %rax
sarq $0x3, %rax
cmpq %rsi, %rax
jbe 0xa813
movl 0x4(%r14,%rsi,8), %eax
cmpl $-0x1, %eax
je 0xa351
cmpl $-0x1, %r9d
je 0xa338
cmpl %r9d, %eax
jle 0xa33d
movl $0x2, 0x4(%rsp)
jmp 0xa347
movl %eax, %r9d
jmp 0xa351
movl $0x1, 0x4(%rsp)
jge 0xa35b
movl $0x1, %eax
movq %rax, 0x78(%rsp)
incq %rsi
cmpq %rsi, %r11
jne 0xa2fa
jmp 0xa37a
movl $0x2, %r14d
movq %r14, 0x78(%rsp)
testl %eax, %eax
je 0xa370
cmpl %edi, %eax
je 0xa351
jmp 0xa3a8
movl $0x2, 0x4(%rsp)
jmp 0xa351
incq %r8
cmpq %rdx, %r8
jne 0xa2d1
cmpl $0x0, 0x4(%rsp)
setne %al
cmpl $0x0, 0x78(%rsp)
setne %cl
testb %cl, %al
movq 0x30(%rsp), %rdi
je 0x9de7
jmp 0xa461
movq 0x12c41(%rip), %rbx     # 0x1cff0
leaq 0xaa49(%rip), %rsi      # 0x14dff
movl $0x27, %edx
movq %rbx, %rdi
callq 0x5450
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x12c0f(%rip), %rdi     # 0x1cff0
callq 0x5040
movq %rax, %rdi
callq 0x5260
movq 0xb8(%rsp), %rbx
jmp 0xa74a
movl 0x4(%rsp), %eax
orl 0x78(%rsp), %eax
sete %al
andb 0x8(%rsp), %al
cmpb $0x1, %al
jne 0xa461
movq 0x12bdb(%rip), %rbx     # 0x1cff0
leaq 0xaa0b(%rip), %rsi      # 0x14e27
movl $0x20, %edx
movq %rbx, %rdi
callq 0x5450
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x12ba9(%rip), %rdi     # 0x1cff0
callq 0x5040
movq %rax, %rdi
callq 0x5260
movq 0xb8(%rsp), %rbx
jmp 0xa74a
cmpb $0x0, 0x8(%rsp)
je 0xa71b
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpl $0x2, 0x4(%rsp)
jne 0xa5bd
cmpq %rax, %rcx
je 0xa623
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbx
xorl %r15d, %r15d
leaq (%rax,%r14), %rdx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0xa4c7
movq (%rdx), %rdx
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0xa4d9
movq %rbx, %rdi
callq 0xe340
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
addq $0x8, %r14
cmpq %rdx, %r15
jb 0xa4a6
jmp 0xa623
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %rbx
movl $0x8, %edi
callq 0x53d0
movq %rax, %r15
subq %r14, %rbx
sarq $0x3, %rbx
imulq %rbp, %rbx
movq %rbx, (%rax)
movq %rax, %r13
addq $0x8, %r13
leaq 0xc0(%rsp), %rbx
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %rbp, %rcx
cmpq $0x2, %rcx
jb 0x9db5
movq %r15, %r12
movq $-0x1, %r14
xorl %r15d, %r15d
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
incq %r14
cmpq %rcx, %r14
jae 0xa5a6
addq %r15, %rsi
movq %rax, %rdi
callq 0xda6a
addq $0x20, %r15
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq $0x1, %rdx
ja 0xa55a
jmp 0xa7fd
addq $0x18, %rax
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %r15
callq 0xffa6
jmp 0xa528
movq %rcx, %rdx
subq %rax, %rdx
je 0xa623
sarq $0x3, %rdx
movq $-0x1, %r14
xorl %r12d, %r12d
leaq 0x10(%rsp), %rbx
addq %r14, %rdx
leaq (%rax,%rdx,8), %rdx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0xa5fc
movq (%rdx), %rdx
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0xa60e
movq %rbx, %rdi
callq 0xe340
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
incq %r12
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
decq %r14
cmpq %rdx, %r12
jb 0xa5d8
movq 0x80(%rsp), %r8
movq 0x88(%rsp), %r9
movq 0x10(%rsp), %rdi
subq %r8, %r9
je 0xa707
sarq $0x3, %r9
imulq %rbp, %r9
movq 0x30(%rsp), %rax
movq 0x48(%rax), %r10
subq 0x40(%rax), %r10
sarq $0x3, %r10
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
cmpq $0x1, %r9
adcq $0x0, %r9
xorl %r11d, %r11d
xorl %ebx, %ebx
leaq (%rbx,%rbx,2), %rax
movq (%r8,%rax,8), %r14
movq 0x8(%r8,%rax,8), %rcx
subq %r14, %rcx
je 0xa6fb
sarq $0x3, %rcx
movq %r10, %rax
subq %rbx, %rax
incq %rax
cmpl $0x1, 0x4(%rsp)
cmoveq %rbx, %rax
cmpl $0x1, 0x78(%rsp)
cmoveq %r11, %rax
movq 0x30(%rsp), %rdx
movq 0x48(%rdx), %r15
subq 0x40(%rdx), %r15
sarq $0x3, %r15
decq %r15
cmpq $0x1, %rcx
movq %rcx, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
cmpq %r13, %rsi
je 0xa85f
movq (%rdi,%r13,8), %rdx
cmpq %rdx, %rcx
jbe 0xa864
cmpb $0x0, (%r14,%rdx,8)
jne 0xa6f3
movl %eax, 0x4(%r14,%rdx,8)
incq %rax
xorl %edx, %edx
divq %r15
movq %rdx, %rax
incq %r13
cmpq %r13, %r12
jne 0xa6c6
incq %rbx
cmpq %r9, %rbx
jne 0xa673
testq %rdi, %rdi
je 0xa711
callq 0x5390
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %r15
leaq 0x80(%rsp), %rbx
movq %rbx, %rsi
callq 0xb930
movaps 0x80(%rsp), %xmm0
movq 0xb8(%rsp), %rcx
movups %xmm0, (%rcx)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
testq %r15, %r15
je 0xa765
movq %r15, %rdi
callq 0x5390
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xa777
callq 0x5390
leaq 0x80(%rsp), %rdi
callq 0x7dda
leaq 0xc0(%rsp), %rdi
callq 0xdb2a
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa7a0
callq 0x5390
leaq 0xe0(%rsp), %rdi
callq 0xdb2a
leaq 0x48(%rsp), %rdi
callq 0xdb6a
leaq 0x130(%rsp), %rdi
callq 0xdbaa
movq 0xb8(%rsp), %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0e4(%rip), %rdi      # 0x148c9
xorl %eax, %eax
callq 0x5570
movq %rsi, %rdx
leaq 0xa0d3(%rip), %rdi      # 0x148c9
xorl %eax, %eax
callq 0x5570
leaq 0xa0c5(%rip), %rdi      # 0x148c9
movl $0x1, %esi
xorl %eax, %eax
movq %r12, %r15
callq 0x5570
leaq 0xa0af(%rip), %rdi      # 0x148c9
movq %rax, %rdx
xorl %eax, %eax
callq 0x5570
leaq 0xa09e(%rip), %rdi      # 0x148c9
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x5570
leaq 0xa08a(%rip), %rdi      # 0x148c9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5570
movq %rbx, %rsi
jmp 0xa7ef
leaq 0xa074(%rip), %rdi      # 0x148c9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5570
movq %rsi, %rcx
jmp 0xa867
movq %rdx, %rsi
leaq 0xa05b(%rip), %rdi      # 0x148c9
movq %rcx, %rdx
xorl %eax, %eax
callq 0x5570
movq %rbx, %rsi
movq 0x120(%rsp), %rdx
jmp 0xa7ef
movq %rbp, %rsi
jmp 0xa7ef
leaq 0xa032(%rip), %rdi      # 0x148c9
movq %rdx, %rsi
xorl %eax, %eax
callq 0x5570
leaq 0xa021(%rip), %rdi      # 0x148c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
callq 0x50e0
leaq 0xa00b(%rip), %rdi      # 0x148c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
leaq 0x9ffa(%rip), %rdi      # 0x148c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
leaq 0x9fe9(%rip), %rdi      # 0x148c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
jmp 0xa91f
jmp 0xa91f
jmp 0xaa34
jmp 0xaa34
jmp 0xaa51
movq %rax, %rbx
jmp 0xaab0
movq %rax, %rbx
jmp 0xaabf
movq %rax, %rbx
jmp 0xaad6
jmp 0xaa23
jmp 0xa9e9
movq %rax, %rbx
jmp 0xaa84
jmp 0xaa23
jmp 0xaa23
jmp 0xaa56
jmp 0xa9e9
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xd85c
jmp 0xaacc
jmp 0xa9e9
jmp 0xa9e9
jmp 0xa9e9
jmp 0xa9e9
movq %rax, %rbx
jmp 0xaa00
movq %rdx, %r14
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xa98a
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xa98a
movq %rdx, %r14
movq %rax, %rbx
movq %r12, %rdi
addq $0x40, %rdi
callq 0xf0fc
jmp 0xa99e
movq %rdx, %r14
movq %rax, %rbx
movq %r13, %rdi
callq 0xe52e
movq %r12, %rdi
callq 0x5390
jmp 0xa9b6
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0xaa00
movq %rbx, %rdi
callq 0x5150
leaq 0x10(%rax), %rbx
callq 0x51b0
leaq 0x60(%rsp), %rsi
movl $0xb, (%rsi)
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0xe475
callq 0x5530
movq %rax, %rbx
jmp 0xaacc
jmp 0xaa23
movq %rax, %rbx
jmp 0xaa46
movq %rax, %rbx
callq 0x55e0
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xaacc
callq 0xde06
jmp 0xaacc
movq %rax, %rdi
callq 0xde75
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jne 0xaa7f
jmp 0xaa84
jmp 0xaa65
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaa46
callq 0x5390
movq 0x40(%rsp), %r15
jmp 0xaa77
jmp 0xaa65
jmp 0xaa51
movq %rax, %rbx
jmp 0xaa77
movq %rax, %rbx
jmp 0xaa7c
movq %rax, %rbx
movq %r12, %r15
jmp 0xaa7c
jmp 0xaa65
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaa77
callq 0x5390
testq %r15, %r15
je 0xaa84
movq %r15, %rdi
callq 0x5390
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xaa96
callq 0x5390
leaq 0x80(%rsp), %rdi
callq 0x7dda
leaq 0xc0(%rsp), %rdi
callq 0xdb2a
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xaabf
callq 0x5390
leaq 0xe0(%rsp), %rdi
callq 0xdb2a
leaq 0x48(%rsp), %rdi
callq 0xdb6a
leaq 0x130(%rsp), %rdi
callq 0xdbaa
movq %rbx, %rdi
callq 0x5650
nop