// File: /workspace/github_cpp_makefile_star2_O3/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 0x1439b(%rip), %r12     # 0x1cfb0
leaq 0xbf4f(%rip), %rsi      # 0x14b6b
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, 0x40(%rsp)
movq $0x0, 0x50(%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 0xd55e
subq %r14, %rbx
shrq $0x3, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
andq %rbx, %r12
je 0x8e38
movl $0x8, %r13d
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movl $0x68, %edi
callq 0x53d0
movq %rax, %rbx
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%rbx)
leaq 0x13b36(%rip), %rax     # 0x1c818
movq %rax, (%rbx)
leaq 0x10(%rbx), %r14
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movl %eax, 0x20(%rbx)
movb $0x0, 0x24(%rbx)
movl %eax, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movl %eax, 0x38(%rbx)
leaq 0x13b61(%rip), %rax     # 0x1c868
movq %rax, 0x10(%rbx)
movl $0x30, %edi
callq 0x53d0
movq %rax, %r15
movq %rax, %rdi
callq 0xe4b0
movq %r15, 0x40(%rbx)
movsd 0xbce4(%rip), %xmm0     # 0x14a10
movsd %xmm0, 0x48(%rbx)
movl $0x200, 0x50(%rbx)      # imm = 0x200
movq %rbp, 0x58(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rbx)
movq $0x0, 0xb8(%rsp)
movl $0x20, %edi
callq 0x53d0
leaq 0x13b5e(%rip), %rcx     # 0x1c8c0
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
leaq 0x3352(%rip), %rcx      # 0xc0c2
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 0x8da5
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x30(%rbx)
jne 0x964f
movq 0xb8(%rsp), %rax
movq %rax, 0x30(%rbx)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xed14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8de7
callq 0xde06
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 0x8e16
callq 0xde06
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x8e28
callq 0xde06
incq %rbp
addq $0x10, %r13
cmpq %rbp, %r12
jne 0x8cb8
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r13, %rcx
movq 0x8(%rsp), %rdi
movq 0x40(%rdi), %rsi
movq 0x48(%rdi), %rdi
movq %rdi, %r8
subq %rsi, %r8
sarq $0x3, %r8
cmpq %r8, %rcx
jae 0x8f17
leaq 0x10(%rsp), %rbx
leaq 0x40(%rsp), %r14
testq %r12, %r12
je 0x8ef6
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0x963e
addq %rbp, %rsi
movq %rbx, %rdi
callq 0xd5d4
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd642
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8ed3
callq 0x5390
incq %r15
addq $0x10, %rbp
cmpq %r15, %r12
jne 0x8e8e
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq 0x40(%rcx), %rsi
movq 0x48(%rcx), %rdi
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
movq %rdi, %r8
subq %rsi, %r8
sarq $0x3, %r8
cmpq %r8, %rcx
jb 0x8e84
testq %rcx, %rcx
je 0x8f55
xorl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
movq (%rax,%rdi,8), %rsi
movq 0x8(%rax,%rdi,8), %rdi
subq %rsi, %rdi
je 0x8f4b
sarq $0x2, %rdi
xorl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
addl %r9d, 0x60(%rsp,%r8,4)
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdi
ja 0x8f37
incq %rdx
movl %edx, %esi
cmpq %rsi, %rcx
ja 0x8f1e
xorl %eax, %eax
movl $0x1, %ecx
xorl %edx, %edx
movl 0x60(%rsp,%rcx,4), %esi
cmpl %esi, %eax
cmovll %ecx, %edx
cmovlel %esi, %eax
incq %rcx
cmpq $0xc, %rcx
jne 0x8f5e
movslq %edx, %rax
leaq 0xc013(%rip), %rcx      # 0x14f90
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x4(%rsp)
testl %eax, %eax
je 0x95c1
leaq 0x20(%rsp), %r14
movq 0x14040(%rip), %r15     # 0x1cfd8
leaq 0x10(%rsp), %r12
leaq 0xb22e(%rip), %r13      # 0x141d2
movq 0x14045(%rip), %rbp     # 0x1cff0
movq %r14, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movl $0x10, %edx
movq 0x13fe6(%rip), %rdi     # 0x1cfb0
leaq 0xbbeb(%rip), %rsi      # 0x14bbc
callq 0x5450
movl 0x4(%rsp), %esi
movq 0x13fcf(%rip), %rdi     # 0x1cfb0
callq 0x5630
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xb3d5(%rip), %rsi      # 0x143cd
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 0x13f80(%rip), %rdi     # 0x1cfb0
leaq 0xbb96(%rip), %rsi      # 0x14bcd
callq 0x5450
movq 0x13f6d(%rip), %rcx     # 0x1cfb0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %esi
movq 0x13f4f(%rip), %rdi     # 0x1cfb0
callq 0x5040
movq %rax, %rdi
callq 0x5260
movl $0x42, %edx
movq 0x13f36(%rip), %rdi     # 0x1cfb0
leaq 0xbb9b(%rip), %rsi      # 0x14c1c
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 0x958b
movq %r12, %rdi
leaq 0xcff1(%rip), %rsi      # 0x160b6
callq 0x50f0
testl %eax, %eax
je 0x9566
movq %r12, %rdi
leaq 0xce84(%rip), %rsi      # 0x15f60
callq 0x50f0
xorl %ebx, %ebx
testl %eax, %eax
jne 0x9595
movl $0x5c, %edx
movq 0x13eb9(%rip), %rdi     # 0x1cfb0
leaq 0xbba2(%rip), %rsi      # 0x14ca0
callq 0x5450
movl $0x7, %edx
movq 0x13ea1(%rip), %rdi     # 0x1cfb0
leaq 0xbbe7(%rip), %rsi      # 0x14cfd
callq 0x5450
movl 0x60(%rsp), %esi
movq 0x13e8a(%rip), %rdi     # 0x1cfb0
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 0x13e4f(%rip), %rdi     # 0x1cfb0
leaq 0xbb96(%rip), %rsi      # 0x14cfe
callq 0x5450
movl 0x64(%rsp), %esi
movq 0x13e38(%rip), %rdi     # 0x1cfb0
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 0x13dfd(%rip), %rdi     # 0x1cfb0
leaq 0xbb4b(%rip), %rsi      # 0x14d05
callq 0x5450
movl 0x68(%rsp), %esi
movq 0x13de6(%rip), %rdi     # 0x1cfb0
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 0x13dab(%rip), %rdi     # 0x1cfb0
leaq 0xbb00(%rip), %rsi      # 0x14d0c
callq 0x5450
movl 0x6c(%rsp), %esi
movq 0x13d94(%rip), %rdi     # 0x1cfb0
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 0x13d59(%rip), %rdi     # 0x1cfb0
leaq 0xbab5(%rip), %rsi      # 0x14d13
callq 0x5450
movl 0x70(%rsp), %esi
movq 0x13d42(%rip), %rdi     # 0x1cfb0
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 0x13d07(%rip), %rdi     # 0x1cfb0
leaq 0xba6a(%rip), %rsi      # 0x14d1a
callq 0x5450
movl 0x74(%rsp), %esi
movq 0x13cf0(%rip), %rdi     # 0x1cfb0
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 0x13cb5(%rip), %rdi     # 0x1cfb0
leaq 0xba1f(%rip), %rsi      # 0x14d21
callq 0x5450
movl 0x78(%rsp), %esi
movq 0x13c9e(%rip), %rdi     # 0x1cfb0
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 0x13c63(%rip), %rdi     # 0x1cfb0
leaq 0xb9d4(%rip), %rsi      # 0x14d28
callq 0x5450
movl 0x7c(%rsp), %esi
movq 0x13c4c(%rip), %rdi     # 0x1cfb0
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 0x13c11(%rip), %rdi     # 0x1cfb0
leaq 0xb989(%rip), %rsi      # 0x14d2f
callq 0x5450
movl 0x80(%rsp), %esi
movq 0x13bf7(%rip), %rdi     # 0x1cfb0
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 0x13bbc(%rip), %rdi     # 0x1cfb0
leaq 0xb93b(%rip), %rsi      # 0x14d36
callq 0x5450
movl 0x84(%rsp), %esi
movq 0x13ba2(%rip), %rdi     # 0x1cfb0
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 0x13b67(%rip), %rdi     # 0x1cfb0
leaq 0xb8ed(%rip), %rsi      # 0x14d3d
callq 0x5450
movl 0x88(%rsp), %esi
movq 0x13b4d(%rip), %rdi     # 0x1cfb0
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 0x13b12(%rip), %rdi     # 0x1cfb0
leaq 0xb89f(%rip), %rsi      # 0x14d44
callq 0x5450
movl 0x8c(%rsp), %esi
movq 0x13af8(%rip), %rdi     # 0x1cfb0
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 0xb855(%rip), %rsi      # 0x14d4b
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 0xb83b(%rip), %rsi      # 0x14d6d
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 0x9595
movl $0x40, %edx
movq 0x13a3e(%rip), %rdi     # 0x1cfb0
leaq 0xb6e6(%rip), %rsi      # 0x14c5f
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 0x95a4
callq 0x5390
testl %ebx, %ebx
je 0x8fab
cmpl $0x17, %ebx
jne 0x960e
movslq 0x4(%rsp), %rbx
movq 0x8(%rsp), %rax
movq %rbx, 0x60(%rax)
jmp 0x9613
movq 0x139e8(%rip), %rbx     # 0x1cfb0
leaq 0xb5c4(%rip), %rsi      # 0x14b93
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 0x139b6(%rip), %rdi     # 0x1cfb0
callq 0x5040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x5260
jmp 0x9613
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0xa0(%rsp), %rdi
callq 0xd66e
leaq 0x40(%rsp), %rdi
callq 0xd6b4
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb284(%rip), %rdi      # 0x148c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x5570
callq 0x50e0
movq %rax, %r15
jmp 0x973e
jmp 0x971a
movq %rdx, %r12
movq %rax, %r15
jmp 0x96ab
movq %rdx, %r12
movq %rax, %r15
jmp 0x969b
movq %rdx, %r12
movq %rax, %r15
jmp 0x968f
movq %rdx, %r12
movq %rax, %r15
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x968f
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
addq $0x40, %rdi
callq 0xe4d2
movq %r14, %rdi
callq 0xe52e
movq %rbx, %rdi
callq 0x5390
cmpl $0x1, %r12d
jne 0x96ee
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 0xe475
callq 0x5530
movq %rax, %r15
jmp 0x96ee
movq %rax, %r15
callq 0x55e0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x9731
callq 0xde06
jmp 0x9731
movq %rax, %rdi
callq 0xde75
jmp 0x9709
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
jne 0x972c
jmp 0x9731
jmp 0x971a
movq %rax, %r15
jmp 0x9731
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9731
callq 0x5390
leaq 0xa0(%rsp), %rdi
callq 0xd66e
leaq 0x40(%rsp), %rdi
callq 0xd6b4
movq %r15, %rdi
callq 0x5650