// File: /workspace/github_cpp_makefile_star2_O2/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 $0xf8, %rsp
orl $-0x1, 0x8(%rsp)
movq %rdi, %r14
movq 0x48(%rdi), %rbx
subq 0x40(%rdi), %rbx
movq 0x163c0(%rip), %rdi     # 0x1dfb0
leaq 0xbeec(%rip), %rsi      # 0x13ae3
callq 0x5380
movq %rax, %rdi
callq 0x5180
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movq 0x48(%r14), %rsi
movq %r14, 0x40(%rsp)
subq 0x40(%r14), %rsi
sarq $0x3, %rsi
leaq 0xd0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xb942
shrq $0x3, %rbx
xorl %eax, %eax
cmpq $0xc, %rax
je 0x7c60
andl $0x0, 0x70(%rsp,%rax,4)
incq %rax
jmp 0x7c50
movl %ebx, %ebx
xorl %r12d, %r12d
leaq 0xe8(%rsp), %r14
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x7f15
movq %r12, 0xc8(%rsp)
movq %r14, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
pushq $0x68
popq %rdi
callq 0x5390
movq %rax, %r13
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r13)
leaq 0x158fa(%rip), %rax     # 0x1d5b0
movq %rax, (%r13)
andq $0x0, 0x18(%r13)
movq %r13, 0x18(%rsp)
andl $0x0, 0x20(%r13)
movb $0x0, 0x24(%r13)
andl $0x0, 0x28(%r13)
leaq 0x10(%r13), %r14
andq $0x0, 0x30(%r13)
andl $0x0, 0x38(%r13)
leaq 0x15918(%rip), %rax     # 0x1d600
movq %rax, 0x10(%r13)
pushq $0x30
popq %rdi
callq 0x5390
movq %rax, %rbp
movq %rax, %rdi
callq 0xc7ee
movq %rbp, 0x40(%r13)
movsd 0xbc95(%rip), %xmm0     # 0x139a0
movsd %xmm0, 0x48(%r13)
movl $0x200, 0x50(%r13)      # imm = 0x200
movq %r15, 0x58(%r13)
movq 0x40(%rsp), %rax
movq %rax, 0x60(%r13)
andq $0x0, 0xa8(%rsp)
pushq $0x20
popq %rdi
callq 0x5390
leaq 0x1591a(%rip), %rcx     # 0x1d658
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
leaq 0x2988(%rip), %rcx      # 0xa6d4
movq %rcx, 0x10(%rax)
andq $0x0, 0x18(%rax)
movq %rax, 0x48(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x5310
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7d7e
movq (%rdi), %rax
callq *0x8(%rax)
movq %r13, %rdi
addq $0x30, %rdi
leaq 0xa8(%rsp), %rbp
movq %rbp, %rsi
callq 0xc810
movq %rbp, %rdi
callq 0xc82a
andq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xa65e
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps 0x30(%rsp), %xmm0
movq %r14, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xc0d4
leaq 0xb8(%rsp), %rdi
callq 0xc0d4
cmpq $0x0, 0x30(%rsp)
jne 0x7ec7
pushq $0x58
popq %rdi
callq 0x5390
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x1587a(%rip), %rax     # 0x1d698
movq %rax, (%r14)
movq %r14, %r13
addq $0x10, %r13
andq $0x0, 0x18(%r14)
andl $0x0, 0x20(%r14)
movb $0x0, 0x24(%r14)
andl $0x0, 0x28(%r14)
leaq 0x158a5(%rip), %rax     # 0x1d6e8
movq %rax, 0x10(%r14)
pushq $0x30
popq %rdi
callq 0x5390
movq %rax, %rbp
movq %rax, %rdi
callq 0xc7ee
movq %rbp, 0x30(%r14)
movsd 0xbb3a(%rip), %xmm0     # 0x139a0
movsd %xmm0, 0x38(%r14)
movl $0x200, 0x40(%r14)      # imm = 0x200
movq %r15, 0x48(%r14)
movq 0x40(%rsp), %rax
movq %rax, 0x50(%r14)
andq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xaf80
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps 0x30(%rsp), %xmm0
movq %r13, 0x30(%rsp)
movq %r14, 0x38(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xc0d4
leaq 0xb8(%rsp), %rdi
callq 0xc0d4
movq %r12, %r14
movq %r12, %rdi
leaq 0x30(%rsp), %rsi
callq 0xd1ee
movq 0xc8(%rsp), %r12
leaq 0x38(%rsp), %rdi
callq 0xc0d4
movq 0xd0(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0xb994
leaq 0xf0(%rsp), %rdi
callq 0xc0d4
incq %r15
addq $0x10, %r12
jmp 0x7c70
pushq $0x18
popq %rbp
leaq 0xd0(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x50(%rsp), %r12
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
idivq %rbp
movq 0x40(%rsp), %rdi
movq 0x48(%rdi), %rdx
subq 0x40(%rdi), %rdx
sarq $0x3, %rdx
cmpq %rdx, %rax
jae 0x7f8b
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x7f2a
movq %r14, %rdi
movq %r13, %rsi
callq 0xb9c2
movq %r15, %rdi
movq %rax, %rsi
callq 0xb9e4
movq %r12, %rdi
movq %r15, %rsi
callq 0xba38
movq %r15, %rdi
callq 0xc6c6
incq %r13
jmp 0x7f58
xorl %r14d, %r14d
leaq 0x50(%rsp), %r15
subq %rsi, %rcx
movl %r14d, %r14d
movq %rcx, %rax
cqto
idivq %rbp
cmpq %r14, %rax
jbe 0x7ff9
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0xba64
movl %ebx, %r12d
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x7fea
movq %r15, %rdi
movq %r14, %rsi
callq 0xba64
movq %rax, %rdi
movq %r12, %rsi
callq 0xba82
movl (%rax), %eax
addl %eax, 0x70(%rsp,%r12,4)
leal 0x1(%r12), %ebx
jmp 0x7fa8
incl %r14d
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rcx
jmp 0x7f93
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
cmpq $0xc, %rcx
je 0x8017
movl 0x70(%rsp,%rcx,4), %esi
cmpl %esi, %edx
cmovll %ecx, %eax
cmovlel %esi, %edx
incq %rcx
jmp 0x8000
cltq
leaq 0xbee0(%rip), %rcx      # 0x13f00
movl (%rcx,%rax,4), %ebp
movl %ebp, 0x8(%rsp)
testl %eax, %eax
je 0x8101
leaq 0x20(%rsp), %rbx
movq 0x15f75(%rip), %r14     # 0x1dfb0
movq 0x15f96(%rip), %r12     # 0x1dfd8
leaq 0x10(%rsp), %r13
leaq 0xb144(%rip), %r15      # 0x13192
movq %rbx, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %r14, %rdi
leaq 0xbacc(%rip), %rsi      # 0x13b34
callq 0x5380
movq %rax, %rdi
movl %ebp, %esi
callq 0x55f0
movq %rax, %rdi
leaq 0xb30c(%rip), %rsi      # 0x1338d
callq 0x5380
movq %rax, %rdi
callq 0x5180
movq %r14, %rdi
leaq 0xbaad(%rip), %rsi      # 0x13b45
callq 0x5380
movq %rax, %rdi
callq 0x5180
movq %r14, %rdi
leaq 0xbae5(%rip), %rsi      # 0x13b94
callq 0x5380
movq %r12, %rdi
movq %r13, %rsi
callq 0x5090
movq %r13, %rdi
movq %r15, %rsi
callq 0x6f43
testb %al, %al
jne 0x8149
movq %r13, %rdi
leaq 0xd46d(%rip), %rsi      # 0x15545
callq 0x6f43
testb %al, %al
jne 0x8121
movq %r13, %rdi
leaq 0xd304(%rip), %rsi      # 0x153ef
callq 0x6f43
testb %al, %al
jne 0x816d
movq %r13, %rdi
callq 0x5160
jmp 0x804e
movq 0x15ea8(%rip), %rdi     # 0x1dfb0
leaq 0xb9fc(%rip), %rsi      # 0x13b0b
callq 0x5380
movq %rax, %rdi
callq 0x5180
jmp 0x83ac
movq 0x15e88(%rip), %rdi     # 0x1dfb0
leaq 0xbaa8(%rip), %rsi      # 0x13bd7
callq 0x5380
movq 0x15e9d(%rip), %rdi     # 0x1dfd8
leaq 0x8(%rsp), %rsi
callq 0x5210
movl 0x8(%rsp), %ebp
shll $0xa, %ebp
movl %ebp, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x5160
movslq 0x8(%rsp), %r14
movq 0x40(%rsp), %rax
movq %r14, 0x60(%rax)
jmp 0x83b0
movq 0x15e3c(%rip), %rdi     # 0x1dfb0
leaq 0xba9d(%rip), %rsi      # 0x13c18
callq 0x5380
movq 0x15e29(%rip), %rdi     # 0x1dfb0
leaq 0xbae7(%rip), %rsi      # 0x13c75
callq 0x5380
movl 0x70(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15e02(%rip), %rdi     # 0x1dfb0
leaq 0xbac1(%rip), %rsi      # 0x13c76
callq 0x5380
movl 0x74(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15ddb(%rip), %rdi     # 0x1dfb0
leaq 0xbaa1(%rip), %rsi      # 0x13c7d
callq 0x5380
movl 0x78(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15db4(%rip), %rdi     # 0x1dfb0
leaq 0xba81(%rip), %rsi      # 0x13c84
callq 0x5380
movl 0x7c(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15d8d(%rip), %rdi     # 0x1dfb0
leaq 0xba61(%rip), %rsi      # 0x13c8b
callq 0x5380
movl 0x80(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15d63(%rip), %rdi     # 0x1dfb0
leaq 0xba3e(%rip), %rsi      # 0x13c92
callq 0x5380
movl 0x84(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15d39(%rip), %rdi     # 0x1dfb0
leaq 0xba1b(%rip), %rsi      # 0x13c99
callq 0x5380
movl 0x88(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15d0f(%rip), %rdi     # 0x1dfb0
leaq 0xb9f8(%rip), %rsi      # 0x13ca0
callq 0x5380
movl 0x8c(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15ce5(%rip), %rdi     # 0x1dfb0
leaq 0xb9d5(%rip), %rsi      # 0x13ca7
callq 0x5380
movl 0x90(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15cbb(%rip), %rdi     # 0x1dfb0
leaq 0xb9b2(%rip), %rsi      # 0x13cae
callq 0x5380
movl 0x94(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15c91(%rip), %rdi     # 0x1dfb0
leaq 0xb98f(%rip), %rsi      # 0x13cb5
callq 0x5380
movl 0x98(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15c67(%rip), %rdi     # 0x1dfb0
leaq 0xb96c(%rip), %rsi      # 0x13cbc
callq 0x5380
movl 0x9c(%rsp), %esi
movq %rax, %rdi
callq 0x55f0
movq %rax, %rdi
callq 0x5180
movq 0x15c7d(%rip), %rdi     # 0x1dff0
leaq 0xb949(%rip), %rsi      # 0x13cc3
callq 0x5380
movq %rax, %rdi
callq 0x5180
movq 0x15c62(%rip), %rdi     # 0x1dff0
leaq 0xb950(%rip), %rsi      # 0x13ce5
callq 0x5380
movq %rax, %rdi
callq 0x5180
leaq 0x10(%rsp), %rdi
callq 0x5160
pushq $-0x1
popq %r14
leaq 0xd0(%rsp), %rdi
callq 0xbaa4
leaq 0x50(%rsp), %rdi
callq 0xbac6
movl %r14d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8499
jmp 0x84d5
movq %rax, %rbx
jmp 0x84e5
jmp 0x8499
movq %rax, %rbx
movq %r13, %rdi
callq 0xc894
leaq 0x10(%rsp), %rdi
callq 0xaf80
jmp 0x84b0
jmp 0x8417
movq %rdx, %r15
movq %rax, %rbx
jmp 0x8463
movq %rax, %rbx
jmp 0x84b0
movq %rdx, %r15
movq %rax, %rbx
jmp 0x8451
movq %rdx, %r15
movq %rax, %rbx
jmp 0x8445
movq %rdx, %r15
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8445
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x40, %r13
movq %r13, %rdi
callq 0xc838
movq %r14, %rdi
callq 0xc862
leaq 0x10(%rsp), %rdi
callq 0xa65e
cmpl $0x1, %r15d
jne 0x84b0
movq %rbx, %rdi
callq 0x5140
leaq 0x10(%rax), %rbx
callq 0x51a0
leaq 0xb0(%rsp), %rsi
movl $0xb, (%rsi)
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0xc7e4
callq 0x54f0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5160
jmp 0x84d8
movq %rax, %rbx
callq 0x55a0
leaq 0x38(%rsp), %rdi
callq 0xc0d4
jmp 0x84d8
movq %rax, %rdi
callq 0x7100
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xc6c6
jmp 0x84d8
jmp 0x84d5
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xbaa4
leaq 0x50(%rsp), %rdi
callq 0xbac6
movq %rbx, %rdi
callq 0x5610
nop