// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_max_gchain_adv(void*, ul_idx_t const*, long, st_mt_t*, vec_mg_lchain_t*, kv_ul_ov_t*, kv_ul_ov_t*, long, float, float, float, unsigned long, asg_t const*, st_mt_t*, vec_sp_node_t*, vec_mg_pathv_t*, unsigned long*, vec_mg_lchain_t*)
uint32_t gen_max_gchain_adv(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, kv_ul_ov_t *raw_chn,
int64_t qlen, float primary_cov_rate, float primary_fragment_cov_rate, float primary_fragment_second_score_rate, uint64_t mini_primary_fragment_len, 
const asg_t *g, st_mt_t *dst_done, vec_sp_node_t *out, vec_mg_pathv_t *res, uint64_t *b, vec_mg_lchain_t *gchains)
{
	gchains->n = 0;
	if(idx->n <= 0) return 0;
	int64_t a_n, idx_n = idx->n, i, k, is_done = 0, n_mchain = 0; uint64_t om, ok, ovlp, novlp; 
	ul_ov_t *m = NULL, *p = NULL; 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 = 0;//(tn = 1) -> normal; (t = 0) -> duplicated chain
		a_n += ((uint32_t)idx->a[i]);
		// fprintf(stderr, "[M::%s::i->%ld] score->%u, qs->%u, qe->%u, occ->%u\n", __func__, i, p->qn, p->qs, p->qe, p->te-p->ts); 
	}
	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
	m = &(gb[gb_n-1]);///max chain
	// assert(a[m.ts].qs<=a[m.te-1].qs && a[m.te-1].qe>=a[m.ts].qe);
	// print_chain(a + m.ts, m.te - m.ts);
	///for debug
	// dedup_second_chain(uref, idx->a, idx_n, m.ts, m.te, a, raw_idx, raw_chn, b, bw, diff_ec_ul);
	// debug_ll_chains(uref, idx->a, idx_n, m.ts, m.te, a, raw_idx, raw_chn, b, bw, diff_ec_ul, qlen);

	if((m->qe - m->qs) > (qlen*primary_cov_rate)) {
		is_done = 1; m->tn = 1; n_mchain = 1;
	}

	if(is_done == 0) {
		for (i = gb_n - 2; i >= 0; i--) {///from the second best chain
			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);
			novlp = (p->qe - p->qs) - ovlp;
			if(novlp > ((m->qe-m->qs)*GC_OFFSET_RATE) && novlp > GC_OFFSET_POS) break;
		}
		if(i < 0) { ///no alignment that is on the left or the right side of the primary chain
			is_done = 2; m->tn = 1; n_mchain = 1;
		}
	}

	if(is_done == 0) {
		if(((m->qe - m->qs) > (qlen*primary_fragment_cov_rate)) || ((m->qe - m->qs) > mini_primary_fragment_len)) {
			// dedup_second_chain(uref, idx->a, idx_n, m.ts, m.te, a, raw_idx, raw_chn, b, bw, diff_ec_ul, qlen);
			if(raw_chn && raw_idx) dedup_second_chain_adv(uref, gb, gb_n, a, raw_idx, raw_chn, b, qlen, ulid);
			for (k = gb_n-1, n_mchain = 0; k >= 0; k--) {
				m = &(gb[k]);///max chain
				// fprintf(stderr, "++[M::%s::k->%ld] score->%u, qs->%u, qe->%u\n", __func__, k, m->qn, m->qs, m->qe); 
				if(((m->qe - m->qs) <= (qlen*primary_fragment_cov_rate)) && 
															((m->qe - m->qs) <= mini_primary_fragment_len)) break;
				om = m->qe - m->qs;
				for (i = gb_n-1; i >= 0; i--) {
					if(i == k) continue;
					p = &(gb[i]);
					// fprintf(stderr, "--[M::%s::i->%ld] score->%u, qs->%u, qe->%u\n", __func__, i, p->qn, p->qs, p->qe); 
					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(p->tn == 1 && ((ovlp > ok*0.1) || (ovlp > om*0.1))) break;
					if(ok > om) ok = om;
					if((ovlp > ok*0.1) && (p->qn > (m->qn*primary_fragment_second_score_rate))) break;
				}
				if(i < 0) {
					is_done = 3; m->tn = 1; n_mchain++;
				} else {
					 break;
				 }
			}
		}
	}

	if(is_done) {
		gchains->n = 0;
		for (k = gb_n - n_mchain; 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;

					// 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]);
				} 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]);
				}
			}
			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 $0x78, %rsp
