// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: filter_ctg_trans(unsigned int, ma_ug_t*, ma_ug_t*, kv_ul_ov_t*, asg64_v*, asg64_v*, double, unsigned long, double, unsigned long, double, unsigned long, unsigned int)
uint64_t filter_ctg_trans(uint32_t qid, ma_ug_t *qry, ma_ug_t *ref, kv_ul_ov_t *aln, asg64_v *aln_e, asg64_v *srt, double reliable_rate, uint64_t reliable_len, double sec_rate, uint64_t sec_bd, double sec_sc, uint64_t soff, uint32_t is_self)
{
	if(aln->n <= 0) return 0;

	uint64_t k, an, *ss, *hs, *bu, *wu, clen, m, wm, z, l, wl, le, os, oe, ovq; ul_ov_t *cz, *mz; uint32_t sce[2]; sce[0] = 0; sce[1] = 1;
	for (k = 0; k < aln->n; k++) {
		aln->a[k].el = 0; clen = 0;
		if((!is_self) || (sce[(qid<soff)?0:1] != sce[(aln->a[k].tn<soff)?0:1])) {
			if(aln->a[k].sec < aln_e->n) {///has reliable regions
				for (z = aln->a[k].sec - aln_e->a[aln->a[k].sec]; z < aln->a[k].sec; z++) {
					clen += ((uint32_t)aln_e->a[z]) - (aln_e->a[z]>>32);
				}
			}
			if((clen > reliable_len) && (clen > ((aln->a[k].qe - aln->a[k].qs)*reliable_rate))) {
				aln->a[k].el = 1;
			}
		}
		aln->a[k].qn = ((uint32_t)-1) - aln->a[k].qn;

		// if(qid == 2 && qry->u.a[qid].len == 112183461) {///h2tg000003l
		// 	fprintf(stderr, "+[M::%s] h2tg%.6u%c\t%u\t%u\t%u\t%c\th1tg%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(qid == 30 && qry->u.a[qid].len == 24761445) {///h1tg000031l
		// 	fprintf(stderr, "+[M::%s] h1tg%.6u%c\t%u\t%u\t%u\t%c\th12g%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(aln->a[k].tn == 2 && ref->u.a[aln->a[k].tn].len == 112183461) {///h2tg000003l
		// 	fprintf(stderr, "+[M::%s] h1tg%.6u%c\t%u\t%u\t%u\t%c\th12g%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(aln->a[k].tn == 30 && ref->u.a[aln->a[k].tn].len == 24761445) {
		// 	fprintf(stderr, "+[M::%s] h2tg%.6u%c\t%u\t%u\t%u\t%c\th1tg%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// }
	}
	if(aln->n > 1) radix_sort_ul_ov_srt_qn(aln->a, aln->a + aln->n);///qn->score
	for (k = 0; k < aln->n; k++) aln->a[k].qn = ((uint32_t)-1) - aln->a[k].qn;

	an = aln->n; an <<= 2;
	srt->n = 0; kv_resize(uint64_t, *srt, an);
	for (k = 0; k < aln->n; k++) {
		srt->a[srt->n] = aln->a[k].qs;
		srt->a[srt->n] <<= 32;
		srt->a[srt->n] |= k;
		srt->n++;
	}

	ss = srt->a; hs = ss + srt->n; bu = hs + srt->n; wu = bu + srt->n;
	radix_sort_gfa64(ss, ss + aln->n);
	for (k = 0; k < aln->n; k++) {
		ss[k] = (uint32_t)ss[k]; hs[ss[k]] = k;
	}
	for (k = 0; k < aln->n; k++) {
		if(aln->a[k].el) continue;
		cz = &(aln->a[k]); clen = (cz->qe-cz->qs) * sec_rate; m = wm = 0;

		for (z = l = wl = le = 0; z < aln->n; z++) {
			if(z == hs[k]) {
				assert(ss[z] == k);
				continue;
			}
			if(ss[z] > k) continue;///smaller nw than a[k]
			mz = &(aln->a[ss[z]]);
			if(mz->qs >= cz->qe) break;
			if(mz->tn == ((uint32_t)-1)) continue;///has been deleted
			if((!(mz->el)) && (cz->qn > (mz->qn*0.9))) continue;
			os = MAX(cz->qs, mz->qs); oe = MIN(cz->qe, mz->qe);
			ovq = ((oe > os)? (oe - os):0);
			if(!ovq) continue;
			// if(is_connect_arc(cz, mz, s->ug, 0.04) || is_connect_arc(mz, cz, s->ug, 0.04)) continue;

			if((m > 0) && (((uint32_t)bu[m-1]) >= os)) {
				if(oe > ((uint32_t)bu[m-1])) {
					le += cal_reliable_ovlp(cz, aln_e, ((uint32_t)bu[m-1]), oe);
					l += (oe - ((uint32_t)bu[m-1]));
					bu[m-1] += (oe - ((uint32_t)bu[m-1]));
				}
			} else {
				le += cal_reliable_ovlp(cz, aln_e, os, oe);
				l += oe - os;
				bu[m] = os; bu[m] <<= 32; bu[m] |= oe; m++;
			}

			if((wm > 0) && (((uint32_t)wu[wm-1]) >= mz->qs)) {
				if(mz->qe > ((uint32_t)wu[wm-1])) {
					wl += (mz->qe - ((uint32_t)wu[wm-1]));
					wu[wm-1] += (mz->qe - ((uint32_t)wu[wm-1]));
				}
			} else {
				wl += mz->qe - mz->qs;
				wu[wm] = mz->qs; wu[wm] <<= 32; wu[wm] |= mz->qe; wm++;
			}

			if((l > 0) && (l > sec_bd) && (le <= l*0.5)) {
				if((l>=clen) || (l>=(wl*sec_rate))) {
					///sc is small enough
					if(cz->qn <= (mz->qn*sec_sc)) {
						cz->tn = ((uint32_t)-1);
						break;
					}
				}
			}
		}        
	}

	for (k = m = 0; k < aln->n; k++) {
		if(aln->a[k].tn == ((uint32_t)-1)) continue;
		// if(qid == 2 && qry->u.a[qid].len == 112183461) {///h2tg000003l
		// 	fprintf(stderr, "-[M::%s] h2tg%.6u%c\t%u\t%u\t%u\t%c\th1tg%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(qid == 30 && qry->u.a[qid].len == 24761445) {///h1tg000031l
		// 	fprintf(stderr, "-[M::%s] h1tg%.6u%c\t%u\t%u\t%u\t%c\th12g%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(aln->a[k].tn == 2 && ref->u.a[aln->a[k].tn].len == 112183461) {///h2tg000003l
		// 	fprintf(stderr, "-[M::%s] h1tg%.6u%c\t%u\t%u\t%u\t%c\th12g%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// } else if(aln->a[k].tn == 30 && ref->u.a[aln->a[k].tn].len == 24761445) {
		// 	fprintf(stderr, "-[M::%s] h2tg%.6u%c\t%u\t%u\t%u\t%c\th1tg%.6u%c\t%u\t%u\t%u\tsec(%u)\tel(%u)\n", __func__,
        // 	qid+1, "lc"[qry->u.a[qid].circ], qry->u.a[qid].len, aln->a[k].qs, aln->a[k].qe, "+-"[aln->a[k].rev],
        // 	aln->a[k].tn+1, "lc"[ref->u.a[aln->a[k].tn].circ], ref->u.a[aln->a[k].tn].len, aln->a[k].ts, aln->a[k].te, aln->a[k].sec, aln->a[k].el);
		// }
		aln->a[m++] = aln->a[k];
	}
	aln->n = m;
	// radix_sort_ul_ov_srt_qs(aln->a, aln->a + aln->n);
	return aln->n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movsd %xmm2, 0x90(%rsp)
movq %xmm1, 0x70(%rsp)
cmpq $0x0, 0x8(%rcx)
je 0x1cfa00
movq %r9, %r15
movq %rcx, %r13
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x88(%rsp)
movq 0x8(%rcx), %rsi
testq %rsi, %rsi
movq %r8, 0x50(%rsp)
je 0x1cf4bb
movl 0xf8(%rsp), %eax
movq 0xf0(%rsp), %rcx
movq 0xe0(%rsp), %rdx
movl %edi, %esi
xorl %edi, %edi
cmpq %rcx, %rsi
setae %dil
xorl %ebp, %ebp
movq 0x55e85(%rip), %xmm1    # 0x225240
movapd 0x55e8d(%rip), %xmm2    # 0x225250
movq (%r13), %r9
leaq (,%rbp,8), %rsi
addq %rbp, %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rbp, %rsi
andl $0xbfffffff, 0x18(%r9,%rsi) # imm = 0xBFFFFFFF
testl %eax, %eax
je 0x1cf40f
movl 0x88(%rsp,%rdi,4), %r9d
movq (%r13), %r10
movl 0xc(%r10,%rsi), %r10d
xorl %r11d, %r11d
cmpq %rcx, %r10
setae %r11b
cmpl 0x88(%rsp,%r11,4), %r9d
je 0x1cf4a3
movq (%r13), %r9
movl 0x18(%r9,%rsi), %r11d
andl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
cmpq %r11, (%r8)
jbe 0x1cf459
movq 0x10(%r8), %rbx
movq (%rbx,%r11,8), %r10
movq %r11, %r14
subq %r10, %r14
cmpq %r11, %r14
jae 0x1cf459
leaq (%rbx,%r11,8), %rbx
negq %r10
xorl %r11d, %r11d
movq (%rbx,%r10,8), %r14
movl %r14d, %r12d
shrq $0x20, %r14
subq %r14, %r11
addq %r12, %r11
incq %r10
jne 0x1cf441
jmp 0x1cf45c
xorl %r11d, %r11d
cmpq %rdx, %r11
movq 0x50(%rsp), %r8
jbe 0x1cf4a3
movq %r11, %xmm3
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
movl 0x8(%r9,%rsi), %r10d
subl 0x4(%r9,%rsi), %r10d
xorps %xmm5, %xmm5
cvtsi2sd %r10, %xmm5
addsd %xmm3, %xmm4
mulsd %xmm0, %xmm5
ucomisd %xmm5, %xmm4
jbe 0x1cf4a3
addq %rsi, %r9
orb $0x40, 0x1b(%r9)
movq (%r13), %r9
notl (%r9,%rsi)
incq %rbp
movq 0x8(%r13), %rsi
cmpq %rsi, %rbp
jb 0x1cf3c3
cmpq $0x2, %rsi
jb 0x1cf4d8
movq (%r13), %rdi
leaq (%rsi,%rsi,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %rsi
addq %rax, %rsi
callq 0x195d3d
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x1cf4f3
movq (%r13), %rcx
movq %rax, %rdx
notl (%rcx)
addq $0x1c, %rcx
decq %rdx
jne 0x1cf4e8
shlq $0x2, %rax
movq $0x0, (%r15)
cmpq %rax, 0x8(%r15)
jae 0x1cf555
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x8(%r15)
movq 0x10(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%r15)
movq 0x8(%r13), %rsi
testq %rsi, %rsi
je 0x1cf597
movq (%r13), %rax
movq 0x10(%r15), %rcx
addq $0x4, %rax
xorl %edx, %edx
movl (%rax), %esi
movq (%r15), %rdi
movq %rsi, (%rcx,%rdi,8)
movq (%r15), %rsi
shlq $0x20, (%rcx,%rsi,8)
movq (%r15), %rsi
orq %rdx, (%rcx,%rsi,8)
incq (%r15)
incq %rdx
movq 0x8(%r13), %rsi
addq $0x1c, %rax
cmpq %rsi, %rdx
jb 0x1cf56c
movq (%r15), %rbx
movq 0x10(%r15), %r14
leaq (%r14,%rbx,8), %r15
leaq (%r14,%rsi,8), %rsi
movq %r14, %rdi
callq 0x194fef
movq %r15, %rsi
movq %r14, %rdx
cmpq $0x0, 0x8(%r13)
je 0x1cf5d1
xorl %eax, %eax
movl (%rdx,%rax,8), %ecx
movq %rcx, (%rdx,%rax,8)
movq %rax, (%rsi,%rcx,8)
incq %rax
cmpq 0x8(%r13), %rax
jb 0x1cf5bd
cmpq $0x0, 0x8(%r13)
je 0x1cf9b1
leaq (%rsi,%rbx,8), %rax
movq %rax, 0x30(%rsp)
leaq (%rax,%rbx,8), %rax
movq %rax, 0x28(%rsp)
movq (%r13), %r8
xorl %r14d, %r14d
movq %rdx, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %r13, 0x20(%rsp)
leaq (%r14,%r14,8), %rax
leaq (%rax,%rax,2), %rdi
addq %r14, %rdi
testb $0x40, 0x1b(%r8,%rdi)
jne 0x1cf9a4
addq %r8, %rdi
movl 0x4(%rdi), %r9d
movl 0x8(%rdi), %r10d
movl %r10d, %eax
subl %r9d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x70(%rsp), %xmm0
movapd %xmm0, %xmm1
subsd 0x55c1d(%rip), %xmm1    # 0x225268
cmpq $0x0, 0x8(%r13)
je 0x1cf9a4
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
cvttsd2si %xmm1, %r11
andq %rcx, %r11
orq %rax, %r11
movq %r11, 0xa0(%rsp)
xorl %r11d, %r11d
movq $0x0, 0x48(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x10(%rsp)
movq %rdi, 0x78(%rsp)
movl %r9d, 0x1c(%rsp)
movl %r10d, 0x18(%rsp)
movq (%rdx,%r12,8), %rax
cmpq (%rsi,%r14,8), %r12
jne 0x1cf6c6
cmpq %r14, %rax
je 0x1cf8f0
jmp 0x1cfa1c
cmpq %r14, %rax
ja 0x1cf8f0
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %r15
addq %rax, %r15
movl 0x4(%r8,%r15), %ebx
cmpl %r10d, %ebx
jae 0x1cf9a4
addq %r8, %r15
cmpl $-0x1, 0xc(%r15)
je 0x1cf8f0
testb $0x40, 0x1b(%r15)
jne 0x1cf724
movl (%rdi), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movl (%r15), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd 0x55dde(%rip), %xmm1    # 0x2254f8
ucomisd %xmm1, %xmm0
ja 0x1cf8f0
cmpl %ebx, %r9d
movl %ebx, %ebp
cmoval %r9d, %ebp
movl 0x8(%r15), %ecx
cmpl %ecx, %r10d
movl %ecx, %r13d
cmovbl %r10d, %r13d
cmpl %ebp, %r13d
jbe 0x1cf8e0
testq %r11, %r11
movq %rcx, 0x80(%rsp)
je 0x1cf766
movq 0x30(%rsp), %rax
movq -0x8(%rax,%r11,8), %rax
movl %eax, %edx
cmpq %rbp, %rdx
jae 0x1cf902
movq 0x50(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r11, 0x40(%rsp)
callq 0x1cf2d2
movq 0x40(%rsp), %r11
addq %rax, 0x48(%rsp)
movq 0x8(%rsp), %rax
subq %rbp, %rax
addq %r13, %rax
movq %rax, 0x8(%rsp)
shlq $0x20, %rbp
orq %r13, %rbp
movq 0x30(%rsp), %rax
movq %rbp, (%rax,%r11,8)
incq %r11
movq 0x20(%rsp), %r13
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x1cf7c9
movq 0x28(%rsp), %rax
movq -0x8(%rax,%rcx,8), %rax
cmpl %eax, %ebx
jbe 0x1cf951
movq 0x80(%rsp), %rdx
movl %edx, %eax
subl %ebx, %eax
addq %rax, 0x38(%rsp)
shlq $0x20, %rbx
orq %rdx, %rbx
movq 0x28(%rsp), %rax
movq %rbx, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x10(%rsp)
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0x78(%rsp), %rdi
movl 0x1c(%rsp), %r9d
movl 0x18(%rsp), %r10d
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x1cf8e7
cmpq 0xe8(%rsp), %rax
jbe 0x1cf8f0
movsd 0x48(%rsp), %xmm0
movsd 0x55a06(%rip), %xmm3    # 0x225240
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x55a0b(%rip), %xmm4    # 0x225250
subpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %rax, %xmm2
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm4, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
movapd %xmm0, %xmm2
mulsd 0x55c76(%rip), %xmm2    # 0x2254f0
ucomisd %xmm1, %xmm2
jb 0x1cf8f0
cmpq 0xa0(%rsp), %rax
jae 0x1cf8b7
movsd 0x38(%rsp), %xmm1
unpcklps 0x559a9(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x559b1(%rip), %xmm1    # 0x225250
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x70(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jb 0x1cf8f0
movl (%rdi), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movl (%r15), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd 0x90(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x1cf8f0
jmp 0x1cf99d
movq 0x20(%rsp), %r13
jmp 0x1cf8f0
movq $0x0, 0x8(%rsp)
incq %r12
cmpq 0x8(%r13), %r12
jb 0x1cf6ae
jmp 0x1cf9a4
cmpl %edx, %r13d
jbe 0x1cf7a8
movq 0x50(%rsp), %rsi
movq %rdx, %rbp
movq %r13, %rcx
movq %r11, 0x40(%rsp)
movq %rax, 0x98(%rsp)
callq 0x1cf2d2
movq 0x40(%rsp), %r11
addq %rax, 0x48(%rsp)
subq %rbp, %r13
addq %r13, 0x8(%rsp)
addq 0x98(%rsp), %r13
movq 0x30(%rsp), %rax
movq %r13, -0x8(%rax,%r11,8)
jmp 0x1cf7a8
movq 0x80(%rsp), %rcx
cmpl %eax, %ecx
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0x78(%rsp), %rdi
movl 0x1c(%rsp), %r9d
movl 0x18(%rsp), %r10d
jbe 0x1cf810
subl %eax, %ecx
addq %rcx, 0x38(%rsp)
addq %rcx, %rax
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rbx
movq %rax, -0x8(%rcx,%rbx,8)
jmp 0x1cf810
movl $0xffffffff, 0xc(%rdi)  # imm = 0xFFFFFFFF
incq %r14
cmpq 0x8(%r13), %r14
jb 0x1cf609
cmpq $0x0, 0x8(%r13)
je 0x1cfa04
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
movq (%r13), %rsi
cmpl $-0x1, 0xc(%rsi,%rcx)
je 0x1cf9f1
leaq (%rsi,%rcx), %rdi
leaq (%rax,%rax,8), %r8
leaq (%r8,%r8,2), %r8
addq %rax, %r8
incq %rax
movupd (%rdi), %xmm0
movdqu 0xc(%rdi), %xmm1
movdqu %xmm1, 0xc(%rsi,%r8)
movupd %xmm0, (%rsi,%r8)
incq %rdx
addq $0x1c, %rcx
cmpq 0x8(%r13), %rdx
jb 0x1cf9be
jmp 0x1cfa06
xorl %eax, %eax
jmp 0x1cfa0a
xorl %eax, %eax
movq %rax, 0x8(%r13)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b02a(%rip), %rdi     # 0x22aa4d
leaq 0x63f61(%rip), %rsi     # 0x23398b
leaq 0x678ca(%rip), %rcx     # 0x2372fb
movl $0x4376, %edx           # imm = 0x4376
callq 0x2110