// File: /workspace/github_cpp_makefile_star2_O3/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 %rsi, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movq 0xe0(%rsp), %rax
movq $0x0, 0x8(%rax)
movq (%rcx), %rbx
testq %rbx, %rbx
je 0x1b84e8
movq (%r8), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r9), %rax
movq %r9, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jle 0x1b84f0
movq %rcx, %r12
movq (%r9), %rdi
xorl %r14d, %r14d
movl $0x2, %r13d
xorl %ebp, %ebp
cmpq 0x10(%r9), %rax
jne 0x1b8477
leaq (%rax,%rax), %rcx
testq %rax, %rax
cmoveq %r13, %rcx
movq %rcx, 0x10(%r9)
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2370
movq 0x10(%rsp), %r9
movq %rax, %rdi
movq %rax, (%r9)
movq 0x8(%r9), %rax
leaq 0x1(%rax), %r15
movq %r15, 0x8(%r9)
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movq 0x10(%r12), %rax
movq (%rax,%rbp,8), %rdx
movq %rdx, %rax
shrq $0x20, %rax
movl %eax, (%rdi,%rcx)
movl %r14d, 0x10(%rdi,%rcx)
addq %r14, %rdx
movl %edx, 0x14(%rdi,%rcx)
movl %r14d, %eax
leaq (%rax,%rax,4), %rax
movq 0x30(%rsp), %rsi
movl 0x14(%rsi,%rax,8), %eax
movl %eax, 0x4(%rdi,%rcx)
leal -0x1(%rdx), %eax
leaq (%rax,%rax,4), %rax
movl 0x18(%rsi,%rax,8), %eax
movl %eax, 0x8(%rdi,%rcx)
movl $0x1, 0xc(%rdi,%rcx)
incq %rbp
movq %r15, %rax
movq %rdx, %r14
cmpq %rbp, %rbx
jne 0x1b8443
jmp 0x1b84f6
xorl %r8d, %r8d
jmp 0x1b8b6d
movq (%r9), %rdi
movq %rax, %r15
movq %rdi, 0x40(%rsp)
movq 0x18(%rsp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movq %rax, 0x38(%rsp)
leaq (%rdi,%rax), %r12
movq %r15, %rbx
subq %rcx, %rbx
leaq (%r15,%r15,8), %rax
leaq (%rax,%rax,2), %r14
leaq (%rdi,%r15), %rsi
addq %r14, %rsi
movq %r12, %rdi
callq 0x19ead4
movq 0x40(%rsp), %rsi
movq %rbx, %rax
sarq %rax
testq %rax, %rax
jle 0x1b8590
addq %r15, %r14
leaq (%rsi,%r14), %rcx
addq $-0x1c, %rcx
movq %r12, %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 0x1b854f
xorl %r8d, %r8d
testq %rbx, %rbx
jle 0x1b8b5f
movq 0x38(%rsp), %rax
leaq (%rsi,%rax), %rcx
addq $-0x10, %rcx
movq %rcx, 0x20(%rsp)
leaq 0x28(%rsi,%rax), %rax
movq %rax, 0x50(%rsp)
movsd 0x875a0(%rip), %xmm0    # 0x23fb60
movsd 0x78fe8(%rip), %xmm1    # 0x2315b0
xorl %edx, %edx
movq %r12, 0x28(%rsp)
leaq (%rdx,%rdx,8), %rax
leaq (%rax,%rax,2), %r10
leaq (%r10,%rdx), %rax
cmpl $0x0, 0xc(%r12,%rax)
je 0x1b8764
leaq (%r12,%rax), %rsi
movl 0x4(%r12,%rax), %edi
movl 0x8(%r12,%rax), %r8d
movl %r8d, %r9d
subl %edi, %r9d
testq %rdx, %rdx
je 0x1b86ad
leaq 0x1(%rdx), %r11
movq 0x20(%rsp), %rax
leaq (%rax,%rdx), %rcx
addq %r10, %rcx
movl -0x8(%rcx), %r12d
movl -0x4(%rcx), %r14d
cmpl %r14d, %r8d
movl %r14d, %r15d
cmovbl %r8d, %r15d
cmpl %r12d, %edi
movl %r12d, %eax
cmoval %edi, %eax
subl %eax, %r15d
jbe 0x1b869c
movl -0xc(%rcx), %eax
movl (%rsi), %ebp
cmpl %ebp, %eax
movl %ebp, %r13d
cmovbl %eax, %r13d
cmoval %eax, %ebp
subl %r12d, %r14d
cmpl %r9d, %r14d
cmovbel %r9d, %r14d
xorps %xmm2, %xmm2
cvtsi2sd %r13, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rbp, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x1b86ad
cmpl $0x9, %r15d
jb 0x1b869c
ucomisd %xmm3, %xmm2
jbe 0x1b869c
movl %r15d, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movl %r14d, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x1b869c
xorl %eax, %eax
movl %eax, (%rcx)
movl %eax, 0xc(%rsi)
decq %r11
addq $-0x1c, %rcx
cmpq $0x1, %r11
jg 0x1b8614
leaq 0x1(%rdx), %r11
cmpq %rbx, %r11
jge 0x1b875d
addq 0x50(%rsp), %rdx
addq %r10, %rdx
movq %r11, %rcx
movl -0x8(%rdx), %eax
movl -0x4(%rdx), %r10d
cmpl %r10d, %r8d
movl %r10d, %r14d
cmovbl %r8d, %r14d
cmpl %eax, %edi
movl %eax, %ebp
cmoval %edi, %ebp
subl %ebp, %r14d
jbe 0x1b874d
movl -0xc(%rdx), %ebp
movl (%rsi), %r15d
cmpl %r15d, %ebp
movl %r15d, %r12d
cmovbl %ebp, %r12d
cmoval %ebp, %r15d
subl %eax, %r10d
cmpl %r9d, %r10d
cmovbel %r9d, %r10d
xorps %xmm2, %xmm2
cvtsi2sd %r12, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %r15, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x1b875d
cmpl $0x9, %r14d
jb 0x1b874d
ucomisd %xmm3, %xmm2
jbe 0x1b874d
movl %r14d, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movl %r10d, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x1b874d
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, 0xc(%rsi)
incq %rcx
addq $0x1c, %rdx
cmpq %rbx, %rcx
jl 0x1b86c5
movq 0x28(%rsp), %r12
jmp 0x1b876a
incq %rdx
movq %rdx, %r11
movq %r11, %rdx
cmpq %rbx, %r11
jne 0x1b85cf
testq %rbx, %rbx
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r15
jle 0x1b8b5a
xorl %eax, %eax
movq %r12, %rcx
movq 0x40(%rsp), %rdi
cmpl $0x0, 0xc(%rcx)
je 0x1b87bd
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(%r12,%rdx)
movupd %xmm0, (%r12,%rdx)
addq $0x1c, %rcx
decq %rbx
jne 0x1b8793
testq %rax, %rax
jle 0x1b8b5a
movq 0x38(%rsp), %rcx
addq %rdi, %rcx
addq $0x8, %rcx
xorl %r8d, %r8d
movsd 0x7842a(%rip), %xmm0    # 0x230c10
xorl %edx, %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movq %r8, %r13
testq %r8, %r8
jle 0x1b8866
movl 0x4(%r12,%rsi), %edi
movl 0x8(%r12,%rsi), %r8d
movl %r8d, %r9d
subl %edi, %r9d
xorps %xmm1, %xmm1
cvtsi2sd %r9, %xmm1
mulsd %xmm0, %xmm1
movq %rcx, %r9
movq %r13, %r10
movl -0x4(%r9), %ebx
movl (%r9), %r11d
cmpl %r11d, %r8d
movl %r11d, %r14d
cmovbl %r8d, %r14d
cmpl %ebx, %edi
movl %ebx, %ebp
cmoval %edi, %ebp
subl %ebp, %r14d
jbe 0x1b885d
subl %ebx, %r11d
xorps %xmm2, %xmm2
cvtsi2sd %r14, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %r11, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1b8897
ucomisd %xmm1, %xmm2
ja 0x1b8897
addq $0x1c, %r9
decq %r10
jne 0x1b881d
addq %r12, %rsi
leaq (,%r13,8), %rdi
addq %r13, %rdi
leaq (%rdi,%rdi,2), %rdi
addq %r13, %rdi
leaq 0x1(%r13), %r8
movupd (%rsi), %xmm1
movupd 0xc(%rsi), %xmm2
movupd %xmm2, 0xc(%r12,%rdi)
movupd %xmm1, (%r12,%rdi)
jmp 0x1b889a
movq %r13, %r8
incq %rdx
cmpq %rax, %rdx
jne 0x1b87e8
testq %r8, %r8
je 0x1b8b82
movq 0xe0(%rsp), %rbx
movq $0x0, 0x8(%rbx)
movq 0x10(%rsp), %rsi
jle 0x1b8b69
xorl %ecx, %ecx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq %r8, 0x20(%rsp)
movq (%rbx), %rax
cmpq 0x10(%rbx), %rcx
jne 0x1b890e
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x10(%rbx)
shlq $0x3, %rdx
leaq (%rdx,%rdx,4), %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
leaq (%rcx,%rcx,4), %rcx
movl $0xffffffff, 0x8(%rax,%rcx,8) # imm = 0xFFFFFFFF
leaq (%r15,%r15,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %r15, %rdx
movq 0x4(%r12,%rdx), %xmm0
movq 0x10(%r12,%rdx), %rdx
movq %rdx, %xmm1
pshufd $0x55, %xmm1, %xmm2     # xmm2 = xmm1[1,1,1,1]
psubd %xmm1, %xmm2
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movdqu %xmm1, 0xc(%rax,%rcx,8)
movl $0x0, (%rax,%rcx,8)
andl $0x80000000, 0x4(%rax,%rcx,8) # imm = 0x80000000
movslq %edx, %rax
leaq (%rax,%rax,4), %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
movd %xmm2, %eax
movslq %eax, %rdx
movq 0xd8(%rsp), %r14
movq %r14, (%rsp)
movq 0x48(%rsp), %rdi
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %r8
movq 0xd0(%rsp), %r9
callq 0x1b8b8c
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
movq 0x8(%r14), %rdx
leaq (%rdx,%rsi), %rcx
cmpq %rcx, 0x10(%rbx)
jae 0x1b8a15
decq %rcx
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x10, %rdx
orq %rcx, %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x10(%rbx)
leaq 0x8(,%rdx,8), %rcx
leaq (%rcx,%rcx,4), %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq 0x8(%r14), %rdx
leaq (%rsi,%rsi,4), %rcx
leaq (%rax,%rcx,8), %rcx
testq %rdx, %rdx
jle 0x1b8b11
movq (%r14), %r10
movl $0x4, %edi
movl $0x20, %r8d
xorl %r9d, %r9d
movl -0x4(%r10,%rdi), %r11d
cmpq %r13, %r11
je 0x1b8a8e
leaq (%rsi,%rsi,4), %rbx
leaq (%rax,%rbx,8), %rbx
movl %r11d, -0x18(%r8,%rbx)
movl $0xffffffff, -0x20(%r8,%rbx) # imm = 0xFFFFFFFF
movl (%r10,%rdi), %ebp
movl %ebp, (%r8,%rbx)
movl $0x0, -0x14(%r8,%rbx)
movq 0x58(%rsp), %r14
movq (%r14), %r14
movq 0x18(%r14), %r14
movq 0x20(%r14), %r14
shrl %r11d
movl (%r14,%r11,8), %r11d
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
andl %ebp, %r11d
movl %r11d, -0x10(%r8,%rbx)
jmp 0x1b8afd
movslq 0x4(%r10,%rdi), %rdx
movslq -0x1c(%rcx), %r10
addq %rdx, %r10
leaq (%r10,%r10,4), %rdx
leaq (%rsi,%rsi,4), %rsi
leaq (%rax,%rsi,8), %rax
movq 0x30(%rsp), %r10
movq 0x20(%r10,%rdx,8), %rsi
movq %rsi, (%r8,%rax)
movdqu (%r10,%rdx,8), %xmm0
movdqu 0x10(%r10,%rdx,8), %xmm1
movdqu %xmm1, -0x10(%r8,%rax)
movdqu %xmm0, -0x20(%r8,%rax)
movq 0xd8(%rsp), %rbx
movq (%rbx), %r10
movl (%r10,%rdi), %edx
movq 0xe0(%rsp), %rsi
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
leaq (%rsi,%rsi,4), %r11
leaq (%rax,%r11,8), %r11
movl %edx, (%r8,%r11)
movq 0x8(%rbx), %rdx
incq %r9
addq $0xc, %rdi
addq $0x28, %r8
cmpq %rdx, %r9
jl 0x1b8a37
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x24(%rcx), %eax
movl $0x80000000, %esi       # imm = 0x80000000
andl %esi, %eax
orl %edx, %eax
movl %eax, -0x24(%rcx)
movq 0xe0(%rsp), %rbx
movq 0x8(%rbx), %rcx
movq 0xd8(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
incq %r15
movq 0x20(%rsp), %r8
cmpq %r8, %r15
movq 0x10(%rsp), %rsi
jne 0x1b88da
jmp 0x1b8b64
xorl %r8d, %r8d
jmp 0x1b8b69
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r15
movq %r15, 0x8(%rsi)
movl %r8d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
movq 0x10(%rsp), %rsi
jmp 0x1b8b69