// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/kprobaln.c
// Function: kpa_glocal
int kpa_glocal(const uint8_t *_ref, int l_ref, const uint8_t *_query, int l_query, const uint8_t *iqual,
			   const kpa_par_t *c, int *state, uint8_t *q)
{
	double **f, **b = 0, *s, m[9], sI, sM, bI, bM, pb;
	float *qual, *_qual;
	const uint8_t *ref, *query;
	int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;

	/*** initialization ***/
	is_backward = state && q? 1 : 0;
	ref = _ref - 1; query = _query - 1; // change to 1-based coordinate
	bw = l_ref > l_query? l_ref : l_query;
	if (bw > c->bw) bw = c->bw;
	if (bw < abs(l_ref - l_query)) bw = abs(l_ref - l_query);
	bw2 = bw * 2 + 1;
	// allocate the forward and backward matrices f[][] and b[][] and the scaling array s[]
	f = calloc(l_query+1, sizeof(void*));
	if (is_backward) b = calloc(l_query+1, sizeof(void*));
	for (i = 0; i <= l_query; ++i) {
		f[i] = calloc(bw2 * 3 + 6, sizeof(double)); // FIXME: this is over-allocated for very short seqs
		if (is_backward) b[i] = calloc(bw2 * 3 + 6, sizeof(double));
	}
	s = calloc(l_query+2, sizeof(double)); // s[] is the scaling factor to avoid underflow
	// initialize qual
	_qual = calloc(l_query, sizeof(float));
	if (g_qual2prob[0] == 0)
		for (i = 0; i < 256; ++i)
			g_qual2prob[i] = pow(10, -i/10.);
	for (i = 0; i < l_query; ++i) _qual[i] = g_qual2prob[iqual? iqual[i] : 30];
	qual = _qual - 1;
	// initialize transition probability
	sM = sI = 1. / (2 * l_query + 2); // the value here seems not to affect results; FIXME: need proof
	m[0*3+0] = (1 - c->d - c->d) * (1 - sM); m[0*3+1] = m[0*3+2] = c->d * (1 - sM);
	m[1*3+0] = (1 - c->e) * (1 - sI); m[1*3+1] = c->e * (1 - sI); m[1*3+2] = 0.;
	m[2*3+0] = 1 - c->e; m[2*3+1] = 0.; m[2*3+2] = c->e;
	bM = (1 - c->d) / l_ref; bI = c->d / l_ref; // (bM+bI)*l_ref==1
	/*** forward ***/
	// f[0]
	set_u(k, bw, 0, 0);
	f[0][k] = s[0] = 1.;
	{ // f[1]
		double *fi = f[1], sum;
		int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1, _beg, _end;
		for (k = beg, sum = 0.; k <= end; ++k) {
			int u;
			double e = (ref[k] > 3 || query[1] > 3)? 1. : ref[k] == query[1]? 1. - qual[1] : qual[1] * EM;
			set_u(u, bw, 1, k);
			fi[u+0] = e * bM; fi[u+1] = EI * bI;
			sum += fi[u] + fi[u+1];
		}
		// rescale
		s[1] = sum;
		set_u(_beg, bw, 1, beg); set_u(_end, bw, 1, end); _end += 2;
		for (k = _beg; k <= _end; ++k) fi[k] /= sum;
	}
	// f[2..l_query]
	for (i = 2; i <= l_query; ++i) {
		double *fi = f[i], *fi1 = f[i-1], sum, qli = qual[i];
		int beg = 1, end = l_ref, x, _beg, _end;
		uint8_t qyi = query[i];
		x = i - bw; beg = beg > x? beg : x; // band start
		x = i + bw; end = end < x? end : x; // band end
		for (k = beg, sum = 0.; k <= end; ++k) {
			int u, v11, v01, v10;
			double e;
			e = (ref[k] > 3 || qyi > 3)? 1. : ref[k] == qyi? 1. - qli : qli * EM;
			set_u(u, bw, i, k); set_u(v11, bw, i-1, k-1); set_u(v10, bw, i-1, k); set_u(v01, bw, i, k-1);
			fi[u+0] = e * (m[0] * fi1[v11+0] + m[3] * fi1[v11+1] + m[6] * fi1[v11+2]);
			fi[u+1] = EI * (m[1] * fi1[v10+0] + m[4] * fi1[v10+1]);
			fi[u+2] = m[2] * fi[v01+0] + m[8] * fi[v01+2];
			sum += fi[u] + fi[u+1] + fi[u+2];
//			fprintf(stderr, "F (%d,%d;%d): %lg,%lg,%lg\n", i, k, u, fi[u], fi[u+1], fi[u+2]); // DEBUG
		}
		// rescale
		s[i] = sum;
		set_u(_beg, bw, i, beg); set_u(_end, bw, i, end); _end += 2;
		for (k = _beg, sum = 1./sum; k <= _end; ++k) fi[k] *= sum;
	}
	{ // f[l_query+1]
		double sum;
		for (k = 1, sum = 0.; k <= l_ref; ++k) {
			int u;
			set_u(u, bw, l_query, k);
			if (u < 3 || u >= bw2*3+3) continue;
		    sum += f[l_query][u+0] * sM + f[l_query][u+1] * sI;
		}
		s[l_query+1] = sum; // the last scaling factor
	}
	{ // compute likelihood
		double p = 1., Pr1 = 0.;
		for (i = 0; i <= l_query + 1; ++i) {
			p *= s[i];
			if (p < 1e-100) Pr1 += -4.343 * log(p), p = 1.;
		}
		Pr1 += -4.343 * log(p * l_ref * l_query);
		Pr = (int)(Pr1 + .499);
		if (!is_backward) { // skip backward and MAP
			for (i = 0; i <= l_query; ++i) free(f[i]);
			free(f); free(s); free(_qual);
			return Pr;
		}
	}
	/*** backward ***/
	// b[l_query] (b[l_query+1][0]=1 and thus \tilde{b}[][]=1/s[l_query+1]; this is where s[l_query+1] comes from)
	for (k = 1; k <= l_ref; ++k) {
		int u;
		double *bi = b[l_query];
		set_u(u, bw, l_query, k);
		if (u < 3 || u >= bw2*3+3) continue;
		bi[u+0] = sM / s[l_query] / s[l_query+1]; bi[u+1] = sI / s[l_query] / s[l_query+1];
	}
	// b[l_query-1..1]
	for (i = l_query - 1; i >= 1; --i) {
		int beg = 1, end = l_ref, x, _beg, _end;
		double *bi = b[i], *bi1 = b[i+1], y = (i > 1), qli1 = qual[i+1];
		uint8_t qyi1 = query[i+1];
		x = i - bw; beg = beg > x? beg : x;
		x = i + bw; end = end < x? end : x;
		for (k = end; k >= beg; --k) {
			int u, v11, v01, v10;
			double e;
			set_u(u, bw, i, k); set_u(v11, bw, i+1, k+1); set_u(v10, bw, i+1, k); set_u(v01, bw, i, k+1);
			e = (k >= l_ref? 0 : (ref[k+1] > 3 || qyi1 > 3)? 1. : ref[k+1] == qyi1? 1. - qli1 : qli1 * EM) * bi1[v11];
			bi[u+0] = e * m[0] + EI * m[1] * bi1[v10+1] + m[2] * bi[v01+2]; // bi1[v11] has been foled into e.
			bi[u+1] = e * m[3] + EI * m[4] * bi1[v10+1];
			bi[u+2] = (e * m[6] + m[8] * bi[v01+2]) * y;
//			fprintf(stderr, "B (%d,%d;%d): %lg,%lg,%lg\n", i, k, u, bi[u], bi[u+1], bi[u+2]); // DEBUG
		}
		// rescale
		set_u(_beg, bw, i, beg); set_u(_end, bw, i, end); _end += 2;
		for (k = _beg, y = 1./s[i]; k <= _end; ++k) bi[k] *= y;
	}
	{ // b[0]
		int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1;
		double sum = 0.;
		for (k = end; k >= beg; --k) {
			int u;
			double e = (ref[k] > 3 || query[1] > 3)? 1. : ref[k] == query[1]? 1. - qual[1] : qual[1] * EM;
			set_u(u, bw, 1, k);
			if (u < 3 || u >= bw2*3+3) continue;
		    sum += e * b[1][u+0] * bM + EI * b[1][u+1] * bI;
		}
		set_u(k, bw, 0, 0);
		pb = b[0][k] = sum / s[0]; // if everything works as is expected, pb == 1.0
	}
	is_diff = fabs(pb - 1.) > 1e-7? 1 : 0;
	/*** MAP ***/
	for (i = 1; i <= l_query; ++i) {
		double sum = 0., *fi = f[i], *bi = b[i], max = 0.;
		int beg = 1, end = l_ref, x, max_k = -1;
		x = i - bw; beg = beg > x? beg : x;
		x = i + bw; end = end < x? end : x;
		for (k = beg; k <= end; ++k) {
			int u;
			double z;
			set_u(u, bw, i, k);
			z = fi[u+0] * bi[u+0]; if (z > max) max = z, max_k = (k-1)<<2 | 0; sum += z;
			z = fi[u+1] * bi[u+1]; if (z > max) max = z, max_k = (k-1)<<2 | 1; sum += z;
		}
		max /= sum; sum *= s[i]; // if everything works as is expected, sum == 1.0
		if (state) state[i-1] = max_k;
		if (q) k = (int)(-4.343 * log(1. - max) + .499), q[i-1] = k > 100? 99 : k;
#ifdef _MAIN
		fprintf(stderr, "(%.10lg,%.10lg) (%d,%d:%c,%c:%d) %lg\n", pb, sum, i-1, max_k>>2,
				"ACGT"[query[i]], "ACGT"[ref[(max_k>>2)+1]], max_k&3, max); // DEBUG
#endif
	}
	/*** free ***/
	for (i = 0; i <= l_query; ++i) {
		free(f[i]); free(b[i]);
	}
	free(f); free(b); free(s); free(_qual);
	return Pr;
}

