// File: /workspace/github_cpp_makefile_star2_O2/auton1[P]viterbi/viterbi.cpp
// Function: viterbi(std::vector<std::vector<bool, std::allocator<bool>>, std::allocator<std::vector<bool, std::allocator<bool>>>> const&, std::vector<double, std::allocator<double>> const&, int, parameters const&, std::vector<int, std::allocator<int>>&)
void viterbi(const vector<vector<bool> > &haps, const vector<double> &map, int indv_idx, const parameters &params, vector<int> &out_path)
{
	int N_hap = haps.size()-1;	// The minus 1 accounts for the current haplotype.
	int N_pos = haps[0].size();
	vector<double> v(N_hap, 0.0);
	//vector<double> va(N_hap, -numeric_limits<double>::max());
	vector<double> vb(N_hap, -numeric_limits<double>::max());
	vector<double>::iterator it;
	vector<vector<unsigned short> > ptr(N_pos-1, vector<unsigned short>(N_hap, 0));	// Lots of memory used here

	double em_match = log(1.0 - params.p_error);
	double em_mismatch = max(log(params.p_error), -9999.9);

	vector<int> v_idx_to_hap_idx(N_hap);
	int idx_i=0;
	for (int i=0; i<haps.size(); i++)
	{
		if (i == indv_idx)
			continue;
		v_idx_to_hap_idx[idx_i] = i;

		if (haps[indv_idx][0] == haps[i][0])
			v[idx_i] = em_match;
		else
			v[idx_i] = em_mismatch;

		idx_i++;
	}

	int numthreads = min(min((int)thread::hardware_concurrency(), params.max_threads), 8);
	LOG.printLOG("Using " + output_log::int2str(numthreads) + " threads\n");
	int rows = N_hap / numthreads;
	int extra = N_hap % numthreads;
	int output_count = 0;

	struct timespec start_time;
	struct timespec end_time;
	double prev_elapsed = numeric_limits<double>::max();
	bool increase = true;

	#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
		clock_serv_t cclock;
		mach_timespec_t mts;
		host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
		clock_get_time(cclock, &mts);
		mach_port_deallocate(mach_task_self(), cclock);
		start_time.tv_sec = mts.tv_sec;
		start_time.tv_nsec = mts.tv_nsec;
	#else
		clock_gettime(CLOCK_REALTIME, &start_time);
	#endif

	for (int i=1; i < N_pos; i++)
	{
		bool allele = haps[indv_idx][i];
		double rho = 4.0*params.Ne*((map[i] - map[i-1])/100.0);

		double tmp = exp(-rho / N_hap);
		double p_rec = (1.0-tmp) / N_hap;
		double p_no_rec = tmp + p_rec;

		p_rec = log(p_rec);
		p_no_rec = log(p_no_rec);

		/*
		for (int j=0; j < N_hap; j++)	// Could parallelize this loop?
		{	// Fast Version
			transform(v.begin(), v.end(), va.begin(), bind2nd(std::plus<double>(), p_rec));
			va[j] = v[j] + p_no_rec;
			it = max_element(va.begin(), va.end());
			ptr[i-1][j] = distance(va.begin(), it);

			if (haps[ v_idx_to_hap_idx[j] ][i] == allele)
			{	// Match
				vb[j] = em_match + *it;
			}
			else
			{	// Mismatch
				vb[j] = em_mismatch + *it;
			}
		}
		*/

		int start = 0; int end = rows;
		vector<std::thread> workers;

		for (int t=0; t<numthreads; t++)
		{
			if (t == (numthreads-1))
				end += extra;	// Last thread does extra work

			workers.push_back(std::thread(inner_loop_viterbi, ref(v), p_rec, p_no_rec, ref(haps),
					em_match, em_mismatch, i, start, end,
					ref(v_idx_to_hap_idx), allele, ref(ptr), ref(vb)));
			start = end;
			end = end + rows;
		}
		for (thread& t : workers)
			t.join();

		v = vb;	// Replace old state with new state.

		if ((i % 100) == 0)
		{
			// Adaptive threading
			#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
				host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
				clock_get_time(cclock, &mts);
				mach_port_deallocate(mach_task_self(), cclock);
				end_time.tv_sec = mts.tv_sec;
				end_time.tv_nsec = mts.tv_nsec;
			#else
				clock_gettime(CLOCK_REALTIME, &end_time);
			#endif

			double elapsed = diff(start_time, end_time);

			LOG.printLOG(output_log::dbl2str(double(i)/N_pos*100, 3) + "% " + output_log::int2str(numthreads) + " threads " + output_log::dbl2str(elapsed, 3) + " seconds\n");

			if (((elapsed > prev_elapsed) && (increase == false)) || ((elapsed < prev_elapsed) && (increase == true)))
			{	// Try increasing the number of threads
				numthreads++;
				numthreads = min(numthreads, min((int)thread::hardware_concurrency(), params.max_threads));
				rows = N_hap / numthreads;
				extra = N_hap % numthreads;
				increase = true;
			}
			else if (((elapsed > prev_elapsed) && (increase == true)) || ((elapsed < prev_elapsed) && (increase == false)))
			{	// Try decreasing the number of threads
				numthreads -= 2;
				numthreads = max(numthreads, 1);
				rows = N_hap / numthreads;
				extra = N_hap % numthreads;
				increase = false;
			}
			prev_elapsed = elapsed;

			#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
				host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
				clock_get_time(cclock, &mts);
				mach_port_deallocate(mach_task_self(), cclock);
				start_time.tv_sec = mts.tv_sec;
				start_time.tv_nsec = mts.tv_nsec;
			#else
				clock_gettime(CLOCK_REALTIME, &start_time);
			#endif
		}
	}

	double max_v = -numeric_limits<double>::max();
	int max_v_idx = -1;
	for (int j=0; j<N_hap; j++)
	{
		if (v[j] > max_v)
		{
			max_v = v[j];
			max_v_idx = j;
		}
	}

	LOG.printLOG("Best Path Prob: " + output_log::dbl2str(max_v,6) + "\n");

	out_path.resize(N_pos);
	out_path[N_pos-1] = v_idx_to_hap_idx[max_v_idx];
	for (int i=N_pos-2; i >= 0; i--)
	{
		max_v_idx = ptr[i][max_v_idx];
		out_path[i] = v_idx_to_hap_idx[max_v_idx];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %r8, 0xf8(%rsp)
movq %rcx, 0x20(%rsp)
movl %edx, %ebp
movq %rsi, 0x108(%rsp)
movq (%rdi), %rcx
movq %rdi, 0x28(%rsp)
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x28
popq %rbx
cqto
idivq %rbx
decl %eax
movq 0x10(%rcx), %r12
movl 0x18(%rcx), %r13d
subq (%rcx), %r12
movq %rax, 0x70(%rsp)
movslq %eax, %r14
leaq 0x50(%rsp), %r15
andq $0x0, (%r15)
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x97b0
movabsq $-0x10000000000001, %rax # imm = 0xFFEFFFFFFFFFFFFF
movq %rax, (%r15)
leaq 0x180(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r14, %rsi
callq 0x97b0
leaq 0x30(%rsp), %rdx
andw $0x0, (%rdx)
leaq 0x50(%rsp), %rdi
leaq 0x198(%rsp), %rcx
movq %r14, %rsi
callq 0x9984
leaq (,%r12,8), %rcx
addq %r13, %rcx
movq %rcx, 0x78(%rsp)
shlq $0x20, %rcx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movq %rcx, 0xf0(%rsp)
addq %rcx, %rsi
sarq $0x20, %rsi
leaq 0x168(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x148(%rsp), %rcx
movq %rsi, 0xe8(%rsp)
callq 0x99da
leaq 0x50(%rsp), %rdi
callq 0xac56
movsd 0x259cf(%rip), %xmm0    # 0x2d018
movq 0x20(%rsp), %r15
subsd 0x520(%r15), %xmm0
callq 0x53a0
movsd %xmm0, 0xa8(%rsp)
movsd 0x520(%r15), %xmm0
callq 0x53a0
movsd 0x259a5(%rip), %xmm1    # 0x2d020
maxsd %xmm0, %xmm1
movsd %xmm1, 0xa0(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0x985c
movslq %ebp, %rax
movl %eax, %r14d
xorl %r15d, %r15d
imulq $0x28, %rax, %rax
movq %rax, 0x90(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
cqto
idivq %rbx
cmpq %r13, %rax
jbe 0x7740
cmpq %r13, %r14
je 0x7734
movslq %r12d, %r12
movq 0x130(%rsp), %rax
movl %r13d, (%rax,%r12,4)
addq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0x9792
movl %eax, %ebp
movq 0x28(%rsp), %rax
movq (%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x9792
xorb %al, %bpl
leaq 0xa8(%rsp), %rax
leaq 0xa0(%rsp), %rcx
cmovneq %rcx, %rax
movq 0xd0(%rsp), %rcx
movsd (%rax), %xmm0
movsd %xmm0, (%rcx,%r12,8)
incl %r12d
incq %r13
addq $0x28, %r15
jmp 0x76b8
callq 0x5620
movq 0x20(%rsp), %rcx
movl 0x528(%rcx), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
cmpl $0x8, %eax
pushq $0x8
popq %rbp
cmovll %eax, %ebp
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
callq 0x2c1fc
leaq 0x25941(%rip), %rsi     # 0x2d0b2
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x98d5
movq 0x70(%rsp), %r15
leaq 0x2592d(%rip), %rdx     # 0x2d0b9
leaq 0x208(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x98b6
leaq 0x39d2b(%rip), %rdi     # 0x414d0
leaq 0x208(%rsp), %rsi
callq 0x2beca
leaq 0x208(%rsp), %rdi
callq 0x5908
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x5908
leaq 0x30(%rsp), %rdi
callq 0x5908
movl %r15d, %eax
cltd
idivl %ebp
movl %edx, 0x18(%rsp)
movl %eax, %r13d
leaq 0x120(%rsp), %rsi
xorl %edi, %edi
callq 0x5420
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x98(%rsp)
cvtsi2sdl 0x78(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x25829(%rip), %xmm0    # 0x2d040
movb $0x1, %al
movl %eax, 0x4(%rsp)
pushq $0x1
popq %rax
leaq 0x248(%rsp), %rbx
movl %eax, 0x8(%rsp)
cmpl 0x78(%rsp), %eax
jge 0x7cc6
movsd %xmm0, 0x80(%rsp)
movq 0x28(%rsp), %rcx
movq (%rcx), %rdi
addq 0x90(%rsp), %rdi
movslq %eax, %rsi
callq 0x9792
movb %al, 0x3(%rsp)
movslq 0x8(%rsp), %rax
movq 0x108(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm1
subsd -0x8(%rcx,%rax,8), %xmm1
divsd 0x257b2(%rip), %xmm1    # 0x2d030
movq 0x20(%rsp), %rax
movsd 0x4f0(%rax), %xmm0
mulsd 0x257a5(%rip), %xmm0    # 0x2d038
mulsd %xmm1, %xmm0
divsd 0x98(%rsp), %xmm0
callq 0x5810
movsd 0x2576b(%rip), %xmm1    # 0x2d018
subsd %xmm0, %xmm1
divsd 0x98(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movapd %xmm1, %xmm0
callq 0x53a0
movsd %xmm0, 0x118(%rsp)
movsd 0x88(%rsp), %xmm0
callq 0x53a0
movsd %xmm0, 0x88(%rsp)
andl $0x0, 0x1c(%rsp)
movl %r13d, 0xc(%rsp)
andq $0x0, 0xc0(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
xorl %r12d, %r12d
testl %ebp, %ebp
movq %rbp, %rax
movl $0x0, %ebp
cmovgl %eax, %ebp
movq %rax, 0x110(%rsp)
leal -0x1(%rax), %r15d
movl %r13d, %eax
cmpl %r12d, %ebp
je 0x7a2f
cmpl %r12d, %r15d
jne 0x7945
addl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x198(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x148(%rsp)
leaq 0x168(%rsp), %rax
movq %rax, 0x248(%rsp)
leaq 0x180(%rsp), %rax
movq %rax, 0x1c8(%rsp)
subq $0x8, %rsp
movq %r14, %rdi
leaq -0x1378(%rip), %rsi     # 0x6625
leaq 0x38(%rsp), %rdx
leaq 0x120(%rsp), %rcx
leaq 0x90(%rsp), %r8
leaq 0x1a0(%rsp), %r9
leaq 0x1d0(%rsp), %rax
pushq %rax
pushq %rbx
leaq 0x1b(%rsp), %rax
pushq %rax
leaq 0x168(%rsp), %rax
pushq %rax
leaq 0x34(%rsp), %rax
pushq %rax
leaq 0x4c(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
callq 0x9a30
addq $0x50, %rsp
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0xb1fe
movq %r14, %rdi
callq 0x9b14
movl 0xc(%rsp), %eax
movl %eax, 0x1c(%rsp)
addl %r13d, %eax
movl %eax, 0xc(%rsp)
incl %r12d
jmp 0x792f
movq 0xb0(%rsp), %r12
movq 0xb8(%rsp), %r15
movq 0x110(%rsp), %rbp
cmpq %r15, %r12
je 0x7a5a
movq %r12, %rdi
callq 0x57c0
addq $0x8, %r12
jmp 0x7a47
leaq 0xd0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x9b22
movl 0x8(%rsp), %eax
cltd
pushq $0x64
popq %rcx
idivl %ecx
testl %edx, %edx
jne 0x7ca5
xorl %edi, %edi
leaq 0x1b8(%rsp), %rsi
callq 0x5420
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
movq 0x1c0(%rsp), %rcx
callq 0x6781
movsd %xmm0, 0x10(%rsp)
cvtsi2sdl 0x8(%rsp), %xmm0
divsd 0x100(%rsp), %xmm0
mulsd 0x2555e(%rip), %xmm0    # 0x2d030
movq %rbx, %r15
movq %rbx, %rdi
pushq $0x3
popq %rsi
callq 0x2c2cc
leaq 0x148(%rsp), %rdi
movq %r15, %rsi
leaq 0x255d1(%rip), %rdx     # 0x2d0c3
callq 0x98b6
leaq 0x1c8(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0x2c1fc
leaq 0x198(%rsp), %r12
movq %r12, %rdi
leaq 0x148(%rsp), %rsi
movq %r15, %rdx
callq 0x9be3
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
leaq 0x25593(%rip), %rdx     # 0x2d0c6
callq 0x98b6
leaq 0x228(%rsp), %r15
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
pushq $0x3
popq %rsi
callq 0x2c2cc
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %r15, %rdx
callq 0x9be3
leaq 0x268(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x2555a(%rip), %rdx     # 0x2d0d0
callq 0x98b6
leaq 0x3994e(%rip), %rdi     # 0x414d0
movq %r15, %rsi
callq 0x2beca
movq %r15, %rdi
callq 0x5908
movq %r14, %rdi
callq 0x5908
leaq 0x228(%rsp), %rdi
callq 0x5908
leaq 0x30(%rsp), %rdi
callq 0x5908
leaq 0x198(%rsp), %rdi
callq 0x5908
leaq 0x1c8(%rsp), %rdi
callq 0x5908
leaq 0x148(%rsp), %rdi
callq 0x5908
movq %rbx, %rdi
callq 0x5908
movl 0x4(%rsp), %eax
andb $0x1, %al
movsd 0x80(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7c23
testb %al, %al
jne 0x7c23
incl %ebp
callq 0x5620
movq 0x20(%rsp), %rcx
movl 0x528(%rcx), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
cmpl %ebp, %eax
cmovll %eax, %ebp
movb $0x1, %al
movl %eax, 0x4(%rsp)
jmp 0x7c78
ucomisd 0x10(%rsp), %xmm0
jbe 0x7c32
testb $0x1, 0x4(%rsp)
jne 0x7bff
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7c5a
ucomisd %xmm1, %xmm0
seta %al
movl 0x4(%rsp), %edx
testb $0x1, %dl
sete %cl
testb $0x1, %dl
jne 0x7c64
andb %cl, %al
je 0x7c87
jmp 0x7c64
ucomisd %xmm1, %xmm0
jbe 0x7c87
testb %al, %al
jne 0x7c87
cmpl $0x4, %ebp
pushq $0x3
popq %rax
cmovll %eax, %ebp
addl $-0x2, %ebp
movl $0x0, 0x4(%rsp)
movq 0x70(%rsp), %rax
cltd
idivl %ebp
movl %edx, 0x18(%rsp)
movl %eax, %r13d
xorl %edi, %edi
leaq 0x120(%rsp), %rsi
callq 0x5420
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x9c4a
movl 0x8(%rsp), %eax
incl %eax
movsd 0x80(%rsp), %xmm0
jmp 0x7828
movq 0xd0(%rsp), %rax
xorl %ecx, %ecx
movq 0x70(%rsp), %rdx
testl %edx, %edx
cmovlel %ecx, %edx
pushq $-0x1
popq %rbx
movsd 0x25343(%rip), %xmm0    # 0x2d028
movq 0xf8(%rsp), %r14
cmpq %rcx, %rdx
je 0x7d0b
movsd (%rax,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
cmoval %ecx, %ebx
maxsd %xmm0, %xmm1
incq %rcx
movapd %xmm1, %xmm0
jmp 0x7ced
leaq 0x30(%rsp), %rdi
pushq $0x6
popq %rsi
callq 0x2c2cc
leaq 0x253bb(%rip), %rsi     # 0x2d0da
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x98d5
leaq 0x253d6(%rip), %rdx     # 0x2d10b
leaq 0x1e8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x98b6
leaq 0x39782(%rip), %rdi     # 0x414d0
leaq 0x1e8(%rsp), %rsi
callq 0x2beca
leaq 0x1e8(%rsp), %rdi
callq 0x5908
leaq 0x50(%rsp), %rdi
callq 0x5908
leaq 0x30(%rsp), %rdi
callq 0x5908
movq 0xf0(%rsp), %rsi
sarq $0x20, %rsi
movq %r14, %rdi
callq 0x9c6c
movslq %ebx, %rcx
movq 0x130(%rsp), %rax
movl (%rax,%rcx,4), %edx
movq (%r14), %rcx
movq 0xe8(%rsp), %rsi
movl %edx, (%rcx,%rsi,4)
movq 0x78(%rsp), %r9
addl $-0x2, %r9d
movq 0x168(%rsp), %rdx
testl %r9d, %r9d
js 0x7de0
movl %r9d, %esi
imulq $0x18, %rsi, %rdi
movslq %ebx, %r8
movq (%rdx,%rdi), %rdi
movzwl (%rdi,%r8,2), %ebx
movl (%rax,%rbx,4), %edi
movl %edi, (%rcx,%rsi,4)
decl %r9d
jmp 0x7dbd
leaq 0x130(%rsp), %rdi
callq 0xa18e
leaq 0x168(%rsp), %rdi
callq 0x9c9e
leaq 0x180(%rsp), %rdi
callq 0xa19c
leaq 0xd0(%rsp), %rdi
callq 0xa19c
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7f48
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
callq 0x5908
jmp 0x7e40
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5908
jmp 0x7e7a
movq %rax, %rbx
jmp 0x7e7a
jmp 0x7f48
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x5908
jmp 0x7e6b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5908
jmp 0x7e7a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5908
jmp 0x7f6e
jmp 0x7f48
movq %rax, %rbx
jmp 0x7f7b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xac56
jmp 0x7f88
movq %rax, %rbx
jmp 0x7f88
movq %rax, %rbx
jmp 0x7f95
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
callq 0x5908
jmp 0x7ecd
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5908
jmp 0x7ef2
movq %rax, %rbx
jmp 0x7eff
movq %rax, %rbx
jmp 0x7f1b
movq %rax, %rbx
jmp 0x7f28
movq %rax, %rbx
jmp 0x7f35
jmp 0x7f4f
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x5908
leaq 0x30(%rsp), %rdi
callq 0x5908
jmp 0x7f0e
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x5908
leaq 0x1c8(%rsp), %rdi
callq 0x5908
leaq 0x148(%rsp), %rdi
callq 0x5908
leaq 0x248(%rsp), %rdi
callq 0x5908
jmp 0x7f61
jmp 0x7f4f
jmp 0x7f48
movq %rax, %rbx
jmp 0x7f6e
jmp 0x7f4f
movq %rax, %rbx
jmp 0x7f61
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x9b14
leaq 0xb0(%rsp), %rdi
callq 0x9c4a
leaq 0x130(%rsp), %rdi
callq 0xa18e
leaq 0x168(%rsp), %rdi
callq 0x9c9e
leaq 0x180(%rsp), %rdi
callq 0xa19c
leaq 0xd0(%rsp), %rdi
callq 0xa19c
movq %rbx, %rdi
callq 0x5800