// File: auton1[P]viterbi/viterbi.cpp
// Function: fwdbck(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>>&, std::vector<double, std::allocator<double>>&)
void fwdbck(const vector<vector<bool> > &haps, const vector<double> &map, int indv_idx, const parameters &params, vector<int> &out_path, vector<double> &out_prob)
{
	int N_hap = haps.size()-1;	// The minus 1 accounts for the current haplotype.
	int N_pos = haps[0].size();

	vector<vector<double> > f(N_pos, vector<double>(N_hap, -numeric_limits<double>::max()));	// Lots of memory used here
	vector<vector<double> > b(N_pos, vector<double>(N_hap, -numeric_limits<double>::max()));	// 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> f_idx_to_hap_idx(N_hap);
	int idx_i=0;
	for (int i=0; i<haps.size(); i++)
	{
		if (i == indv_idx)
			continue;
		f_idx_to_hap_idx[idx_i] = i;

		if (haps[indv_idx][0] == haps[i][0])
			f[0][idx_i] = em_match - log(N_hap);
		else
			f[0][idx_i] = em_mismatch - log(N_hap);

		idx_i++;
	}

	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?
		{
			vector<double> tmp(N_hap, -numeric_limits<double>::max());
			double m=-numeric_limits<double>::max();
			for (int k=0; k<N_hap; k++)
			{
				if (j == k)
					tmp[k] = p_no_rec + f[i-1][k];
				else
					tmp[k] = p_rec + f[i-1][k];
				m = max(m, tmp[k]);
			}

			double s = 0;
			for (int k=0; k<N_hap; k++)
				s += exp(tmp[k] - m);
			s = log(s);
			s += m;

			if (haps[ f_idx_to_hap_idx[j] ][i] == allele)
				f[i][j] = s + em_match;
			else
				f[i][j] = s + em_mismatch;
		}

		if ((i % 100) == 0)
		{
			LOG.printLOG(output_log::dbl2str(double(i)/N_pos*100, 3) + "%\n");
		}
	}

	{
		double m=-numeric_limits<double>::max();
		for (int k=0; k<N_hap; k++)
			m = max(m, f[N_pos-1][k]);
		double post = 0;
		for (int k=0; k<N_hap; k++)
			post += exp(f[N_pos-1][k] - m);
		post = log(post);
		post += m;
		LOG.printLOG("Fwd posterior: " + LOG.dbl2str(post, 3) + "\n");
	}

	for (int i=0; i<b[0].size(); i++)
	{
		b[N_pos-1][i] = -log(N_hap);
	}

	for (int i=N_pos-2; i > -1; i--)
	{
		bool allele = haps[indv_idx][i+1];
		double rho = 4.0*params.Ne*((map[i+1] - map[i])/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?
		{
			vector<double> tmp(N_hap, -numeric_limits<double>::max());
			double m=-numeric_limits<double>::max();
			for (int k=0; k<N_hap; k++)
			{
				tmp[k] = em_mismatch;
				if (haps[ f_idx_to_hap_idx[k] ][i+1] == allele)
					tmp[k] = em_match;

				if (j == k)
					tmp[k] += p_no_rec + b[i+1][k];
				else
					tmp[k] += p_rec + b[i+1][k];

				m = max(m, tmp[k]);
			}

			double s = 0;
			for (int k=0; k<N_hap; k++)
				s += exp(tmp[k] - m);
			s = log(s);
			s += m;

			b[i][j] = s;
		}

		if ((i % 100) == 0)
		{
			LOG.printLOG(output_log::dbl2str(double(i)/N_pos*100, 3) + "%\n");
		}
	}

	{
		bool allele = haps[indv_idx][0];
		double m=-numeric_limits<double>::max();
		for (int k=0; k<N_hap; k++)
		{
			if (haps[ f_idx_to_hap_idx[k] ][0] == allele)
				m = max(m, b[0][k] + em_match);
			else
				m = max(m, b[0][k] + em_mismatch);
		}
		double post = 0;
		for (int k=0; k<N_hap; k++)
		{
			if (haps[ f_idx_to_hap_idx[k] ][0] == allele)
				post += exp((b[0][k] + em_match) - m);
			else
				post += exp((b[0][k] + em_mismatch) - m);
		}
		post = log(post);
		post += m;
		LOG.printLOG("Bwd posterior: " + LOG.dbl2str(post, 3) + "\n");
	}

	out_path.resize(N_pos, 0);
	out_prob.resize(N_pos,0);
	for (int i=0; i<N_pos; i++)
	{
		vector<double> post(N_hap, -numeric_limits<double>::max());
		double m = -numeric_limits<double>::max();
		int m_idx = 0;
		for (int j=0; j<N_hap; j++)
		{
			post[j] = f[i][j] + b[i][j];
			if (post[j] > m)
			{
				m = post[j];
				m_idx = j;
			}
		}
		double sum = 0;
		for (int j=0; j<N_hap; j++)
		{
			post[j] = exp(post[j] - m);
			sum += post[j];
		}
		for (int j=0; j<N_hap; j++)
			post[j] /= sum;

		out_path[i] = f_idx_to_hap_idx[m_idx];
		out_prob[i] = post[m_idx];
	}


}