// Assembly:
subq $0x388, %rsp            # imm = 0x388
movq 0x398(%rsp), %rax
movq 0x390(%rsp), %rax
movq %rdi, 0x378(%rsp)
movl %esi, 0x374(%rsp)
movq %rdx, 0x368(%rsp)
movl %ecx, 0x364(%rsp)
movq %r8, 0x358(%rsp)
movq %r9, 0x350(%rsp)
movq $0x0, 0x340(%rsp)
movl $0x0, 0x294(%rsp)
movl $0x1, 0x290(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x390(%rsp)
movb %al, 0xd3(%rsp)
je 0x48c2ae
cmpq $0x0, 0x398(%rsp)
setne %al
movb %al, 0xd3(%rsp)
movb 0xd3(%rsp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x290(%rsp)
movq 0x378(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x2b0(%rsp)
movq 0x368(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x2a8(%rsp)
movl 0x374(%rsp), %eax
cmpl 0x364(%rsp), %eax
jle 0x48c311
movl 0x374(%rsp), %eax
movl %eax, 0xcc(%rsp)
jmp 0x48c31f
movl 0x364(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0xcc(%rsp), %eax
movl %eax, 0x2a4(%rsp)
movl 0x2a4(%rsp), %eax
movq 0x350(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x48c353
movq 0x350(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x2a4(%rsp)
movl 0x2a4(%rsp), %eax
movl 0x374(%rsp), %ecx
subl 0x364(%rsp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jge 0x48c38f
movl 0x374(%rsp), %eax
subl 0x364(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0x2a4(%rsp)
movl 0x2a4(%rsp), %eax
shll %eax
addl $0x1, %eax
movl %eax, 0x2a0(%rsp)
movl 0x364(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x32f50
movq %rax, 0x348(%rsp)
cmpl $0x0, 0x290(%rsp)
je 0x48c3ea
movl 0x364(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x32f50
movq %rax, 0x340(%rsp)
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jg 0x48c489
imull $0x3, 0x2a0(%rsp), %eax
addl $0x6, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x32f50
movq %rax, %rdx
movq 0x348(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, 0x290(%rsp)
je 0x48c471
imull $0x3, 0x2a0(%rsp), %eax
addl $0x6, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x32f50
movq %rax, %rdx
movq 0x340(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x48c473
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48c3f5
movl 0x364(%rsp), %eax
addl $0x2, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x32f50
movq %rax, 0x338(%rsp)
movslq 0x364(%rsp), %rdi
movl $0x4, %esi
callq 0x32f50
movq %rax, 0x2b8(%rsp)
movss 0x17b846(%rip), %xmm0   # 0x607d10
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x48c53f
jp 0x48c53f
movl $0x0, 0x29c(%rsp)
cmpl $0x100, 0x29c(%rsp) # imm = 0x100
jge 0x48c53d
xorl %eax, %eax
subl 0x29c(%rsp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x6a1f7(%rip), %xmm0    # 0x4f66f8
divsd %xmm0, %xmm1
movsd 0x6a1eb(%rip), %xmm0    # 0x4f66f8
callq 0x33350
cvtsd2ss %xmm0, %xmm0
movslq 0x29c(%rsp), %rcx
leaq 0x17b7eb(%rip), %rax    # 0x607d10
movss %xmm0, (%rax,%rcx,4)
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48c4df
jmp 0x48c53f
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jge 0x48c5d1
cmpq $0x0, 0x358(%rsp)
je 0x48c582
movq 0x358(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0xc8(%rsp)
jmp 0x48c590
movl $0x1e, %eax
movl %eax, 0xc8(%rsp)
jmp 0x48c590
movl 0xc8(%rsp), %eax
movslq %eax, %rcx
leaq 0x17b76f(%rip), %rax    # 0x607d10
movss (%rax,%rcx,4), %xmm0
movq 0x2b8(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48c54a
movq 0x2b8(%rsp), %rax
addq $-0x4, %rax
movq %rax, 0x2c0(%rsp)
movl 0x364(%rsp), %eax
shll %eax
addl $0x2, %eax
cvtsi2sd %eax, %xmm1
movsd 0x6a06b(%rip), %xmm0    # 0x4f6668
divsd %xmm1, %xmm0
movsd %xmm0, 0x2e8(%rsp)
movsd %xmm0, 0x2e0(%rsp)
movq 0x350(%rsp), %rax
movss 0xcda2d(%rip), %xmm0    # 0x55a050
subss (%rax), %xmm0
movq 0x350(%rsp), %rax
subss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6a029(%rip), %xmm1    # 0x4f6668
subsd 0x2e0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x2f0(%rsp)
movq 0x350(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x69ffb(%rip), %xmm1    # 0x4f6668
subsd 0x2e0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x300(%rsp)
movsd %xmm0, 0x2f8(%rsp)
movq 0x350(%rsp), %rax
movss 0xcd9b4(%rip), %xmm0    # 0x55a050
subss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x69fbb(%rip), %xmm1    # 0x4f6668
subsd 0x2e8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x308(%rsp)
movq 0x350(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x69f8c(%rip), %xmm1    # 0x4f6668
subsd 0x2e8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x310(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x318(%rsp)
movq 0x350(%rsp), %rax
movss 0xcd942(%rip), %xmm0    # 0x55a050
subss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x320(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x328(%rsp)
movq 0x350(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x330(%rsp)
movq 0x350(%rsp), %rax
movss 0xcd8fa(%rip), %xmm0    # 0x55a050
subss (%rax), %xmm0
cvtsi2ssl 0x374(%rsp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x2d0(%rsp)
movq 0x350(%rsp), %rax
movss (%rax), %xmm0
cvtsi2ssl 0x374(%rsp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x2d8(%rsp)
xorl %eax, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x288(%rsp)
cmpl $0x0, 0x288(%rsp)
jle 0x48c7c4
movl 0x288(%rsp), %eax
movl %eax, 0xc4(%rsp)
jmp 0x48c7cf
xorl %eax, %eax
movl %eax, 0xc4(%rsp)
jmp 0x48c7cf
movl 0xc4(%rsp), %eax
movl %eax, 0x288(%rsp)
xorl %eax, %eax
subl 0x288(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x298(%rsp)
movq 0x338(%rsp), %rax
movsd 0x69e65(%rip), %xmm0    # 0x4f6668
movsd %xmm0, (%rax)
movq 0x348(%rsp), %rax
movq (%rax), %rax
movslq 0x298(%rsp), %rcx
movsd 0x69e46(%rip), %xmm0    # 0x4f6668
movsd %xmm0, (%rax,%rcx,8)
movq 0x348(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x280(%rsp)
movl $0x1, 0x274(%rsp)
movl 0x374(%rsp), %eax
movl 0x2a4(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x48c86b
movl 0x374(%rsp), %eax
movl %eax, 0xc0(%rsp)
jmp 0x48c87c
movl 0x2a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0x270(%rsp)
movl 0x274(%rsp), %eax
movl %eax, 0x298(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x278(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x270(%rsp), %eax
jg 0x48ca9d
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x48c8e2
movq 0x2a8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x3, %eax
jle 0x48c8f8
movsd 0x69d7e(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0xb8(%rsp)
jmp 0x48c97c
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x2a8(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x48c944
movq 0x2c0(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x69d33(%rip), %xmm0    # 0x4f6668
subsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rsp)
jmp 0x48c96a
movq 0x2c0(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xef1e3(%rip), %xmm1    # 0x57bb40
mulsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0x258(%rsp)
movl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x254(%rsp)
cmpl $0x0, 0x254(%rsp)
jle 0x48c9bb
movl 0x254(%rsp), %eax
movl %eax, 0xac(%rsp)
jmp 0x48c9c6
xorl %eax, %eax
movl %eax, 0xac(%rsp)
jmp 0x48c9c6
movl 0xac(%rsp), %eax
movl %eax, 0x254(%rsp)
movl 0x298(%rsp), %eax
subl 0x254(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x264(%rsp)
movsd 0x258(%rsp), %xmm0
mulsd 0x2d0(%rsp), %xmm0
movq 0x280(%rsp), %rax
movl 0x264(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x8d875(%rip), %xmm0    # 0x51a298
mulsd 0x2d8(%rsp), %xmm0
movq 0x280(%rsp), %rax
movl 0x264(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x280(%rsp), %rax
movslq 0x264(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x280(%rsp), %rax
movl 0x264(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
addsd 0x278(%rsp), %xmm0
movsd %xmm0, 0x278(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48c8a4
movsd 0x278(%rsp), %xmm0
movq 0x338(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x250(%rsp)
cmpl $0x0, 0x250(%rsp)
jle 0x48cae0
movl 0x250(%rsp), %eax
movl %eax, 0xa8(%rsp)
jmp 0x48caeb
xorl %eax, %eax
movl %eax, 0xa8(%rsp)
jmp 0x48caeb
movl 0xa8(%rsp), %eax
movl %eax, 0x250(%rsp)
movl 0x274(%rsp), %eax
subl 0x250(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x26c(%rsp)
movl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x24c(%rsp)
cmpl $0x0, 0x24c(%rsp)
jle 0x48cb41
movl 0x24c(%rsp), %eax
movl %eax, 0xa4(%rsp)
jmp 0x48cb4c
xorl %eax, %eax
movl %eax, 0xa4(%rsp)
jmp 0x48cb4c
movl 0xa4(%rsp), %eax
movl %eax, 0x24c(%rsp)
movl 0x270(%rsp), %eax
subl 0x24c(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x268(%rsp)
movl 0x268(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x268(%rsp)
movl 0x26c(%rsp), %eax
movl %eax, 0x298(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x268(%rsp), %eax
jg 0x48cbde
movsd 0x278(%rsp), %xmm1
movq 0x280(%rsp), %rax
movslq 0x298(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48cb94
movl $0x2, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jg 0x48d2ee
movq 0x348(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x240(%rsp)
movq 0x348(%rsp), %rax
movl 0x29c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x238(%rsp)
movq 0x2c0(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x228(%rsp)
movl $0x1, 0x224(%rsp)
movl 0x374(%rsp), %eax
movl %eax, 0x220(%rsp)
movq 0x2a8(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x213(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x21c(%rsp)
movl 0x224(%rsp), %eax
cmpl 0x21c(%rsp), %eax
jle 0x48ccc4
movl 0x224(%rsp), %eax
movl %eax, 0xa0(%rsp)
jmp 0x48ccd2
movl 0x21c(%rsp), %eax
movl %eax, 0xa0(%rsp)
movl 0xa0(%rsp), %eax
movl %eax, 0x224(%rsp)
movl 0x29c(%rsp), %eax
addl 0x2a4(%rsp), %eax
movl %eax, 0x21c(%rsp)
movl 0x220(%rsp), %eax
cmpl 0x21c(%rsp), %eax
jge 0x48cd15
movl 0x220(%rsp), %eax
movl %eax, 0x9c(%rsp)
jmp 0x48cd23
movl 0x21c(%rsp), %eax
movl %eax, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
movl %eax, 0x220(%rsp)
movl 0x224(%rsp), %eax
movl %eax, 0x298(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x230(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x220(%rsp), %eax
jg 0x48d185
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x48cd85
movzbl 0x213(%rsp), %eax
cmpl $0x3, %eax
jle 0x48cd98
movsd 0x698db(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0x90(%rsp)
jmp 0x48ce00
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x213(%rsp), %ecx
cmpl %ecx, %eax
jne 0x48cdd4
movsd 0x698a8(%rip), %xmm0    # 0x4f6668
subsd 0x228(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
jmp 0x48cdee
movsd 0xeed64(%rip), %xmm0    # 0x57bb40
mulsd 0x228(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x90(%rsp), %xmm0
movsd %xmm0, 0x1f8(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1f4(%rsp)
cmpl $0x0, 0x1f4(%rsp)
jle 0x48ce41
movl 0x1f4(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x48ce4c
xorl %eax, %eax
movl %eax, 0x84(%rsp)
jmp 0x48ce4c
movl 0x84(%rsp), %eax
movl %eax, 0x1f4(%rsp)
movl 0x298(%rsp), %eax
subl 0x1f4(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x20c(%rsp)
movl 0x29c(%rsp), %eax
subl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1f0(%rsp)
cmpl $0x0, 0x1f0(%rsp)
jle 0x48cea7
movl 0x1f0(%rsp), %eax
movl %eax, 0x80(%rsp)
jmp 0x48ceb2
xorl %eax, %eax
movl %eax, 0x80(%rsp)
jmp 0x48ceb2
movl 0x80(%rsp), %eax
movl %eax, 0x1f0(%rsp)
movl 0x298(%rsp), %eax
subl $0x1, %eax
subl 0x1f0(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x208(%rsp)
movl 0x29c(%rsp), %eax
subl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1ec(%rsp)
cmpl $0x0, 0x1ec(%rsp)
jle 0x48cf0d
movl 0x1ec(%rsp), %eax
movl %eax, 0x7c(%rsp)
jmp 0x48cf15
xorl %eax, %eax
movl %eax, 0x7c(%rsp)
jmp 0x48cf15
movl 0x7c(%rsp), %eax
movl %eax, 0x1ec(%rsp)
movl 0x298(%rsp), %eax
subl 0x1ec(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x200(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1e8(%rsp)
cmpl $0x0, 0x1e8(%rsp)
jle 0x48cf67
movl 0x1e8(%rsp), %eax
movl %eax, 0x78(%rsp)
jmp 0x48cf6f
xorl %eax, %eax
movl %eax, 0x78(%rsp)
jmp 0x48cf6f
movl 0x78(%rsp), %eax
movl %eax, 0x1e8(%rsp)
movl 0x298(%rsp), %eax
subl $0x1, %eax
subl 0x1e8(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x204(%rsp)
movsd 0x1f8(%rsp), %xmm0
movsd 0x2f0(%rsp), %xmm2
movq 0x238(%rsp), %rax
movl 0x208(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x308(%rsp), %xmm1
movq 0x238(%rsp), %rax
movl 0x208(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movsd 0x320(%rsp), %xmm1
movq 0x238(%rsp), %rax
movl 0x208(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq 0x240(%rsp), %rax
movl 0x20c(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x2f8(%rsp), %xmm1
movq 0x238(%rsp), %rax
movl 0x200(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x310(%rsp), %xmm0
movq 0x238(%rsp), %rax
movl 0x200(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x8d20a(%rip), %xmm0    # 0x51a298
mulsd %xmm1, %xmm0
movq 0x240(%rsp), %rax
movl 0x20c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x300(%rsp), %xmm0
movq 0x240(%rsp), %rax
movl 0x204(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x330(%rsp), %xmm1
movq 0x240(%rsp), %rax
movl 0x204(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x240(%rsp), %rax
movl 0x20c(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x240(%rsp), %rax
movslq 0x20c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x240(%rsp), %rax
movl 0x20c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x240(%rsp), %rax
movl 0x20c(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
addsd 0x230(%rsp), %xmm0
movsd %xmm0, 0x230(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48cd4b
movsd 0x230(%rsp), %xmm0
movq 0x338(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1e4(%rsp)
cmpl $0x0, 0x1e4(%rsp)
jle 0x48d1cf
movl 0x1e4(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x48d1d7
xorl %eax, %eax
movl %eax, 0x74(%rsp)
jmp 0x48d1d7
movl 0x74(%rsp), %eax
movl %eax, 0x1e4(%rsp)
movl 0x224(%rsp), %eax
subl 0x1e4(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x218(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1e0(%rsp)
cmpl $0x0, 0x1e0(%rsp)
jle 0x48d229
movl 0x1e0(%rsp), %eax
movl %eax, 0x70(%rsp)
jmp 0x48d231
xorl %eax, %eax
movl %eax, 0x70(%rsp)
jmp 0x48d231
movl 0x70(%rsp), %eax
movl %eax, 0x1e0(%rsp)
movl 0x220(%rsp), %eax
subl 0x1e0(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x214(%rsp)
movl 0x214(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x214(%rsp)
movl 0x218(%rsp), %eax
movl %eax, 0x298(%rsp)
movsd 0x693ea(%rip), %xmm0    # 0x4f6668
divsd 0x230(%rsp), %xmm0
movsd %xmm0, 0x230(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x214(%rsp), %eax
jg 0x48d2d6
movsd 0x230(%rsp), %xmm0
movq 0x240(%rsp), %rax
movslq 0x298(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48d290
jmp 0x48d2d8
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48cbe9
movl $0x1, 0x298(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d8(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x374(%rsp), %eax
jg 0x48d423
movl 0x364(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1d0(%rsp)
cmpl $0x0, 0x1d0(%rsp)
jle 0x48d345
movl 0x1d0(%rsp), %eax
movl %eax, 0x6c(%rsp)
jmp 0x48d34d
xorl %eax, %eax
movl %eax, 0x6c(%rsp)
jmp 0x48d34d
movl 0x6c(%rsp), %eax
movl %eax, 0x1d0(%rsp)
movl 0x298(%rsp), %eax
subl 0x1d0(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x1d4(%rsp)
cmpl $0x3, 0x1d4(%rsp)
jl 0x48d393
movl 0x1d4(%rsp), %eax
imull $0x3, 0x2a0(%rsp), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
jl 0x48d395
jmp 0x48d40d
movq 0x348(%rsp), %rax
movslq 0x364(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1d4(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x2e0(%rsp), %xmm2
movq 0x348(%rsp), %rax
movslq 0x364(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1d4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd 0x2e8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x1d8(%rsp), %xmm0
movsd %xmm0, 0x1d8(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48d305
movsd 0x1d8(%rsp), %xmm0
movq 0x338(%rsp), %rax
movl 0x364(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x6921a(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0x1c8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1c0(%rsp)
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
movl 0x364(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x48d51a
movq 0x338(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x1c8(%rsp), %xmm0
movsd %xmm0, 0x1c8(%rsp)
movsd 0x7e552(%rip), %xmm0    # 0x50ba08
ucomisd 0x1c8(%rsp), %xmm0
jbe 0x48d502
movsd 0x1c8(%rsp), %xmm0
callq 0x31530
movsd 0x1c0(%rsp), %xmm1
movsd 0xed2c0(%rip), %xmm2    # 0x57a7a0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
movsd 0x6916f(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0x1c8(%rsp)
jmp 0x48d504
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48d46e
movsd 0x1c8(%rsp), %xmm0
cvtsi2sdl 0x374(%rsp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl 0x364(%rsp), %xmm1
mulsd %xmm1, %xmm0
callq 0x31530
movsd 0x1c0(%rsp), %xmm1
movsd 0xed24d(%rip), %xmm2    # 0x57a7a0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
movsd 0xed23c(%rip), %xmm0    # 0x57a7a8
addsd 0x1c0(%rsp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x28c(%rsp)
cmpl $0x0, 0x290(%rsp)
jne 0x48d60f
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jg 0x48d5d5
movq 0x348(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x34078
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48d599
movq 0x348(%rsp), %rdi
callq 0x34078
movq 0x338(%rsp), %rdi
callq 0x34078
movq 0x2b8(%rsp), %rdi
callq 0x34078
movl 0x28c(%rsp), %eax
movl %eax, 0x384(%rsp)
jmp 0x48e5aa
movl $0x1, 0x298(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x374(%rsp), %eax
jg 0x48d783
movq 0x340(%rsp), %rax
movslq 0x364(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x1b0(%rsp)
movl 0x364(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1ac(%rsp)
cmpl $0x0, 0x1ac(%rsp)
jle 0x48d676
movl 0x1ac(%rsp), %eax
movl %eax, 0x68(%rsp)
jmp 0x48d67e
xorl %eax, %eax
movl %eax, 0x68(%rsp)
jmp 0x48d67e
movl 0x68(%rsp), %eax
movl %eax, 0x1ac(%rsp)
movl 0x298(%rsp), %eax
subl 0x1ac(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x1bc(%rsp)
cmpl $0x3, 0x1bc(%rsp)
jl 0x48d6c4
movl 0x1bc(%rsp), %eax
imull $0x3, 0x2a0(%rsp), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
jl 0x48d6c9
jmp 0x48d76d
movsd 0x2e0(%rsp), %xmm0
movq 0x338(%rsp), %rax
movslq 0x364(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x338(%rsp), %rax
movl 0x364(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x1b0(%rsp), %rax
movl 0x1bc(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x2e8(%rsp), %xmm0
movq 0x338(%rsp), %rax
movslq 0x364(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x338(%rsp), %rax
movl 0x364(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x1b0(%rsp), %rax
movl 0x1bc(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48d61a
movl 0x364(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x29c(%rsp)
cmpl $0x1, 0x29c(%rsp)
jl 0x48de21
movl $0x1, 0x1a8(%rsp)
movl 0x374(%rsp), %eax
movl %eax, 0x1a4(%rsp)
movq 0x340(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x190(%rsp)
movq 0x340(%rsp), %rax
movl 0x29c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x188(%rsp)
cmpl $0x1, 0x29c(%rsp)
setg %al
andb $0x1, %al
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x180(%rsp)
movq 0x2c0(%rsp), %rax
movl 0x29c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x178(%rsp)
movq 0x2a8(%rsp), %rax
movl 0x29c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, 0x177(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x1a0(%rsp)
movl 0x1a8(%rsp), %eax
cmpl 0x1a0(%rsp), %eax
jle 0x48d88d
movl 0x1a8(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x48d898
movl 0x1a0(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x1a8(%rsp)
movl 0x29c(%rsp), %eax
addl 0x2a4(%rsp), %eax
movl %eax, 0x1a0(%rsp)
movl 0x1a4(%rsp), %eax
cmpl 0x1a0(%rsp), %eax
jge 0x48d8d5
movl 0x1a4(%rsp), %eax
movl %eax, 0x60(%rsp)
jmp 0x48d8e0
movl 0x1a0(%rsp), %eax
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x1a4(%rsp)
movl 0x1a4(%rsp), %eax
movl %eax, 0x298(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x1a8(%rsp), %eax
jl 0x48dcca
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x154(%rsp)
cmpl $0x0, 0x154(%rsp)
jle 0x48d939
movl 0x154(%rsp), %eax
movl %eax, 0x5c(%rsp)
jmp 0x48d941
xorl %eax, %eax
movl %eax, 0x5c(%rsp)
jmp 0x48d941
movl 0x5c(%rsp), %eax
movl %eax, 0x154(%rsp)
movl 0x298(%rsp), %eax
subl 0x154(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x170(%rsp)
movl 0x29c(%rsp), %eax
addl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x150(%rsp)
cmpl $0x0, 0x150(%rsp)
jle 0x48d996
movl 0x150(%rsp), %eax
movl %eax, 0x58(%rsp)
jmp 0x48d99e
xorl %eax, %eax
movl %eax, 0x58(%rsp)
jmp 0x48d99e
movl 0x58(%rsp), %eax
movl %eax, 0x150(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
subl 0x150(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x16c(%rsp)
movl 0x29c(%rsp), %eax
addl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x14c(%rsp)
cmpl $0x0, 0x14c(%rsp)
jle 0x48d9f6
movl 0x14c(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x48d9fe
xorl %eax, %eax
movl %eax, 0x54(%rsp)
jmp 0x48d9fe
movl 0x54(%rsp), %eax
movl %eax, 0x14c(%rsp)
movl 0x298(%rsp), %eax
subl 0x14c(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x164(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x148(%rsp)
cmpl $0x0, 0x148(%rsp)
jle 0x48da50
movl 0x148(%rsp), %eax
movl %eax, 0x50(%rsp)
jmp 0x48da58
xorl %eax, %eax
movl %eax, 0x50(%rsp)
jmp 0x48da58
movl 0x50(%rsp), %eax
movl %eax, 0x148(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
subl 0x148(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x168(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x374(%rsp), %eax
jl 0x48da9f
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
jmp 0x48db47
movq 0x2b0(%rsp), %rax
movl 0x298(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x48daca
movzbl 0x177(%rsp), %eax
cmpl $0x3, %eax
jle 0x48dada
movsd 0x68b96(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0x40(%rsp)
jmp 0x48db3b
movq 0x2b0(%rsp), %rax
movl 0x298(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x177(%rsp), %ecx
cmpl %ecx, %eax
jne 0x48db18
movsd 0x68b61(%rip), %xmm0    # 0x4f6668
subsd 0x178(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
jmp 0x48db2f
movsd 0xee020(%rip), %xmm0    # 0x57bb40
mulsd 0x178(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
movq 0x188(%rsp), %rax
movslq 0x16c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x158(%rsp)
movsd 0x158(%rsp), %xmm1
movsd 0x2f0(%rsp), %xmm2
movsd 0x8c713(%rip), %xmm0    # 0x51a298
mulsd 0x2f8(%rsp), %xmm0
movq 0x188(%rsp), %rax
movl 0x164(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x300(%rsp), %xmm0
movq 0x190(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x190(%rsp), %rax
movl 0x170(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x158(%rsp), %xmm0
movsd 0x308(%rsp), %xmm2
movsd 0x8c689(%rip), %xmm1    # 0x51a298
mulsd 0x310(%rsp), %xmm1
movq 0x188(%rsp), %rax
movl 0x164(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x190(%rsp), %rax
movl 0x170(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x158(%rsp), %xmm0
movsd 0x320(%rsp), %xmm2
movsd 0x330(%rsp), %xmm1
movq 0x190(%rsp), %rax
movl 0x168(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd 0x180(%rsp), %xmm0
movq 0x190(%rsp), %rax
movl 0x170(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x298(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48d8f9
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x144(%rsp)
cmpl $0x0, 0x144(%rsp)
jle 0x48dcf6
movl 0x144(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x48dcfe
xorl %eax, %eax
movl %eax, 0x34(%rsp)
jmp 0x48dcfe
movl 0x34(%rsp), %eax
movl %eax, 0x144(%rsp)
movl 0x1a8(%rsp), %eax
subl 0x144(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x19c(%rsp)
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x140(%rsp)
cmpl $0x0, 0x140(%rsp)
jle 0x48dd50
movl 0x140(%rsp), %eax
movl %eax, 0x30(%rsp)
jmp 0x48dd58
xorl %eax, %eax
movl %eax, 0x30(%rsp)
jmp 0x48dd58
movl 0x30(%rsp), %eax
movl %eax, 0x140(%rsp)
movl 0x1a4(%rsp), %eax
subl 0x140(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x198(%rsp)
movl 0x198(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x198(%rsp)
movl 0x19c(%rsp), %eax
movl %eax, 0x298(%rsp)
movq 0x338(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movsd 0x688b3(%rip), %xmm0    # 0x4f6668
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x180(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x198(%rsp), %eax
jg 0x48de09
movsd 0x180(%rsp), %xmm0
movq 0x190(%rsp), %rax
movslq 0x298(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48ddc3
jmp 0x48de0b
movl 0x29c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48d794
movl $0x1, 0x13c(%rsp)
movl 0x374(%rsp), %eax
movl 0x2a4(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x48de4e
movl 0x374(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x48de5c
movl 0x2a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x138(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0x138(%rsp), %eax
movl %eax, 0x298(%rsp)
movl 0x298(%rsp), %eax
cmpl 0x13c(%rsp), %eax
jl 0x48e05f
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x48debf
movq 0x2a8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x3, %eax
jle 0x48decf
movsd 0x687a1(%rip), %xmm0    # 0x4f6668
movsd %xmm0, 0x20(%rsp)
jmp 0x48df47
movq 0x2b0(%rsp), %rax
movslq 0x298(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x2a8(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x48df18
movq 0x2c0(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x6875c(%rip), %xmm0    # 0x4f6668
subsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x48df3b
movq 0x2c0(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xedc0f(%rip), %xmm1    # 0x57bb40
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x120(%rsp)
movl $0x1, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x11c(%rsp)
cmpl $0x0, 0x11c(%rsp)
jle 0x48df80
movl 0x11c(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x48df88
xorl %eax, %eax
movl %eax, 0x14(%rsp)
jmp 0x48df88
movl 0x14(%rsp), %eax
movl %eax, 0x11c(%rsp)
movl 0x298(%rsp), %eax
subl 0x11c(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x12c(%rsp)
cmpl $0x3, 0x12c(%rsp)
jl 0x48dfce
movl 0x12c(%rsp), %eax
imull $0x3, 0x2a0(%rsp), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
jl 0x48dfd0
jmp 0x48e049
movsd 0x120(%rsp), %xmm0
movq 0x340(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x12c(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd 0x2d0(%rsp), %xmm2
movq 0x340(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x12c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x8c277(%rip), %xmm1    # 0x51a298
mulsd (%rax,%rcx,8), %xmm1
mulsd 0x2d8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0x298(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48de81
xorl %eax, %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0x118(%rsp)
cmpl $0x0, 0x118(%rsp)
jle 0x48e086
movl 0x118(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x48e08e
xorl %eax, %eax
movl %eax, 0x10(%rsp)
jmp 0x48e08e
movl 0x10(%rsp), %eax
movl %eax, 0x118(%rsp)
xorl %eax, %eax
subl 0x118(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0x298(%rsp)
movsd 0x130(%rsp), %xmm0
movq 0x338(%rsp), %rax
divsd (%rax), %xmm0
movq 0x340(%rsp), %rax
movq (%rax), %rax
movslq 0x298(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd %xmm0, 0x2c8(%rsp)
movsd 0x2c8(%rsp), %xmm0
movsd 0x68572(%rip), %xmm1    # 0x4f6668
subsd %xmm1, %xmm0
movaps 0x7d95f(%rip), %xmm1    # 0x50ba60
pand %xmm1, %xmm0
movsd 0xeda2b(%rip), %xmm1    # 0x57bb38
xorl %eax, %eax
movl $0x1, %ecx
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, 0x294(%rsp)
movl $0x1, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jg 0x48e508
xorps %xmm0, %xmm0
movsd %xmm0, 0x110(%rsp)
movq 0x348(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x108(%rsp)
movq 0x340(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x100(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xf8(%rsp)
movl $0x1, 0xf4(%rsp)
movl 0x374(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl $0xffffffff, 0xe8(%rsp) # imm = 0xFFFFFFFF
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0xec(%rsp)
movl 0xf4(%rsp), %eax
cmpl 0xec(%rsp), %eax
jle 0x48e1e7
movl 0xf4(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x48e1f2
movl 0xec(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0xf4(%rsp)
movl 0x29c(%rsp), %eax
addl 0x2a4(%rsp), %eax
movl %eax, 0xec(%rsp)
movl 0xf0(%rsp), %eax
cmpl 0xec(%rsp), %eax
jge 0x48e22f
movl 0xf0(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0x48e23a
movl 0xec(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x298(%rsp)
movl 0x298(%rsp), %eax
cmpl 0xf0(%rsp), %eax
jg 0x48e401
movl 0x29c(%rsp), %eax
subl 0x2a4(%rsp), %eax
movl %eax, 0xd4(%rsp)
cmpl $0x0, 0xd4(%rsp)
jle 0x48e293
movl 0xd4(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0x48e29b
xorl %eax, %eax
movl %eax, 0x4(%rsp)
jmp 0x48e29b
movl 0x4(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0x298(%rsp), %eax
subl 0xd4(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, 0xe4(%rsp)
movq 0x108(%rsp), %rax
movl 0xe4(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x100(%rsp), %rax
movl 0xe4(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd8(%rsp)
movsd 0xd8(%rsp), %xmm0
ucomisd 0xf8(%rsp), %xmm0
jbe 0x48e33b
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movl 0x298(%rsp), %eax
subl $0x1, %eax
shll $0x2, %eax
orl $0x0, %eax
movl %eax, 0xe8(%rsp)
movsd 0xd8(%rsp), %xmm0
addsd 0x110(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movq 0x108(%rsp), %rax
movl 0xe4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x100(%rsp), %rax
movl 0xe4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd8(%rsp)
movsd 0xd8(%rsp), %xmm0
ucomisd 0xf8(%rsp), %xmm0
jbe 0x48e3d0
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movl 0x298(%rsp), %eax
subl $0x1, %eax
shll $0x2, %eax
orl $0x1, %eax
movl %eax, 0xe8(%rsp)
movsd 0xd8(%rsp), %xmm0
addsd 0x110(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x48e253
movsd 0x110(%rsp), %xmm1
movsd 0xf8(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movq 0x338(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x110(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
cmpq $0x0, 0x390(%rsp)
je 0x48e471
movl 0xe8(%rsp), %edx
movq 0x390(%rsp), %rax
movl 0x29c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, 0x398(%rsp)
je 0x48e4f0
movsd 0x681e4(%rip), %xmm0    # 0x4f6668
subsd 0xf8(%rsp), %xmm0
callq 0x31530
movsd 0xec306(%rip), %xmm1    # 0x57a7a0
mulsd %xmm1, %xmm0
movsd 0xec302(%rip), %xmm1    # 0x57a7a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x298(%rsp)
cmpl $0x64, 0x298(%rsp)
jle 0x48e4c9
movl $0x63, %eax
movl %eax, (%rsp)
jmp 0x48e4d3
movl 0x298(%rsp), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movb %al, %dl
movq 0x398(%rsp), %rax
movl 0x29c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x48e4f2
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48e12d
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x364(%rsp), %eax
jg 0x48e568
movq 0x348(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x34078
movq 0x340(%rsp), %rax
movslq 0x29c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x34078
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x48e513
movq 0x348(%rsp), %rdi
callq 0x34078
movq 0x340(%rsp), %rdi
callq 0x34078
movq 0x338(%rsp), %rdi
callq 0x34078
movq 0x2b8(%rsp), %rdi
callq 0x34078
movl 0x28c(%rsp), %eax
movl %eax, 0x384(%rsp)
movl 0x384(%rsp), %eax
addq $0x388, %rsp            # imm = 0x388
retq
nopl (%rax)