// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_cal
int bcf_p1_cal(const bcf1_t *b, int do_contrast, bcf_p1aux_t *ma, bcf_p1rst_t *rst)
{
	int i, k;
	long double sum = 0.;
	ma->is_indel = bcf_is_indel(b);
	rst->perm_rank = -1;
	// set PL and PL_len
	for (i = 0; i < b->n_gi; ++i) {
		if (b->gi[i].fmt == bcf_str2int("PL", 2)) {
			ma->PL = (uint8_t*)b->gi[i].data;
			ma->PL_len = b->gi[i].len;
			break;
		}
	}
	if (i == b->n_gi) return -1; // no PL
	if (b->n_alleles < 2) return -1; // FIXME: find a better solution
	// 
	rst->rank0 = cal_pdg(b, ma);
	rst->f_exp = mc_cal_afs(ma, &rst->p_ref_folded, &rst->p_var_folded);
	rst->p_ref = ma->afs1[ma->M];
	for (k = 0, sum = 0.; k < ma->M; ++k)
		sum += ma->afs1[k];
	rst->p_var = (double)sum;
	{ // compute the allele count
		double max = -1;
		rst->ac = -1;
		for (k = 0; k <= ma->M; ++k)
			if (max < ma->z[k]) max = ma->z[k], rst->ac = k;
		rst->ac = ma->M - rst->ac;
	}
	// calculate f_flat and f_em
	for (k = 0, sum = 0.; k <= ma->M; ++k)
		sum += (long double)ma->z[k];
	rst->f_flat = 0.;
	for (k = 0; k <= ma->M; ++k) {
		double p = ma->z[k] / sum;
		rst->f_flat += k * p;
	}
	rst->f_flat /= ma->M;
	{ // estimate equal-tail credible interval (95% level)
		int l, h;
		double p;
		for (i = 0, p = 0.; i <= ma->M; ++i)
			if (p + ma->afs1[i] > 0.025) break;
			else p += ma->afs1[i];
		l = i;
		for (i = ma->M, p = 0.; i >= 0; --i)
			if (p + ma->afs1[i] > 0.025) break;
			else p += ma->afs1[i];
		h = i;
		rst->cil = (double)(ma->M - h) / ma->M; rst->cih = (double)(ma->M - l) / ma->M;
	}
	if (ma->n1 > 0) { // compute LRT
		double max0, max1, max2;
		for (k = 0, max0 = -1; k <= ma->M; ++k)
			if (max0 < ma->z[k]) max0 = ma->z[k];
		for (k = 0, max1 = -1; k <= ma->n1 * 2; ++k)
			if (max1 < ma->z1[k]) max1 = ma->z1[k];
		for (k = 0, max2 = -1; k <= ma->M - ma->n1 * 2; ++k)
			if (max2 < ma->z2[k]) max2 = ma->z2[k];
		rst->lrt = log(max1 * max2 / max0);
		rst->lrt = rst->lrt < 0? 1 : kf_gammaq(.5, rst->lrt);
	} else rst->lrt = -1.0;
	rst->cmp[0] = rst->cmp[1] = rst->cmp[2] = rst->p_chi2 = -1.0;
	if (do_contrast && rst->p_var > 0.5) // skip contrast2() if the locus is a strong non-variant
		rst->p_chi2 = contrast2(ma, rst->cmp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r12
callq 0xd0a2
movl %eax, 0xc(%rbx)
movl $0xffffffff, 0x4(%r14)  # imm = 0xFFFFFFFF
movslq 0x48(%r12), %r8
testq %r8, %r8
jle 0x131fc
movq 0x50(%r12), %rdx
addq $0x8, %rdx
xorl %ecx, %ecx
cmpl $0x504c, -0x8(%rdx)     # imm = 0x504C
je 0x13200
incq %rcx
addq $0x10, %rdx
cmpq %rcx, %r8
jne 0x131dd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x14958
xorl %ecx, %ecx
jmp 0x13213
movq (%rdx), %rdi
movq %rdi, 0xa0(%rbx)
movl -0x4(%rdx), %edx
movl %edx, 0xa8(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r8d, %ecx
je 0x14958
movl 0x58(%r12), %edi
cmpl $0x2, %edi
jl 0x14958
movq %rbx, %rsi
movq %rbx, 0x10(%rsp)
callq 0x14997
movl %eax, (%r14)
xorl %eax, %eax
movq 0x10(%rsp), %rcx
cmpl $0x0, 0xc(%rcx)
setne %al
movq 0x10(%rsp), %rcx
movq 0x28(%rcx,%rax,8), %rbx
movq 0x10(%rsp), %rax
movq 0x98(%rax), %rdi
movq 0x10(%rsp), %rax
movslq 0x4(%rax), %rax
leaq 0x8(,%rax,8), %rdx
xorl %esi, %esi
callq 0x21f0
movq 0x10(%rsp), %rdi
movl 0x8(%rdi), %edx
testl %edx, %edx
jle 0x133c9
movl (%rdi), %eax
cmpl %eax, %edx
jge 0x133c9
addl %eax, %eax
cmpl %eax, 0x4(%rdi)
jne 0x133c9
movq 0x48(%rdi), %rdi
shlq $0x4, %rdx
orq $0x8, %rdx
xorl %esi, %esi
callq 0x21f0
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x10(%rsp), %rax
movslq (%rax), %rdx
movq 0x10(%rsp), %rax
movslq 0x8(%rax), %rax
subq %rax, %rdx
shlq $0x4, %rdx
orq $0x8, %rdx
xorl %esi, %esi
callq 0x21f0
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, 0x80(%rax)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x10(%rsp), %rdi
callq 0x14b04
movq 0x10(%rsp), %rax
movsd 0x78(%rax), %xmm0
movq 0x10(%rsp), %rax
movsd %xmm0, 0x88(%rax)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x10(%rsp), %rax
movslq (%rax), %rdx
movq 0x10(%rsp), %rax
movslq 0x8(%rax), %rax
subq %rax, %rdx
shlq $0x4, %rdx
orq $0x8, %rdx
callq 0x22e0
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x14b04
movq 0x10(%rsp), %rax
movsd 0x80(%rax), %xmm0
movq 0x10(%rsp), %rax
addsd 0x88(%rax), %xmm0
movq 0x10(%rsp), %rax
movsd 0x78(%rax), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x1a0(%rsp)
fldl 0x1a0(%rsp)
fstpt (%rsp)
callq 0x2530
movq 0x10(%rsp), %r10
movl 0x4(%r10), %eax
fldz
testl %eax, %eax
js 0x134f9
fstp %st(0)
movq 0x38(%r10), %rcx
leaq 0x1(%rax), %rdx
xorl %esi, %esi
fld %st(0)
fmull (%rcx,%rsi,8)
fstpl (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x133b5
fstp %st(0)
jmp 0x133d9
xorl %esi, %esi
callq 0x14b04
movq 0x10(%rsp), %r10
movl 0x4(%r10), %eax
fldz
testl %eax, %eax
js 0x134fb
fstp %st(0)
movq 0x38(%r10), %rcx
leal 0x1(%rax), %edi
fldz
xorl %edx, %edx
fldl (%rbx,%rdx,8)
fmull (%rcx,%rdx,8)
faddp %st, %st(1)
incq %rdx
cmpq %rdx, %rdi
jne 0x133f0
movq 0x98(%r10), %rdx
xorl %esi, %esi
movsd 0x5c87(%rip), %xmm0     # 0x19098
movabsq $0x7fefffffffffffff, %r8 # imm = 0x7FEFFFFFFFFFFFFF
movsd (%rbx,%rsi,8), %xmm1
mulsd (%rcx,%rsi,8), %xmm1
movsd %xmm1, 0x198(%rsp)
fld %st(0)
fdivrl 0x198(%rsp)
fstpl 0x190(%rsp)
movq 0x190(%rsp), %xmm1
movq %xmm1, %r9
movq %xmm1, (%rdx,%rsi,8)
btrq $0x3f, %r9
cmpq %r8, %r9
jg 0x134ee
incq %rsi
cmpq %rsi, %rdi
jne 0x1341b
fstp %st(0)
movl %eax, %esi
leaq (%rbx,%rsi,8), %r8
fldz
xorl %r9d, %r9d
movsd (%rbx,%r9,8), %xmm0
addsd (%r8), %xmm0
movsd %xmm0, 0x188(%rsp)
fldl 0x188(%rsp)
fmuls 0x80ab(%rip)            # 0x1b540
fmull (%rcx,%r9,8)
faddp %st, %st(1)
incq %r9
addq $-0x8, %r8
cmpq %r9, %rdi
jne 0x13474
cmpl $0x2, %eax
jl 0x134f5
leaq -0x1(%rsi), %rdi
fldz
movl $0x1, %r8d
movsd (%rbx,%r8,8), %xmm0
addsd (%rbx,%rdi,8), %xmm0
movsd %xmm0, 0x180(%rsp)
fldl 0x180(%rsp)
fmuls 0x8067(%rip)            # 0x1b540
fmull (%rcx,%r8,8)
faddp %st, %st(1)
incq %r8
decq %rdi
jne 0x134b8
xorl %edi, %edi
movl %eax, %r8d
jmp 0x13514
fstp %st(0)
jmp 0x135c9
xorl %edi, %edi
jmp 0x134fe
fstp %st(1)
movb $0x1, %dil
movq 0x38(%r10), %rcx
movq 0x98(%r10), %rdx
movslq %eax, %rsi
fldz
movl $0x1, %r8d
fdiv %st(1), %st
fstpl 0x30(%r14)
movl %r8d, %r9d
movsd (%rbx,%r9,8), %xmm0
movl %eax, %r9d
subl %r8d, %r9d
movslq %r9d, %r8
addsd (%rbx,%r8,8), %xmm0
mulsd 0x5b46(%rip), %xmm0     # 0x19080
movsd (%rcx,%rsi,8), %xmm1
addsd (%rcx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x178(%rsp)
fdivrl 0x178(%rsp)
fstpl 0x20(%r14)
fldz
testb %dil, %dil
jne 0x135ab
fstp %st(0)
movq 0x90(%r10), %rsi
leal 0x1(%rax), %edi
fldz
xorl %r8d, %r8d
movsd (%rdx,%r8,8), %xmm0
addsd (%rsi,%r8,8), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
movsd %xmm0, (%rsi,%r8,8)
mulsd (%rdx,%r8,8), %xmm1
movsd %xmm1, 0x170(%rsp)
faddl 0x170(%rsp)
incq %r8
cmpq %r8, %rdi
jne 0x13573
movl %eax, 0xec(%rsp)
fidivl 0xec(%rsp)
fstpl 0x168(%rsp)
movsd 0x168(%rsp), %xmm0
movsd %xmm0, 0x10(%r14)
movslq %eax, %rsi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, 0x28(%r14)
testl %esi, %esi
jle 0x13604
movl %eax, %esi
fldz
xorl %edi, %edi
faddl (%rdx,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x135e7
fstpl 0x160(%rsp)
movsd 0x160(%rsp), %xmm0
jmp 0x13608
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%r14)
leal 0x1(%rax), %esi
testl %eax, %eax
js 0x136f7
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl %esi, %edi
movsd 0x5a6e(%rip), %xmm1     # 0x19098
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movsd (%rcx,%r9,8), %xmm2
ucomisd %xmm1, %xmm2
cmoval %r9d, %r8d
maxsd %xmm1, %xmm2
incq %r9
movapd %xmm2, %xmm1
cmpq %r9, %rdi
jne 0x13633
movl %eax, %r9d
subl %r8d, %r9d
movl %r9d, 0x8(%r14)
testl %eax, %eax
js 0x136fb
fldz
xorl %r8d, %r8d
faddl (%rcx,%r8,8)
incq %r8
cmpq %r8, %rdi
jne 0x13668
leaq 0x18(%r14), %r8
movq $0x0, 0x18(%r14)
testl %eax, %eax
js 0x14652
xorpd %xmm1, %xmm1
xorl %r9d, %r9d
fld %st(0)
fdivrl (%rcx,%r9,8)
fstpl 0x158(%rsp)
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
mulsd 0x158(%rsp), %xmm2
addsd %xmm2, %xmm1
movsd %xmm1, (%r8)
incq %r9
cmpq %r9, %rdi
jne 0x1368f
fstp %st(0)
divsd %xmm0, %xmm1
movsd %xmm1, (%r8)
testl %eax, %eax
js 0x13713
xorpd %xmm2, %xmm2
xorl %edi, %edi
movsd 0x7dfd(%rip), %xmm1     # 0x1b4d8
addsd (%rdx,%rdi,8), %xmm2
ucomisd %xmm1, %xmm2
ja 0x1496a
incq %rdi
cmpq %rdi, %rsi
jne 0x136db
jmp 0x1496c
movl %esi, 0x8(%r14)
leaq 0x18(%r14), %r8
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorpd %xmm1, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r8)
xorl %esi, %esi
movl %eax, %edi
movl %eax, %edx
subl %edi, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x40(%r14)
movl %eax, %edx
subl %esi, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x48(%r14)
movl 0x8(%r10), %edx
testl %edx, %edx
jle 0x137af
movsd 0x5947(%rip), %xmm0     # 0x19098
movapd %xmm0, %xmm1
testl %eax, %eax
js 0x1377b
leal 0x1(%rax), %esi
movsd 0x5934(%rip), %xmm2     # 0x19098
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm1
maxsd %xmm2, %xmm1
incq %rdi
movapd %xmm1, %xmm2
cmpq %rdi, %rsi
jne 0x13766
movq 0x48(%r10), %rcx
leaq 0x1(,%rdx,2), %rsi
addq %rdx, %rdx
xorl %edi, %edi
movapd %xmm0, %xmm2
movsd (%rcx,%rdi,8), %xmm0
maxsd %xmm2, %xmm0
incq %rdi
cmpq %rdi, %rsi
jne 0x1378c
subl %edx, %eax
jge 0x137bf
movsd 0x58eb(%rip), %xmm2     # 0x19098
jmp 0x137e4
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%r14)
jmp 0x13827
movq 0x50(%r10), %rcx
incl %eax
movsd 0x58cb(%rip), %xmm3     # 0x19098
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm2
maxsd %xmm3, %xmm2
incq %rdx
movapd %xmm2, %xmm3
cmpq %rdx, %rax
jne 0x137cf
mulsd %xmm2, %xmm0
divsd %xmm1, %xmm0
callq 0x2210
movapd %xmm0, %xmm1
movsd %xmm0, 0x70(%r14)
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1380f
movsd 0x586b(%rip), %xmm0     # 0x19078
jmp 0x1381c
movsd 0x5869(%rip), %xmm0     # 0x19080
callq 0x165df
movsd %xmm0, 0x70(%r14)
movq 0x10(%rsp), %r10
movapd 0x7cf1(%rip), %xmm0     # 0x1b520
movupd %xmm0, 0x60(%r14)
movupd %xmm0, 0x50(%r14)
xorl %eax, %eax
testl %r15d, %r15d
je 0x14958
movsd 0x38(%r14), %xmm0
ucomisd 0x582c(%rip), %xmm0     # 0x19080
jbe 0x14958
movl (%r10), %esi
movl 0x8(%r10), %r8d
movl %esi, %edx
subl %r8d, %edx
testl %r8d, %r8d
setle %cl
movq %rdx, 0x88(%rsp)
testl %edx, %edx
setle %dl
orb %cl, %dl
xorpd %xmm0, %xmm0
jne 0x14952
movq %r8, 0xd0(%rsp)
movq %r14, 0x108(%rsp)
cmpq $0x0, 0x68(%r10)
jne 0x13aaf
leal 0x1(,%rsi,2), %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
callq 0x22b0
movsd %xmm0, 0xa0(%rsp)
movq 0xd0(%rsp), %rax
leaq (%rax,%rax), %rbx
leaq 0x1(,%rax,2), %r15
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
callq 0x22b0
movsd %xmm0, 0x38(%rsp)
movq 0x88(%rsp), %rax
leal 0x1(,%rax,2), %eax
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x22b0
addsd 0x38(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0xa0(%rsp)
movl $0x8, %esi
movq %r15, %rdi
callq 0x2260
movq %rax, %r13
movq 0x10(%rsp), %rax
movq %r13, 0x68(%rax)
subl %ebx, %r14d
movq %r14, 0x90(%rsp)
movl $0x1, %ebx
movl $0x1, %r12d
movq $0x0, 0x30(%rsp)
movq %r15, 0xb8(%rsp)
movl $0x8, %esi
movq 0x50(%rsp), %rdi
callq 0x2260
movq 0x30(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x58(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x80(%rsp)
movl %r15d, %ecx
subl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rax, (%r13,%rdx,8)
movl %ebx, 0x98(%rsp)
movq 0x90(%rsp), %r15
xorl %r14d, %r14d
leal (%r12,%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x22b0
movsd %xmm0, 0x38(%rsp)
movq 0x10(%rsp), %r13
movl 0x4(%r13), %eax
addl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x22b0
addsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x80(%rsp), %xmm0
callq 0x22b0
movsd %xmm0, 0x18(%rsp)
leaq 0x1(%r14), %rbp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
callq 0x22b0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x22b0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
callq 0x22b0
addsd 0x18(%rsp), %xmm0
addsd 0xa0(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2570
movq 0x68(%r13), %r13
movq 0x30(%rsp), %rax
movq (%r13,%rax,8), %rax
movsd %xmm0, (%rax,%r14,8)
decl %ebx
movq %rbp, %r14
decq %r15
jne 0x139b7
movl 0x98(%rsp), %ebx
decl %ebx
incq %r12
movq 0x58(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0xb8(%rsp), %r15
cmpq %r15, %rcx
jne 0x13961
movq 0x10(%rsp), %r9
movl 0x4(%r9), %eax
xorpd %xmm0, %xmm0
xorpd %xmm5, %xmm5
testl %eax, %eax
movq 0x108(%rsp), %r8
js 0x13b0d
movq 0x28(%r9), %rcx
movq 0x38(%r9), %rdx
incq %rax
fldz
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
movsd %xmm1, 0x150(%rsp)
faddl 0x150(%rsp)
incq %rsi
cmpq %rsi, %rax
jne 0x13adb
fstpl 0x148(%rsp)
movsd 0x148(%rsp), %xmm5
leaq 0x50(%r8), %rdi
leaq 0x60(%r8), %r10
leaq 0x58(%r8), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%r9), %rax
movq 0x58(%r9), %rcx
movq 0xd0(%rsp), %rdx
movl %edx, %ebp
addl %edx, %ebp
leal 0x1(,%rdx,2), %r11d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
mulsd (%rax,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
cmoval %edx, %ebx
maxsd %xmm0, %xmm1
incq %rdx
movapd %xmm1, %xmm0
cmpq %rdx, %r11
jne 0x13b41
movq 0x50(%r9), %rax
movq 0x60(%r9), %rcx
movq 0x88(%rsp), %rsi
movl %esi, %edx
addl %esi, %esi
movq %rsi, 0x88(%rsp)
leal 0x1(,%rdx,2), %edx
xorpd %xmm0, %xmm0
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rax,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
cmoval %esi, %r8d
maxsd %xmm0, %xmm1
incq %rsi
movapd %xmm1, %xmm0
cmpq %rsi, %rdx
jne 0x13b91
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x70(%rsp)
fldz
xorpd %xmm6, %xmm6
movl %r8d, %eax
movq %rax, 0x80(%rsp)
movslq %r8d, %rax
movq %rax, 0x100(%rsp)
movl 0x88(%rsp), %eax
movq %rax, 0x38(%rsp)
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
xorpd %xmm0, %xmm0
testl %ebx, %ebx
movq %rdi, 0x98(%rsp)
movq %r10, 0xc0(%rsp)
movsd %xmm5, 0x30(%rsp)
movq %r11, 0x110(%rsp)
movq %r8, 0xc8(%rsp)
js 0x14107
fstp %st(0)
movl %ebp, 0xe8(%rsp)
movl %ebx, %r15d
movq 0x80(%rsp), %rax
incq %rax
movq %rax, 0xb0(%rsp)
movq 0x100(%rsp), %rcx
movl %ecx, %eax
negl %eax
movl %eax, 0xf0(%rsp)
movl %ebx, %r12d
negl %r12d
leaq (,%r15,8), %r13
movq 0x38(%rsp), %rax
subq %rcx, %rax
movq %rax, 0xb8(%rsp)
leal 0x1(%rcx), %eax
movq %rax, 0x90(%rsp)
leaq 0x8(,%rcx,8), %r14
movl %ecx, %eax
notl %eax
movl %eax, 0x4c(%rsp)
movq %rbx, 0xe0(%rsp)
leal 0x1(%rcx,%rbx), %eax
movq %rax, 0x58(%rsp)
leaq 0x8(%r13,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
fldz
movsd 0x53c7(%rip), %xmm4     # 0x19080
movsd 0x781f(%rip), %xmm3     # 0x1b4e0
leaq 0x40(%rsp), %r10
movsd 0x53aa(%rip), %xmm7     # 0x19078
xorpd %xmm8, %xmm8
testl %r8d, %r8d
js 0x13eb0
xorps %xmm9, %xmm9
cvtsi2sd %r15d, %xmm9
mulsd %xmm4, %xmm9
movl 0xf0(%rsp), %eax
movl %eax, %ebx
movq 0xb0(%rsp), %rbp
movapd %xmm9, 0xd0(%rsp)
movq 0x28(%r9), %rax
addq %r13, %rax
movsd -0x8(%rax,%rbp,8), %xmm10
movq 0x48(%r9), %rax
mulsd (%rax,%r15,8), %xmm10
movq 0x50(%r9), %rax
mulsd -0x8(%rax,%rbp,8), %xmm10
divsd %xmm5, %xmm10
movq 0x68(%r9), %rax
movq (%rax,%r15,8), %rax
mulsd -0x8(%rax,%rbp,8), %xmm10
ucomisd %xmm10, %xmm3
ja 0x13eb0
movl (%r9), %esi
movl 0x8(%r9), %eax
movl %esi, %edx
subl %eax, %edx
movd %edx, %xmm0
movd %eax, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
leaq -0x1(%rbp), %rcx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm9, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm0, %xmm1
movq %r10, %rdi
ja 0x13d9f
ucomisd %xmm1, %xmm0
leaq 0x70(%rsp), %rdi
jbe 0x13d9f
leaq 0x60(%rsp), %rdi
movsd (%rdi), %xmm0
addsd %xmm10, %xmm0
movsd %xmm0, (%rdi)
leaq (%r15,%rbp), %rdi
decq %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
leal (%r12,%rbx), %r8d
leal (%r8,%rsi,2), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
leal (%rdx,%rdx), %r8d
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
addl %eax, %eax
mulsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
ucomisd %xmm8, %xmm2
movapd %xmm7, %xmm0
jne 0x13dfb
jnp 0x13e88
subl %r15d, %eax
leal (%rbx,%rdx,2), %edx
imull %r15d, %edx
imull %eax, %ecx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movapd %xmm0, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
addl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
movapd %xmm4, %xmm0
fstpt 0x18(%rsp)
movsd %xmm10, 0x50(%rsp)
callq 0x165df
movsd 0x50(%rsp), %xmm10
movapd 0xd0(%rsp), %xmm9
xorpd %xmm8, %xmm8
movsd 0x5218(%rip), %xmm7     # 0x19078
leaq 0x40(%rsp), %r10
movsd 0x7673(%rip), %xmm3     # 0x1b4e0
movsd 0x520b(%rip), %xmm4     # 0x19080
xorpd %xmm6, %xmm6
fldt 0x18(%rsp)
movsd 0x30(%rsp), %xmm5
movq 0x10(%rsp), %r9
mulsd %xmm0, %xmm10
ucomisd %xmm10, %xmm8
ja 0x13eb0
movsd %xmm10, 0x140(%rsp)
faddl 0x140(%rsp)
incl %ebx
decq %rbp
jg 0x13d05
movq 0xc8(%rsp), %rax
cmpl 0x88(%rsp), %eax
jge 0x140a9
xorps %xmm9, %xmm9
cvtsi2sd %r15d, %xmm9
mulsd %xmm4, %xmm9
movl 0x4c(%rsp), %eax
movl %eax, %ebp
xorl %ebx, %ebx
movapd %xmm9, 0xd0(%rsp)
movq 0x28(%r9), %rax
addq 0xa0(%rsp), %rax
movsd (%rax,%rbx,8), %xmm10
movq 0x48(%r9), %rax
mulsd (%rax,%r15,8), %xmm10
movq 0x50(%r9), %rax
addq %r14, %rax
mulsd (%rax,%rbx,8), %xmm10
divsd %xmm5, %xmm10
movq 0x68(%r9), %rax
movq (%rax,%r15,8), %rax
addq %r14, %rax
mulsd (%rax,%rbx,8), %xmm10
ucomisd %xmm10, %xmm3
ja 0x140a9
movl (%r9), %esi
movl 0x8(%r9), %eax
movl %esi, %edx
subl %eax, %edx
movd %edx, %xmm0
movd %eax, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
movq 0x90(%rsp), %rcx
addq %rbx, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm9, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm0, %xmm1
movq %r10, %rdi
ja 0x13f8e
ucomisd %xmm1, %xmm0
leaq 0x70(%rsp), %rdi
jbe 0x13f8e
leaq 0x60(%rsp), %rdi
movsd (%rdi), %xmm0
addsd %xmm10, %xmm0
movsd %xmm0, (%rdi)
movq 0x58(%rsp), %rdi
addq %rbx, %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
leal (%r12,%rbp), %r8d
leal (%r8,%rsi,2), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
leal (%rdx,%rdx), %r8d
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
addl %eax, %eax
mulsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
ucomisd %xmm8, %xmm2
movapd %xmm7, %xmm0
jne 0x13feb
jnp 0x14079
subl %r15d, %eax
leal (%rbp,%rdx,2), %edx
imull %r15d, %edx
imull %eax, %ecx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movapd %xmm0, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
addl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
movapd %xmm4, %xmm0
fstpt 0x18(%rsp)
movsd %xmm10, 0x50(%rsp)
callq 0x165df
movsd 0x50(%rsp), %xmm10
movapd 0xd0(%rsp), %xmm9
xorpd %xmm8, %xmm8
movsd 0x5027(%rip), %xmm7     # 0x19078
leaq 0x40(%rsp), %r10
movsd 0x7482(%rip), %xmm3     # 0x1b4e0
movsd 0x501a(%rip), %xmm4     # 0x19080
xorpd %xmm6, %xmm6
fldt 0x18(%rsp)
movsd 0x30(%rsp), %xmm5
movq 0x10(%rsp), %r9
mulsd %xmm0, %xmm10
ucomisd %xmm10, %xmm8
ja 0x140a9
movsd %xmm10, 0x138(%rsp)
faddl 0x138(%rsp)
incq %rbx
decl %ebp
cmpq %rbx, 0xb8(%rsp)
jne 0x13ee5
leaq -0x1(%r15), %rax
incl %r12d
addq $-0x8, %r13
decq 0x58(%rsp)
addq $-0x8, 0xa0(%rsp)
testq %r15, %r15
movq %rax, %r15
movq 0xc8(%rsp), %r8
jg 0x13cd3
movsd 0x70(%rsp), %xmm0
movsd 0x40(%rsp), %xmm2
movsd 0x60(%rsp), %xmm1
movq 0x98(%rsp), %rdi
movq 0xc0(%rsp), %r10
movq 0xe0(%rsp), %rbx
movl 0xe8(%rsp), %ebp
movsd %xmm0, (%rdi)
movq 0x28(%rsp), %rax
movsd %xmm2, (%rax)
movsd %xmm1, (%r10)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x70(%rsp)
cmpl %ebp, %ebx
jge 0x14659
movslq %ebx, %r13
movl %ebp, %eax
movq %rax, 0xe0(%rsp)
movq 0x100(%rsp), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%rsp)
movl %r8d, %eax
negl %eax
movl %eax, 0x4c(%rsp)
movl %ebx, %r14d
notl %r14d
leaq (,%rcx,8), %r12
leal 0x1(%rbx,%r8), %eax
movq %rax, 0xa0(%rsp)
leaq (%r12,%r13,8), %rbp
addq $0x8, %rbp
movq 0x38(%rsp), %rax
subq %rcx, %rax
movq %rax, 0xd0(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %ebx, %eax
movq %rax, 0x58(%rsp)
leal (%rbx,%r8), %eax
addl $0x2, %eax
movq %rax, 0x50(%rsp)
leaq 0x10(%r12,%r13,8), %rax
movq %rax, 0x90(%rsp)
movsd 0x4ec4(%rip), %xmm4     # 0x19080
movsd 0x731c(%rip), %xmm3     # 0x1b4e0
leaq 0x40(%rsp), %r11
movsd 0x4ea7(%rip), %xmm6     # 0x19078
xorpd %xmm7, %xmm7
movq 0x28(%rsp), %r10
incq %r13
testl %r8d, %r8d
js 0x143d6
xorps %xmm8, %xmm8
cvtsi2sd %r13d, %xmm8
mulsd %xmm4, %xmm8
movl 0x4c(%rsp), %eax
movl %eax, %ebx
xorl %r15d, %r15d
movapd %xmm8, 0xf0(%rsp)
movq 0x28(%r9), %rax
addq %rbp, %rax
movsd (%rax,%r15,8), %xmm9
movq 0x48(%r9), %rax
mulsd (%rax,%r13,8), %xmm9
movq 0x50(%r9), %rax
addq %r12, %rax
mulsd (%rax,%r15,8), %xmm9
divsd %xmm5, %xmm9
movq 0x68(%r9), %rax
movq (%rax,%r13,8), %rax
addq %r12, %rax
mulsd (%rax,%r15,8), %xmm9
ucomisd %xmm9, %xmm3
ja 0x143d6
movl (%r9), %esi
movl 0x8(%r9), %eax
movl %esi, %edx
subl %eax, %edx
movd %edx, %xmm0
movd %eax, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
movq 0x80(%rsp), %rcx
addq %r15, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm8, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm0, %xmm1
movq %r11, %rdi
ja 0x142ab
ucomisd %xmm1, %xmm0
leaq 0x70(%rsp), %rdi
jbe 0x142ab
leaq 0x60(%rsp), %rdi
movsd (%rdi), %xmm0
addsd %xmm9, %xmm0
movsd %xmm0, (%rdi)
movq 0xa0(%rsp), %rdi
addq %r15, %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
leal (%r14,%rbx), %r8d
leal (%r8,%rsi,2), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
leal (%rdx,%rdx), %r8d
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
addl %eax, %eax
mulsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
ucomisd %xmm7, %xmm2
movapd %xmm6, %xmm0
jne 0x1430a
jnp 0x1439d
subl %r13d, %eax
leal (%rbx,%rdx,2), %edx
imull %r13d, %edx
imull %eax, %ecx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movapd %xmm0, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
addl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
movapd %xmm4, %xmm0
fstpt 0x18(%rsp)
movsd %xmm9, 0xb0(%rsp)
callq 0x165df
movsd 0xb0(%rsp), %xmm9
movapd 0xf0(%rsp), %xmm8
xorpd %xmm7, %xmm7
movsd 0x4d04(%rip), %xmm6     # 0x19078
leaq 0x40(%rsp), %r11
movsd 0x715f(%rip), %xmm3     # 0x1b4e0
movsd 0x4cf7(%rip), %xmm4     # 0x19080
fldt 0x18(%rsp)
movq 0x28(%rsp), %r10
movsd 0x30(%rsp), %xmm5
movq 0x10(%rsp), %r9
mulsd %xmm0, %xmm9
ucomisd %xmm9, %xmm7
ja 0x143d6
movsd %xmm9, 0x130(%rsp)
faddl 0x130(%rsp)
movq 0xb8(%rsp), %rax
addq %r15, %rax
decq %rax
decq %r15
incl %ebx
testq %rax, %rax
jg 0x14207
movq 0xc8(%rsp), %rax
cmpl 0x88(%rsp), %eax
jge 0x145de
xorps %xmm8, %xmm8
cvtsi2sd %r13d, %xmm8
mulsd %xmm4, %xmm8
movl 0x4c(%rsp), %eax
movl %eax, %ebx
xorl %r15d, %r15d
movapd %xmm8, 0xf0(%rsp)
movq 0x28(%r9), %rax
addq 0x90(%rsp), %rax
movsd (%rax,%r15,8), %xmm9
movq 0x48(%r9), %rax
mulsd (%rax,%r13,8), %xmm9
movq 0x50(%r9), %rax
addq %r12, %rax
mulsd 0x8(%rax,%r15,8), %xmm9
divsd %xmm5, %xmm9
movq 0x68(%r9), %rax
movq (%rax,%r13,8), %rax
addq %r12, %rax
mulsd 0x8(%rax,%r15,8), %xmm9
ucomisd %xmm9, %xmm3
ja 0x145de
movl (%r9), %esi
movl 0x8(%r9), %eax
movl %esi, %edx
subl %eax, %edx
movd %edx, %xmm0
movd %eax, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
movq 0x80(%rsp), %rcx
leaq 0x1(%rcx,%r15), %rcx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm8, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm0, %xmm1
movq %r11, %rdi
ja 0x144b9
ucomisd %xmm1, %xmm0
leaq 0x70(%rsp), %rdi
jbe 0x144b9
leaq 0x60(%rsp), %rdi
movsd (%rdi), %xmm0
addsd %xmm9, %xmm0
movsd %xmm0, (%rdi)
movq 0x50(%rsp), %rdi
addq %r15, %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movq 0x58(%rsp), %r8
addl %ebx, %r8d
leal (%r8,%rsi,2), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
leal (%rdx,%rdx), %r8d
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
addl %eax, %eax
mulsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
ucomisd %xmm7, %xmm2
movapd %xmm6, %xmm0
jne 0x14519
jnp 0x145ae
subl %r13d, %eax
leal (%rbx,%rdx,2), %edx
decl %edx
imull %r13d, %edx
imull %eax, %ecx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movapd %xmm0, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
addl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
movapd %xmm4, %xmm0
fstpt 0x18(%rsp)
movsd %xmm9, 0xb0(%rsp)
callq 0x165df
movsd 0xb0(%rsp), %xmm9
movapd 0xf0(%rsp), %xmm8
xorpd %xmm7, %xmm7
movsd 0x4af3(%rip), %xmm6     # 0x19078
leaq 0x40(%rsp), %r11
movsd 0x6f4e(%rip), %xmm3     # 0x1b4e0
movsd 0x4ae6(%rip), %xmm4     # 0x19080
fldt 0x18(%rsp)
movq 0x28(%rsp), %r10
movsd 0x30(%rsp), %xmm5
movq 0x10(%rsp), %r9
mulsd %xmm0, %xmm9
ucomisd %xmm9, %xmm7
ja 0x145de
movsd %xmm9, 0x128(%rsp)
faddl 0x128(%rsp)
incq %r15
decl %ebx
cmpq %r15, 0xd0(%rsp)
jne 0x1440c
decl %r14d
incq 0xa0(%rsp)
addq $0x8, %rbp
movq 0x58(%rsp), %rax
decl %eax
movq %rax, 0x58(%rsp)
incq 0x50(%rsp)
addq $0x8, 0x90(%rsp)
cmpq 0xe0(%rsp), %r13
movq 0xc8(%rsp), %r8
jne 0x141da
movsd 0x70(%rsp), %xmm3
movq 0x98(%rsp), %rdi
movsd (%rdi), %xmm0
movsd 0x40(%rsp), %xmm4
movsd (%r10), %xmm2
movsd 0x60(%rsp), %xmm6
movq %r10, %rax
movq 0xc0(%rsp), %r10
movsd (%r10), %xmm1
jmp 0x14666
fstp %st(0)
jmp 0x136ff
xorpd %xmm4, %xmm4
xorpd %xmm3, %xmm3
movq 0x28(%rsp), %rax
addsd %xmm6, %xmm1
addsd %xmm4, %xmm2
addsd %xmm3, %xmm0
movsd %xmm0, (%rdi)
movsd %xmm2, (%rax)
movsd %xmm1, (%r10)
addsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x6e59(%rip), %xmm1     # 0x1b4e8
ucomisd %xmm0, %xmm1
jbe 0x14938
fstp %st(0)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
fldz
xorl %ebx, %ebx
movsd 0x49c9(%rip), %xmm4     # 0x19080
movsd 0x49d9(%rip), %xmm3     # 0x19098
movsd 0x6e19(%rip), %xmm6     # 0x1b4e0
xorpd %xmm7, %xmm7
movsd 0x49a4(%rip), %xmm8     # 0x19078
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x28(%rsp), %r10
xorps %xmm9, %xmm9
cvtsi2sd %r12d, %xmm9
mulsd %xmm4, %xmm9
movq $-0x1, %r13
xorl %ebp, %ebp
movapd %xmm9, 0xa0(%rsp)
fldz
fstp %st(0)
movq 0x28(%r9), %rax
addq %rbx, %rax
movsd 0x8(%rax,%r13,8), %xmm10
movq 0x48(%r9), %rax
mulsd (%rax,%r12,8), %xmm10
movq 0x50(%r9), %rax
mulsd 0x8(%rax,%r13,8), %xmm10
divsd %xmm5, %xmm10
movq 0x68(%r9), %rax
movq (%rax,%r12,8), %rax
mulsd 0x8(%rax,%r13,8), %xmm10
ucomisd %xmm10, %xmm6
movapd %xmm3, %xmm0
ja 0x148a6
movl (%r9), %esi
movl 0x8(%r9), %eax
movl %esi, %edx
subl %eax, %edx
movd %edx, %xmm0
movd %eax, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
leaq 0x1(%r13), %rcx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm9, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
divpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm0, %xmm1
movq %r10, %rdi
ja 0x147a8
ucomisd %xmm1, %xmm0
movq 0x98(%rsp), %rdi
jbe 0x147a8
movq 0xc0(%rsp), %rdi
movsd (%rdi), %xmm0
addsd %xmm10, %xmm0
movsd %xmm0, (%rdi)
leaq (%r12,%r13), %rdi
incq %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
leal (%r15,%rbp), %r8d
leal (%r8,%rsi,2), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
leal (%rdx,%rdx), %r8d
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
addl %eax, %eax
mulsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
ucomisd %xmm7, %xmm2
movapd %xmm8, %xmm0
jne 0x14804
jnp 0x1489c
subl %r12d, %eax
leal (%rbp,%rdx,2), %edx
imull %r12d, %edx
imull %eax, %ecx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movapd %xmm0, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
addl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
movapd %xmm4, %xmm0
fstpt 0x18(%rsp)
movsd %xmm10, 0x80(%rsp)
callq 0x165df
movsd 0x80(%rsp), %xmm10
fldt 0x18(%rsp)
movapd 0xa0(%rsp), %xmm9
movsd 0x4808(%rip), %xmm8     # 0x19078
xorpd %xmm7, %xmm7
movsd 0x6c64(%rip), %xmm6     # 0x1b4e0
movsd 0x4814(%rip), %xmm3     # 0x19098
movsd 0x47f4(%rip), %xmm4     # 0x19080
movq 0x28(%rsp), %r10
movsd 0x30(%rsp), %xmm5
movq 0x10(%rsp), %r9
mulsd %xmm0, %xmm10
movapd %xmm10, %xmm0
ucomisd %xmm7, %xmm0
movsd %xmm0, 0x120(%rsp)
fld %st(0)
faddl 0x120(%rsp)
fcmovb %st(1), %st
fstp %st(1)
incq %r13
decl %ebp
fld %st(0)
cmpq %r13, 0x38(%rsp)
fxch %st(1)
jne 0x14702
fstp %st(1)
incq %r12
decl %r15d
addq $0x8, %rbx
cmpq 0x110(%rsp), %r12
jne 0x146df
movq 0x98(%rsp), %r14
movsd (%r14), %xmm0
addsd (%r10), %xmm0
movq 0xc0(%rsp), %rcx
addsd (%rcx), %xmm0
movsd 0x6bd4(%rip), %xmm1     # 0x1b4e8
ucomisd %xmm0, %xmm1
jbe 0x14938
fstp %st(0)
movabsq $0x3fd5555555555555, %rax # imm = 0x3FD5555555555555
movq %rax, (%rcx)
movapd 0x6bff(%rip), %xmm0     # 0x1b530
movupd %xmm0, (%r14)
fld1
fstpl 0x118(%rsp)
movsd 0x118(%rsp), %xmm0
xorl %eax, %eax
movq 0x108(%rsp), %r14
movsd %xmm0, 0x68(%r14)
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %esi
movl %eax, %edi
xorpd %xmm2, %xmm2
addsd (%rdx,%rdi,8), %xmm2
ucomisd %xmm1, %xmm2
ja 0x13717
leaq -0x1(%rdi), %r8
testq %rdi, %rdi
movq %r8, %rdi
jg 0x14972
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x13717