// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem_pair.c
// Function: mem_pestat
void mem_pestat(const mem_opt_t *opt, int64_t l_pac, int n, const mem_alnreg_v *regs, mem_pestat_t pes[4])
{
	int i, d, max;
	uint64_v isize[4];
	memset(pes, 0, 4 * sizeof(mem_pestat_t));
	memset(isize, 0, sizeof(kvec_t(int)) * 4);
	printf("WARNING\n");
	for (i = 0; i < n>>1; ++i) {
		int dir;
		int64_t is;
		mem_alnreg_v *r[2];
		r[0] = (mem_alnreg_v*)&regs[i<<1|0];
		r[1] = (mem_alnreg_v*)&regs[i<<1|1];
		if (r[0]->n == 0 || r[1]->n == 0) continue;
		if (cal_sub(opt, r[0]) > MIN_RATIO * r[0]->a[0].score) continue;
		if (cal_sub(opt, r[1]) > MIN_RATIO * r[1]->a[0].score) continue;
		if (r[0]->a[0].rid != r[1]->a[0].rid) continue; // not on the same chr
		dir = mem_infer_dir(l_pac, r[0]->a[0].rb, r[1]->a[0].rb, &is);
		if (is && is <= opt->max_ins) kv_push(uint64_t, isize[dir], is);
	}
	if (bwa_verbose >= 3) fprintf(stderr, "[M::%s] # candidate unique pairs for (FF, FR, RF, RR): (%ld, %ld, %ld, %ld)\n", __func__, isize[0].n, isize[1].n, isize[2].n, isize[3].n);
	for (d = 0; d < 4; ++d) { // TODO: this block is nearly identical to the one in bwtsw2_pair.c. It would be better to merge these two.
		mem_pestat_t *r = &pes[d];
		uint64_v *q = &isize[d];
		int p25, p50, p75, x;
		if (q->n < MIN_DIR_CNT) {
			fprintf(stderr, "[M::%s] skip orientation %c%c as there are not enough pairs\n", __func__, "FR"[d>>1&1], "FR"[d&1]);
			r->failed = 1;
			free(q->a);
			continue;
		} else fprintf(stderr, "[M::%s] analyzing insert size distribution for orientation %c%c...\n", __func__, "FR"[d>>1&1], "FR"[d&1]);
		ks_introsort_64(q->n, q->a);
		p25 = q->a[(int)(.25 * q->n + .499)];
		p50 = q->a[(int)(.50 * q->n + .499)];
		p75 = q->a[(int)(.75 * q->n + .499)];
		r->low  = (int)(p25 - OUTLIER_BOUND * (p75 - p25) + .499);
		if (r->low < 1) r->low = 1;
		r->high = (int)(p75 + OUTLIER_BOUND * (p75 - p25) + .499);
		fprintf(stderr, "[M::%s] (25, 50, 75) percentile: (%d, %d, %d)\n", __func__, p25, p50, p75);
		fprintf(stderr, "[M::%s] low and high boundaries for computing mean and std.dev: (%d, %d)\n", __func__, r->low, r->high);
		for (i = x = 0, r->avg = 0; i < q->n; ++i)
			if (q->a[i] >= r->low && q->a[i] <= r->high)
				r->avg += q->a[i], ++x;
		r->avg /= x;
		for (i = 0, r->std = 0; i < q->n; ++i)
			if (q->a[i] >= r->low && q->a[i] <= r->high)
				r->std += (q->a[i] - r->avg) * (q->a[i] - r->avg);
		r->std = sqrt(r->std / x);
		fprintf(stderr, "[M::%s] mean and std.dev: (%.2f, %.2f)\n", __func__, r->avg, r->std);
		r->low  = (int)(p25 - MAPPING_BOUND * (p75 - p25) + .499);
		r->high = (int)(p75 + MAPPING_BOUND * (p75 - p25) + .499);
		if (r->low  > r->avg - MAX_STDDEV * r->std) r->low  = (int)(r->avg - MAX_STDDEV * r->std + .499);
		if (r->high < r->avg - MAX_STDDEV * r->std) r->high = (int)(r->avg + MAX_STDDEV * r->std + .499);
		if (r->low < 1) r->low = 1;
		fprintf(stderr, "[M::%s] low and high boundaries for proper pairs: (%d, %d)\n", __func__, r->low, r->high);
		free(q->a);
	}
	for (d = 0, max = 0; d < 4; ++d)
		max = max > isize[d].n? max : isize[d].n;
	for (d = 0; d < 4; ++d)
		if (pes[d].failed == 0 && isize[d].n < max * MIN_DIR_RATIO) {
			pes[d].failed = 1;
			fprintf(stderr, "[M::%s] skip orientation %c%c\n", __func__, "FR"[d>>1&1], "FR"[d&1]);
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x3130
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x3130
leaq 0xdf38(%rip), %rdi      # 0x3b120
movb $0x0, %al
callq 0x3060
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x2d4bd
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
orl $0x0, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
orl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2d25a
movq -0xb8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2d25f
jmp 0x2d4af
movq -0x8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x2dd80
cvtsi2sd %eax, %xmm0
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %rax
cvtsi2sdl 0x1c(%rax), %xmm2
movsd 0xde55(%rip), %xmm1     # 0x3b0e0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2d29a
jmp 0x2d4af
movq -0x8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x2dd80
cvtsi2sd %eax, %xmm0
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
cvtsi2sdl 0x1c(%rax), %xmm2
movsd 0xde1a(%rip), %xmm1     # 0x3b0e0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2d2d5
jmp 0x2d4af
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %eax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x18(%rcx), %eax
je 0x2d2f8
jmp 0x2d4af
movq -0x10(%rbp), %rdi
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x2df60
movl %eax, -0xa4(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0x2d4ad
movq -0xb0(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0xb4(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2d4ad
jmp 0x2d355
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0xa4(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x2d465
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x2d3cd
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xe8(%rbp)
jmp 0x2d3db
movl $0x2, %eax
movq %rax, -0xe8(%rbp)
jmp 0x2d3db
movq -0xe8(%rbp), %rcx
movslq -0xa4(%rbp), %rdx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
leaq 0xdcf1(%rip), %rdx      # 0x3b129
movl $0x40, %ecx
leaq 0xdcf3(%rip), %r8       # 0x3b137
callq 0x31d40
movq %rax, %rcx
movslq -0xa4(%rbp), %rdx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0xb0(%rbp), %rdx
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xa4(%rbp), %rcx
leaq -0xa0(%rbp), %rsi
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2d4ad
jmp 0x2d4af
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2d1f6
leaq 0x1396c(%rip), %rax     # 0x40e30
cmpl $0x3, (%rax)
jl 0x2d502
movq 0x12b08(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0xa0(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x70(%rbp), %r9
movq -0x58(%rbp), %rax
leaq 0xdc52(%rip), %rsi      # 0x3b142
leaq 0xdc40(%rip), %rdx      # 0x3b137
movq %rax, (%rsp)
movb $0x0, %al
callq 0x34e0
movl $0x0, -0x30(%rbp)
cmpl $0x4, -0x30(%rbp)
jge 0x2dc21
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movslq -0x30(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq $0xa, (%rax)
jae 0x2d5bc
movq 0x12a82(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movl -0x30(%rbp), %eax
sarl %eax
andl $0x1, %eax
movslq %eax, %rcx
leaq 0xdc61(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rcx), %ecx
movl -0x30(%rbp), %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0xdc4d(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rdx), %r8d
leaq 0xdc04(%rip), %rsi      # 0x3b18f
leaq 0xdba5(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
movq -0xc8(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3380
jmp 0x2dc13
movq 0x12a15(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movl -0x30(%rbp), %eax
sarl %eax
andl $0x1, %eax
movslq %eax, %rcx
leaq 0xdbf4(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rcx), %ecx
movl -0x30(%rbp), %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0xdbe0(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rdx), %r8d
leaq 0xdbd7(%rip), %rsi      # 0x3b1cf
leaq 0xdb38(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
movq -0xd0(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x11350
movq -0xd0(%rbp), %rcx
movq 0x10(%rcx), %rax
movq (%rcx), %xmm0
movaps 0xc811(%rip), %xmm2     # 0x39e40
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0xc815(%rip), %xmm1     # 0x39e50
subpd %xmm1, %xmm0
movaps %xmm0, %xmm3
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm3, %xmm0
movsd 0xda76(%rip), %xmm3     # 0x3b0c8
mulsd %xmm3, %xmm0
movsd 0xa14a(%rip), %xmm3     # 0x377a8
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0xd4(%rbp)
movq -0xd0(%rbp), %rcx
movq 0x10(%rcx), %rax
movq (%rcx), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm4
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm4, %xmm0
movsd 0xca5c(%rip), %xmm4     # 0x3a0f8
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0xd8(%rbp)
movq -0xd0(%rbp), %rcx
movq 0x10(%rcx), %rax
movq (%rcx), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xd9e2(%rip), %xmm1     # 0x3b0c0
mulsd %xmm1, %xmm0
movsd 0xa0be(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0xdc(%rbp)
cvtsi2sdl -0xd4(%rbp), %xmm0
movl -0xdc(%rbp), %eax
subl -0xd4(%rbp), %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd 0xa081(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc8(%rbp), %rax
cmpl $0x1, (%rax)
jge 0x2d751
movq -0xc8(%rbp), %rax
movl $0x1, (%rax)
cvtsi2sdl -0xdc(%rbp), %xmm1
movl -0xdc(%rbp), %eax
subl -0xd4(%rbp), %eax
cvtsi2sd %eax, %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0xa02f(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq 0x12846(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movl -0xd4(%rbp), %ecx
movl -0xd8(%rbp), %r8d
movl -0xdc(%rbp), %r9d
leaq 0xda63(%rip), %rsi      # 0x3b213
leaq 0xd980(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
movq 0x12813(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0xc8(%rbp), %rax
movl (%rax), %ecx
movq -0xc8(%rbp), %rax
movl 0x4(%rax), %r8d
leaq 0xda5f(%rip), %rsi      # 0x3b242
leaq 0xd94d(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
movl $0x0, -0xe0(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0xc8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
movslq -0x2c(%rbp), %rax
movq -0xd0(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2d8d0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0xc8(%rbp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jb 0x2d8c0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0xc8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
ja 0x2d8c0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %xmm0
movaps 0xc5bb(%rip), %xmm1     # 0x39e40
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xc5bf(%rip), %xmm1     # 0x39e50
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0xc8(%rbp), %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x2d8c2
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2d811
cvtsi2sdl -0xe0(%rbp), %xmm1
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
movl $0x0, -0x2c(%rbp)
movq -0xc8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movslq -0x2c(%rbp), %rax
movq -0xd0(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2d9de
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0xc8(%rbp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jb 0x2d9ce
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0xc8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
ja 0x2d9ce
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %xmm2
movaps 0xc4c5(%rip), %xmm0     # 0x39e40
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movapd 0xc4c9(%rip), %xmm0     # 0x39e50
subpd %xmm0, %xmm2
movaps %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm0, %xmm2
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm1
movaps %xmm2, %xmm0
subsd %xmm1, %xmm0
movq -0xc8(%rbp), %rax
subsd 0x10(%rax), %xmm2
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x2d9d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2d903
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm0
cvtsi2sdl -0xe0(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x3220
movq -0xc8(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movq 0x125ca(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm1
leaq 0xd85c(%rip), %rsi      # 0x3b28c
leaq 0xd700(%rip), %rdx      # 0x3b137
movb $0x2, %al
callq 0x34e0
cvtsi2sdl -0xd4(%rbp), %xmm1
movl -0xdc(%rbp), %eax
subl -0xd4(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0xd67a(%rip), %xmm2     # 0x3b0d8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x9d3a(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
cvtsi2sdl -0xdc(%rbp), %xmm1
movl -0xdc(%rbp), %eax
subl -0xd4(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0xd631(%rip), %xmm2     # 0x3b0d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x9cf9(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xc8(%rbp), %rax
cvtsi2sdl (%rax), %xmm0
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm2
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm1
movsd 0x9cc4(%rip), %xmm3     # 0x377b0
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2db3b
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm1
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x9c96(%rip), %xmm2     # 0x377b0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x9c7e(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc8(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm1
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm2
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x9c49(%rip), %xmm3     # 0x377b0
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2dbb7
movq -0xc8(%rbp), %rax
movsd 0x10(%rax), %xmm1
movq -0xc8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x9c23(%rip), %xmm2     # 0x377b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x9c03(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xc8(%rbp), %rax
cmpl $0x1, (%rax)
jge 0x2dbd0
movq -0xc8(%rbp), %rax
movl $0x1, (%rax)
movq 0x12401(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0xc8(%rbp), %rax
movl (%rax), %ecx
movq -0xc8(%rbp), %rax
movl 0x4(%rax), %r8d
leaq 0xd6bf(%rip), %rsi      # 0x3b2b4
leaq 0xd53b(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2d509
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x4, -0x30(%rbp)
jge 0x2dc8e
movslq -0x34(%rbp), %rax
movslq -0x30(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jbe 0x2dc5d
movslq -0x34(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x2dc79
movslq -0x30(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2dc2f
movl $0x0, -0x30(%rbp)
cmpl $0x4, -0x30(%rbp)
jge 0x2dd72
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0x2dd62
movslq -0x30(%rbp), %rax
leaq (%rax,%rax,2), %rax
movq -0xa0(%rbp,%rax,8), %xmm1
movaps 0xc170(%rip), %xmm0     # 0x39e40
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0xc174(%rip), %xmm0     # 0x39e50
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0xd3c0(%rip), %xmm2     # 0x3b0b8
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2dd62
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0x8(%rax)
movq 0x122b9(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movl -0x30(%rbp), %eax
sarl %eax
andl $0x1, %eax
movslq %eax, %rcx
leaq 0xd498(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rcx), %ecx
movl -0x30(%rbp), %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0xd484(%rip), %rax      # 0x3b1cc
movsbl (%rax,%rdx), %r8d
leaq 0xd59c(%rip), %rsi      # 0x3b2f0
leaq 0xd3dc(%rip), %rdx      # 0x3b137
movb $0x0, %al
callq 0x34e0
jmp 0x2dd64
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2dc95
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)