movd %xmm2, 0x5c(%rsp)
movss %xmm1, 0x48(%rsp)
movq %rdi, 0x70(%rsp)
movq 0xf0(%rsp), %rbp
movq $0x0, 0x8(%rbp)
movq (%rcx), %rbx
testq %rbx, %rbx
je 0x1aa50a
movss %xmm0, 0x10(%rsp)
movq (%r8), %r12
movq 0x8(%r9), %rax
movq %rax, 0x68(%rsp)
movq %r9, 0x50(%rsp)
movq %rsi, 0x40(%rsp)
jle 0x1aa475
movq %rcx, %r15
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x10(%r9), %rax
cmpq %rax, 0x8(%r9)
jne 0x1aa406
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%r9)
movq (%r9), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2370
movq 0x50(%rsp), %r9
movq %rax, (%r9)
movq (%r9), %rax
movq 0x8(%r9), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r9)
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 %r14d, 0x10(%rax,%rdx)
addq %r14, %rcx
movl %ecx, 0x14(%rax,%rdx)
movl %r14d, %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x14(%r12,%rsi,8), %esi
movl %esi, 0x4(%rax,%rdx)
leal -0x1(%rcx), %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x18(%r12,%rsi,8), %esi
movl %esi, 0x8(%rax,%rdx)
movl $0x0, 0xc(%rax,%rdx)
incq %r13
movq %rcx, %r14
cmpq %r13, %rbx
jne 0x1aa3cd
movq (%r9), %rdx
movq 0x8(%r9), %r15
movq 0x68(%rsp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rbx
addq %rcx, %rbx
addq %rdx, %rbx
movq %r15, %r14
subq %rcx, %r14
leaq (%r15,%r15,8), %rax
leaq (%rax,%rax,2), %rax
movq %rdx, 0x20(%rsp)
leaq (%rdx,%r15), %rsi
movq %rax, 0x28(%rsp)
addq %rax, %rsi
movq %rbx, %rdi
callq 0x195d3d
leaq -0x1(%r14), %r13
leaq (,%r13,8), %rax
addq %r13, %rax
leaq (%rax,%rax,2), %r10
leaq -0x1(%r14,%r10), %rax
movl 0x4(%rbx,%rax), %edx
movl 0x8(%rbx,%rax), %esi
movl %esi, %ecx
subl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
cvtsi2ssq 0xb8(%rsp), %xmm6
leaq (%rbx,%rax), %r8
movss 0x10(%rsp), %xmm1
mulss %xmm6, %xmm1
ucomiss %xmm1, %xmm0
ja 0x1aa511
movq $0x0, 0x8(%rsp)
jmp 0x1aa523
xorl %eax, %eax
jmp 0x1aab70
movl $0x1, 0xc(%r8)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
ucomiss %xmm1, %xmm0
movq 0x40(%rsp), %rdi
movq %rbx, 0x38(%rsp)
movq %r14, 0x10(%rsp)
ja 0x1aa625
movq %r14, %rax
addq $-0x2, %r14
cmpq $0x2, %rax
jl 0x1aa61a
movq %r8, 0x60(%rsp)
movq %r10, 0x18(%rsp)
movq %r13, 0x30(%rsp)
movl %ecx, %r8d
xorps %xmm1, %xmm1
cvtsi2sd %r8, %xmm1
mulsd 0x8931a(%rip), %xmm1    # 0x233888
movq %r14, %r8
sarq $0x3f, %r8
andq %r14, %r8
decq %r8
movq 0x28(%rsp), %rax
leaq (%rax,%r15), %r9
movq 0x20(%rsp), %rax
addq %rax, %r9
addq $-0x30, %r9
xorl %r10d, %r10d
movq 0x7aca5(%rip), %xmm2    # 0x225240
movapd 0x7acad(%rip), %xmm3    # 0x225250
movl -0x4(%r9), %eax
movl (%r9), %r13d
cmpl %r13d, %esi
movl %r13d, %ebx
cmovbl %esi, %ebx
cmpl %eax, %edx
movl %eax, %r11d
cmoval %edx, %r11d
subl %r11d, %ebx
cmovbl %r10d, %ebx
subl %eax, %r13d
subq %rbx, %r13
movq %r13, %xmm4
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
subpd %xmm3, %xmm4
cmpq $0x9, %r13
jb 0x1aa5ee
movapd %xmm4, %xmm5
unpckhpd %xmm4, %xmm5            # xmm5 = xmm5[1],xmm4[1]
addsd %xmm4, %xmm5
ucomisd %xmm1, %xmm5
ja 0x1aa601
leaq -0x1(%r14), %rax
addq $-0x1c, %r9
testq %r14, %r14
movq %rax, %r14
jg 0x1aa5a3
movq %r8, %r14
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x18(%rsp), %r10
movq 0x60(%rsp), %r8
testq %r14, %r14
js 0x1aa62e
movb $0x1, %dl
xorl %esi, %esi
jmp 0x1aa647
movl $0x1, %esi
xorl %edx, %edx
jmp 0x1aa64c
movl $0x1, 0xc(%r8)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
movl $0x2, %esi
xorl %edx, %edx
movq 0x10(%rsp), %r14
testb %dl, %dl
je 0x1aa8ca
mulss 0x48(%rsp), %xmm6
ucomiss %xmm6, %xmm0
setbe %al
movl %ecx, %ecx
cmpq 0xc0(%rsp), %rcx
setbe %cl
testb %cl, %al
jne 0x1aa8bb
movq 0xb0(%rsp), %r9
testq %r9, %r9
je 0x1aa6c1
subq $0x10, %rsp
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x60(%rsp), %r8
pushq 0xc8(%rsp)
pushq 0x100(%rsp)
movss %xmm6, 0x28(%rsp)
movq %r10, 0x38(%rsp)
callq 0x1c89fc
movq 0x38(%rsp), %r10
movss 0x28(%rsp), %xmm6
addq $0x20, %rsp
testq %r14, %r14
jle 0x1aa8bf
addq %r13, %r10
movl 0x4(%rbx,%r10), %edi
movl 0x8(%rbx,%r10), %r8d
movl %r8d, %r9d
subl %edi, %r9d
xorps %xmm0, %xmm0
cvtsi2ss %r9, %xmm0
ucomiss %xmm0, %xmm6
setae %al
cmpq 0xc0(%rsp), %r9
setbe %dl
xorl %ecx, %ecx
testb %dl, %al
jne 0x1aa8bf
addq %rbx, %r10
movq 0x28(%rsp), %rdx
addq %r15, %rdx
movq 0x20(%rsp), %rax
addq %rdx, %rax
addq $-0x10, %rax
movq %rax, 0x28(%rsp)
movsd 0x7a4ac(%rip), %xmm0    # 0x224bd0
xorl %ebx, %ebx
xorl %esi, %esi
movq $0x0, 0x8(%rsp)
movq %r13, 0x30(%rsp)
movq %r13, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %r10, %rsi
movl %r9d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
movq 0x28(%rsp), %r15
movq %rbx, 0x48(%rsp)
movq %rbx, %r13
movq 0x30(%rsp), %r11
testq %r13, %r13
je 0x1aa805
movl -0x8(%r15), %r10d
movl -0x4(%r15), %ebx
cmpl %ebx, %r8d
movl %ebx, %eax
cmovbl %r8d, %eax
cmpl %r10d, %edi
movl %r10d, %edx
cmoval %edi, %edx
subl %edx, %eax
cmovbl %ecx, %eax
jbe 0x1aa805
subl %r10d, %ebx
cmpl $0x1, (%r15)
movl %eax, %edx
jne 0x1aa7c3
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
movl %ebx, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1aa8b0
ucomisd %xmm1, %xmm2
ja 0x1aa8b0
cmpl %r9d, %ebx
cmovael %r9d, %ebx
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rbx, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x1aa805
movl -0xc(%r15), %eax
xorps %xmm2, %xmm2
cvtsi2ss %rax, %xmm2
movl (%rsi), %eax
xorps %xmm3, %xmm3
cvtsi2ss %rax, %xmm3
mulss 0x5c(%rsp), %xmm3
ucomiss %xmm3, %xmm2
ja 0x1aa81f
decq %r11
incq %r13
addq $-0x1c, %r15
decq %r14
jg 0x1aa764
movq $-0x1, %r11
testq %r11, %r11
movq 0x38(%rsp), %r10
movq 0x10(%rsp), %r14
movq 0x48(%rsp), %rbx
jns 0x1aab7f
movl $0x1, 0xc(%rsi)
movq 0x8(%rsp), %rdx
incq %rdx
movq %rdx, 0x8(%rsp)
cmpq %r14, %rdx
je 0x1aab89
movq 0x20(%rsp), %rsi
leaq -0x1(%rsi), %rax
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rsi, %rdx
decq %rdx
movl 0x4(%r10,%rdx), %edi
movl 0x8(%r10,%rdx), %r8d
movl %r8d, %r9d
subl %edi, %r9d
xorps %xmm1, %xmm1
cvtsi2ss %r9, %xmm1
addq %rdx, %r10
ucomiss %xmm1, %xmm6
setae %dl
cmpq 0xc0(%rsp), %r9
setbe %r11b
decq %rbx
movl $0x3, %esi
movq %rax, 0x20(%rsp)
testb %r11b, %dl
je 0x1aa73b
jmp 0x1aa8ca
decq %r14
movq %r14, %r11
jmp 0x1aa81f
xorl %esi, %esi
jmp 0x1aa8ca
xorl %esi, %esi
movq $0x0, 0x8(%rsp)
testq %rsi, %rsi
je 0x1aab5d
movq $0x0, 0x8(%rbp)
cmpq $0x0, 0x8(%rsp)
jle 0x1aab5d
movq 0xe0(%rsp), %r15
movq 0x10(%rsp), %r13
subq 0x8(%rsp), %r13
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq 0x10(%rbp), %rax
cmpq %rax, 0x8(%rbp)
jne 0x1aa937
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%rbp)
movq (%rbp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rsi
callq 0x2370
movq %rax, (%rbp)
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp)
leaq (%rcx,%rcx,4), %rcx
movl $0xffffffff, 0x8(%rax,%rcx,8) # imm = 0xFFFFFFFF
leaq (,%r13,8), %rdx
addq %r13, %rdx
leaq (%rdx,%rdx,2), %rdx
addq %r13, %rdx
movq 0x38(%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 (%r12,%rax,8), %rsi
subl %edi, %edx
movslq %edx, %rdx
subq $0x8, %rsp
movq 0x78(%rsp), %rdi
movq 0xd0(%rsp), %rcx
movq 0xd8(%rsp), %r8
movq 0xe0(%rsp), %r9
pushq %r15
callq 0x1af92c
addq $0x10, %rsp
movq 0x8(%r15), %rax
addq 0x8(%rbp), %rax
cmpq %rax, 0x10(%rbp)
jae 0x1aaa39
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(%rbp)
movq (%rbp), %rdi
leaq 0x8(,%rcx,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, (%rbp)
movq 0x8(%rbp), %rax
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq (%rbp), %rax
movq 0x8(%r15), %rdi
testq %rdi, %rdi
movq 0x40(%rsp), %r10
jle 0x1aab32
movl $0x4, %ecx
movl $0x20, %edx
xorl %esi, %esi
movq (%r15), %r8
movl -0x4(%r8,%rcx), %edi
cmpq %rbx, %rdi
je 0x1aaabe
movq 0x8(%rbp), %r9
leaq (%r9,%r9,4), %r9
shlq $0x3, %r9
addq (%rbp), %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 (%r10), %r8
movq 0x18(%r8), %r8
movq 0x20(%r8), %r8
shrl %edi
movl (%r8,%rdi,8), %edi
andl %r14d, %edi
movl %edi, -0x10(%rdx,%r9)
jmp 0x1aab1a
movslq 0x4(%r8,%rcx), %rdi
movslq -0x1c(%rax), %r8
addq %rdi, %r8
leaq (%r8,%r8,4), %rdi
movq 0x8(%rbp), %r8
leaq (%r8,%r8,4), %r8
shlq $0x3, %r8
addq (%rbp), %r8
movq 0x20(%r12,%rdi,8), %r9
movq %r9, (%rdx,%r8)
movupd (%r12,%rdi,8), %xmm0
movups 0x10(%r12,%rdi,8), %xmm1
movups %xmm1, -0x10(%rdx,%r8)
movupd %xmm0, -0x20(%rdx,%r8)
movq (%r15), %rdi
movl (%rdi,%rcx), %edi
movq 0x8(%rbp), %r8
leaq (%r8,%r8,4), %r8
shlq $0x3, %r8
addq (%rbp), %r8
movl %edi, (%rdx,%r8)
incq %rsi
movq 0x8(%r15), %rdi
addq $0xc, %rcx
addq $0x28, %rdx
cmpq %rdi, %rsi
jl 0x1aaa67
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(%rbp)
incq %r13
cmpq 0x10(%rsp), %r13
jl 0x1aa904
movq 0x50(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rsi
jmp 0x1aa8ca
movl $0x3, %esi
movq %r14, 0x8(%rsp)
jmp 0x1aa8ca