// File: /workspace/github_cpp_makefile_star2_O2/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)
movsd %xmm1, 0x58(%rsp)
movq %r9, %r15
movq 0x8(%rcx), %r9
testq %r9, %r9
je 0x18c94b
movl 0xf8(%rsp), %eax
movabsq $0x100000000, %rsi      # imm = 0x100000000
movq %rsi, 0x88(%rsp)
movl %edi, %edi
xorl %esi, %esi
cmpq 0xf0(%rsp), %rdi
setae %sil
xorl %edi, %edi
movq %rcx, 0x8(%rsp)
movq %r8, 0x20(%rsp)
cmpq %r9, %rdi
jae 0x18c42a
movq (%rcx), %r9
imulq $0x1c, %rdi, %rdx
andl $0xbfffffff, 0x18(%r9,%rdx) # imm = 0xBFFFFFFF
movq (%rcx), %r9
testl %eax, %eax
je 0x18c370
movl 0x88(%rsp,%rsi,4), %r10d
movl 0xc(%r9,%rdx), %r11d
xorl %ebx, %ebx
cmpq 0xf0(%rsp), %r11
setae %bl
cmpl 0x88(%rsp,%rbx,4), %r10d
je 0x18c3ad
movl 0x18(%r9,%rdx), %r10d
movl %r10d, %r11d
andl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
cmpq %r11, (%r8)
jbe 0x18c3ad
movq 0x10(%r8), %rbx
movq %r11, %r12
subq (%rbx,%r11,8), %r12
xorl %r14d, %r14d
cmpq %r11, %r12
jae 0x18c3b4
movq (%rbx,%r12,8), %r13
movl %r13d, %ebp
shrq $0x20, %r13
subq %r13, %r14
addq %rbp, %r14
incq %r12
jmp 0x18c392
movq 0x8(%rsp), %rcx
jmp 0x18c41a
cmpq 0xe0(%rsp), %r14
jbe 0x18c410
movq %r14, %xmm1
punpckldq 0x56ea5(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x56ead(%rip), %xmm1    # 0x1e3280
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movl 0x8(%r9,%rdx), %r11d
subl 0x4(%r9,%rdx), %r11d
cvtsi2sd %r11, %xmm3
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x18c410
addq %rdx, %r9
orl $0x40000000, %r10d      # imm = 0x40000000
movl %r10d, 0x18(%r9)
movq 0x8(%rsp), %rcx
movq (%rcx), %r9
jmp 0x18c415
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %r8
notl (%r9,%rdx)
incq %rdi
movq 0x8(%rcx), %r9
jmp 0x18c32c
cmpq $0x2, %r9
jb 0x18c448
movq (%rcx), %rdi
imulq $0x1c, %r9, %rsi
addq %rdi, %rsi
callq 0x15775d
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %r9
xorl %eax, %eax
movq %r9, %rsi
subq $0x1, %rsi
jb 0x18c45f
movq (%rcx), %rdx
notl (%rdx,%rax)
addq $0x1c, %rax
jmp 0x18c44d
andq $0x0, (%r15)
shlq $0x2, %r9
cmpq %r9, 0x8(%r15)
jae 0x18c4c3
decq %r9
movq %r9, %rax
shrq %rax
orq %r9, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movq 0x10(%r15), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2370
movq 0x8(%rsp), %rcx
movq %rax, 0x10(%r15)
pushq $0x4
popq %rax
xorl %r8d, %r8d
movq 0x8(%rcx), %rdx
cmpq %rdx, %r8
jae 0x18c4fe
movq (%rcx), %rdx
movl (%rdx,%rax), %edx
movq (%r15), %rsi
movq 0x10(%r15), %rdi
movq %rdx, (%rdi,%rsi,8)
movq (%r15), %rdx
shlq $0x20, (%rdi,%rdx,8)
movq (%r15), %rdx
orq %r8, (%rdi,%rdx,8)
incq (%r15)
incq %r8
addq $0x1c, %rax
jmp 0x18c4c9
movq (%r15), %rbx
movq 0x10(%r15), %r14
leaq (%r14,%rbx,8), %r15
leaq (%r15,%rbx,8), %rax
movq %rax, 0x30(%rsp)
leaq (%r14,%rdx,8), %rsi
movq %r14, %rdi
callq 0x156b0d
movq %r15, %r8
movq %r14, %rsi
movq 0x8(%rsp), %r9
xorl %eax, %eax
movq 0x8(%r9), %rcx
cmpq %rcx, %rax
jae 0x18c544
movl (%rsi,%rax,8), %ecx
movq %rcx, (%rsi,%rax,8)
movq %rax, (%r8,%rcx,8)
incq %rax
jmp 0x18c52b
movq 0x30(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, 0x40(%rsp)
xorl %r14d, %r14d
movq %rsi, 0x68(%rsp)
movq %r8, 0x60(%rsp)
cmpq %rcx, %r14
jae 0x18c902
movq (%r9), %r10
imulq $0x1c, %r14, %rdi
testb $0x40, 0x1b(%r10,%rdi)
jne 0x18c8fa
addq %r10, %rdi
movl 0x4(%rdi), %r11d
movl 0x8(%rdi), %ebx
movl %ebx, %eax
subl %r11d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x58(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
subsd 0x56cef(%rip), %xmm0    # 0x1e3298
cvttsd2si %xmm0, %r15
andq %rdx, %r15
movl %r11d, %edx
movl %ebx, %r11d
orq %rax, %r15
movq %r15, 0xa0(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r13d, %r13d
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
movq %rdi, 0x78(%rsp)
movq %r10, 0x70(%rsp)
movl %edx, 0x2c(%rsp)
movl %r11d, 0x28(%rsp)
cmpq %rcx, %rbx
jae 0x18c8fa
movq (%rsi,%rbx,8), %rax
cmpq (%r8,%r14,8), %rbx
jne 0x18c61f
cmpq %r14, %rax
je 0x18c840
jmp 0x18c95f
cmpq %r14, %rax
ja 0x18c840
imulq $0x1c, %rax, %r12
movl 0x4(%r10,%r12), %r15d
cmpl %r11d, %r15d
jae 0x18c8fa
addq %r10, %r12
cmpl $-0x1, 0xc(%r12)
je 0x18c840
testb $0x40, 0x1b(%r12)
jne 0x18c673
movl (%rdi), %eax
cvtsi2sd %rax, %xmm0
movl (%r12), %eax
cvtsi2sd %rax, %xmm1
mulsd 0x56ed7(%rip), %xmm1    # 0x1e3540
ucomisd %xmm1, %xmm0
ja 0x18c840
movq %r13, 0x18(%rsp)
cmpl %r15d, %edx
movl %r15d, %ebp
cmoval %edx, %ebp
movl 0x8(%r12), %ecx
cmpl %ecx, %r11d
movl %ecx, %r13d
cmovbl %r11d, %r13d
cmpl %ebp, %r13d
jbe 0x18c836
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
movq %rcx, 0x80(%rsp)
je 0x18c6c0
movq 0x30(%rsp), %rax
movq -0x8(%rax,%rsi,8), %rax
movl %eax, %edx
cmpq %rbp, %rdx
jae 0x18c84c
movq 0x20(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x18c269
movq 0x38(%rsp), %rsi
addq %rax, 0x50(%rsp)
movq 0x18(%rsp), %rax
subq %rbp, %rax
addq %r13, %rax
movq %rax, 0x18(%rsp)
shlq $0x20, %rbp
orq %r13, %rbp
movq 0x30(%rsp), %rax
movq %rbp, (%rax,%rsi,8)
incq %rsi
movq 0x10(%rsp), %rcx
movq %rsi, 0x38(%rsp)
testq %rcx, %rcx
je 0x18c71f
movq 0x40(%rsp), %rax
movq -0x8(%rax,%rcx,8), %rax
cmpl %eax, %r15d
jbe 0x18c896
movq 0x80(%rsp), %rdx
movl %edx, %eax
subl %r15d, %eax
addq %rax, 0x48(%rsp)
shlq $0x20, %r15
orq %rdx, %r15
movq 0x40(%rsp), %rax
movq %r15, (%rax,%rcx,8)
incq %rcx
movq 0x8(%rsp), %r9
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %r8
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %r10
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %r11d
movq 0x18(%rsp), %r13
testq %r13, %r13
movq %rcx, 0x10(%rsp)
je 0x18c83d
cmpq 0xe8(%rsp), %r13
jbe 0x18c840
movsd 0x50(%rsp), %xmm0
movsd 0x56adb(%rip), %xmm3    # 0x1e3270
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x56ae0(%rip), %xmm4    # 0x1e3280
subpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %r13, %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 0x56d73(%rip), %xmm2    # 0x1e3548
ucomisd %xmm1, %xmm2
jb 0x18c840
cmpq 0xa0(%rsp), %r13
jae 0x18c812
movsd 0x48(%rsp), %xmm1
unpcklps 0x56a7e(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x56a86(%rip), %xmm1    # 0x1e3280
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x58(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jb 0x18c840
movl (%rdi), %eax
cvtsi2sd %rax, %xmm0
movl (%r12), %eax
cvtsi2sd %rax, %xmm1
mulsd 0x90(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x18c840
jmp 0x18c8f2
movq 0x18(%rsp), %r13
jmp 0x18c840
xorl %r13d, %r13d
incq %rbx
movq 0x8(%r9), %rcx
jmp 0x18c5fe
cmpl %edx, %r13d
jbe 0x18c6fd
movq 0x20(%rsp), %rsi
movq %r13, %rcx
movq %rax, 0x98(%rsp)
movq %rdx, %rbp
callq 0x18c269
movq 0x38(%rsp), %rsi
addq %rax, 0x50(%rsp)
subq %rbp, %r13
addq %r13, 0x18(%rsp)
addq 0x98(%rsp), %r13
movq 0x30(%rsp), %rax
movq %r13, -0x8(%rax,%rsi,8)
jmp 0x18c6fd
movq 0x80(%rsp), %r15
cmpl %eax, %r15d
movq 0x8(%rsp), %r9
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %r8
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %r10
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %r11d
movq 0x18(%rsp), %r13
jbe 0x18c76b
subl %eax, %r15d
addq %r15, 0x48(%rsp)
addq %r15, %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rsp), %r15
movq %rax, -0x8(%rcx,%r15,8)
movq 0x10(%rsp), %rcx
jmp 0x18c76b
orl $-0x1, 0xc(%rdi)
movq 0x8(%r9), %rcx
incq %r14
jmp 0x18c55f
xorl %edx, %edx
xorl %eax, %eax
xorl %esi, %esi
cmpq %rcx, %rsi
jae 0x18c945
movq (%r9), %rdi
cmpl $-0x1, 0xc(%rdi,%rdx)
je 0x18c93c
leaq (%rdi,%rdx), %rcx
imulq $0x1c, %rax, %r8
incq %rax
movupd (%rcx), %xmm0
movupd 0xc(%rcx), %xmm1
movupd %xmm1, 0xc(%rdi,%r8)
movupd %xmm0, (%rdi,%r8)
movq 0x8(%r9), %rcx
incq %rsi
addq $0x1c, %rdx
jmp 0x18c908
movq %rax, 0x8(%r9)
jmp 0x18c94d
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c1d7(%rip), %rdi     # 0x1e8b3d
leaq 0x651b6(%rip), %rsi     # 0x1f1b23
leaq 0x68b1f(%rip), %rcx     # 0x1f5493
movl $0x4376, %edx           # imm = 0x4376
callq 0x2110