// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::estimateStripeSize()
int FileHandler::estimateStripeSize()
{
	//Lambda function, which is done by threads
	auto lambda = [&] (size_t id, size_t size, const float lowEdge, const float highEdge) -> std::vector<int>
	{
		//Initialization
		std::vector<std::pair<size_t, float>> entropies;
		FileReader *me = inFiles.at(id);
		const size_t CHECKS=800;
		int counters[12]={};
		float ent=0;
		std::vector<size_t> adressEdges;
		me->setBlockSize(size);
		const int checkSize = 16;
		me->reset();

		//Initial fill of vector with zero
		for (int i = 0; i < checkSize; ++i)
			entropies.push_back(std::pair<size_t,float>(0,0));

		//While loop until enough adressEdges are found
		size_t outputCounter = 0;
		while (adressEdges.size() < CHECKS)
		{
			size_t edgeCut = 0;
			size_t counter=0;
			size_t edgeAdress=0;
			bool low=false;
			bool high=false;
			do
			{
				if (me->newBlock() == false)
				{
					break;
				}
				if (outputCounter == 0)
				{
					std::string wr = "Thread ";
					wr += std::to_string(id);
					wr += " working ";
					printf("\r%s\t%f%%\t%s",wr.c_str(), static_cast<float>(adressEdges.size())*100.0f/static_cast<float>(CHECKS), me->getRelativePos().c_str());
					fflush(stdout);
				}
				outputCounter = (outputCounter + 1) % 25000;

				//Calculate entropy and check if the edges are good enough
				ent = me->calcEntropyOfCurrentBlock();
				if (ent <= lowEdge)
				{
					if (low == false)
					{
						if (high == true && counter >= checkSize)
						{
							++edgeCut;
						}
						else
						{
							edgeCut = 0;
						}
						low = true;
						high = false;
						edgeAdress = me->getCurrentAdress();
						counter = 0;
					}
					++counter;
				}
				else if (ent >= highEdge)
				{
					if (high == false)
					{
						if (low == true && counter >= checkSize)
						{
							++edgeCut;
						}
						else
						{
							edgeCut = 0;
						}
						high = true;
						low = false;
						edgeAdress = me->getCurrentAdress();
						counter = 0;
					}
					++counter;
				}
				else
				{
					low=false;
					high=false;
					edgeCut=0;
					counter=0;
				}
				if (counter == checkSize && edgeCut == 1)
					++edgeCut;
			} while (edgeCut != 2);

			//found an edge
			if (edgeCut == 2)
			{
				adressEdges.push_back(edgeAdress);
			}
			else //end of file
			{
				break;
			}
		}

		std::string wr = "Thread ";
		wr += std::to_string(id);
		wr += " working ";
		printf("\r%s\t%9d%%",wr.c_str(), 100);
		me->reset();

		//Sorting adress edges to possible stripesizes
		for (size_t i = 1; i < adressEdges.size(); ++i)
		{
			size_t in = (adressEdges.at(i) - adressEdges.at(i-1))/512;
			if (in % 4096 == 0)
				counters[0] += 1;
			else if (in % 2048 == 0)
				counters[1] += 1;
			else if (in % 1024 == 0)
				counters[2] += 1;
			else if (in % 512 == 0)
				counters[3] += 1;
			else if (in % 256 == 0)
				counters[4] += 1;
			else if (in % 128 == 0)
				counters[5] += 1;
			else if (in % 64 == 0)
				counters[6] += 1;
			else if (in % 32 == 0)
				counters[7] += 1;
			else if (in % 16 == 0)
				counters[8] += 1;
			else if (in % 8 == 0)
				counters[9] += 1;
			else if (in % 4 == 0)
				counters[10] += 1;
			else if (in % 2 == 0)
				counters[11] += 1;
		}
		std::vector<int> ret;
		for (int i = 0; i < 12; ++i)
		{
			ret.push_back(counters[i]);
		}
		return ret;
	}; //lambda function end

	//Initialization to run threads with above lambda function
	int stripeSize = -1;
	unsigned int NUM_THREADS = inFiles.size();
	std::cout << "Issuing Stripesize-calculating threads." << std::endl;
	int counters[12]={};

	std::vector<std::vector<int>> results;
	float lowEdge = 0.3f;
	float highEdge = 7.3f;
	int value[12] = {2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1};
	int index = 0;
	std::vector<std::future<std::vector<int>>> futureResults(inFiles.size());

	//Starting threads
	for (size_t tm = 0; tm < 12; ++tm)
		counters[tm]=0;
	for (size_t i = 0; i < NUM_THREADS; ++i)
	{
		futureResults[i] = std::async(std::launch::async, lambda, i, 512, lowEdge, highEdge);
	}

	//Getting results
	while (results.size() < inFiles.size())
	{
		for (size_t i = 0; i < NUM_THREADS; ++i)
		{
			std::vector<int> res = futureResults.at(i).get();
			results.push_back(res);
		}
	}
	for (unsigned int i=0; i < results.size();++i)
	{
		for (unsigned int j = 0; j < results.at(i).size(); ++j)
		{
			counters[j] += results.at(i).at(j);
		}
	}
	int ff=0;
	for (unsigned int i = 1; i < 12; ++i)
	{
		if (ff < counters[i])
		{
			ff = counters[i];
			index = i;
		}
	}
	//Print the results for the different stripesizes
	stripeSize = value[index];
	if (stripeSize == 2048)
	{
		std::cout << "Not one good block found. Need to abort." << std::endl;
		return -1;
	}
	while (true)
	{
		//Output and ask the user
		std::string answer;
		std::cout << "\nIt's probably:\t" << stripeSize << "KB"<< std::endl;
		std::cout << "It's just with simple heuristics. Would you like to continue with this result?" << std::endl;
		std::cout << "Answer with 'y' for 'yes', 'n' for 'no' or 'h' for 'hint' [y/n/h] ";
		std::getline(std::cin, answer);
		if (answer == "y")
		{
			stripeSize *= 1024;
			break;
		}
		else if (answer == "n")
		{
			std::cout << "With which Stripesize do you wish to continue? [1-1024] (in kB) ";
			std::cin >> stripeSize;
			stripeSize *= 1024;
			break;
		}
		else if (answer == "h")
		{
			int x = 0;
			std::cout << "\nFound possible blocksizes with following values (Higher value means supposable blocksize):\n";
			std::cout << ">1024:\t" << counters[x] << std::endl;
			++x;
			std::cout << "1024:\t" << counters[x] << std::endl;
			++x;
			std::cout << " 512:\t" << counters[x] << std::endl;
			++x;
			std::cout << " 256:\t" << counters[x] << std::endl;
			++x;
			std::cout << " 128:\t" << counters[x] << std::endl;
			++x;
			std::cout << "  64:\t" << counters[x] << std::endl;
			++x;
			std::cout << "  32:\t" << counters[x] << std::endl;
			++x;
			std::cout << "  16:\t" << counters[x] << std::endl;
			++x;
			std::cout << "   8:\t" << counters[x] << std::endl;
			++x;
			std::cout << "   4:\t" << counters[x] << std::endl;
			++x;
			std::cout << "   2:\t" << counters[x] << std::endl;
			++x;
			std::cout << "   1:\t" << counters[x] << std::endl;
			std::cerr << "Use Stripesize with high values. " << std::endl;
			std::cerr << "If automatically estimated Stripesize doesn't work correct. You could try the blocksize with the next lower value!" << std::endl;
			return -1;
		}
	}

	//If accepted, set block size to stripesize
	mStripeSize = stripeSize;
	return stripeSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r15
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movq 0x40(%rdi), %r14
movq 0x48(%rdi), %rbx
movq 0x16351(%rip), %r12     # 0x1efb0
leaq 0xcf05(%rip), %rsi      # 0x15b6b
movl $0x27, %edx
movq %r12, %rdi
callq 0x5450
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x48(%r15), %rsi
movq %r15, 0x8(%rsp)
subq 0x40(%r15), %rsi
sarq $0x3, %rsi
leaq 0xa0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xddf2
subq %r14, %rbx
shrq $0x3, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
andq %rbx, %r12
je 0x8f48
movl $0x8, %r13d
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movl $0x68, %edi
callq 0x53d0
movq %rax, %r14
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x15845(%rip), %rax     # 0x1e580
movq %rax, (%r14)
leaq 0x10(%r14), %rbx
xorl %eax, %eax
movl %eax, 0x28(%r14)
movq %rax, 0x18(%r14)
movq %rax, 0x1d(%r14)
movq %rax, 0x30(%r14)
movl %eax, 0x38(%r14)
leaq 0x15871(%rip), %rax     # 0x1e5d0
movq %rax, 0x10(%r14)
movl $0x30, %edi
callq 0x53d0
movq %rax, %r15
movq %rax, %rdi
callq 0xed1e
movq %r15, 0x40(%r14)
movsd 0xcc8c(%rip), %xmm0     # 0x15a10
movsd %xmm0, 0x48(%r14)
movl $0x200, 0x50(%r14)      # imm = 0x200
movq %rbp, 0x58(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x60(%r14)
movq $0x0, 0xb8(%rsp)
movl $0x20, %edi
callq 0x53d0
leaq 0x1586c(%rip), %rcx     # 0x1e628
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
leaq 0x3800(%rip), %rcx      # 0xc5ca
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq %rax, 0x38(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x5340
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8dff
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x30(%r14)
jne 0x9769
movq 0xb8(%rsp), %rax
movq %rax, 0x30(%r14)
movq %rbx, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %r14, 0x18(%rsp)
testq %rdi, %rdi
je 0x8e2f
callq 0xe634
cmpq $0x0, 0x10(%rsp)
jne 0x8ed6
movl $0x58, %edi
callq 0x53d0
movq %rax, %rbx
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%rbx)
leaq 0x1580b(%rip), %rax     # 0x1e668
movq %rax, (%rbx)
movq %rbx, %r14
addq $0x10, %r14
movl $0x0, 0x28(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %rax, 0x1d(%rbx)
leaq 0x15839(%rip), %rax     # 0x1e6b8
movq %rax, 0x10(%rbx)
movl $0x30, %edi
callq 0x53d0
movq %rax, %r15
movq %rax, %rdi
callq 0xed1e
movq %r15, 0x30(%rbx)
movsd 0xcb6c(%rip), %xmm0     # 0x15a10
movsd %xmm0, 0x38(%rbx)
movl $0x200, 0x40(%rbx)      # imm = 0x200
movq %rbp, 0x48(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rbx)
movq %r14, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rbx, 0x18(%rsp)
testq %rdi, %rdi
je 0x8ed6
callq 0xe634
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xf586
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8ef7
callq 0xe634
movq 0xa0(%rsp), %rax
movaps 0x90(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x90(%rsp)
movq (%rax,%r13), %rdi
movups %xmm0, -0x8(%rax,%r13)
testq %rdi, %rdi
je 0x8f26
callq 0xe634
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x8f38
callq 0xe634
incq %rbp
addq $0x10, %r13
cmpq %rbp, %r12
jne 0x8d11
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r13, %rdx
movq 0x8(%rsp), %rsi
movq 0x48(%rsi), %rcx
subq 0x40(%rsi), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jae 0x9015
leaq 0x10(%rsp), %rbx
leaq 0x70(%rsp), %r14
testq %r12, %r12
je 0x8fe6
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0x9758
addq %rbp, %rsi
movq %rbx, %rdi
callq 0xde6a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xded8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8fda
callq 0x5390
incq %r15
addq $0x10, %rbp
cmpq %r15, %r12
jne 0x8f95
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
movq 0x8(%rsp), %rsi
movq 0x48(%rsi), %rcx
subq 0x40(%rsi), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jb 0x8f8b
testq %rdx, %rdx
setne %cl
je 0x906d
xorl %esi, %esi
testb $0x1, %cl
je 0x974a
leaq (%rsi,%rsi,2), %r8
movq (%rax,%r8,8), %rdi
movq 0x8(%rax,%r8,8), %r8
subq %rdi, %r8
sarq $0x2, %r8
movl $0x1, %r9d
xorl %r10d, %r10d
cmpq %r10, %r8
jbe 0x9063
movl (%rdi,%r10,4), %r11d
addl %r11d, 0x40(%rsp,%r10,4)
movl %r9d, %r10d
incl %r9d
testb $0x1, %cl
jne 0x9045
jmp 0x974a
incl %esi
cmpq %rsi, %rdx
seta %cl
ja 0x901f
xorl %eax, %eax
movl $0x1, %ecx
xorl %edx, %edx
movl 0x40(%rsp,%rcx,4), %esi
cmpl %esi, %eax
cmovll %ecx, %edx
cmovlel %esi, %eax
incq %rcx
cmpq $0xc, %rcx
jne 0x9076
movslq %edx, %rax
leaq 0xcefb(%rip), %rcx      # 0x15f90
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x4(%rsp)
testl %eax, %eax
je 0x96cd
leaq 0x20(%rsp), %r14
movq 0x15f28(%rip), %r15     # 0x1efd8
leaq 0x10(%rsp), %r12
leaq 0xc116(%rip), %r13      # 0x151d2
movq 0x15f2d(%rip), %rbp     # 0x1eff0
movq %r14, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movl $0x10, %edx
movq 0x15ece(%rip), %rdi     # 0x1efb0
leaq 0xcad3(%rip), %rsi      # 0x15bbc
callq 0x5450
movl 0x4(%rsp), %esi
movq 0x15eb7(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xc2bd(%rip), %rsi      # 0x153cd
callq 0x5450
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x4e, %edx
movq 0x15e68(%rip), %rdi     # 0x1efb0
leaq 0xca7e(%rip), %rsi      # 0x15bcd
callq 0x5450
movq 0x15e55(%rip), %rcx     # 0x1efb0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x15e37(%rip), %rdi     # 0x1efb0
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x42, %edx
movq 0x15e1e(%rip), %rdi     # 0x1efb0
leaq 0xca83(%rip), %rsi      # 0x15c1c
callq 0x5450
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5670
movq %r12, %rdi
movq %r13, %rsi
callq 0x50f0
testl %eax, %eax
je 0x9697
movq %r12, %rdi
leaq 0xe3c8(%rip), %rsi      # 0x175a5
callq 0x50f0
testl %eax, %eax
je 0x9672
movq %r12, %rdi
leaq 0xe25b(%rip), %rsi      # 0x1744f
callq 0x50f0
xorl %ebx, %ebx
testl %eax, %eax
jne 0x96a1
movl $0x5c, %edx
movq 0x15da1(%rip), %rdi     # 0x1efb0
leaq 0xca8a(%rip), %rsi      # 0x15ca0
callq 0x5450
movl $0x7, %edx
movq 0x15d89(%rip), %rdi     # 0x1efb0
leaq 0xcacf(%rip), %rsi      # 0x15cfd
callq 0x5450
movl 0x40(%rsp), %esi
movq 0x15d72(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15d37(%rip), %rdi     # 0x1efb0
leaq 0xca7e(%rip), %rsi      # 0x15cfe
callq 0x5450
movl 0x44(%rsp), %esi
movq 0x15d20(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15ce5(%rip), %rdi     # 0x1efb0
leaq 0xca33(%rip), %rsi      # 0x15d05
callq 0x5450
movl 0x48(%rsp), %esi
movq 0x15cce(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15c93(%rip), %rdi     # 0x1efb0
leaq 0xc9e8(%rip), %rsi      # 0x15d0c
callq 0x5450
movl 0x4c(%rsp), %esi
movq 0x15c7c(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15c41(%rip), %rdi     # 0x1efb0
leaq 0xc99d(%rip), %rsi      # 0x15d13
callq 0x5450
movl 0x50(%rsp), %esi
movq 0x15c2a(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15bef(%rip), %rdi     # 0x1efb0
leaq 0xc952(%rip), %rsi      # 0x15d1a
callq 0x5450
movl 0x54(%rsp), %esi
movq 0x15bd8(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15b9d(%rip), %rdi     # 0x1efb0
leaq 0xc907(%rip), %rsi      # 0x15d21
callq 0x5450
movl 0x58(%rsp), %esi
movq 0x15b86(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15b4b(%rip), %rdi     # 0x1efb0
leaq 0xc8bc(%rip), %rsi      # 0x15d28
callq 0x5450
movl 0x5c(%rsp), %esi
movq 0x15b34(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15af9(%rip), %rdi     # 0x1efb0
leaq 0xc871(%rip), %rsi      # 0x15d2f
callq 0x5450
movl 0x60(%rsp), %esi
movq 0x15ae2(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15aa7(%rip), %rdi     # 0x1efb0
leaq 0xc826(%rip), %rsi      # 0x15d36
callq 0x5450
movl 0x64(%rsp), %esi
movq 0x15a90(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15a55(%rip), %rdi     # 0x1efb0
leaq 0xc7db(%rip), %rsi      # 0x15d3d
callq 0x5450
movl 0x68(%rsp), %esi
movq 0x15a3e(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x6, %edx
movq 0x15a03(%rip), %rdi     # 0x1efb0
leaq 0xc790(%rip), %rsi      # 0x15d44
callq 0x5450
movl 0x6c(%rsp), %esi
movq 0x159ec(%rip), %rdi     # 0x1efb0
callq 0x5630
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x21, %edx
movq %rbp, %rdi
leaq 0xc749(%rip), %rsi      # 0x15d4b
callq 0x5450
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x72, %edx
movq %rbp, %rdi
leaq 0xc72f(%rip), %rsi      # 0x15d6d
callq 0x5450
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x5260
jmp 0x96a1
movl $0x40, %edx
movq 0x15932(%rip), %rdi     # 0x1efb0
leaq 0xc5da(%rip), %rsi      # 0x15c5f
callq 0x5450
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x5220
shll $0xa, 0x4(%rsp)
movl $0x17, %ebx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x96b0
callq 0x5390
testl %ebx, %ebx
je 0x90c3
cmpl $0x17, %ebx
jne 0x971a
movslq 0x4(%rsp), %rbx
movq 0x8(%rsp), %rax
movq %rbx, 0x60(%rax)
jmp 0x971f
movq 0x158dc(%rip), %rbx     # 0x1efb0
leaq 0xc4b8(%rip), %rsi      # 0x15b93
movl $0x28, %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 0x158aa(%rip), %rdi     # 0x1efb0
callq 0x5040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x5260
jmp 0x971f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0xa0(%rsp), %rdi
callq 0xdf04
leaq 0x70(%rsp), %rdi
callq 0xdf44
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc178(%rip), %rdi      # 0x158c9
xorl %eax, %eax
callq 0x5570
leaq 0xc16a(%rip), %rdi      # 0x158c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
callq 0x50e0
movq %rax, %r15
jmp 0x9880
jmp 0x9870
movq %rax, %r15
movq %r14, %rdi
callq 0xedca
movq %rbx, %rdi
callq 0x5390
jmp 0x982e
jmp 0x9795
movq %rax, %r15
jmp 0x982e
movq %rdx, %r12
movq %rax, %r15
jmp 0x97f0
movq %rdx, %r12
movq %rax, %r15
jmp 0x97e0
movq %rdx, %r12
movq %rax, %r15
jmp 0x97d4
movq %rdx, %r12
movq %rax, %r15
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x97cb
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x38(%rsp)
movq %r14, %rdi
addq $0x40, %rdi
callq 0xed40
movq %rbx, %rdi
callq 0xed9c
movq %r14, %rdi
callq 0x5390
cmpl $0x1, %r12d
jne 0x982e
movq %r15, %rdi
callq 0x5150
leaq 0x10(%rax), %rbx
callq 0x51b0
leaq 0xb8(%rsp), %rsi
movl $0xb, (%rsi)
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0xecdb
callq 0x5530
movq %rax, %r15
callq 0x55e0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x9873
callq 0xe634
jmp 0x9873
movq %rax, %rdi
callq 0xe6a3
jmp 0x9849
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
jne 0x9869
jmp 0x9873
jmp 0x9870
jmp 0x9870
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9873
callq 0x5390
jmp 0x9873
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0xdf04
leaq 0x70(%rsp), %rdi
callq 0xdf44
movq %r15, %rdi
callq 0x5650