// File: 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:
subq $0x738, %rsp            # imm = 0x738
movq %rdi, 0x300(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x308(%rsp)
movq %rdi, 0x730(%rsp)
movq %rsi, 0x728(%rsp)
andb $0x1, %al
movb %al, 0x727(%rsp)
movq 0x728(%rsp), %rdi
movq %rdi, 0x310(%rsp)
movq %rdi, 0x718(%rsp)
addq $0x40, %rdi
movq %rdi, 0x318(%rsp)
callq 0x9d50
movl %eax, 0x714(%rsp)
leaq 0x6f8(%rsp), %rdi
callq 0x195d0
movq 0x318(%rsp), %rdi
callq 0x9d50
movq %rax, 0x320(%rsp)
leaq 0x6df(%rsp), %rdi
movq %rdi, 0x328(%rsp)
callq 0x195e0
movq 0x320(%rsp), %rsi
movq 0x328(%rsp), %rdx
leaq 0x6e0(%rsp), %rdi
callq 0x195f0
jmp 0xe15b
leaq 0x6df(%rsp), %rdi
callq 0x19670
movq 0x310(%rsp), %rdi
addq $0x40, %rdi
callq 0x9d50
movq %rax, 0x2f0(%rsp)
leaq 0x6af(%rsp), %rdi
movq %rdi, 0x2f8(%rsp)
callq 0x19680
movq 0x2f0(%rsp), %rsi
movq 0x2f8(%rsp), %rdx
leaq 0x6b0(%rsp), %rdi
callq 0x19690
jmp 0xe1b5
leaq 0x6af(%rsp), %rdi
callq 0x19710
movq $0x0, 0x6a0(%rsp)
movq 0x6a0(%rsp), %rax
movl 0x714(%rsp), %ecx
cmpq %rcx, %rax
jae 0xe2fb
movq 0x310(%rsp), %rdi
addq $0x40, %rdi
movq 0x6a0(%rsp), %rsi
callq 0x9d70
movq %rax, 0x2e8(%rsp)
jmp 0xe209
movq 0x310(%rsp), %rax
movq 0x2e8(%rsp), %rcx
movq (%rcx), %rdi
movq 0x60(%rax), %rsi
callq 0x2fed0
jmp 0xe227
leaq 0x690(%rsp), %rdi
movl $0x1, %esi
leaq 0x718(%rsp), %rdx
leaq 0x6a0(%rsp), %rcx
callq 0x10170
jmp 0xe24b
movq 0x6a0(%rsp), %rsi
leaq 0x6e0(%rsp), %rdi
callq 0x19720
movq %rax, %rdi
leaq 0x690(%rsp), %rsi
callq 0x19740
leaq 0x690(%rsp), %rdi
callq 0x19790
movq 0x6a0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x6a0(%rsp)
jmp 0xe1ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x6df(%rsp), %rdi
callq 0x19670
jmp 0x1014c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x6af(%rsp), %rdi
callq 0x19710
jmp 0x1013f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
jmp 0x10132
movq $0x0, 0x688(%rsp)
movq 0x688(%rsp), %rax
movl 0x714(%rsp), %ecx
cmpq %rcx, %rax
jae 0xe420
movq 0x688(%rsp), %rsi
leaq 0x6e0(%rsp), %rdi
callq 0x197a0
movq %rax, 0x2e0(%rsp)
jmp 0xe33e
movq 0x2e0(%rsp), %rsi
leaq 0x670(%rsp), %rdi
callq 0x197e0
jmp 0xe355
movq 0x688(%rsp), %rsi
leaq 0x6b0(%rsp), %rdi
callq 0x19870
movq %rax, 0x2d8(%rsp)
jmp 0xe374
movq 0x2d8(%rsp), %rdi
leaq 0x670(%rsp), %rsi
movq %rsi, 0x2c8(%rsp)
callq 0x198b0
movq 0x2c8(%rsp), %rdi
callq 0x198f0
movq 0x310(%rsp), %rdi
addq $0x40, %rdi
movq 0x688(%rsp), %rsi
callq 0x9d70
movq %rax, 0x2d0(%rsp)
jmp 0xe3c1
movq 0x310(%rsp), %rax
movq 0x2d0(%rsp), %rcx
movq (%rcx), %rdi
movq 0x60(%rax), %rsi
callq 0x2fed0
jmp 0xe3df
jmp 0xe3e1
movq 0x688(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x688(%rsp)
jmp 0xe307
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x670(%rsp), %rdi
callq 0x198f0
jmp 0x10132
movq 0x45b89(%rip), %rdi     # 0x53fb0
movq 0x45b42(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0xe435
movq 0x45b74(%rip), %rdi     # 0x53fb0
leaq 0x2d1b5(%rip), %rsi     # 0x3b5f8
callq 0x6420
movq %rax, 0x2c0(%rsp)
jmp 0xe452
movq 0x2c0(%rsp), %rdi
movq 0x45b0f(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0xe468
leaq 0x658(%rsp), %rdi
movq %rdi, 0x2b8(%rsp)
callq 0x19950
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq 0x2b8(%rsp), %rdi
movq %rax, %rsi
callq 0x19960
jmp 0xe49c
leaq 0x640(%rsp), %rdi
movq %rdi, 0x2b0(%rsp)
callq 0x19a20
movq 0x310(%rsp), %rsi
movq 0x2b0(%rsp), %rcx
leaq 0x628(%rsp), %rdi
leaq 0x6b0(%rsp), %rdx
callq 0x10350
jmp 0xe4d8
leaq 0x610(%rsp), %rdi
callq 0x9be0
leaq 0x5f8(%rsp), %rdi
callq 0x19a30
leaq 0x5e8(%rsp), %rdi
callq 0x19a40
jmp 0xe501
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
subq $0x2, %rax
movq %rax, 0x5e0(%rsp)
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xe58c
movq 0x5e0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x5e0(%rsp)
jmp 0xe58c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
jmp 0x10125
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
jmp 0x10118
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
jmp 0x100f1
movq $0x0, 0x5d8(%rsp)
movq 0x5d8(%rsp), %rax
movq %rax, 0x2a8(%rsp)
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x2a8(%rsp), %rax
cmpq %rcx, %rax
jae 0xe621
movl $0x0, 0x5c4(%rsp)
leaq 0x5c8(%rsp), %rdi
leaq 0x5c4(%rsp), %rsi
leaq 0x5e0(%rsp), %rdx
callq 0x19a90
jmp 0xe5ef
leaq 0x5f8(%rsp), %rdi
leaq 0x5c8(%rsp), %rsi
callq 0x19a60
jmp 0xe606
jmp 0xe608
movq 0x5d8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x5d8(%rsp)
jmp 0xe598
movq $0x0, 0x5b8(%rsp)
movq 0x5b8(%rsp), %rax
movq %rax, 0x2a0(%rsp)
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x2a0(%rsp), %rax
cmpq %rcx, %rax
jae 0xe83b
leaq 0x5a0(%rsp), %rdi
callq 0x19ac0
movq $0x0, 0x598(%rsp)
movq 0x598(%rsp), %rax
movq %rax, 0x298(%rsp)
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x298(%rsp), %rax
cmpq %rcx, %rax
jae 0xe7c4
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xe77a
movq 0x5b8(%rsp), %rsi
leaq 0x640(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x290(%rsp)
jmp 0xe6dc
movq 0x290(%rsp), %rax
movq (%rax), %rax
cmpq 0x598(%rsp), %rax
jne 0xe749
leaq 0x590(%rsp), %rdi
movl $0x1, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x19b40
jmp 0xe70a
leaq 0x5a0(%rsp), %rdi
leaq 0x590(%rsp), %rsi
callq 0x19b10
jmp 0xe721
jmp 0xe778
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x5a0(%rsp), %rdi
callq 0xa910
jmp 0x100f1
leaq 0x588(%rsp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19b40
jmp 0xe75f
leaq 0x5a0(%rsp), %rdi
leaq 0x588(%rsp), %rsi
callq 0x19b10
jmp 0xe776
jmp 0xe778
jmp 0xe7a9
leaq 0x580(%rsp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19b40
jmp 0xe790
leaq 0x5a0(%rsp), %rdi
leaq 0x580(%rsp), %rsi
callq 0x19b10
jmp 0xe7a7
jmp 0xe7a9
jmp 0xe7ab
movq 0x598(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x598(%rsp)
jmp 0xe677
leaq 0x610(%rsp), %rdi
leaq 0x5a0(%rsp), %rsi
callq 0x19b70
jmp 0xe7db
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xe7f9
movl $0xb, 0x57c(%rsp)
jmp 0xe804
movl $0x0, 0x57c(%rsp)
leaq 0x5a0(%rsp), %rdi
callq 0xa910
movl 0x57c(%rsp), %eax
testl %eax, %eax
je 0xe820
jmp 0xe81e
jmp 0xe83b
jmp 0xe822
movq 0x5b8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x5b8(%rsp)
jmp 0xe62d
leaq 0x560(%rsp), %rdi
callq 0x19a20
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xe928
leaq 0x6b0(%rsp), %rdi
movq %rdi, 0x278(%rsp)
callq 0x19a00
movq 0x278(%rsp), %rdi
movq %rax, 0x280(%rsp)
callq 0x19a00
decq %rax
movq %rax, 0x540(%rsp)
leaq 0x53f(%rsp), %rdi
movq %rdi, 0x288(%rsp)
callq 0x19be0
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rcx
leaq 0x548(%rsp), %rdi
leaq 0x540(%rsp), %rdx
callq 0x19bf0
jmp 0xe8ce
leaq 0x560(%rsp), %rdi
leaq 0x548(%rsp), %rsi
callq 0x19c70
leaq 0x548(%rsp), %rdi
callq 0x19cb0
leaq 0x53f(%rsp), %rdi
callq 0x19d10
jmp 0xe9cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x53f(%rsp), %rdi
callq 0x19d10
jmp 0x100e4
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, 0x518(%rsp)
leaq 0x517(%rsp), %rdi
movq %rdi, 0x270(%rsp)
callq 0x19be0
movq 0x270(%rsp), %rcx
leaq 0x520(%rsp), %rdi
movl $0x1, %esi
leaq 0x518(%rsp), %rdx
callq 0x19bf0
jmp 0xe976
leaq 0x560(%rsp), %rdi
leaq 0x520(%rsp), %rsi
callq 0x19c70
leaq 0x520(%rsp), %rdi
callq 0x19cb0
leaq 0x517(%rsp), %rdi
callq 0x19d10
jmp 0xe9cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x517(%rsp), %rdi
callq 0x19d10
jmp 0x100e4
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xeba4
movq $0x1, 0x508(%rsp)
movq 0x508(%rsp), %rax
movq %rax, 0x268(%rsp)
leaq 0x628(%rsp), %rdi
callq 0x19d20
movq %rax, %rcx
movq 0x268(%rsp), %rax
cmpq %rcx, %rax
jae 0xeba2
movq $0x0, 0x500(%rsp)
movq 0x500(%rsp), %rax
movq %rax, 0x258(%rsp)
movq 0x508(%rsp), %rsi
leaq 0x628(%rsp), %rdi
callq 0x19d40
movq %rax, 0x260(%rsp)
jmp 0xea5a
movq 0x260(%rsp), %rdi
callq 0x19d80
movq %rax, %rcx
movq 0x258(%rsp), %rax
cmpq %rcx, %rax
jae 0xeb1f
xorl %eax, %eax
movl %eax, %esi
leaq 0x628(%rsp), %rdi
callq 0x19d40
movq %rax, 0x250(%rsp)
jmp 0xea96
movq 0x508(%rsp), %rsi
leaq 0x628(%rsp), %rdi
callq 0x19d40
movq %rax, 0x248(%rsp)
jmp 0xeab5
movq 0x248(%rsp), %rdi
movq 0x500(%rsp), %rsi
callq 0x19e10
movq %rax, 0x240(%rsp)
jmp 0xead4
movq 0x240(%rsp), %rsi
movq 0x250(%rsp), %rdi
callq 0x19da0
jmp 0xeaeb
jmp 0xeaed
movq 0x500(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x500(%rsp)
jmp 0xea2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
jmp 0x100e4
leaq 0x628(%rsp), %rdi
movq %rdi, 0x230(%rsp)
callq 0x19ec0
movq %rax, 0x4e8(%rsp)
movq 0x508(%rsp), %rsi
leaq 0x4e8(%rsp), %rdi
callq 0x19ef0
movq %rax, 0x4f0(%rsp)
leaq 0x4f8(%rsp), %rdi
leaq 0x4f0(%rsp), %rsi
callq 0x19f30
movq 0x230(%rsp), %rdi
movq 0x4f8(%rsp), %rsi
callq 0x19e50
movq %rax, 0x238(%rsp)
jmp 0xeb8d
movq 0x238(%rsp), %rax
movq %rax, 0x4e0(%rsp)
jmp 0xe9ee
jmp 0xeba4
movss 0x2bdcc(%rip), %xmm0    # 0x3a978
movss %xmm0, 0x4dc(%rsp)
movl $0x0, 0x4d8(%rsp)
movl $0x0, 0x4d4(%rsp)
movss 0x4dc(%rsp), %xmm0
movss 0x2bda0(%rip), %xmm1    # 0x3a97c
ucomiss %xmm1, %xmm0
jbe 0xfbfd
movq $0x0, 0x4c8(%rsp)
movq $0x0, 0x4c0(%rsp)
leaq 0x628(%rsp), %rax
movq %rax, 0x4b8(%rsp)
movq 0x4b8(%rsp), %rdi
callq 0x19ec0
movq %rax, 0x4b0(%rsp)
movq 0x4b8(%rsp), %rdi
callq 0x19f70
movq %rax, 0x4a8(%rsp)
leaq 0x4b0(%rsp), %rdi
leaq 0x4a8(%rsp), %rsi
callq 0x19fa0
testb $0x1, %al
jne 0xec55
jmp 0xf8d6
leaq 0x4b0(%rsp), %rdi
callq 0x19fe0
movq %rax, 0x4a0(%rsp)
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, 0x228(%rsp)
movl $0x0, 0x474(%rsp)
movl $0x0, 0x470(%rsp)
leaq 0x478(%rsp), %rdi
leaq 0x474(%rsp), %rsi
leaq 0x470(%rsp), %rdx
callq 0x19ff0
jmp 0xecb4
leaq 0x46f(%rsp), %rdi
movq %rdi, 0x220(%rsp)
callq 0x1a020
movq 0x228(%rsp), %rsi
movq 0x220(%rsp), %rcx
leaq 0x488(%rsp), %rdi
leaq 0x478(%rsp), %rdx
callq 0x1a030
jmp 0xecf0
leaq 0x46f(%rsp), %rdi
callq 0x1a0b0
movl $0x0, 0x454(%rsp)
movl $0x0, 0x450(%rsp)
leaq 0x458(%rsp), %rdi
leaq 0x454(%rsp), %rsi
leaq 0x450(%rsp), %rdx
callq 0x19ff0
jmp 0xed32
movq 0x4a0(%rsp), %rax
movq %rax, 0x448(%rsp)
movq 0x448(%rsp), %rdi
callq 0x1a0c0
movq %rax, 0x440(%rsp)
movq 0x448(%rsp), %rdi
callq 0x1a0f0
movq %rax, 0x438(%rsp)
leaq 0x440(%rsp), %rdi
leaq 0x438(%rsp), %rsi
callq 0x1a120
testb $0x1, %al
jne 0xed8a
jmp 0xef5f
leaq 0x440(%rsp), %rdi
callq 0x1a160
movq %rax, 0x430(%rsp)
movq 0x430(%rsp), %rdi
addq $0x8, %rdi
callq 0x1a170
cmpq $0x0, %rax
jbe 0xee46
movq 0x430(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xee30
movq 0x458(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x458(%rsp)
jmp 0xee44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x46f(%rsp), %rdi
callq 0x1a0b0
jmp 0x100e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x488(%rsp), %rdi
callq 0x1a3d0
jmp 0x100e4
movq 0x460(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x460(%rsp)
jmp 0xee46
movq 0x430(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x428(%rsp)
movq 0x428(%rsp), %rdi
callq 0x1a190
movq %rax, 0x420(%rsp)
movq 0x428(%rsp), %rdi
callq 0x1a1c0
movq %rax, 0x418(%rsp)
leaq 0x420(%rsp), %rdi
leaq 0x418(%rsp), %rsi
callq 0x1a1f0
testb $0x1, %al
jne 0xeea2
jmp 0xef4b
leaq 0x420(%rsp), %rdi
callq 0x1a230
movq %rax, 0x410(%rsp)
movq 0x430(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xef01
movq 0x410(%rsp), %rax
movq (%rax), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x218(%rsp)
jmp 0xeeed
movq 0x218(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xef37
movq 0x410(%rsp), %rax
movq (%rax), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x210(%rsp)
jmp 0xef23
movq 0x210(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0xef39
leaq 0x420(%rsp), %rdi
callq 0x1a280
jmp 0xee84
jmp 0xef4d
leaq 0x440(%rsp), %rdi
callq 0x1a2a0
jmp 0xed6c
movq $0x0, 0x408(%rsp)
movq 0x408(%rsp), %rax
movq %rax, 0x208(%rsp)
leaq 0x6b0(%rsp), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x208(%rsp), %rax
cmpq %rcx, %rax
jae 0xf651
movw $0xffff, 0x406(%rsp)    # imm = 0xFFFF
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x200(%rsp)
jmp 0xefc5
movq 0x200(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xf006
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x1f8(%rsp)
jmp 0xeff2
movq 0x1f8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf006
jmp 0xf638
movq 0x460(%rsp), %rax
cmpq 0x458(%rsp), %rax
jbe 0xf11a
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x1f0(%rsp)
jmp 0xf03b
movq 0x1f0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x1e8(%rsp)
testq %rax, %rax
movss %xmm0, 0x1ec(%rsp)
js 0xf08c
movss 0x1e8(%rsp), %xmm0
movss %xmm0, 0x1ec(%rsp)
movss 0x1ec(%rsp), %xmm0
movss %xmm0, 0x1dc(%rsp)
movq 0x460(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x1e0(%rsp)
testq %rax, %rax
movss %xmm0, 0x1e4(%rsp)
js 0xf0eb
movss 0x1e0(%rsp), %xmm0
movss %xmm0, 0x1e4(%rsp)
movss 0x1dc(%rsp), %xmm0
movss 0x1e4(%rsp), %xmm1
divss %xmm1, %xmm0
ucomiss 0x4dc(%rsp), %xmm0
jb 0xf115
movw $0x0, 0x406(%rsp)
jmp 0xf236
movswl 0x406(%rsp), %eax
cmpl $-0x1, %eax
jne 0xf234
cmpq $0x0, 0x458(%rsp)
jbe 0xf234
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x1d0(%rsp)
jmp 0xf159
movq 0x1d0(%rsp), %rax
movq (%rax), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x1c8(%rsp)
testq %rax, %rax
movss %xmm0, 0x1cc(%rsp)
js 0xf1a9
movss 0x1c8(%rsp), %xmm0
movss %xmm0, 0x1cc(%rsp)
movss 0x1cc(%rsp), %xmm0
movss %xmm0, 0x1bc(%rsp)
movq 0x458(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x1c0(%rsp)
testq %rax, %rax
movss %xmm0, 0x1c4(%rsp)
js 0xf208
movss 0x1c0(%rsp), %xmm0
movss %xmm0, 0x1c4(%rsp)
movss 0x1bc(%rsp), %xmm0
movss 0x1c4(%rsp), %xmm1
divss %xmm1, %xmm0
ucomiss 0x4dc(%rsp), %xmm0
jb 0xf232
movw $0x1, 0x406(%rsp)
jmp 0xf234
jmp 0xf236
movswl 0x406(%rsp), %eax
cmpl $-0x1, %eax
je 0xf636
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x1b0(%rsp)
jmp 0xf266
movq 0x1b0(%rsp), %rax
movq $0x0, (%rax)
movq 0x408(%rsp), %rsi
leaq 0x488(%rsp), %rdi
callq 0x1a240
movq %rax, 0x1a8(%rsp)
jmp 0xf294
movq 0x1a8(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x1a0(%rsp)
jmp 0xf2c3
movq 0x1a0(%rsp), %rdi
movq 0x408(%rsp), %rsi
callq 0xa510
movq %rax, 0x198(%rsp)
jmp 0xf2e2
movq 0x198(%rsp), %rax
movb $0x0, (%rax)
movswl 0x406(%rsp), %eax
cmpl $0x1, %eax
jne 0xf38d
movq 0x4c8(%rsp), %rsi
leaq 0x5f8(%rsp), %rdi
callq 0x1a240
movq %rax, 0x190(%rsp)
jmp 0xf31d
movq 0x190(%rsp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, (%rcx)
movl %eax, 0x184(%rsp)
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x188(%rsp)
jmp 0xf357
movq 0x188(%rsp), %rdi
movq 0x408(%rsp), %rsi
callq 0xa510
movq %rax, 0x178(%rsp)
jmp 0xf376
movq 0x178(%rsp), %rax
movl 0x184(%rsp), %ecx
movl %ecx, 0x4(%rax)
jmp 0xf419
movq 0x4c8(%rsp), %rsi
leaq 0x5f8(%rsp), %rdi
callq 0x1a240
movq %rax, 0x170(%rsp)
jmp 0xf3ac
movq 0x170(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
decq %rdx
movq %rdx, 0x8(%rcx)
movl %eax, 0x164(%rsp)
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x168(%rsp)
jmp 0xf3e8
movq 0x168(%rsp), %rdi
movq 0x408(%rsp), %rsi
callq 0xa510
movq %rax, 0x158(%rsp)
jmp 0xf407
movq 0x158(%rsp), %rax
movl 0x164(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x4c8(%rsp), %rsi
leaq 0x560(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x150(%rsp)
jmp 0xf438
movq 0x150(%rsp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
movq 0x4a0(%rsp), %rax
movq %rax, 0x3f8(%rsp)
movq 0x3f8(%rsp), %rdi
callq 0x1a0c0
movq %rax, 0x3f0(%rsp)
movq 0x3f8(%rsp), %rdi
callq 0x1a0f0
movq %rax, 0x3e8(%rsp)
leaq 0x3f0(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0x1a120
testb $0x1, %al
jne 0xf4a2
jmp 0xf623
leaq 0x3f0(%rsp), %rdi
callq 0x1a160
movq %rax, 0x3e0(%rsp)
movq 0x4c8(%rsp), %rsi
leaq 0x560(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x148(%rsp)
jmp 0xf4d6
movq 0x148(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xf4f5
movq 0x3e0(%rsp), %rdi
addq $0x8, %rdi
callq 0x1a2c0
movq $0x0, 0x3d8(%rsp)
movq 0x3d8(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x3e0(%rsp), %rdi
addq $0x8, %rdi
callq 0x1a170
movq %rax, %rcx
movq 0x140(%rsp), %rax
cmpq %rcx, %rax
jae 0xf60f
movq 0x3e0(%rsp), %rdi
addq $0x8, %rdi
movq 0x3d8(%rsp), %rsi
callq 0x19ad0
movq %rax, 0x138(%rsp)
jmp 0xf559
movq 0x138(%rsp), %rax
movq (%rax), %rax
cmpq 0x408(%rsp), %rax
jne 0xf5f6
movq 0x3e0(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x128(%rsp)
callq 0x1a190
movq %rax, 0x3c0(%rsp)
movq 0x3d8(%rsp), %rsi
leaq 0x3c0(%rsp), %rdi
callq 0x1a350
movq %rax, 0x3c8(%rsp)
leaq 0x3d0(%rsp), %rdi
leaq 0x3c8(%rsp), %rsi
callq 0x1a390
movq 0x128(%rsp), %rdi
movq 0x3d0(%rsp), %rsi
callq 0x1a2e0
movq %rax, 0x130(%rsp)
jmp 0xf5e4
movq 0x130(%rsp), %rax
movq %rax, 0x3b8(%rsp)
jmp 0xf60a
movq 0x3d8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x3d8(%rsp)
jmp 0xf501
jmp 0xf611
leaq 0x3f0(%rsp), %rdi
callq 0x1a2a0
jmp 0xf484
movss 0x2b34d(%rip), %xmm0    # 0x3a978
movss %xmm0, 0x4dc(%rsp)
jmp 0xf651
jmp 0xf638
movq 0x408(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x408(%rsp)
jmp 0xef6b
movq 0x4c8(%rsp), %rsi
leaq 0x560(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x120(%rsp)
jmp 0xf670
movq 0x120(%rsp), %rax
cmpq $0x1, (%rax)
jne 0xf88f
movq $0x0, 0x3b0(%rsp)
movq 0x3b0(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x118(%rsp)
jmp 0xf6bd
movq 0x118(%rsp), %rdi
callq 0xa4f0
movq %rax, %rcx
movq 0x110(%rsp), %rax
cmpq %rcx, %rax
jae 0xf88d
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x108(%rsp)
jmp 0xf6fd
movq 0x108(%rsp), %rdi
movq 0x3b0(%rsp), %rsi
callq 0xa510
movq %rax, 0x100(%rsp)
jmp 0xf71c
movq 0x100(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0xf872
movq 0x4c8(%rsp), %rsi
leaq 0x5f8(%rsp), %rdi
callq 0x1a240
movq %rax, 0xf8(%rsp)
jmp 0xf74d
movq 0xf8(%rsp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, (%rcx)
movl %eax, 0xec(%rsp)
movq 0x4c8(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0xf0(%rsp)
jmp 0xf787
movq 0xf0(%rsp), %rdi
movq 0x3b0(%rsp), %rsi
callq 0xa510
movq %rax, 0xe0(%rsp)
jmp 0xf7a6
movq 0xe0(%rsp), %rax
movl 0xec(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x4c8(%rsp), %rsi
leaq 0x560(%rsp), %rdi
callq 0x19ad0
movq %rax, 0xd8(%rsp)
jmp 0xf7d7
movq 0xd8(%rsp), %rax
movq $0x0, (%rax)
movq 0x4a0(%rsp), %rax
movq %rax, 0x3a8(%rsp)
movq 0x3a8(%rsp), %rdi
callq 0x1a0c0
movq %rax, 0x3a0(%rsp)
movq 0x3a8(%rsp), %rdi
callq 0x1a0f0
movq %rax, 0x398(%rsp)
leaq 0x3a0(%rsp), %rdi
leaq 0x398(%rsp), %rsi
callq 0x1a120
testb $0x1, %al
jne 0xf83b
jmp 0xf870
leaq 0x3a0(%rsp), %rdi
callq 0x1a160
movq %rax, 0x390(%rsp)
movq 0x390(%rsp), %rdi
addq $0x8, %rdi
callq 0x1a2c0
leaq 0x3a0(%rsp), %rdi
callq 0x1a2a0
jmp 0xf820
jmp 0xf88d
jmp 0xf874
movq 0x3b0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x3b0(%rsp)
jmp 0xf68e
jmp 0xf88f
movq 0x4c0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x4c0(%rsp)
movq 0x4c8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x4c8(%rsp)
leaq 0x488(%rsp), %rdi
callq 0x1a3d0
leaq 0x4b0(%rsp), %rdi
callq 0x1a430
jmp 0xec37
movss 0x4dc(%rsp), %xmm0
movss 0x2b099(%rip), %xmm1    # 0x3a980
subss %xmm1, %xmm0
movss %xmm0, 0x4dc(%rsp)
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xfbe2
movl $0xffffffff, 0x38c(%rsp) # imm = 0xFFFFFFFF
movq $0x1, 0x380(%rsp)
movq 0x380(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0x610(%rsp), %rdi
callq 0x9e80
movq %rax, %rcx
movq 0xd0(%rsp), %rax
cmpq %rcx, %rax
jae 0xfbe0
movq $0x0, 0x378(%rsp)
movq 0x378(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x380(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0xc8(%rsp)
jmp 0xf98c
movq 0xc8(%rsp), %rdi
callq 0xa4f0
movq %rax, %rcx
movq 0xc0(%rsp), %rax
cmpq %rcx, %rax
jae 0xfbc5
movq 0x380(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0xb8(%rsp)
jmp 0xf9cc
movq 0xb8(%rsp), %rdi
movq 0x378(%rsp), %rsi
callq 0xa510
movq %rax, 0xb0(%rsp)
jmp 0xf9eb
movq 0xb0(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xfbaa
movq 0x380(%rsp), %rsi
decq %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0xa8(%rsp)
jmp 0xfa25
movq 0xa8(%rsp), %rdi
movq 0x378(%rsp), %rsi
callq 0xa510
movq %rax, 0xa0(%rsp)
jmp 0xfa44
movq 0xa0(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x374(%rsp)
cmpl $-0x1, 0x374(%rsp)
je 0xfba8
cmpl $-0x1, 0x38c(%rsp)
jne 0xfa81
movl 0x374(%rsp), %eax
movl %eax, 0x38c(%rsp)
jmp 0xfba6
movl 0x374(%rsp), %eax
cmpl 0x38c(%rsp), %eax
jle 0xfaac
movl $0x1, 0x4d4(%rsp)
movl $0x2, 0x4d8(%rsp)
jmp 0xfba4
movl 0x374(%rsp), %eax
cmpl 0x38c(%rsp), %eax
jge 0xfad7
movl $0x1, 0x4d4(%rsp)
movl $0x1, 0x4d8(%rsp)
jmp 0xfba2
movl $0x2, 0x4d4(%rsp)
cmpl $0x0, 0x374(%rsp)
jne 0xfafc
movl $0x2, 0x4d8(%rsp)
jmp 0xfba0
movq 0x310(%rsp), %rdi
movl 0x374(%rsp), %eax
movl %eax, 0x9c(%rsp)
addq $0x40, %rdi
callq 0x9d50
movq %rax, %rcx
movl 0x9c(%rsp), %eax
subq $0x1, %rcx
cmpl %ecx, %eax
jne 0xfb3a
movl $0x1, 0x4d8(%rsp)
jmp 0xfb9e
movq 0x444af(%rip), %rdi     # 0x53ff0
leaq 0x2bacf(%rip), %rsi     # 0x3b617
callq 0x6420
movq %rax, 0x90(%rsp)
jmp 0xfb57
movq 0x90(%rsp), %rdi
movq 0x4440a(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0xfb6d
movq 0x300(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x6200
movq 0x300(%rsp), %rdi
callq 0x9be0
movl $0x1, 0x57c(%rsp)
jmp 0x1005f
jmp 0xfba0
jmp 0xfba2
jmp 0xfba4
jmp 0xfba6
jmp 0xfba8
jmp 0xfbaa
jmp 0xfbac
movq 0x378(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x378(%rsp)
jmp 0xf95d
jmp 0xfbc7
movq 0x380(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x380(%rsp)
jmp 0xf920
jmp 0xfbe2
cmpl $0x0, 0x4d8(%rsp)
je 0xfbf8
cmpl $0x0, 0x4d4(%rsp)
je 0xfbf8
jmp 0xfbfd
jmp 0xebcb
cmpl $0x0, 0x4d8(%rsp)
jne 0xfc86
cmpl $0x0, 0x4d4(%rsp)
jne 0xfc86
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xfc86
movq 0x443c7(%rip), %rdi     # 0x53ff0
leaq 0x2ba0f(%rip), %rsi     # 0x3b63f
callq 0x6420
movq %rax, 0x88(%rsp)
jmp 0xfc3f
movq 0x88(%rsp), %rdi
movq 0x44322(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0xfc55
movq 0x300(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x6200
movq 0x300(%rsp), %rdi
callq 0x9be0
movl $0x1, 0x57c(%rsp)
jmp 0x1005f
movb 0x727(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x10028
leaq 0x358(%rsp), %rdi
callq 0x19a20
cmpl $0x2, 0x4d8(%rsp)
jne 0xfd62
movq $0x0, 0x350(%rsp)
movq 0x350(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x640(%rsp), %rdi
callq 0x1a170
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
jae 0xfd5d
movq 0x350(%rsp), %rsi
leaq 0x640(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x78(%rsp)
jmp 0xfd0b
movq 0x78(%rsp), %rsi
leaq 0x358(%rsp), %rdi
callq 0x1a450
jmp 0xfd1f
jmp 0xfd21
movq 0x350(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x350(%rsp)
jmp 0xfcc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6d0(%rsp)
movl %eax, 0x6cc(%rsp)
leaq 0x358(%rsp), %rdi
callq 0x19cb0
jmp 0x100e4
jmp 0xfdf7
movq $0x0, 0x348(%rsp)
movq 0x348(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x640(%rsp), %rdi
callq 0x1a170
movq %rax, %rcx
movq 0x70(%rsp), %rax
cmpq %rcx, %rax
jae 0xfdf5
leaq 0x640(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x1a170
movq 0x60(%rsp), %rdi
movq 0x348(%rsp), %rsi
notq %rsi
addq %rax, %rsi
callq 0x19ad0
movq %rax, 0x68(%rsp)
jmp 0xfdc6
movq 0x68(%rsp), %rsi
leaq 0x358(%rsp), %rdi
callq 0x1a450
jmp 0xfdda
jmp 0xfddc
movq 0x348(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x348(%rsp)
jmp 0xfd6e
jmp 0xfdf7
movq $0x0, 0x340(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x610(%rsp), %rdi
callq 0x9e80
movq %rax, %rcx
movq 0x58(%rsp), %rax
cmpq %rcx, %rax
jae 0x1001b
cmpl $0x1, 0x4d4(%rsp)
jne 0xfe46
movq $0x0, 0x338(%rsp)
jmp 0xfe8c
cmpl $0x1, 0x4d8(%rsp)
jne 0xfe62
movq 0x340(%rsp), %rax
movq %rax, 0x338(%rsp)
jmp 0xfe8a
movq 0x310(%rsp), %rdi
addq $0x40, %rdi
callq 0x9d50
movq 0x340(%rsp), %rcx
subq $0x1, %rcx
subq %rcx, %rax
movq %rax, 0x338(%rsp)
jmp 0xfe8c
movq $0x0, 0x330(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x340(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x50(%rsp)
jmp 0xfec1
movq 0x50(%rsp), %rdi
callq 0xa4f0
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x10000
movq 0x340(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x40(%rsp)
jmp 0xfef8
movq 0x330(%rsp), %rsi
leaq 0x358(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x38(%rsp)
jmp 0xff14
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rax
movq (%rax), %rsi
callq 0xa510
movq %rax, 0x30(%rsp)
jmp 0xff2d
movq 0x30(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xffe5
movl 0x338(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x340(%rsp), %rsi
leaq 0x610(%rsp), %rdi
callq 0xa4b0
movq %rax, 0x28(%rsp)
jmp 0xff69
movq 0x330(%rsp), %rsi
leaq 0x358(%rsp), %rdi
callq 0x19ad0
movq %rax, 0x18(%rsp)
jmp 0xff85
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0xa510
movq %rax, 0x10(%rsp)
jmp 0xff9e
movq 0x310(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x338(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rdi
callq 0x9d50
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, 0x338(%rsp)
jmp 0xffe7
movq 0x330(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x330(%rsp)
jmp 0xfe98
jmp 0x10002
movq 0x340(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x340(%rsp)
jmp 0xfe03
leaq 0x358(%rsp), %rdi
callq 0x19cb0
movq 0x310(%rsp), %rdi
leaq 0x610(%rsp), %rsi
callq 0x11f40
jmp 0x1003f
movq 0x300(%rsp), %rdi
leaq 0x610(%rsp), %rsi
callq 0x1a4c0
movl $0x1, 0x57c(%rsp)
leaq 0x560(%rsp), %rdi
callq 0x19cb0
leaq 0x5f8(%rsp), %rdi
callq 0x1a3d0
leaq 0x610(%rsp), %rdi
callq 0x9bf0
leaq 0x628(%rsp), %rdi
callq 0x1a4f0
leaq 0x640(%rsp), %rdi
callq 0x19cb0
leaq 0x658(%rsp), %rdi
callq 0x1a4f0
leaq 0x6b0(%rsp), %rdi
callq 0x1a550
leaq 0x6e0(%rsp), %rdi
callq 0x1a5b0
leaq 0x6f8(%rsp), %rdi
callq 0x1a610
movq 0x308(%rsp), %rax
addq $0x738, %rsp            # imm = 0x738
retq
leaq 0x560(%rsp), %rdi
callq 0x19cb0
leaq 0x5f8(%rsp), %rdi
callq 0x1a3d0
leaq 0x610(%rsp), %rdi
callq 0x9bf0
leaq 0x628(%rsp), %rdi
callq 0x1a4f0
leaq 0x640(%rsp), %rdi
callq 0x19cb0
leaq 0x658(%rsp), %rdi
callq 0x1a4f0
leaq 0x6b0(%rsp), %rdi
callq 0x1a550
leaq 0x6e0(%rsp), %rdi
callq 0x1a5b0
leaq 0x6f8(%rsp), %rdi
callq 0x1a610
movq 0x6d0(%rsp), %rdi
callq 0x6750
nopw %cs:(%rax,%rax)