// Assembly:
subq $0x618, %rsp            # imm = 0x618
movq %rdi, 0x610(%rsp)
movq %rsi, 0x608(%rsp)
movl %edx, 0x604(%rsp)
movq %rcx, 0x5f8(%rsp)
movq %r8, 0x5f0(%rsp)
movq %r9, 0x5e8(%rsp)
movq 0x610(%rsp), %rdi
callq 0xf1b0
decl %eax
movl %eax, 0x5e4(%rsp)
movq 0x610(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf110
movq %rax, %rdi
callq 0xf1d0
movl %eax, 0x5e0(%rsp)
movslq 0x5e0(%rsp), %rax
movq %rax, 0x200(%rsp)
movslq 0x5e4(%rsp), %rax
movq %rax, 0x208(%rsp)
callq 0xf250
movaps 0x6b7b8(%rip), %xmm1    # 0x74040
pxor %xmm1, %xmm0
movlpd %xmm0, 0x5a8(%rsp)
leaq 0x5a7(%rsp), %rdi
movq %rdi, 0x210(%rsp)
callq 0xedd0
movq 0x208(%rsp), %rsi
movq 0x210(%rsp), %rcx
leaq 0x5b0(%rsp), %rdi
leaq 0x5a8(%rsp), %rdx
callq 0xf260
jmp 0x88d1
leaq 0x593(%rsp), %rdi
movq %rdi, 0x1f8(%rsp)
callq 0xf2e0
movq 0x200(%rsp), %rsi
movq 0x1f8(%rsp), %rcx
leaq 0x5c8(%rsp), %rdi
leaq 0x5b0(%rsp), %rdx
callq 0xf2f0
jmp 0x890d
leaq 0x593(%rsp), %rdi
callq 0xf370
leaq 0x5b0(%rsp), %rdi
callq 0xed10
leaq 0x5a7(%rsp), %rdi
callq 0xee60
movslq 0x5e0(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movslq 0x5e4(%rsp), %rax
movq %rax, 0x1e8(%rsp)
callq 0xf250
movaps 0x6b6e0(%rip), %xmm1    # 0x74040
pxor %xmm1, %xmm0
movlpd %xmm0, 0x558(%rsp)
leaq 0x557(%rsp), %rdi
movq %rdi, 0x1f0(%rsp)
callq 0xedd0
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rcx
leaq 0x560(%rsp), %rdi
leaq 0x558(%rsp), %rdx
callq 0xf260
jmp 0x89a9
leaq 0x556(%rsp), %rdi
movq %rdi, 0x1d8(%rsp)
callq 0xf2e0
movq 0x1e0(%rsp), %rsi
movq 0x1d8(%rsp), %rcx
leaq 0x578(%rsp), %rdi
leaq 0x560(%rsp), %rdx
callq 0xf2f0
jmp 0x89e5
leaq 0x556(%rsp), %rdi
callq 0xf370
leaq 0x560(%rsp), %rdi
callq 0xed10
leaq 0x557(%rsp), %rdi
callq 0xee60
movq 0x5f8(%rsp), %rax
movsd 0x520(%rax), %xmm1
movsd 0x6b5f4(%rip), %xmm0    # 0x74018
subsd %xmm1, %xmm0
callq 0x6410
movsd %xmm0, 0x548(%rsp)
movq 0x5f8(%rsp), %rax
movsd 0x520(%rax), %xmm0
callq 0x6410
movsd %xmm0, 0x538(%rsp)
movabsq $-0x3f3c780ccccccccd, %rax # imm = 0xC0C387F333333333
movq %rax, 0x530(%rsp)
leaq 0x538(%rsp), %rdi
leaq 0x530(%rsp), %rsi
callq 0xf380
movq %rax, 0x1d0(%rsp)
jmp 0x8a85
movq 0x1d0(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x540(%rsp)
movslq 0x5e4(%rsp), %rax
movq %rax, 0x1c0(%rsp)
leaq 0x517(%rsp), %rdi
movq %rdi, 0x1c8(%rsp)
callq 0xf3c0
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
leaq 0x518(%rsp), %rdi
callq 0xf3d0
jmp 0x8ade
leaq 0x517(%rsp), %rdi
callq 0xf450
movl $0x0, 0x510(%rsp)
movl $0x0, 0x50c(%rsp)
movslq 0x50c(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movq 0x610(%rsp), %rdi
callq 0xf1b0
movq %rax, %rcx
movq 0x1b8(%rsp), %rax
cmpq %rcx, %rax
jae 0x8e17
movl 0x50c(%rsp), %eax
cmpl 0x604(%rsp), %eax
jne 0x8c36
jmp 0x8e01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x8b8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x593(%rsp), %rdi
callq 0xf370
leaq 0x5b0(%rsp), %rdi
callq 0xed10
leaq 0x5a7(%rsp), %rdi
callq 0xee60
jmp 0xa7ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x8be5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x556(%rsp), %rdi
callq 0xf370
leaq 0x560(%rsp), %rdi
callq 0xed10
leaq 0x557(%rsp), %rdi
callq 0xee60
jmp 0xa7a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0xa793
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x517(%rsp), %rdi
callq 0xf450
jmp 0xa793
movl 0x50c(%rsp), %eax
movl %eax, 0x1b0(%rsp)
movslq 0x510(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movl 0x1b0(%rsp), %ecx
movl %ecx, (%rax)
movq 0x610(%rsp), %rdi
movslq 0x604(%rsp), %rsi
callq 0xf110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf150
movb %al, 0x1b7(%rsp)
jmp 0x8c8c
movb 0x1b7(%rsp), %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, 0x1a8(%rsp)
movq 0x610(%rsp), %rdi
movslq 0x50c(%rsp), %rsi
callq 0xf110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf150
movb %al, 0x1af(%rsp)
jmp 0x8cca
movl 0x1a8(%rsp), %eax
movb 0x1af(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x8d7a
movsd 0x548(%rsp), %xmm0
movsd %xmm0, 0x198(%rsp)
movl 0x5e4(%rsp), %edi
callq 0xf460
movsd %xmm0, 0x1a0(%rsp)
jmp 0x8d0f
movsd 0x1a0(%rsp), %xmm1
movsd 0x198(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x190(%rsp)
leaq 0x5c8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf480
movq %rax, %rdi
movslq 0x510(%rsp), %rsi
callq 0xe870
movsd 0x190(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x8df0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0xa786
movsd 0x540(%rsp), %xmm0
movsd %xmm0, 0x180(%rsp)
movl 0x5e4(%rsp), %edi
callq 0xf460
movsd %xmm0, 0x188(%rsp)
jmp 0x8da3
movsd 0x188(%rsp), %xmm1
movsd 0x180(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x178(%rsp)
leaq 0x5c8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf480
movq %rax, %rdi
movslq 0x510(%rsp), %rsi
callq 0xe870
movsd 0x178(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x510(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x510(%rsp)
movl 0x50c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50c(%rsp)
jmp 0x8b01
movl $0x1, 0x508(%rsp)
movl 0x508(%rsp), %eax
cmpl 0x5e0(%rsp), %eax
jge 0x94f9
movq 0x610(%rsp), %rdi
movslq 0x604(%rsp), %rsi
callq 0xf110
movq %rax, %rdi
movslq 0x508(%rsp), %rsi
callq 0xf150
movb %al, 0x177(%rsp)
jmp 0x8e64
movb 0x177(%rsp), %al
andb $0x1, %al
movb %al, 0x507(%rsp)
movq 0x5f8(%rsp), %rax
movsd 0x6b1a4(%rip), %xmm0    # 0x74028
mulsd 0x4f0(%rax), %xmm0
movsd %xmm0, 0x168(%rsp)
movq 0x608(%rsp), %rdi
movslq 0x508(%rsp), %rsi
callq 0xeff0
movsd (%rax), %xmm0
movsd %xmm0, 0x160(%rsp)
movq 0x608(%rsp), %rdi
movl 0x508(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xeff0
movsd 0x160(%rsp), %xmm1
movsd 0x168(%rsp), %xmm0
subsd (%rax), %xmm1
movsd 0x6b131(%rip), %xmm2    # 0x74020
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x4f8(%rsp)
movsd 0x4f8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
cvtsi2sdl 0x5e4(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x6a00
movsd %xmm0, 0x4f0(%rsp)
movsd 0x6b0d5(%rip), %xmm0    # 0x74018
subsd 0x4f0(%rsp), %xmm0
cvtsi2sdl 0x5e4(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x4e8(%rsp)
movsd 0x4f0(%rsp), %xmm0
addsd 0x4e8(%rsp), %xmm0
movsd %xmm0, 0x4e0(%rsp)
movsd 0x4e8(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x4e8(%rsp)
movsd 0x4e0(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x4e0(%rsp)
movl $0x0, 0x4dc(%rsp)
movl 0x4dc(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x93fa
movslq 0x5e4(%rsp), %rax
movq %rax, 0x150(%rsp)
callq 0xf250
movaps 0x6b05a(%rip), %xmm1    # 0x74040
pxor %xmm1, %xmm0
movlpd %xmm0, 0x4b8(%rsp)
leaq 0x4b7(%rsp), %rdi
movq %rdi, 0x158(%rsp)
callq 0xedd0
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rcx
leaq 0x4c0(%rsp), %rdi
leaq 0x4b8(%rsp), %rdx
callq 0xf260
jmp 0x902f
leaq 0x4b7(%rsp), %rdi
callq 0xee60
callq 0xf250
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x4a8(%rsp)
movl $0x0, 0x4a4(%rsp)
movl 0x4a4(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x9227
movl 0x4dc(%rsp), %eax
cmpl 0x4a4(%rsp), %eax
jne 0x9133
movsd 0x4e0(%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movl 0x508(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x4a4(%rsp), %rsi
callq 0xe870
movsd 0x140(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x148(%rsp)
movslq 0x4a4(%rsp), %rsi
leaq 0x4c0(%rsp), %rdi
callq 0xe870
movsd 0x148(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x91a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x4b7(%rsp), %rdi
callq 0xee60
jmp 0xa786
movsd 0x4e8(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0x508(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x4a4(%rsp), %rsi
callq 0xe870
movsd 0x130(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x138(%rsp)
movslq 0x4a4(%rsp), %rsi
leaq 0x4c0(%rsp), %rdi
callq 0xe870
movsd 0x138(%rsp), %xmm0
movsd %xmm0, (%rax)
movslq 0x4a4(%rsp), %rsi
leaq 0x4c0(%rsp), %rdi
callq 0xe870
movq %rax, %rsi
leaq 0x4a8(%rsp), %rdi
callq 0xf380
movq %rax, 0x128(%rsp)
jmp 0x91d6
movq 0x128(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x4a8(%rsp)
movl 0x4a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a4(%rsp)
jmp 0x906c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x4c0(%rsp), %rdi
callq 0xed10
jmp 0xa786
xorps %xmm0, %xmm0
movsd %xmm0, 0x498(%rsp)
movl $0x0, 0x494(%rsp)
movl 0x494(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x929a
movslq 0x494(%rsp), %rsi
leaq 0x4c0(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
subsd 0x4a8(%rsp), %xmm0
callq 0x6a00
addsd 0x498(%rsp), %xmm0
movsd %xmm0, 0x498(%rsp)
movl 0x494(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x494(%rsp)
jmp 0x923e
movsd 0x498(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x498(%rsp)
movsd 0x4a8(%rsp), %xmm1
movsd 0x498(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x498(%rsp)
movq 0x610(%rsp), %rax
movq %rax, 0x118(%rsp)
movslq 0x4dc(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movq 0x118(%rsp), %rdi
movslq (%rax), %rsi
callq 0xf110
movq %rax, %rdi
movslq 0x508(%rsp), %rsi
callq 0xf150
movb %al, 0x127(%rsp)
jmp 0x931e
movb 0x127(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x507(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x938a
movsd 0x498(%rsp), %xmm0
addsd 0x548(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movslq 0x508(%rsp), %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x4dc(%rsp), %rsi
callq 0xe870
movsd 0x110(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x93d7
movsd 0x498(%rsp), %xmm0
addsd 0x540(%rsp), %xmm0
movsd %xmm0, 0x108(%rsp)
movslq 0x508(%rsp), %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x4dc(%rsp), %rsi
callq 0xe870
movsd 0x108(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x4c0(%rsp), %rdi
callq 0xed10
movl 0x4dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4dc(%rsp)
jmp 0x8fb6
movl 0x508(%rsp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x94e1
cvtsi2sdl 0x508(%rsp), %xmm0
cvtsi2sdl 0x5e0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x6abf0(%rip), %xmm1    # 0x74020
mulsd %xmm1, %xmm0
leaq 0x450(%rsp), %rdi
movl $0x3, %esi
callq 0x71870
jmp 0x9448
leaq 0x6ac20(%rip), %rdx     # 0x7406f
leaq 0x470(%rsp), %rdi
leaq 0x450(%rsp), %rsi
callq 0xf4a0
jmp 0x9466
leaq 0x8a193(%rip), %rdi     # 0x93600
leaq 0x470(%rsp), %rsi
callq 0x71280
jmp 0x947c
leaq 0x470(%rsp), %rdi
callq 0x6b50
leaq 0x450(%rsp), %rdi
callq 0x6b50
jmp 0x94e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x94cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x470(%rsp), %rdi
callq 0x6b50
leaq 0x450(%rsp), %rdi
callq 0x6b50
jmp 0xa786
jmp 0x94e3
movl 0x508(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x508(%rsp)
jmp 0x8e22
callq 0xf250
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x448(%rsp)
movl $0x0, 0x444(%rsp)
movl 0x444(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x95a4
movl 0x5e0(%rsp), %eax
decl %eax
movslq %eax, %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x444(%rsp), %rsi
callq 0xe870
movq %rax, %rsi
leaq 0x448(%rsp), %rdi
callq 0xf380
movq %rax, 0x100(%rsp)
jmp 0x957c
movq 0x100(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x448(%rsp)
movl 0x444(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x444(%rsp)
jmp 0x9529
xorps %xmm0, %xmm0
movsd %xmm0, 0x438(%rsp)
movl $0x0, 0x434(%rsp)
movl 0x434(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x962c
movl 0x5e0(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x434(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
subsd 0x448(%rsp), %xmm0
callq 0x6a00
addsd 0x438(%rsp), %xmm0
movsd %xmm0, 0x438(%rsp)
movl 0x434(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x434(%rsp)
jmp 0x95bb
movsd 0x438(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x438(%rsp)
movsd 0x448(%rsp), %xmm1
movsd 0x438(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x438(%rsp)
movsd 0x438(%rsp), %xmm0
leaq 0x3d0(%rsp), %rdi
movl $0x3, %esi
callq 0x71870
jmp 0x967f
leaq 0x6a9ec(%rip), %rsi     # 0x74072
leaq 0x3f0(%rsp), %rdi
leaq 0x3d0(%rsp), %rdx
callq 0xf4f0
jmp 0x969d
leaq 0x6aa47(%rip), %rdx     # 0x740eb
leaq 0x410(%rsp), %rdi
leaq 0x3f0(%rsp), %rsi
callq 0xf4a0
jmp 0x96bb
leaq 0x89f3e(%rip), %rdi     # 0x93600
leaq 0x410(%rsp), %rsi
callq 0x71280
jmp 0x96d1
leaq 0x410(%rsp), %rdi
callq 0x6b50
leaq 0x3f0(%rsp), %rdi
callq 0x6b50
leaq 0x3d0(%rsp), %rdi
callq 0x6b50
movl $0x0, 0x3cc(%rsp)
movslq 0x3cc(%rsp), %rax
movq %rax, 0xf8(%rsp)
leaq 0x578(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf480
movq %rax, %rdi
callq 0xe890
movq %rax, %rcx
movq 0xf8(%rsp), %rax
cmpq %rcx, %rax
jae 0x9839
movl 0x5e4(%rsp), %edi
callq 0xf460
movsd %xmm0, 0xf0(%rsp)
jmp 0x9757
movsd 0xf0(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xe8(%rsp)
movl 0x5e0(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x3cc(%rsp), %rsi
callq 0xe870
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x3cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3cc(%rsp)
jmp 0x9703
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x9827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x981a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x410(%rsp), %rdi
callq 0x6b50
leaq 0x3f0(%rsp), %rdi
callq 0x6b50
leaq 0x3d0(%rsp), %rdi
callq 0x6b50
jmp 0xa786
movl 0x5e0(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x3c8(%rsp)
cmpl $-0x1, 0x3c8(%rsp)
jle 0x9f2a
movq 0x610(%rsp), %rdi
movslq 0x604(%rsp), %rsi
callq 0xf110
movq %rax, %rdi
movl 0x3c8(%rsp), %eax
incl %eax
movslq %eax, %rsi
callq 0xf150
movb %al, 0xe7(%rsp)
jmp 0x988a
movb 0xe7(%rsp), %al
andb $0x1, %al
movb %al, 0x3c7(%rsp)
movq 0x5f8(%rsp), %rax
movsd 0x6a77e(%rip), %xmm0    # 0x74028
mulsd 0x4f0(%rax), %xmm0
movsd %xmm0, 0xd8(%rsp)
movq 0x608(%rsp), %rdi
movl 0x3c8(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xeff0
movsd (%rax), %xmm0
movsd %xmm0, 0xd0(%rsp)
movq 0x608(%rsp), %rdi
movslq 0x3c8(%rsp), %rsi
callq 0xeff0
movsd 0xd0(%rsp), %xmm1
movsd 0xd8(%rsp), %xmm0
subsd (%rax), %xmm1
movsd 0x6a70b(%rip), %xmm2    # 0x74020
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x3b8(%rsp)
movsd 0x3b8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
cvtsi2sdl 0x5e4(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x6a00
movsd %xmm0, 0x3b0(%rsp)
movsd 0x6a6af(%rip), %xmm0    # 0x74018
subsd 0x3b0(%rsp), %xmm0
cvtsi2sdl 0x5e4(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x3a8(%rsp)
movsd 0x3b0(%rsp), %xmm0
addsd 0x3a8(%rsp), %xmm0
movsd %xmm0, 0x3a0(%rsp)
movsd 0x3a8(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x3a8(%rsp)
movsd 0x3a0(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x3a0(%rsp)
movl $0x0, 0x39c(%rsp)
movl 0x39c(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x9e2b
movslq 0x5e4(%rsp), %rax
movq %rax, 0xc0(%rsp)
callq 0xf250
movaps 0x6a634(%rip), %xmm1    # 0x74040
pxor %xmm1, %xmm0
movlpd %xmm0, 0x378(%rsp)
leaq 0x377(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0xedd0
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rcx
leaq 0x380(%rsp), %rdi
leaq 0x378(%rsp), %rdx
callq 0xf260
jmp 0x9a55
leaq 0x377(%rsp), %rdi
callq 0xee60
callq 0xf250
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x368(%rsp)
movl $0x0, 0x364(%rsp)
movl 0x364(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x9d25
movsd 0x540(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movslq 0x364(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movsd 0xa8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x610(%rsp), %rax
movq %rax, 0xb0(%rsp)
movslq 0x364(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movq 0xb0(%rsp), %rdi
movslq (%rax), %rsi
callq 0xf110
movq %rax, %rdi
movl 0x3c8(%rsp), %eax
incl %eax
movslq %eax, %rsi
callq 0xf150
movb %al, 0xbf(%rsp)
jmp 0x9b2c
movb 0xbf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x3c7(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x9bcf
movsd 0x548(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movslq 0x364(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x9bcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x377(%rsp), %rdi
callq 0xee60
jmp 0xa786
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x380(%rsp), %rdi
callq 0xed10
jmp 0xa786
movl 0x39c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jne 0x9c59
movsd 0x3a0(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movl 0x3c8(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x364(%rsp), %rsi
callq 0xe870
movsd 0x90(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x98(%rsp)
movslq 0x364(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movsd 0x98(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0x9cd1
movsd 0x3a8(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movl 0x3c8(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x364(%rsp), %rsi
callq 0xe870
movsd 0x80(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movslq 0x364(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movsd 0x88(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movslq 0x364(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movq %rax, %rsi
leaq 0x368(%rsp), %rdi
callq 0xf380
movq %rax, 0x78(%rsp)
jmp 0x9cfd
movq 0x78(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x368(%rsp)
movl 0x364(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x364(%rsp)
jmp 0x9a92
xorps %xmm0, %xmm0
movsd %xmm0, 0x358(%rsp)
movl $0x0, 0x354(%rsp)
movl 0x354(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0x9d98
movslq 0x354(%rsp), %rsi
leaq 0x380(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
subsd 0x368(%rsp), %xmm0
callq 0x6a00
addsd 0x358(%rsp), %xmm0
movsd %xmm0, 0x358(%rsp)
movl 0x354(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x354(%rsp)
jmp 0x9d3c
movsd 0x358(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x358(%rsp)
movsd 0x368(%rsp), %xmm0
addsd 0x358(%rsp), %xmm0
movsd %xmm0, 0x358(%rsp)
movsd 0x358(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movslq 0x3c8(%rsp), %rsi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x39c(%rsp), %rsi
callq 0xe870
movsd 0x70(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x380(%rsp), %rdi
callq 0xed10
movl 0x39c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x39c(%rsp)
jmp 0x99dc
movl 0x3c8(%rsp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x9f12
cvtsi2sdl 0x3c8(%rsp), %xmm0
cvtsi2sdl 0x5e0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x6a1bf(%rip), %xmm1    # 0x74020
mulsd %xmm1, %xmm0
leaq 0x310(%rsp), %rdi
movl $0x3, %esi
callq 0x71870
jmp 0x9e79
leaq 0x6a1ef(%rip), %rdx     # 0x7406f
leaq 0x330(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0xf4a0
jmp 0x9e97
leaq 0x89762(%rip), %rdi     # 0x93600
leaq 0x330(%rsp), %rsi
callq 0x71280
jmp 0x9ead
leaq 0x330(%rsp), %rdi
callq 0x6b50
leaq 0x310(%rsp), %rdi
callq 0x6b50
jmp 0x9f12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0x9f00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x330(%rsp), %rdi
callq 0x6b50
leaq 0x310(%rsp), %rdi
callq 0x6b50
jmp 0xa786
jmp 0x9f14
movl 0x3c8(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x3c8(%rsp)
jmp 0x984a
movq 0x610(%rsp), %rdi
movslq 0x604(%rsp), %rsi
callq 0xf110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf150
movb %al, 0x6f(%rsp)
jmp 0x9f51
movb 0x6f(%rsp), %al
andb $0x1, %al
movb %al, 0x30f(%rsp)
callq 0xf250
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x300(%rsp)
movl $0x0, 0x2fc(%rsp)
movl 0x2fc(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0xa0e9
movq 0x610(%rsp), %rax
movq %rax, 0x60(%rsp)
movslq 0x2fc(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movq 0x60(%rsp), %rdi
movslq (%rax), %rsi
callq 0xf110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf150
movb %al, 0x6e(%rsp)
jmp 0x9fe3
movb 0x6e(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x30f(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xa068
xorl %eax, %eax
movl %eax, %esi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x2fc(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
movsd 0x548(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x2f0(%rsp)
leaq 0x300(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0xf380
movq %rax, 0x58(%rsp)
jmp 0xa054
movq 0x58(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x300(%rsp)
jmp 0xa0d1
xorl %eax, %eax
movl %eax, %esi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x2fc(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
movsd 0x540(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x2e8(%rsp)
leaq 0x300(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0xf380
movq %rax, 0x50(%rsp)
jmp 0xa0bf
movq 0x50(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x300(%rsp)
jmp 0xa0d3
movl 0x2fc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2fc(%rsp)
jmp 0x9f8e
xorps %xmm0, %xmm0
movsd %xmm0, 0x2e0(%rsp)
movl $0x0, 0x2dc(%rsp)
movl 0x2dc(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0xa225
movq 0x610(%rsp), %rax
movq %rax, 0x40(%rsp)
movslq 0x2dc(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movq 0x40(%rsp), %rdi
movslq (%rax), %rsi
callq 0xf110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf150
movb %al, 0x4f(%rsp)
jmp 0xa155
movb 0x4f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x30f(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xa1bf
leaq 0x578(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf480
movq %rax, %rdi
movslq 0x2dc(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
addsd 0x548(%rsp), %xmm0
subsd 0x300(%rsp), %xmm0
callq 0x6a00
addsd 0x2e0(%rsp), %xmm0
movsd %xmm0, 0x2e0(%rsp)
jmp 0xa20d
leaq 0x578(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf480
movq %rax, %rdi
movslq 0x2dc(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
addsd 0x540(%rsp), %xmm0
subsd 0x300(%rsp), %xmm0
callq 0x6a00
addsd 0x2e0(%rsp), %xmm0
movsd %xmm0, 0x2e0(%rsp)
jmp 0xa20f
movl 0x2dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2dc(%rsp)
jmp 0xa100
movsd 0x2e0(%rsp), %xmm0
callq 0x6410
movsd %xmm0, 0x2e0(%rsp)
movsd 0x300(%rsp), %xmm1
movsd 0x2e0(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2e0(%rsp)
movsd 0x2e0(%rsp), %xmm0
leaq 0x278(%rsp), %rdi
movl $0x3, %esi
callq 0x71870
jmp 0xa278
leaq 0x69e03(%rip), %rsi     # 0x74082
leaq 0x298(%rsp), %rdi
leaq 0x278(%rsp), %rdx
callq 0xf4f0
jmp 0xa296
leaq 0x69e4e(%rip), %rdx     # 0x740eb
leaq 0x2b8(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0xf4a0
jmp 0xa2b4
leaq 0x89345(%rip), %rdi     # 0x93600
leaq 0x2b8(%rsp), %rsi
callq 0x71280
jmp 0xa2ca
leaq 0x2b8(%rsp), %rdi
callq 0x6b50
leaq 0x298(%rsp), %rdi
callq 0x6b50
leaq 0x278(%rsp), %rdi
callq 0x6b50
movq 0x5f0(%rsp), %rdi
movslq 0x5e0(%rsp), %rsi
movl $0x0, 0x274(%rsp)
leaq 0x274(%rsp), %rdx
callq 0xf540
jmp 0xa31b
movq 0x5e8(%rsp), %rdi
movslq 0x5e0(%rsp), %rsi
movq $0x0, 0x268(%rsp)
leaq 0x268(%rsp), %rdx
callq 0xf600
jmp 0xa346
movl $0x0, 0x264(%rsp)
movl 0x264(%rsp), %eax
cmpl 0x5e0(%rsp), %eax
jge 0xa757
movslq 0x5e4(%rsp), %rax
movq %rax, 0x30(%rsp)
callq 0xf250
movaps 0x69cc2(%rip), %xmm1    # 0x74040
pxor %xmm1, %xmm0
movlpd %xmm0, 0x240(%rsp)
leaq 0x23f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xedd0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
leaq 0x248(%rsp), %rdi
leaq 0x240(%rsp), %rdx
callq 0xf260
jmp 0xa3be
leaq 0x23f(%rsp), %rdi
callq 0xee60
callq 0xf250
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x230(%rsp)
movl $0x0, 0x22c(%rsp)
movl $0x0, 0x228(%rsp)
movl 0x228(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0xa5a4
movslq 0x264(%rsp), %rsi
leaq 0x5c8(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x228(%rsp), %rsi
callq 0xe870
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movslq 0x264(%rsp), %rsi
leaq 0x578(%rsp), %rdi
callq 0xf480
movq %rax, %rdi
movslq 0x228(%rsp), %rsi
callq 0xe870
movsd 0x20(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movslq 0x228(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rax)
movslq 0x228(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
ucomisd 0x230(%rsp), %xmm0
jbe 0xa58c
movslq 0x228(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
movsd %xmm0, 0x230(%rsp)
movl 0x228(%rsp), %eax
movl %eax, 0x22c(%rsp)
jmp 0xa58c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0xa554
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
jmp 0xa547
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x6b50
leaq 0x298(%rsp), %rdi
callq 0x6b50
leaq 0x278(%rsp), %rdi
callq 0x6b50
jmp 0xa786
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x598(%rsp)
movl %eax, 0x594(%rsp)
leaq 0x23f(%rsp), %rdi
callq 0xee60
jmp 0xa786
jmp 0xa58e
movl 0x228(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x228(%rsp)
jmp 0xa406
xorps %xmm0, %xmm0
movsd %xmm0, 0x220(%rsp)
movl $0x0, 0x21c(%rsp)
movl 0x21c(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0xa65c
movslq 0x21c(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
subsd 0x230(%rsp), %xmm0
callq 0x6a00
movsd %xmm0, 0x18(%rsp)
movslq 0x21c(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movslq 0x21c(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
addsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0xa5bb
movl $0x0, 0x218(%rsp)
movl 0x218(%rsp), %eax
cmpl 0x5e4(%rsp), %eax
jge 0xa6c0
movsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movslq 0x218(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd 0x10(%rsp), %xmm1
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x218(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x218(%rsp)
jmp 0xa667
movslq 0x22c(%rsp), %rsi
leaq 0x518(%rsp), %rdi
callq 0xecf0
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x5f0(%rsp), %rdi
movslq 0x264(%rsp), %rsi
callq 0xecf0
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movslq 0x22c(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0xe870
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x5e8(%rsp), %rdi
movslq 0x264(%rsp), %rsi
callq 0xe870
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x248(%rsp), %rdi
callq 0xed10
movl 0x264(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x264(%rsp)
jmp 0xa351
leaq 0x518(%rsp), %rdi
callq 0xed70
leaq 0x578(%rsp), %rdi
callq 0xf6c0
leaq 0x5c8(%rsp), %rdi
callq 0xf6c0
addq $0x618, %rsp            # imm = 0x618
retq
leaq 0x518(%rsp), %rdi
callq 0xed70
leaq 0x578(%rsp), %rdi
callq 0xf6c0
leaq 0x5c8(%rsp), %rdi
callq 0xf6c0
movq 0x598(%rsp), %rdi
callq 0x69e0
nopw (%rax,%rax)