// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: select_max_gchain(void*, ul_idx_t const*, long, st_mt_t*, vec_mg_lchain_t*, kv_ul_ov_t*, asg_t const*, st_mt_t*, vec_sp_node_t*, vec_mg_pathv_t*, vec_mg_lchain_t*)
uint32_t select_max_gchain(void *km, const ul_idx_t *uref, int64_t ulid, st_mt_t *idx, vec_mg_lchain_t *e, kv_ul_ov_t *raw_idx, 
const asg_t *g, st_mt_t *dst_done, vec_sp_node_t *out, vec_mg_pathv_t *res, vec_mg_lchain_t *gchains)
{
	gchains->n = 0;
    if(idx->n <= 0) return 0;
    int64_t a_n, idx_n = idx->n, i, k, n_mchain = 0, min_sc, max_sc; uint64_t om, ok, ovlp; 
    ul_ov_t *m = NULL, *p = NULL, kp; mg_lchain_t *a = e->a, *g_item; int64_t raw_idx_n = raw_idx->n;
    ul_ov_t *gb = NULL; int64_t gb_n = 0;
    for (i = a_n = 0; i < idx_n; ++i) {
        kv_pushp(ul_ov_t, *raw_idx, &p);
        p->qn = ((int64_t)(idx->a[i]>>32));//score
        p->ts = a_n; p->te = a_n + ((uint32_t)idx->a[i]);
        p->qs = a[p->ts].qs; p->qe = a[p->te-1].qe; p->tn = 1;//(tn = 1) -> normal; (t = 0) -> duplicated chain
        a_n += ((uint32_t)idx->a[i]);
    }
    gb = raw_idx->a + raw_idx_n; gb_n = raw_idx->n - raw_idx_n;
    radix_sort_ul_ov_srt_qn(gb, gb + gb_n);//sort by scores
	for (k = 0, n_mchain = gb_n>>1; k < n_mchain; k++) {
		kp = gb[k]; gb[k] = gb[gb_n-k-1]; gb[gb_n-k-1] = kp;
	}
	
	for (k = 0; k < gb_n; k++) {//filter too close chains
		m = &(gb[k]); om = m->qe - m->qs; ///current chain
		// fprintf(stderr, "k::%ld[M::%s::sc->%u] q::[%u, %u), set::%u\n", k, __func__, m->qn, m->qs, m->qe, m->tn);
		if(m->tn == 0) continue;
		for (i = k-1; i >= 0; i--) {
			p = &(gb[i]);
			ovlp = ((MIN(m->qe, p->qe) > MAX(m->qs, p->qs))? (MIN(m->qe, p->qe) - MAX(m->qs, p->qs)):0);
			if(ovlp == 0) continue;
			min_sc = MIN(p->qn, m->qn); max_sc = MAX(p->qn, m->qn);
			ok = p->qe - p->qs; ok = MAX(ok, om);
			if(min_sc < (max_sc*0.98)) break;
			if((ovlp > GC_OFFSET_POS) && (min_sc > (max_sc*0.98)) && (ovlp > (ok*0.8))) {
				// fprintf(stderr, "k::%ld[M::%s::i->%ld] min_sc::%ld, max_sc::%ld\n", 
				// k, __func__, i, min_sc, max_sc);
				m->tn = p->tn = 0;
			}
		}

		for (i = k+1; i < gb_n; i++) {
			p = &(gb[i]);
			ovlp = ((MIN(m->qe, p->qe) > MAX(m->qs, p->qs))? (MIN(m->qe, p->qe) - MAX(m->qs, p->qs)):0);
			if(ovlp == 0) continue;
			min_sc = MIN(p->qn, m->qn); max_sc = MAX(p->qn, m->qn);
			ok = p->qe - p->qs; ok = MAX(ok, om);
			if(min_sc < (max_sc*0.98)) break;
			if((ovlp > GC_OFFSET_POS) && (min_sc > (max_sc*0.98)) && (ovlp > (ok*0.8))) {
				// fprintf(stderr, "k::%ld[M::%s::i->%ld] min_sc::%ld, max_sc::%ld\n", 
				// k, __func__, i, min_sc, max_sc);
				m->tn = p->tn = 0;
			}
		}
	}

	for (k = i = 0; k < gb_n; k++) {
		m = &(gb[k]); if(m->tn == 0) continue;
		gb[i++] = gb[k];
	}
	// fprintf(stderr, "[M::%s::] gb_n0::%ld, gb_n::%ld\n", __func__, gb_n, i);
	gb_n = i;

	for (k = n_mchain = 0; k < gb_n; k++) {
		m = &(gb[k]); om = m->qe - m->qs;
		for (i = 0; i < n_mchain; i++) {
			p = &(gb[i]);
			ovlp = ((MIN(m->qe, p->qe) > MAX(m->qs, p->qs))? (MIN(m->qe, p->qe) - MAX(m->qs, p->qs)):0);
			if(ovlp == 0) continue;
			ok = p->qe - p->qs;
			if((ovlp > ok*0.1) || (ovlp > om*0.1)) break;
		}
		if(i < n_mchain) continue;
		gb[n_mchain++] = gb[k];
	}
	gb_n = n_mchain;

	if(gb_n) {
		gchains->n = 0;
		for (k = 0; k < gb_n; k++) {
			kv_pushp(mg_lchain_t, *gchains, &g_item);
			g_item->v = (uint32_t)-1; 
			g_item->qs = gb[k].qs; g_item->qe = gb[k].qe; 
			g_item->rs = gb[k].ts; g_item->re = gb[k].te; 
			g_item->cnt = g_item->off = 0;
			gen_gchain_track(km, a + g_item->rs, g_item->re - g_item->rs, g, dst_done, out, res);
			kv_resize(mg_lchain_t, *gchains, gchains->n + res->n); ///a = gchains->a + gchains->n;
			for (i = 0, g_item = &(gchains->a[gchains->n-1]); i < ((int64_t)res->n); i++) {
				if(res->a[i].v == (uint32_t)-1) {
					gchains->a[i+gchains->n] = a[res->a[i].pre + g_item->rs]; 
					gchains->a[i+gchains->n].dist_pre = res->a[i].d;
					// if(ulid == 14714) {
					// 	fprintf(stderr, "+[M::%s::]\tutg%.6dl(%c)\tq::[%d, %d)\tt::[%d, %d)\n", __func__, 
					// 		(int32_t)(gchains->a[i+gchains->n].v>>1)+1, "+-"[gchains->a[i+gchains->n].v&1],
					// 		gchains->a[i+gchains->n].qs, gchains->a[i+gchains->n].qe,
					// 		gchains->a[i+gchains->n].rs, gchains->a[i+gchains->n].re);
					// }
				} else {
					gchains->a[i+gchains->n].v = res->a[i].v; 
					gchains->a[i+gchains->n].off = -1; 
					gchains->a[i+gchains->n].dist_pre = res->a[i].d;
					///the nodes detected by the graph chaining should be fully covered
					gchains->a[i+gchains->n].rs = 0;
					gchains->a[i+gchains->n].re = uref->ug->g->seq[res->a[i].v>>1].len;
					// fprintf(stderr, "aaaaaaa, ulid->%ld\n", ulid);
					// fprintf(stderr, "-[M::%s::]\tutg%.6dl(%c)\n", __func__, 
					// (int32_t)(gchains->a[i+gchains->n].v>>1)+1, "+-"[gchains->a[i+gchains->n].v&1]);
					// if(ulid == 14714) {
					// 	fprintf(stderr, "-[M::%s::]\tutg%.6dl(%c)\tq::[%d, %d)\tt::[%d, %d)\n", __func__, 
					// 		(int32_t)(gchains->a[i+gchains->n].v>>1)+1, "+-"[gchains->a[i+gchains->n].v&1],
					// 		gchains->a[i+gchains->n].qs, gchains->a[i+gchains->n].qe,
					// 		gchains->a[i+gchains->n].rs, gchains->a[i+gchains->n].re);
					// }
				}
			}
			g_item->cnt = res->n;
			gchains->n += res->n;
			// fprintf(stderr, "sbsbsbsb, ulid->%ld\n", ulid);
			// debug_gchain(km, g, gchains->a + gchains->n - res->n, res->n, dst_done, out);
		}
	}

	raw_idx->n = raw_idx_n;
    return n_mchain;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, 0x58(%rsp)
movq 0xe0(%rsp), %rax
movq $0x0, 0x8(%rax)
movq (%rcx), %r14
testq %r14, %r14
je 0x1af65c
movq %r9, %rbx
movq %rsi, %rbp
movq (%r8), %rdi
movq 0x8(%r9), %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x10(%rsp)
jle 0x1af28f
movq %rcx, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
jne 0x1af222
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%rbx)
movq (%rbx), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2370
movq 0x10(%rsp), %rdi
movq %rax, (%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movq 0x10(%r15), %rcx
movq (%rcx,%r13,8), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
movl %esi, (%rax,%rdx)
movl %r12d, 0x10(%rax,%rdx)
addq %r12, %rcx
movl %ecx, 0x14(%rax,%rdx)
movl %r12d, %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x14(%rdi,%rsi,8), %esi
movl %esi, 0x4(%rax,%rdx)
leal -0x1(%rcx), %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x18(%rdi,%rsi,8), %esi
movl %esi, 0x8(%rax,%rdx)
movl $0x1, 0xc(%rax,%rdx)
incq %r13
movq %rcx, %r12
cmpq %r13, %r14
jne 0x1af1e9
movq %rbp, 0x48(%rsp)
movq (%rbx), %rdx
movq %rbx, 0x50(%rsp)
movq 0x8(%rbx), %rbx
movq 0x28(%rsp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
leaq (%rdx,%rax), %rdi
movq %rbx, %r15
subq %rcx, %r15
leaq (%rbx,%rbx,8), %rax
leaq (%rax,%rax,2), %r14
movq %rdx, 0x18(%rsp)
leaq (%rdx,%rbx), %rsi
addq %r14, %rsi
movq %rdi, 0x8(%rsp)
callq 0x195d3d
movq %r15, %rax
sarq %rax
testq %rax, %rax
jle 0x1af33d
addq %rbx, %r14
movq 0x18(%rsp), %rcx
addq %r14, %rcx
addq $-0x1c, %rcx
movq 0x8(%rsp), %rdx
movups (%rdx), %xmm0
movups 0xc(%rdx), %xmm1
movups %xmm1, 0x6c(%rsp)
movaps %xmm0, 0x60(%rsp)
movups (%rcx), %xmm0
movupd 0xc(%rcx), %xmm1
movupd %xmm1, 0xc(%rdx)
movups %xmm0, (%rdx)
movups 0x6c(%rsp), %xmm0
movups %xmm0, 0xc(%rcx)
movapd 0x60(%rsp), %xmm0
movupd %xmm0, (%rcx)
addq $0x1c, %rdx
addq $-0x1c, %rcx
decq %rax
jne 0x1af2fc
testq %r15, %r15
jle 0x1af531
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq (%rax,%rcx), %rdx
addq $-0x10, %rdx
movq %rdx, 0x40(%rsp)
leaq 0x28(%rax,%rcx), %rax
movq %rax, 0x30(%rsp)
movl $0x1, %eax
movq %rax, 0x38(%rsp)
xorl %esi, %esi
movsd 0x84515(%rip), %xmm0    # 0x233890
movsd 0x7612d(%rip), %xmm1    # 0x2254b0
xorl %edi, %edi
leaq (%rdi,%rdi,8), %r8
leaq (%r8,%r8,2), %r10
addq %rdi, %r10
movq 0x8(%rsp), %rax
cmpl $0x0, 0xc(%rax,%r10)
je 0x1af514
movq 0x8(%rsp), %rax
leaq (%rax,%r10), %r8
movl 0x4(%rax,%r10), %r9d
movl 0x8(%rax,%r10), %r10d
movl %r10d, %r11d
subl %r9d, %r11d
testq %rdi, %rdi
je 0x1af466
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r12
movl -0x8(%r14), %ecx
movl -0x4(%r14), %r13d
cmpl %r13d, %r10d
movl %r13d, %ebx
cmovbl %r10d, %ebx
cmpl %ecx, %r9d
movl %ecx, %ebp
cmoval %r9d, %ebp
subl %ebp, %ebx
cmovbl %esi, %ebx
jbe 0x1af455
movl -0xc(%r14), %ebp
movl (%r8), %eax
cmpl %eax, %ebp
movl %eax, %edx
cmovbl %ebp, %edx
cmoval %ebp, %eax
subl %ecx, %r13d
cmpl %r11d, %r13d
cmovbel %r11d, %r13d
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x1af466
cmpl $0x9, %ebx
jb 0x1af455
ucomisd %xmm3, %xmm2
jbe 0x1af455
movl %ebx, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movl %r13d, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x1af455
movl %esi, (%r14)
movl %esi, 0xc(%r8)
decq %r12
addq $-0x1c, %r14
cmpq $0x1, %r12
jg 0x1af3cd
leaq 0x1(%rdi), %r14
cmpq %r15, %r14
jge 0x1af514
movq 0x30(%rsp), %r12
movl -0x8(%r12), %ebp
movl -0x4(%r12), %r13d
cmpl %r13d, %r10d
movl %r13d, %ebx
cmovbl %r10d, %ebx
cmpl %ebp, %r9d
movl %ebp, %eax
cmoval %r9d, %eax
subl %eax, %ebx
cmovbl %esi, %ebx
jbe 0x1af504
movl -0xc(%r12), %eax
movl (%r8), %ecx
cmpl %ecx, %eax
movl %ecx, %edx
cmovbl %eax, %edx
cmoval %eax, %ecx
subl %ebp, %r13d
cmpl %r11d, %r13d
cmovbel %r11d, %r13d
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rcx, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x1af514
cmpl $0x9, %ebx
jb 0x1af504
ucomisd %xmm3, %xmm2
jbe 0x1af504
movl %ebx, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movl %r13d, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x1af504
movl %esi, (%r12)
movl %esi, 0xc(%r8)
incq %r14
addq $0x1c, %r12
cmpq %r15, %r14
jl 0x1af478
incq %rdi
incq 0x38(%rsp)
addq $0x1c, 0x40(%rsp)
addq $0x1c, 0x30(%rsp)
cmpq %r15, %rdi
jne 0x1af385
xorl %eax, %eax
testq %r15, %r15
jle 0x1af573
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rsi
cmpl $0x0, 0xc(%rcx)
je 0x1af56a
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
incq %rax
movupd (%rcx), %xmm0
movupd 0xc(%rcx), %xmm1
movupd %xmm1, 0xc(%rsi,%rdx)
movupd %xmm0, (%rsi,%rdx)
addq $0x1c, %rcx
decq %r15
jne 0x1af542
xorl %ecx, %ecx
testq %rax, %rax
jle 0x1af663
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rsi
addq %rsi, %rdx
addq $0x8, %rdx
movsd 0x75639(%rip), %xmm0    # 0x224bd0
xorl %r12d, %r12d
xorl %esi, %esi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
testq %r12, %r12
jle 0x1af622
movq 0x8(%rsp), %r9
movl 0x4(%r9,%rdi), %r8d
movl 0x8(%r9,%rdi), %r9d
movl %r9d, %r10d
subl %r8d, %r10d
xorps %xmm1, %xmm1
cvtsi2sd %r10, %xmm1
mulsd %xmm0, %xmm1
movq %rdx, %r10
movq %r12, %r11
movl -0x4(%r10), %ebp
movl (%r10), %ebx
cmpl %ebx, %r9d
movl %ebx, %r14d
cmovbl %r9d, %r14d
cmpl %ebp, %r8d
movl %ebp, %r15d
cmoval %r8d, %r15d
subl %r15d, %r14d
jbe 0x1af619
cmovbl %ecx, %r14d
subl %ebp, %ebx
xorps %xmm2, %xmm2
cvtsi2sd %r14, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rbx, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1af64e
ucomisd %xmm1, %xmm2
ja 0x1af64e
addq $0x1c, %r10
decq %r11
jne 0x1af5d3
movq 0x8(%rsp), %r10
addq %r10, %rdi
leaq (%r12,%r12,8), %r8
leaq (%r8,%r8,2), %r8
addq %r12, %r8
incq %r12
movupd (%rdi), %xmm1
movupd 0xc(%rdi), %xmm2
movupd %xmm2, 0xc(%r10,%r8)
movupd %xmm1, (%r10,%r8)
incq %rsi
cmpq %rax, %rsi
jne 0x1af59c
jmp 0x1af666
xorl %ebx, %ebx
jmp 0x1af918
xorl %r12d, %r12d
movq %r12, %rbx
testq %r12, %r12
movq 0x48(%rsp), %rbp
movq 0xe0(%rsp), %r10
movq 0x10(%rsp), %r11
je 0x1af90a
movq $0x0, 0x8(%r10)
jle 0x1af90a
movq 0xd8(%rsp), %r15
xorl %r14d, %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq 0x10(%r10), %rax
cmpq %rax, 0x8(%r10)
jne 0x1af6e7
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%r10)
movq (%r10), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rsi
callq 0x2370
movq 0x10(%rsp), %r11
movq 0xe0(%rsp), %r10
movq %rax, (%r10)
movq (%r10), %rax
movq 0x8(%r10), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r10)
leaq (%rcx,%rcx,4), %rcx
movl $0xffffffff, 0x8(%rax,%rcx,8) # imm = 0xFFFFFFFF
leaq (%r14,%r14,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %r14, %rdx
movq 0x8(%rsp), %r8
movl 0x4(%r8,%rdx), %esi
movl %esi, 0x14(%rax,%rcx,8)
movl 0x8(%r8,%rdx), %esi
movl %esi, 0x18(%rax,%rcx,8)
movslq 0x10(%r8,%rdx), %rdi
movl %edi, 0xc(%rax,%rcx,8)
movl 0x14(%r8,%rdx), %edx
movl %edx, 0x10(%rax,%rcx,8)
movl $0x0, (%rax,%rcx,8)
andl $0x80000000, 0x4(%rax,%rcx,8) # imm = 0x80000000
leaq (%rdi,%rdi,4), %rax
leaq (%r11,%rax,8), %rsi
subl %edi, %edx
movslq %edx, %rdx
movq %r15, (%rsp)
movq 0x58(%rsp), %rdi
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %r8
movq 0xd0(%rsp), %r9
callq 0x1af92c
movq 0xe0(%rsp), %r10
movq 0x8(%r15), %rax
addq 0x8(%r10), %rax
cmpq %rax, 0x10(%r10)
jae 0x1af7e9
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, 0x10(%r10)
movq (%r10), %rdi
leaq 0x8(,%rcx,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq 0xe0(%rsp), %r10
movq %rax, (%r10)
movq 0x8(%r10), %rax
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq (%r10), %rax
movq 0x8(%r15), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %r11
jle 0x1af8e1
movl $0x4, %ecx
movl $0x20, %edx
xorl %esi, %esi
movq (%r15), %r8
movl -0x4(%r8,%rcx), %edi
cmpq %r12, %rdi
je 0x1af86d
movq 0x8(%r10), %r9
leaq (%r9,%r9,4), %r9
shlq $0x3, %r9
addq (%r10), %r9
movl %edi, -0x18(%rdx,%r9)
movl $0xffffffff, -0x20(%rdx,%r9) # imm = 0xFFFFFFFF
movl (%r8,%rcx), %r8d
movl %r8d, (%rdx,%r9)
movl $0x0, -0x14(%rdx,%r9)
movq (%rbp), %r8
movq 0x18(%r8), %r8
movq 0x20(%r8), %r8
shrl %edi
movl (%r8,%rdi,8), %edi
andl %r13d, %edi
movl %edi, -0x10(%rdx,%r9)
jmp 0x1af8c9
movslq 0x4(%r8,%rcx), %rdi
movslq -0x1c(%rax), %r8
addq %rdi, %r8
leaq (%r8,%r8,4), %rdi
movq 0x8(%r10), %r8
leaq (%r8,%r8,4), %r8
shlq $0x3, %r8
addq (%r10), %r8
movq 0x20(%r11,%rdi,8), %r9
movq %r9, (%rdx,%r8)
movupd (%r11,%rdi,8), %xmm0
movupd 0x10(%r11,%rdi,8), %xmm1
movupd %xmm1, -0x10(%rdx,%r8)
movupd %xmm0, -0x20(%rdx,%r8)
movq (%r15), %rdi
movl (%rdi,%rcx), %edi
movq 0x8(%r10), %r8
leaq (%r8,%r8,4), %r8
shlq $0x3, %r8
addq (%r10), %r8
movl %edi, (%rdx,%r8)
incq %rsi
movq 0x8(%r15), %rdi
addq $0xc, %rcx
addq $0x28, %rdx
cmpq %rdi, %rsi
jl 0x1af816
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl -0x24(%rax), %ecx
movl $0x80000000, %edx       # imm = 0x80000000
andl %edx, %ecx
orl %edi, %ecx
movl %ecx, -0x24(%rax)
movq 0x8(%r15), %rax
addq %rax, 0x8(%r10)
incq %r14
cmpq %rbx, %r14
jne 0x1af6a9
movq 0x28(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rax, 0x8(%rcx)
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq