LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: fill_unaligned_alignments(ma_ug_t*, mg_lchain_t*, long, long, long)
void fill_unaligned_alignments(ma_ug_t *ug, mg_lchain_t *a, int64_t a_n, int64_t offset, int64_t ulid)
{
	// fprintf(stderr, "\n[M::%s::] a_n->%ld, offset->%ld\n", __func__, a_n, offset);
	if(a_n == 0) return;
	int64_t k, l;
	for (k = 0, l = ug->g->seq[a[0].v>>1].len; k < a_n; k++) {
		l -= ug->g->seq[a[k].v>>1].len;
		if(a[k].off < 0) a[k].qs = a[k].qe = -1; 
		a[k].off = l; a[k].hash_pre = (uint32_t)-1;
		if(k > 0) a[k].hash_pre = offset + k - 1;
		// fprintf(stderr, "k->%ld, l->%ld, [M::utg%.6u%c::%c::len->%u], qs->%u, qe->%u, rs->%u, re->%u\n", k, l, 
		// (a[k].v>>1)+1, "lc"[ug->u.a[a[k].v>>1].circ], "+-"[a[k].v&1], ug->u.a[a[k].v>>1].len,
		//  a[k].qs, a[k].qe, a[k].rs, a[k].re);
		l += ug->g->seq[a[k].v>>1].len + a[k].dist_pre;
	}

	// debug_update_uovlp_chain_qse(ug, a, a_n, ulid);

	for (l = -1, k = 0; k <= a_n; k++) {
		if(k == a_n || a[k].qs >= 0) { ///a[k] and a[l] are anchors
			if(k-l>1) update_uovlp_chain_qse(ug, l, k, a, a_n);
			l = k;
		}
	}
}

// Assembly:
testq %rdx, %rdx
je 0x1a7653
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
jle 0x1a75ec
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
movl 0x8(%r14), %edx
shrl %edx
movl (%rax,%rdx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
decl %ecx
xorl %esi, %esi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movq %r14, %r8
movl 0x8(%r8), %r9d
shrl %r9d
movl (%rax,%r9,8), %r10d
cmpl $0x0, (%r8)
jns 0x1a75ad
movq $-0x1, 0x14(%r8)
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
subq %r10, %rdx
movl %edx, (%r8)
leal (%rcx,%rsi), %r10d
cmpq $0x1, %rsi
movl $0x0, %r11d
sbbl %r11d, %r11d
orl %r10d, %r11d
movl %r11d, 0x24(%r8)
movl (%rax,%r9,8), %r9d
andl %edi, %r9d
addl 0x20(%r8), %r9d
addq %r9, %rdx
incq %rsi
addq $0x28, %r8
cmpq %rsi, %rbx
jne 0x1a7594
testq %rbx, %rbx
js 0x1a7645
leaq 0x1(%rbx), %r13
leaq 0x14(%r14), %rbp
movq $-0x1, %rsi
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1a760e
cmpl $0x0, (%rbp)
js 0x1a7633
movq %r12, %rcx
subq %rsi, %rcx
movq %r12, %rax
cmpq $0x2, %rcx
jl 0x1a7636
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x1a6f5a
movq %r12, %rax
jmp 0x1a7636
movq %rsi, %rax
incq %r12
addq $0x28, %rbp
movq %rax, %rsi
cmpq %r12, %r13
jne 0x1a7603
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: print_raw_chains(vec_mg_lchain_t*, long)
void print_raw_chains(vec_mg_lchain_t *uc, int64_t ulid)
{
	if(uc->n <= 0) return;
	int64_t k, m, ucn = uc->n, k_cnt, a_n; mg_lchain_t *ix, *a; 
	for (k = m = 0; k < ucn; k += k_cnt) {
		ix = &(uc->a[k]); assert(ix->v == (uint32_t)-1); k_cnt = ix->cnt + 1;
		a = uc->a + k + 1; a_n = ix->cnt;
		for (m = 0; m < a_n; m++) {
			if(a[m].off < 0) break;
		}
		if(m < a_n) fprintf(stderr, "ulid->%ld\n", ulid);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r12
testq %r12, %r12
jle 0x1a7b40
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8cfe6(%rip), %r15     # 0x234ab9
xorl %ebp, %ebp
movq (%r14), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
cmpl $-0x1, 0x8(%rax,%rcx,8)
jne 0x1a7b4f
leaq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
leal (%rcx,%rcx), %r13d
sarl %r13d
testl %r13d, %r13d
jle 0x1a7b17
addq $0x28, %rax
shlq $0x21, %rcx
sarq $0x21, %rcx
cmpl $0x0, (%rax)
js 0x1a7b27
addq $0x28, %rax
decq %rcx
jne 0x1a7b09
incl %r13d
movslq %r13d, %rax
addq %rax, %rbp
cmpq %r12, %rbp
jl 0x1a7ad5
jmp 0x1a7b40
movq 0xe24b2(%rip), %rax     # 0x289fe0
movq (%rax), %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0x1a7b17
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8cd51(%rip), %rdi     # 0x2348a7
leaq 0x8be2e(%rip), %rsi     # 0x23398b
leaq 0x8d1b8(%rip), %rcx     # 0x234d1c
movl $0x13cf, %edx           # imm = 0x13CF
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_gg_aln(overlap_region_alloc*, ul_idx_t const*, long, vec_mg_lchain_t*)
void gen_gg_aln(overlap_region_alloc* olist, const ul_idx_t *uref, int64_t trans_sc, vec_mg_lchain_t *res)
{
	uint64_t k; mg_lchain_t *p = NULL;
	res->n = 0; kv_resize(mg_lchain_t, *res, olist->length);
	for (k = 0; k < olist->length; k++) {
		p = &(res->a[res->n++]); memset(p, 0, sizeof((*p)));
		p->v = ((olist->list[k].y_id<<1)|(olist->list[k].y_pos_strand)); p->off = k; 
		p->score = aln_sc((olist->list[k]), (trans_sc), UG_TRANS_ERR_W);
		p->qs = olist->list[k].x_pos_s; p->qe = olist->list[k].x_pos_e+1;
		if((p->v&1)) {
			p->rs = uref->ug->u.a[p->v>>1].len - (olist->list[k].y_pos_e+1); 
			p->re = uref->ug->u.a[p->v>>1].len - olist->list[k].y_pos_s;
		} else {
			p->rs = olist->list[k].y_pos_s; 
			p->re = olist->list[k].y_pos_e+1;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq $0x0, 0x8(%rcx)
movq 0x10(%rdi), %rax
cmpq %rax, 0x10(%rcx)
jae 0x1ab398
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(%rbx)
movq (%rbx), %rdi
leaq 0x8(,%rcx,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, (%rbx)
cmpq $0x0, 0x10(%r12)
je 0x1ab48a
movl $0x30, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
leaq 0x1(%rdi), %r8
movq %r8, 0x8(%rbx)
leaq (%rdi,%rdi,4), %rdi
leaq (%rsi,%rdi,8), %rsi
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movq $0x0, 0x20(%rsi)
movq (%r12), %rdi
movl -0x20(%rdi,%rax), %r8d
movl -0x14(%rdi,%rax), %r9d
addl %r8d, %r8d
orl %r9d, %r8d
movl %r8d, 0x8(%rsi)
movl %ecx, (%rsi)
movl -0x10(%rdi,%rax), %r10d
movl -0x8(%rdi,%rax), %r11d
subl %r11d, %r10d
imull %r14d, %r10d
movl (%rdi,%rax), %ebp
shll $0x6, %ebp
addl %r10d, %ebp
subl %ebp, %r11d
movl %r11d, 0x1c(%rsi)
movl -0x2c(%rdi,%rax), %r10d
movl %r10d, 0x14(%rsi)
movl -0x28(%rdi,%rax), %r10d
incl %r10d
movl %r10d, 0x18(%rsi)
testb $0x1, %r9b
jne 0x1ab442
movl -0x1c(%rdi,%rax), %r8d
movl %r8d, 0xc(%rsi)
movl -0x18(%rdi,%rax), %r8d
incl %r8d
jmp 0x1ab472
movq (%r15), %r9
movq 0x10(%r9), %r9
shrl %r8d
leaq (%r8,%r8,4), %r8
movl (%r9,%r8,8), %r10d
andl %edx, %r10d
movl -0x18(%rdi,%rax), %r11d
notl %r11d
addl %r10d, %r11d
movl %r11d, 0xc(%rsi)
movl (%r9,%r8,8), %r8d
andl %edx, %r8d
subl -0x1c(%rdi,%rax), %r8d
movl %r8d, 0x10(%rsi)
incq %rcx
addq $0xa8, %rax
cmpq 0x10(%r12), %rcx
jb 0x1ab3b3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_overlap_region_sub_err_debug(overlap_region*, long, long*)
int64_t get_overlap_region_sub_err_debug(overlap_region *o, int64_t qs, int64_t *sec_err)
{
	(*sec_err) = 0;
	if(o->w_list.n <= 0) return 0;
	int64_t k; double rr; int64_t terr, dd;
	for (k = o->w_list.n-1, terr = 0; k >= 0 && qs < o->w_list.a[k].x_end; k--) {
		if(qs >= o->w_list.a[k].x_start && qs < o->w_list.a[k].x_end) {
			// if(qs == 102178) {
			// 	fprintf(stderr, "[M::%s::qs->%ld] k::%ld, wn::%u, x::[%d, %d), clen::%u, terr::%ld, sec_err::%ld\n", 
			// 	__func__, qs, k, (uint32_t)o->w_list.n, o->w_list.a[k].x_start, o->w_list.a[k].x_end, 
			// 	o->w_list.a[k].clen, terr, (*sec_err));
			// }
            if(o->w_list.a[k].clen > 0) {
                rr = ((double)(o->w_list.a[k].x_end-qs))/
							((double)(o->w_list.a[k].x_end-o->w_list.a[k].x_start));
				dd = o->w_list.a[k].clen*rr;
                (*sec_err) += (dd>0?dd:1);
            }

            terr += ((o->w_list.a[k].clen > 0)?(o->w_list.a[k].x_end-qs):(0));
            return terr;
		}
		if(o->w_list.a[k].clen > 0) {
			(*sec_err) += o->w_list.a[k].clen;
			terr += o->w_list.a[k].x_end-o->w_list.a[k].x_start;
		}
	}
	return terr;
}

// Assembly:
movq $0x0, (%rdx)
movq 0x48(%rdi), %rcx
testq %rcx, %rcx
je 0x1ab4f2
movq %rcx, %rax
decq %rax
js 0x1ab4f2
movq 0x58(%rdi), %rax
movq %rcx, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
addq $-0x4, %rdi
xorl %eax, %eax
movslq -0x18(%rdi), %r9
movq %r9, %r8
subq %rsi, %r8
jle 0x1ab4f1
movslq -0x1c(%rdi), %r10
cmpq %rsi, %r10
jle 0x1ab4f5
movl (%rdi), %r8d
testq %r8, %r8
je 0x1ab4e5
addq %r8, (%rdx)
subq %r10, %r9
addq %r9, %rax
decq %rcx
addq $-0x20, %rdi
testq %rcx, %rcx
jg 0x1ab4bf
retq
xorl %eax, %eax
retq
movl (%rdi), %ecx
testl %ecx, %ecx
je 0x1ab52c
cvtsi2sd %r8, %xmm0
subl %r10d, %r9d
cvtsi2sd %r9d, %xmm1
movl %ecx, %esi
cvtsi2sd %rsi, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rsi
cmpq $0x2, %rsi
movl $0x1, %edi
cmovgeq %rsi, %rdi
addq %rdi, (%rdx)
xorl %edx, %edx
testl %ecx, %ecx
cmoveq %rdx, %r8
addq %r8, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: find_mg_lchain_max(long, mg_lchain_t const*, int)
int64_t find_mg_lchain_max(int64_t n, const mg_lchain_t *a, int32_t x)
{
    int64_t s = 0, e = n;
    if (n == 0) return -1;
    if (a[n-1].qe < x) return n - 1;
    if (a[0].qe >= x) return -1;
    while (e > s) { // TODO: finish this block
        int64_t m = s + (e - s) / 2;
        if (a[m].qe >= x) e = m;
        else s = m + 1;
    }
    assert(s == e);
    return s;
}

// Assembly:
movq $-0x1, %rax
testq %rdi, %rdi
je 0x1ac440
leaq (%rdi,%rdi,4), %rcx
cmpl %edx, -0x10(%rsi,%rcx,8)
jge 0x1ac3fd
decq %rdi
movq %rdi, %rax
retq
cmpl %edx, 0x18(%rsi)
jge 0x1ac440
xorl %eax, %eax
testq %rdi, %rdi
jle 0x1ac43b
movq %rdi, %r8
subq %rax, %r8
movq %r8, %rcx
shrq $0x3f, %rcx
addq %r8, %rcx
sarq %rcx
leaq (%rcx,%rax), %r8
leaq (%r8,%r8,4), %r9
cmpl %edx, 0x18(%rsi,%r9,8)
jl 0x1ac430
movq %r8, %rdi
jmp 0x1ac436
addq %rcx, %rax
incq %rax
cmpq %rax, %rdi
jg 0x1ac409
cmpq %rdi, %rax
jne 0x1ac441
retq
pushq %rax
leaq 0x87be3(%rip), %rdi     # 0x23402c
leaq 0x8753b(%rip), %rsi     # 0x23398b
leaq 0x88ab9(%rip), %rcx     # 0x234f10
movl $0x15d2, %edx           # imm = 0x15D2
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: hc_target_len(asg_t*, mg_lchain_t*, mg_lchain_t*)
int64_t hc_target_len(asg_t *g, mg_lchain_t *s, mg_lchain_t *e)
{
	// int64_t ql = s->qe - e->qe, tp, tm;
	// if((s->v^1)&1) tp = g->seq[s->v>>1].len - s->re;
	// else tp = s->rs;

	// if((e->v^1)&1) tm = g->seq[e->v>>1].len - e->re;
	// else tm = e->rs;
	int64_t ql = (int64_t)s->qs - (int64_t)e->qe, tp, tm;
	int64_t sts, ete;
	sts = (s->v&1)?g->seq[s->v>>1].len-s->re:s->rs; tp = g->seq[s->v>>1].len - sts;
	ete = (e->v&1)?g->seq[e->v>>1].len-e->rs:e->re; tm = g->seq[e->v>>1].len - ete;
	// fprintf(stderr, "[M::%s::] ql:%ld, tp:%ld, tm:%ld, sts:%ld, ete:%ld\n", __func__, ql, tp, tm, sts, ete);
	return ql + tp - tm;
}

// Assembly:
movl 0x8(%rsi), %r9d
testb $0x1, %r9b
jne 0x1ac470
movl 0xc(%rsi), %eax
jmp 0x1ac486
movq 0x20(%rdi), %rcx
movl %r9d, %r8d
shrl %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rcx,%r8,8), %eax
subl 0x10(%rsi), %eax
movslq 0x14(%rsi), %rsi
movslq 0x18(%rdx), %r8
movq 0x20(%rdi), %rcx
shrl %r9d
movl (%rcx,%r9,8), %r9d
movl 0x8(%rdx), %edi
testb $0x1, %dil
jne 0x1ac4a8
movl 0x10(%rdx), %r10d
jmp 0x1ac4bc
movl %edi, %r11d
shrl %r11d
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andl (%rcx,%r11,8), %r10d
subl 0xc(%rdx), %r10d
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andq %rdx, %r9
cltq
addq %rax, %r8
subq %r8, %rsi
movslq %r10d, %rax
addq %r9, %rax
addq %rsi, %rax
shrl %edi
movl (%rcx,%rdi,8), %ecx
andq %rdx, %rcx
subq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: prt_chains(ul_ov_t*, long, ul_ov_t*, unsigned long*, long, vec_mg_lchain_t*, long)
void prt_chains(ul_ov_t *l_idx, int64_t l_idx_n, ul_ov_t *l_a, uint64_t *g_idx, int64_t g_idx_n, vec_mg_lchain_t *g_a, int64_t ql)
{
	int64_t k, i, s, e;
	if(l_idx && l_a) {
		fprintf(stderr, "\n[M::%s::qlen->%ld] print linear chains\n", __func__, ql);
		for (k = 0; k < l_idx_n; k++) {
			s = l_idx[k].ts; e = l_idx[k].te;
			fprintf(stderr, "[M::%s::linear_chain] sc::%u, occ::%ld\n", __func__, l_idx[k].qn, e-s);
			for (i = s; i < e; i++) {
				fprintf(stderr, "[M::%s::utg%.6dl] q::[%u, %u)\n", __func__, (int32_t)l_a[i].tn+1, l_a[i].qs, l_a[i].qe);
			}
		}
	}

	if(g_idx && g_a) {
		fprintf(stderr, "\n[M::%s::qlen->%ld] print graph chains\n", __func__, ql);
		for (k = s = e = 0; k < g_idx_n; ++k) {
			s = e; e += ((uint32_t)g_idx[k]);
			fprintf(stderr, "[M::%s::grapn_chain] sc::%lu, occ::%ld\n", __func__, g_idx[k]>>32, e-s);
			for (i = s; i < e; i++) {
				fprintf(stderr, "[M::%s::utg%.6dl] q::[%u, %u)\n", __func__, (int32_t)(g_a->a[i].v>>1)+1, g_a->a[i].qs, g_a->a[i].qe);
			}
    	}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rcx
movq %rdi, %rdx
movq 0x30(%rsp), %r12
testq %rdi, %rdi
sete %al
testq %rcx, %rcx
sete %dil
orb %al, %dil
je 0x1af174
testq %r14, %r14
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
je 0x1af17e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x2a052
jmp 0x1af158
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2a131
jmp 0x1af168
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: comput_err_partial_cigar(long, overlap_region*, long*)
int64_t comput_err_partial_cigar(int64_t ol, overlap_region *z, int64_t *rk)
{
	int64_t k = 0, err = 0, e = z->x_pos_s+ol, wn = z->w_list.n; (*rk) = -1;
	for (k = 0; k < wn; k++) {
		if(z->w_list.a[k].x_start >= e) break;
		if(z->w_list.a[k].y_end != -1) {
			err += z->w_list.a[k].error;
		}
	}
	k--;
	if(k < 0) return 0;
	if(z->w_list.a[k].y_end != -1) {
		err -= z->w_list.a[k].error;
	}

	if((int64_t)z->w_list.a[k].x_end+1 <= e) {
		if(z->w_list.a[k].y_end != -1) {
			err += z->w_list.a[k].error;
		}
	} else {
		// assert(z->w_list.a[k].x_start < e);
		if(z->w_list.a[k].y_end != -1) {
			err += (((double)(e-z->w_list.a[k].x_start))/
							((double)(z->w_list.a[k].x_end+1-z->w_list.a[k].x_start)))*z->w_list.a[k].error;
		} 
	}
	(*rk) = k;
	return err;
}

// Assembly:
movl 0x4(%rsi), %r8d
addq %rdi, %r8
movq 0x48(%rsi), %rdi
movq $-0x1, (%rdx)
testq %rdi, %rdi
jle 0x1b089f
movq 0x58(%rsi), %r9
addq $0x14, %r9
xorl %ecx, %ecx
xorl %eax, %eax
movslq -0x14(%r9), %r10
cmpq %r10, %r8
jle 0x1b08a3
cmpl $-0x1, -0x8(%r9)
je 0x1b088e
movswq (%r9), %r10
addq %r10, %rax
incq %rcx
addq $0x20, %r9
cmpq %rcx, %rdi
jne 0x1b0877
movq %rdi, %rcx
jmp 0x1b08a3
xorl %eax, %eax
xorl %ecx, %ecx
subq $0x1, %rcx
jae 0x1b08ac
xorl %eax, %eax
retq
movq 0x58(%rsi), %rdi
movq %rcx, %r9
shlq $0x5, %r9
leaq (%rdi,%r9), %rsi
movl 0xc(%rdi,%r9), %edi
cmpl $-0x1, %edi
je 0x1b08cd
movswq 0x14(%rsi), %r9
subq %r9, %rax
movslq 0x4(%rsi), %r9
cmpq %r9, %r8
jle 0x1b08e5
cmpl $-0x1, %edi
je 0x1b0921
movswq 0x14(%rsi), %rsi
addq %rsi, %rax
jmp 0x1b0921
cmpl $-0x1, %edi
je 0x1b0921
movslq (%rsi), %rdi
subq %rdi, %r8
cvtsi2sd %r8, %xmm0
subl %edi, %r9d
incl %r9d
cvtsi2sd %r9d, %xmm1
divsd %xmm1, %xmm0
movswl 0x14(%rsi), %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rax
movq %rcx, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: sum_w_err(window_list*, long)
int64_t sum_w_err(window_list *a, int64_t n)
{
	int64_t k, err = 0;
	for (k = 0; k < n; k++) {
		if(a[k].y_end != -1) err += a[k].error;
	}
	return err;
}

// Assembly:
testq %rsi, %rsi
jle 0x1b0947
addq $0x14, %rdi
xorl %eax, %eax
cmpl $-0x1, -0x8(%rdi)
je 0x1b093d
movswq (%rdi), %rcx
addq %rcx, %rax
addq $0x20, %rdi
decq %rsi
jne 0x1b0930
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: set_sec_e_min(overlap_region*, unsigned long*, long, long)
void set_sec_e_min(overlap_region *z, uint64_t *w_idx, int64_t wl, int64_t ql)
{
	int64_t wid, k, wn = z->w_list.n, ws, we;
	for (k = 0; k < wn; k++) {
		wid = z->w_list.a[k].x_start/wl;
		ws = wid*wl; we = ws+wl; if(we > ql) we = ql; we--;
		// fprintf(stderr, "[M::%s] ws::%ld, we::%ld, xs::%d, xe::%d, err::%d\n", __func__, 
		// ws, we, z->w_list.a[k].x_start, z->w_list.a[k].x_end, z->w_list.a[k].error);
		if(ws == z->w_list.a[k].x_start && we == z->w_list.a[k].x_end && z->w_list.a[k].y_end != -1) {
			if((w_idx[wid] == (uint64_t)-1) || (w_idx[wid] > (uint64_t)z->w_list.a[k].error)) {
				w_idx[wid] = z->w_list.a[k].error;
			}
		}
	}
}

// Assembly:
movq 0x48(%rdi), %r9
testq %r9, %r9
jle 0x1b1435
movq %rdx, %r8
movq 0x58(%rdi), %r10
addq $0x14, %r10
movslq -0x14(%r10), %rdi
movq %rdi, %rax
cqto
idivq %r8
movq %rax, %rdx
imulq %r8, %rdx
cmpq %rdi, %rdx
jne 0x1b142c
addq %r8, %rdx
cmpq %rcx, %rdx
cmovgeq %rcx, %rdx
decq %rdx
movslq -0x10(%r10), %rdi
cmpq %rdi, %rdx
jne 0x1b142c
cmpl $-0x1, -0x8(%r10)
je 0x1b142c
movq (%rsi,%rax,8), %rdx
cmpq $-0x1, %rdx
je 0x1b1424
movswq (%r10), %rdi
cmpq %rdi, %rdx
jbe 0x1b142c
movswq (%r10), %rdx
movq %rdx, (%rsi,%rax,8)
addq $0x20, %r10
decq %r9
jne 0x1b13dc
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: cal_sec_e_min(overlap_region*, unsigned long*, long, long, long*)
int64_t cal_sec_e_min(overlap_region *z, uint64_t *w_idx, int64_t wl, int64_t ql, int64_t *sec_err)
{
	int64_t wid, k, wn = z->w_list.n, ws, we, o[2], tot_e, sc; uint64_t self_err;
	o[0] = o[1] = tot_e = 0;
	for (k = 0; k < wn; k++) {
		wid = z->w_list.a[k].x_start/wl;
		if(w_idx[wid] == (uint64_t)-1) continue;
		ws = wid*wl; we = ws+wl; if(we > ql) we = ql; we--;
		self_err = THRESHOLD_MAX_SIZE + 1;
		if(z->w_list.a[k].y_end != -1) self_err = z->w_list.a[k].error;
		
		if(ws == z->w_list.a[k].x_start && we == z->w_list.a[k].x_end) {
			if(self_err <= w_idx[wid]) {
				o[0] += we+1-ws;
			} else {
				o[1] += we+1-ws; tot_e += self_err - w_idx[wid];
			}
		}
	}
	if(sec_err) (*sec_err) = tot_e;

	sc = o[0] - (o[1]*ERROR_RATE)-(tot_e*5);
	return sc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x48(%rdi), %r11
testq %r11, %r11
jle 0x1b14d5
movq %rdx, %r9
movq 0x58(%rdi), %rbx
xorl %r10d, %r10d
xorl %r15d, %r15d
xorl %r14d, %r14d
movslq (%rbx), %rdi
movq %rdi, %rax
cqto
idivq %r9
movq (%rsi,%rax,8), %rdx
cmpq $-0x1, %rdx
je 0x1b14c0
imulq %r9, %rax
leaq (%rax,%r9), %r12
cmpq %rcx, %r12
cmovgeq %rcx, %r12
cmpl $-0x1, 0xc(%rbx)
je 0x1b148e
movswq 0x14(%rbx), %r13
jmp 0x1b1494
movl $0x20, %r13d
cmpq %rdi, %rax
jne 0x1b14c0
leaq -0x1(%r12), %rdi
movslq 0x4(%rbx), %rbp
cmpq %rbp, %rdi
jne 0x1b14c0
cmpq %rdx, %r13
jbe 0x1b14ba
subq %rax, %r14
addq %r12, %r14
subq %rdx, %r10
addq %r13, %r10
jmp 0x1b14c0
subq %rax, %r15
addq %r12, %r15
addq $0x20, %rbx
decq %r11
jne 0x1b145d
cvtsi2sd %r15, %xmm0
cvtsi2sd %r14, %xmm1
jmp 0x1b14e0
xorpd %xmm1, %xmm1
xorl %r10d, %r10d
xorpd %xmm0, %xmm0
testq %r8, %r8
je 0x1b14e8
movq %r10, (%r8)
mulsd 0x823b8(%rip), %xmm1    # 0x2338a8
addsd %xmm1, %xmm0
leaq (%r10,%r10,4), %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: ck_w_err(overlap_region*, unsigned long*, long, long)
uint32_t ck_w_err(overlap_region *z, uint64_t *w_idx, int64_t wl, int64_t ql)
{
	int64_t wid, k, wn = z->w_list.n, ws, we, ol, e[2];
	ol = e[0] = e[1] = 0;
	for (k = 0; k < wn; k++) {
		wid = z->w_list.a[k].x_start/wl;
		if(w_idx[wid] == (uint64_t)-1) continue;
		ws = wid*wl; we = ws+wl; if(we > ql) we = ql; we--;
		if(ws == z->w_list.a[k].x_start && we == z->w_list.a[k].x_end) {
			ol += we+1-ws; e[0] += w_idx[wid]; 
			if(z->w_list.a[k].y_end != -1) e[1] += z->w_list.a[k].error;
			else e[1] += THRESHOLD_MAX_SIZE + 1;
		}
	}
	// fprintf(stderr, "[M::%s::utg%.6dl] x::[%u, %u), ol::%ld, e[0]::%ld, e[1]::%ld\n", 
	// __func__, (int32_t)z->y_id+1, z->x_pos_s, z->x_pos_e+1, ol, e[0], e[1]);
	if(e[1] > (e[0]+64)) {
		if((e[1] > (e[0]+(ol*0.01)))/**||(e[1] > (e[0]+(e[0]*0.03)))**/) {
			z->non_homopolymer_errors = e[1] - e[0];
			return 0;
		}
	}
	// if((e[1] > (e[0]+16)) && (e[1] > (e[0]+(ol*0.01)))) return 0;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x48(%rdi), %rbx
testq %rbx, %rbx
jle 0x1b1609
movq %rdx, %r8
movq 0x58(%rdi), %r14
xorl %r11d, %r11d
xorl %r10d, %r10d
xorl %r15d, %r15d
movslq (%r14), %r9
movq %r9, %rax
cqto
idivq %r8
movq (%rsi,%rax,8), %rdx
cmpq $-0x1, %rdx
je 0x1b15f9
imulq %r8, %rax
leaq (%rax,%r8), %r12
cmpq %rcx, %r12
cmovgeq %rcx, %r12
cmpq %r9, %rax
jne 0x1b15f9
leaq -0x1(%r12), %r9
movslq 0x4(%r14), %r13
cmpq %r13, %r9
jne 0x1b15f9
subq %rax, %r12
addq %r12, %r15
addq %rdx, %r11
cmpl $-0x1, 0xc(%r14)
je 0x1b15f5
movswq 0x14(%r14), %rax
addq %rax, %r10
jmp 0x1b15f9
addq $0x20, %r10
addq $0x20, %r14
decq %rbx
jne 0x1b15a4
cvtsi2sd %r15, %xmm0
jmp 0x1b1613
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
xorl %r11d, %r11d
leaq 0x40(%r11), %rcx
movl $0x1, %eax
cmpq %rcx, %r10
jle 0x1b1646
cvtsi2sd %r10, %xmm1
cvtsi2sd %r11, %xmm2
mulsd 0x7d9ad(%rip), %xmm0    # 0x22efe0
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x1b1646
subl %r11d, %r10d
movl %r10d, 0x30(%rdi)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_win_info(overlap_region*, unsigned long, long*, long*, long*)
uint64_t get_win_info(overlap_region *z, uint64_t wid, int64_t *ys, int64_t *ye, int64_t *err)
{
	(*err) = -2;
	if((wid > 0) && (z->w_list.a[wid].y_end != -1) && (z->w_list.a[wid-1].y_end != -1) && (z->w_list.a[wid].y_end > z->w_list.a[wid-1].y_end)) {
		(*ys) = z->w_list.a[wid-1].y_end+1; 
		(*ye) = z->w_list.a[wid].y_end; 
		(*err) = z->w_list.a[wid].error;
		return 1;
	}else if(z->w_list.a[wid].y_end == -1) {
		(*ys) = (*ye) = (*err) -1; 
		return 1;
	} 
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
movq $-0x2, (%r8)
testq %rsi, %rsi
je 0x1b2b73
movq 0x58(%rdi), %rax
movq %rsi, %r9
shlq $0x5, %r9
movslq 0xc(%rax,%r9), %r10
cmpq $-0x1, %r10
je 0x1b2b73
movslq -0x14(%rax,%r9), %r11
cmpl $-0x1, %r11d
sete %bl
cmpl %r11d, %r10d
setle %bpl
orb %bl, %bpl
jne 0x1b2b73
incq %r11
movq %r11, (%rdx)
movq %r10, (%rcx)
movswq 0x14(%rax,%r9), %rax
movq %rax, (%r8)
jmp 0x1b2b93
movq 0x58(%rdi), %rax
shlq $0x5, %rsi
cmpl $-0x1, 0xc(%rax,%rsi)
je 0x1b2b86
xorl %eax, %eax
jmp 0x1b2b98
movq $-0x3, %rax
movq %rax, (%rcx)
movq %rax, (%rdx)
movl $0x1, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: kv_ul_ov_t_statistics(kv_ul_ov_t*, unsigned long, long*)
uint64_t kv_ul_ov_t_statistics(kv_ul_ov_t *olist, uint64_t qn, int64_t *occ)
{
	int64_t k, l = 0;
	uint32_t sp = (uint32_t)-1, ep = (uint32_t)-1;
	for (k = olist->n-1; k >= 0 && olist->a[k].qn == qn; k--) {
		if(!(olist->a[k].el)) continue;
		if(!(olist->a[k].tn&((uint32_t)(0x80000000)))) continue;
		if(sp == (uint32_t)-1 || olist->a[k].qe <= sp) {
			if(sp != (uint32_t)-1) l += ep - sp;
			sp = olist->a[k].qs;
			ep = olist->a[k].qe;
		} else {
			sp = MIN(sp, olist->a[k].qs);
		}
		(*occ)++;
	}
	if(sp != (uint32_t)-1) l += ep - sp;
	return l;
}

// Assembly:
movq 0x8(%rdi), %r8
xorl %ecx, %ecx
movq %r8, %rax
decq %rax
js 0x1b3508
movq (%rdi), %rax
leaq (%r8,%r8,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %r8, %rdi
leaq (%rax,%rdi), %r10
addq $-0x1c, %r10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edi, %edi
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl (%r10), %r11d
cmpq %rsi, %r11
jne 0x1b3515
testb $0x40, 0x1b(%r10)
je 0x1b34fa
cmpl $0x0, 0xc(%r10)
jns 0x1b34fa
cmpl $-0x1, %r9d
je 0x1b34ef
cmpl %r9d, 0x8(%r10)
jbe 0x1b34e9
movl 0x4(%r10), %r11d
cmpl %r11d, %r9d
cmovael %r11d, %r9d
jmp 0x1b34f7
subl %r9d, %eax
addq %rax, %rdi
movl 0x4(%r10), %r9d
movl 0x8(%r10), %eax
incq (%rdx)
decq %r8
addq $-0x1c, %r10
testq %r8, %r8
jg 0x1b34ba
jmp 0x1b3515
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %edi, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %r9d, %eax
cmpl $-0x1, %r9d
cmovel %ecx, %eax
addq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_utepdat_t_mem_tid(utepdat_t const*, long, long*, long*)
int64_t get_utepdat_t_mem_tid(const utepdat_t *b, int64_t tid, int64_t *mem, int64_t *mem_hab)
{
	km_stat_t kmst; memset(mem, 0, sizeof(*(mem))*6);
	if(b->hab) {
		mem[0] += ha_ovec_mem(b->hab[tid], mem_hab);
	}
	if(b->ll) {
		mem[1] += kv_mem(b->ll[tid].lo) + kv_mem(b->ll[tid].tk) + kv_mem(b->ll[tid].srt.a)+ kv_mem(b->ll[tid].tc);
	}
	if(b->buf) {
		km_stat(b->buf[tid]->km, &kmst);
		mem[2] += kmst.capacity;
	}
	if(b->gdp) {
		mem[3] += kv_mem(b->gdp[tid].l) + kv_mem(b->gdp[tid].swap) + kv_mem(b->gdp[tid].dst) + kv_mem(b->gdp[tid].out)
			+ kv_mem(b->gdp[tid].path) + kv_mem(b->gdp[tid].v) + kv_mem(b->gdp[tid].f) + kv_mem(b->gdp[tid].dst_done);
	}
	if(b->mzs) {
		mem[4] += kv_mem(b->mzs[tid]);
	}
	if(b->sps) {
		mem[5] += kv_mem(b->sps[tid]);
	}
	return mem[0] + mem[1] + mem[2] + mem[3] + mem[4] + mem[5];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x1b3560
movq (%rax,%r14,8), %rdi
movq %rcx, %rsi
callq 0x396ea
addq %rax, (%rbx)
movq 0x88(%r15), %rax
testq %rax, %rax
je 0x1b359b
imulq $0x68, %r14, %rcx
movq 0x28(%rax,%rcx), %rdx
movq 0x50(%rax,%rcx), %rsi
addq 0x10(%rax,%rcx), %rdx
leaq (%rdx,%rdx,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rdx, %rdi
leaq (%rdi,%rsi,8), %rdx
imulq $0x34, 0x40(%rax,%rcx), %rax
addq %rdx, %rax
addq %rax, 0x8(%rbx)
movq 0x78(%r15), %rax
testq %rax, %rax
je 0x1b35be
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x1e38a2
movq (%r12), %rax
addq %rax, 0x10(%rbx)
movq 0x90(%r15), %rax
testq %rax, %rax
je 0x1b3627
leaq (%r14,%r14,2), %rcx
shlq $0x6, %rcx
movq 0x28(%rax,%rcx), %rdx
movq 0x40(%rax,%rcx), %rsi
addq 0x10(%rax,%rcx), %rdx
leaq (%rdx,%rdx,4), %rdx
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movq 0x70(%rax,%rcx), %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0x80(%rax,%rcx), %r8
addq 0x58(%rax,%rcx), %r8
addq 0x98(%rax,%rcx), %r8
addq 0xb0(%rax,%rcx), %r8
leaq (%rsi,%rdx,8), %rax
leaq (%rax,%rdi,4), %rax
addq 0x18(%rbx), %rax
leaq (%rax,%r8,8), %rax
movq %rax, 0x18(%rbx)
movq 0x60(%r15), %rax
testq %rax, %rax
je 0x1b3647
movq %r14, %rcx
shlq $0x4, %rcx
movl 0x4(%rax,%rcx), %eax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq %rax, 0x20(%rbx)
movq 0x68(%r15), %rax
testq %rax, %rax
je 0x1b3661
leaq (%r14,%r14,2), %rcx
movq 0x8(%rax,%rcx,8), %rax
shlq $0x3, %rax
addq %rax, 0x28(%rbx)
movq 0x8(%rbx), %rax
addq (%rbx), %rax
addq 0x10(%rbx), %rax
addq 0x18(%rbx), %rax
addq 0x20(%rbx), %rax
addq 0x28(%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: max_ovlp_src_contain(ug_opt_t const*, unsigned int)
int64_t max_ovlp_src_contain(const ug_opt_t *uopt, uint32_t v)
{
	ma_hit_t_alloc* src = uopt->sources;
    int64_t min_ovlp = uopt->min_ovlp, max_hang = uopt->max_hang;
	uint32_t i, qn, tn, o = 0, x = v>>1, dt; asg_arc_t e; int32_t r = 1;

	for (i = 0; i < src[x].length; i++) {
        qn = Get_qn(src[x].buffer[i]); tn = Get_tn(src[x].buffer[i]);
		r = ma_hit2arc(&(src[x].buffer[i]), Get_READ_LENGTH(R_INF, qn), Get_READ_LENGTH(R_INF, tn), 
														max_hang, asm_opt.max_hang_rate, min_ovlp, &e);
		// if(qn == 20171 && tn == 20172) {
		// 	fprintf(stderr, "[r::%d]\t%.*s\t%c\tq::[%u, %u)\t%.*s\tt::[%u, %u)\n", r,
        //             (int)Get_NAME_LENGTH(R_INF, qn), Get_NAME(R_INF, qn), "+-"[src[x].buffer[i].rev], 
		// 			Get_qs(src[x].buffer[i]), Get_qe(src[x].buffer[i]), 
		// 			(int)Get_NAME_LENGTH(R_INF, tn), Get_NAME(R_INF, tn),
		// 			Get_ts(src[x].buffer[i]), Get_te(src[x].buffer[i]));
		// }
		if(r >= 0) {
			if((e.ul>>32) != v) continue;
			if(o < e.ol) o = e.ol;
		} else if(r == MA_HT_TCONT) {///tn is contained in qn
			if(v&1) dt = Get_qe(src[x].buffer[i]);
			else dt = Get_READ_LENGTH(R_INF, qn) - Get_qs(src[x].buffer[i]);
			if(o < dt) o = dt;
		}
    }

	return o;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x8(%rdi), %rax
movl %esi, %ecx
shrl %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0xc(%rax,%rcx,8), %r13d
xorl %ebx, %ebx
testq %r13, %r13
je 0x1b480a
movl 0x44(%rdi), %edx
movl %edx, 0x14(%rsp)
movl 0x40(%rdi), %edx
movl %edx, 0x10(%rsp)
leaq (%rax,%rcx,8), %rax
movq (%rax), %r12
leaq 0xd6ac7(%rip), %rax     # 0x28b230
movq 0x18(%rax), %r14
leaq 0xd5fe4(%rip), %rax     # 0x28a758
movss 0x158(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movl %esi, %eax
movq %rax, 0x18(%rsp)
movq (%r12), %r15
movl 0xc(%r12), %eax
movq %r15, %rcx
shrq $0x20, %rcx
movq (%r14,%rcx,8), %rbp
movl (%r14,%rax,8), %edx
movq %r12, %rdi
movl %ebp, %esi
movl 0x10(%rsp), %ecx
movss 0xc(%rsp), %xmm0
movl 0x14(%rsp), %r8d
leaq 0x20(%rsp), %r9
callq 0x19c0d3
testl %eax, %eax
js 0x1b47e4
movq 0x18(%rsp), %rax
cmpl %eax, 0x24(%rsp)
jne 0x1b47ff
movl 0x2c(%rsp), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
cmpl %eax, %ebx
cmovbel %eax, %ebx
jmp 0x1b47ff
cmpl $-0x3, %eax
jne 0x1b47ff
testb $0x1, 0x8(%rsp)
jne 0x1b47f5
subl %r15d, %ebp
jmp 0x1b47fa
movl 0x8(%r12), %ebp
cmpl %ebp, %ebx
cmovbel %ebp, %ebx
addq $0x28, %r12
decq %r13
jne 0x1b478d
movl %ebx, %ebx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: quick_rechain_sc(ul_ov_t*, overlap_region_alloc*, ul_idx_t const*, ug_opt_t const*, long, double, All_reads*, kv_rtrace_t*, char*, UC_Read*, rtrace_iter*, double, bit_extz_t*, long, int*, long, long)
int64_t quick_rechain_sc(ul_ov_t *a, overlap_region_alloc* ol, const ul_idx_t *uref, const ug_opt_t *uopt, 
int64_t bw, double diff, All_reads *ridx, kv_rtrace_t *trace, char* qstr, UC_Read *tu, rtrace_iter *tc,
double e_rate, bit_extz_t *exz, int64_t trans_sc, int32_t *f, int64_t ai, int64_t aj)
{
	ul_ov_t *li = &(a[ai]), *lj = &(a[aj]);
	uint32_t li_v, lj_v; int64_t qo, is_c, err, sc = INT32_MIN;
	li_v = (li->tn<<1)|li->rev; lj_v = (lj->tn<<1)|lj->rev;
	if(li_v == lj_v) return INT32_MIN;
	if(lj->qe <= li->qs) return INT32_MIN;
	if(lj->qs > li->qs) return INT32_MIN;
	qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL);
	if(get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, bw, diff, qo, &is_c)) {
		if(is_c == 0) {
			err = get_rid_backward_cigar_err(tc, li, trace, NULL, uref, qstr, tu, ol, NULL, exz, e_rate, lj->qe);
			sc = f[aj] + (li->qe - lj->qe) - (err*trans_sc);
		}
	}
	return sc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r10
movq %rcx, %r15
movq 0xb0(%rsp), %r8
movq 0xa8(%rsp), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rbx
addq %rax, %rbx
leaq (%r8,%r8,8), %rax
leaq (%rax,%rax,2), %r14
addq %r8, %r14
movl 0xc(%rdi,%rbx), %eax
movl 0x18(%rdi,%rbx), %r12d
shrdl $0x1f, %eax, %r12d
movl 0xc(%rdi,%r14), %eax
movl 0x18(%rdi,%r14), %ebp
shrdl $0x1f, %eax, %ebp
movq $-0x80000000, %r13      # imm = 0x80000000
cmpl %ebp, %r12d
je 0x1b497f
addq %rdi, %rbx
addq %rdi, %r14
movl 0x4(%rbx), %eax
cmpl %eax, 0x8(%r14)
jbe 0x1b497f
cmpl %eax, 0x4(%r14)
ja 0x1b497f
movq %rdx, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r9, %r8
xorl %r9d, %r9d
movsd %xmm0, 0x28(%rsp)
movq %r10, 0x20(%rsp)
callq 0x6f050
xorl $0x1, %r12d
xorl $0x1, %ebp
subq $0x8, %rsp
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
movl %r12d, %edx
movl %ebp, %ecx
movq 0x28(%rsp), %r8
movsd 0x30(%rsp), %xmm0
movq %rax, %r9
pushq %rdi
callq 0x1b3728
addq $0x10, %rsp
testq %rax, %rax
je 0x1b497f
cmpq $0x0, 0x30(%rsp)
jne 0x1b497f
movq 0xa0(%rsp), %r12
movq 0x98(%rsp), %r15
movq 0x88(%rsp), %rdi
movq 0x78(%rsp), %r9
movq 0x70(%rsp), %rdx
movl 0x8(%r14), %eax
subq $0x8, %rsp
movq %rbx, %rsi
xorl %ecx, %ecx
movq 0x10(%rsp), %r8
movsd 0x18(%rsp), %xmm0
pushq %rax
pushq 0xa0(%rsp)
pushq $0x0
pushq 0x38(%rsp)
pushq 0xa8(%rsp)
callq 0x80597
addq $0x30, %rsp
movl 0x8(%rbx), %r13d
movq 0xb0(%rsp), %rcx
addl (%r12,%rcx,4), %r13d
subl 0x8(%r14), %r13d
imulq %r15, %rax
subq %rax, %r13
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: if_qchain_cnn(ul_idx_t const*, ug_opt_t const*, All_reads*, long, double, ul_ov_t*, ul_ov_t*, long*, long*)
uint32_t if_qchain_cnn(const ul_idx_t *uref, const ug_opt_t *uopt, All_reads *ridx, int64_t bw, double diff, ul_ov_t *li, ul_ov_t *lj, int64_t *is_c, int64_t *arc_len)
{
	uint32_t li_v = (li->tn<<1)|li->rev, lj_v = (lj->tn<<1)|lj->rev; int64_t qo;
	if((li_v == lj_v) || (lj->qe <= li->qs)) return 0;
	qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
	if(get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, bw, diff, qo, is_c)) return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rdi
movl 0xc(%r8), %eax
movl 0x18(%r8), %ebp
shrdl $0x1f, %eax, %ebp
movl 0xc(%r9), %eax
movl 0x18(%r9), %r15d
shrdl $0x1f, %eax, %r15d
xorl %eax, %eax
cmpl %r15d, %ebp
je 0x1b4c27
movq %rcx, %rbx
movl 0x8(%r9), %ecx
cmpl 0x4(%rdi), %ecx
jbe 0x1b4c27
movq %rdx, %r8
movq %rsi, %r14
movq 0x40(%rsp), %r12
movq %r9, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
movsd %xmm0, 0x8(%rsp)
callq 0x6f050
xorl $0x1, %ebp
xorl $0x1, %r15d
movq %r12, (%rsp)
movq %r14, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movq %rbx, %r8
movsd 0x8(%rsp), %xmm0
movq %rax, %r9
callq 0x1b3728
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: prt_rid_raw_chain(kv_ul_ov_t*, long, long)
void prt_rid_raw_chain(kv_ul_ov_t *idx, int64_t rid, int64_t qlen)
{
	uint64_t i;
	for (i = 0; i < idx->n; i++) {
		fprintf(stderr, "[M::%s::rid->%ld] qlen::%ld, q::[%u, %u), sc::%u, cha_n::%u, idx_n::%u\n", 
				__func__, rid, qlen, idx->a[i].qs, idx->a[i].qe, idx->a[i].qn, idx->a[i].te - idx->a[i].ts,
				(uint32_t)idx->n);
	}
	
}

// Assembly:
movq 0x8(%rdi), %r10
testq %r10, %r10
je 0x1b977d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl $0x14, %ebp
xorl %r12d, %r12d
movq 0xd08c9(%rip), %rdx     # 0x289fe0
movq (%rdx), %rdi
movq (%r13), %rax
movl -0x14(%rax,%rbp), %r11d
movl -0x10(%rax,%rbp), %r9d
movl -0xc(%rax,%rbp), %edx
movq %rdx, (%rsp)
movl (%rax,%rbp), %ebx
subl -0x4(%rax,%rbp), %ebx
leaq 0x7c1a1(%rip), %rsi     # 0x2358df
leaq 0x7c1e2(%rip), %rdx     # 0x235927
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
pushq %r10
pushq %rbx
pushq %r11
pushq 0x18(%rsp)
callq 0x22b0
addq $0x20, %rsp
incq %r12
movq 0x8(%r13), %r10
addq $0x1c, %rbp
cmpq %r10, %r12
jb 0x1b9710
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: ck_ul_alignment(ul_vec_t*)
uint32_t ck_ul_alignment(ul_vec_t *x)
{
	uc_block_t *a = x->bb.a, *p, *z0, *z1; uint64_t a_n = x->bb.n, k, rlen = x->rlen;
	for (k = 0; k < a_n; k++) {
		p = &(a[k]);
		if(p->base) continue;
		if(p->qs > rlen || p->qe > rlen || p->qs > p->qe) break;
		if(p->pidx != (uint32_t)-1) {
			if(a[p->pidx].aidx == (uint32_t)-1 || a[p->pidx].aidx != k) break;
			if(p->pidx >= k) break;
			z1 = p; z0 = &(a[p->pidx]);
			if(!(z1->qs >= z0->qs && z1->qe >= z0->qe)) break;
		}

		if(p->aidx != (uint32_t)-1) {
			if(a[p->aidx].pidx == (uint32_t)-1 || a[p->aidx].pidx != k) break;
			if(p->aidx <= k) break;
			z0 = p; z1 = &(a[p->aidx]);
			if(!(z1->qs >= z0->qs && z1->qe >= z0->qe)) break;
		}
	}
	if(k >= a_n) return 1;
	return 0;
}

// Assembly:
movq 0x20(%rdi), %rcx
testq %rcx, %rcx
sete %al
je 0x1b9b1c
pushq %r14
pushq %rbx
movq 0x30(%rdi), %rdx
movl 0x18(%rdi), %esi
leaq 0x20(%rdx), %rdi
xorl %r8d, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
testb $0x40, (%rdi)
jne 0x1b9b03
movl -0x1c(%rdi), %r10d
cmpl %esi, %r10d
ja 0x1b9b19
movl -0x18(%rdi), %r11d
cmpl %esi, %r11d
ja 0x1b9b19
cmpl %r11d, %r10d
ja 0x1b9b19
movl -0xc(%rdi), %ebx
cmpq %r9, %rbx
je 0x1b9ad2
cmpq %rbx, %r8
jbe 0x1b9b19
leaq (%rbx,%rbx,8), %rbx
movl 0x1c(%rdx,%rbx,4), %r14d
cmpl $-0x1, %r14d
je 0x1b9b19
cmpq %r14, %r8
jne 0x1b9b19
leaq (%rdx,%rbx,4), %rbx
cmpl 0x4(%rbx), %r10d
jb 0x1b9b19
cmpl 0x8(%rbx), %r11d
jb 0x1b9b19
movl -0x4(%rdi), %ebx
cmpq %r9, %rbx
je 0x1b9b03
cmpq %rbx, %r8
jae 0x1b9b19
leaq (%rbx,%rbx,8), %rbx
movl 0x14(%rdx,%rbx,4), %r14d
cmpl $-0x1, %r14d
je 0x1b9b19
cmpq %r14, %r8
jne 0x1b9b19
leaq (%rdx,%rbx,4), %rbx
cmpl %r10d, 0x4(%rbx)
jb 0x1b9b19
cmpl %r11d, 0x8(%rbx)
jb 0x1b9b19
incq %r8
cmpq %rcx, %r8
setae %al
addq $0x24, %rdi
cmpq %r8, %rcx
jne 0x1b9a81
popq %rbx
popq %r14
movzbl %al, %eax
andl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: filter_by_reliable_ovlp0(u_trans_t*, unsigned long, unsigned long, unsigned long, double)
uint64_t filter_by_reliable_ovlp0(u_trans_t *a, uint64_t a_n, uint64_t s, uint64_t e, double sec_rate)
{
	uint64_t k, ovlp;
	for (k = 0; k < a_n; k++) {
		if(a[k].del) continue;
		if(a[k].f == RC_0 || a[k].f == RC_1) {
			ovlp = ((MIN(a[k].qe, e) > MAX(a[k].qs, s))? (MIN(a[k].qe, e)-MAX(a[k].qs, s)):0);
			if(ovlp == 0) continue;
			if((ovlp) && (ovlp > ((e-s)*sec_rate))) return 1;
		}
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x1ba07b
movq %rcx, %rax
subq %rdx, %rax
movq %rax, %xmm2
punpckldq 0x6b21b(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x6b223(%rip), %xmm2    # 0x225250
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
xorl %eax, %eax
testb $-0x42, 0x28(%rdi)
jne 0x1ba071
movl (%rdi), %r9d
movl 0x4(%rdi), %r8d
cmpq %rcx, %r8
cmovaeq %rcx, %r8
cmpq %rdx, %r9
cmovbeq %rdx, %r9
subq %r9, %r8
jbe 0x1ba071
cmovbq %rax, %r8
xorps %xmm0, %xmm0
cvtsi2sd %r8, %xmm0
ucomisd %xmm1, %xmm0
ja 0x1ba07e
addq $0x30, %rdi
decq %rsi
jne 0x1ba03f
retq
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: is_mmhom_node(unsigned long*, ma_utg_t*, asg_t*, unsigned long, double)
uint32_t is_mmhom_node(uint64_t *ca, ma_utg_t *u, asg_t *sg, uint64_t cov_bd, double cut_rate)
{
	if(cut_rate < 0) cut_rate = 0; if(cut_rate > 1.0) cut_rate = 1.0;
	uint64_t k, a, na, a_cut = u->n*cut_rate, na_cut = u->n*(1.0-cut_rate);
	for (k = a = na = 0; k < u->n; k++) {
		if(ca[k] > (cov_bd*((uint64_t)sg->seq[u->a[k]>>33].len))) {
			a++; if((a) && (a>=a_cut)) return 1;
		} else {
			na++; if((na) && (na>=na_cut)) return 0;
		}
	}

	if((a) && (a>=a_cut)) return 1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
xorpd %xmm2, %xmm2
maxsd %xmm0, %xmm2
movsd 0x69e5d(%rip), %xmm0    # 0x225270
movapd %xmm0, %xmm1
minsd %xmm2, %xmm1
movl 0x10(%rsi), %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
cvttsd2si %xmm4, %r9
movq %r9, %r10
movsd 0x69e2a(%rip), %xmm3    # 0x225268
subsd %xmm3, %xmm4
cvttsd2si %xmm4, %r8
sarq $0x3f, %r10
andq %r10, %r8
orq %r9, %r8
testq %rax, %rax
je 0x1bb4ce
subsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %r10
movq %r10, %r11
subsd %xmm3, %xmm0
cvttsd2si %xmm0, %r9
sarq $0x3f, %r11
andq %r11, %r9
orq %r10, %r9
movq 0x20(%rdx), %r10
movq 0x18(%rsi), %rsi
xorl %r11d, %r11d
xorl %edx, %edx
xorl %ebx, %ebx
movq (%rsi,%rbx,8), %r14
shrq $0x21, %r14
movl (%r10,%r14,8), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
imulq %rcx, %r14
cmpq %r14, (%rdi,%rbx,8)
jbe 0x1bb4ae
incq %rdx
jne 0x1bb4b8
xorl %edx, %edx
jmp 0x1bb4c4
incq %r11
jne 0x1bb4bf
xorl %r11d, %r11d
jmp 0x1bb4c4
cmpq %r8, %rdx
jb 0x1bb4c4
jmp 0x1bb4e9
cmpq %r9, %r11
jae 0x1bb4e5
incq %rbx
cmpq %rbx, %rax
jne 0x1bb488
jmp 0x1bb4d0
xorl %edx, %edx
testq %rdx, %rdx
setne %al
cmpq %r8, %rdx
setae %cl
andb %al, %cl
movzbl %cl, %eax
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x1bb4e1
movl $0x1, %eax
jmp 0x1bb4e1
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: remove_trans_ovlp_connect(ma_ug_t*, unsigned long, kv_ul_ov_t*)
void remove_trans_ovlp_connect(ma_ug_t *ug, uint64_t rid, kv_ul_ov_t *bck)
{
	int64_t i; uint64_t m, k;
	for (i = ((int64_t)bck->n)-1; i >= 0 && bck->a[i].qn == rid; i--);
	m = i + 1;
	if(m >= bck->n) return;
	for (k = m; k < bck->n; k++) {
		if(!trans_ovlp_connect(&(bck->a[k]), ug)) continue;
		bck->a[m++] = bck->a[k];
	}
	bck->n = m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, (%rsp)
movq 0x8(%rdx), %rax
movq %rax, %r12
sarq $0x3f, %r12
andq %rax, %r12
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx), %rdx
addq $-0x1c, %rdx
movq %rax, %rcx
testq %rcx, %rcx
jle 0x1bbf70
decq %rcx
movq (%rbx), %rdi
movl (%rdi,%rdx), %edi
addq $-0x1c, %rdx
cmpq %rsi, %rdi
je 0x1bbf53
incq %rcx
movq %rcx, %r12
cmpq %rax, %r12
jae 0x1bbfdf
cmpq 0x8(%rbx), %r12
jae 0x1bbfd8
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %r13
addq %r12, %r13
movq %r12, %rbp
movq (%rbx), %r14
leaq (%r14,%r13), %r15
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x1b9e17
testl %eax, %eax
je 0x1bbfc9
leaq (,%rbp,8), %rax
addq %rbp, %rax
leaq (%rax,%rax,2), %rax
addq %rbp, %rax
incq %rbp
movups (%r15), %xmm0
movups 0xc(%r15), %xmm1
movups %xmm1, 0xc(%r14,%rax)
movups %xmm0, (%r14,%rax)
incq %r12
addq $0x1c, %r13
cmpq 0x8(%rbx), %r12
jb 0x1bbf89
jmp 0x1bbfdb
movq %r12, %rbp
movq %rbp, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_reliable_cov_arr(unsigned int, kv_u_trans_t*, ug_rid_cov_t*, st_mt_t*)
uint64_t *gen_reliable_cov_arr(uint32_t id, kv_u_trans_t *idx, ug_rid_cov_t *ccov, st_mt_t *sp)
{
	u_trans_t *a; uint64_t n, k;
	a = u_trans_a(*idx, id); n = u_trans_n(*idx, id);
	kv_resize(uint64_t, *sp, ccov->ug->u.a[id].n);
	memcpy(sp->a, ccov->cov.a+ccov->idx[id], sizeof((*(sp->a)))*ccov->ug->u.a[id].n);
	for (k = 0; k < n; k++) {
		if(a[k].del) continue;
		if(a[k].f == RC_0 || a[k].f == RC_1) {
			append_cov_line_ug_rid_cov_t(id, sp->a, &(a[k]), ccov, ((uint64_t)-1), -1);
		}
	}
	return sp->a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq 0x28(%rsi), %rax
movl %edi, %r15d
movq (%rax,%r15,8), %rax
movl %eax, %r13d
shrq $0x20, %rax
leaq (%rax,%rax,2), %r12
shlq $0x4, %r12
addq 0x10(%rsi), %r12
movq (%rdx), %rax
movq 0x10(%rax), %rax
leaq (%r15,%r15,4), %rbp
movl 0x10(%rax,%rbp,8), %eax
cmpq %rax, 0x8(%rcx)
jae 0x1bc7cb
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(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq 0x10(%rbx), %rdi
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rsi
shlq $0x3, %rsi
addq 0x28(%r14), %rsi
movq (%r14), %rax
movq 0x10(%rax), %rax
movl 0x10(%rax,%rbp,8), %edx
shlq $0x3, %rdx
callq 0x2160
testq %r13, %r13
je 0x1bc82a
testb $-0x42, 0x28(%r12)
jne 0x1bc821
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
movq $-0x1, %r8
movsd 0x68d1c(%rip), %xmm0    # 0x225538
callq 0xc6725
addq $0x30, %r12
decq %r13
jne 0x1bc7f8
movq 0x10(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: is_above_cov(unsigned long, overlap_region*, unsigned long*, ug_rid_cov_t*, double)
uint64_t is_above_cov(uint64_t uid, overlap_region *o, uint64_t *fc, ug_rid_cov_t *ccov, double sec_rate)
{
	u_trans_t p;
	p.qn = uid; p.tn = o->y_id; 
	p.rev = o->y_pos_strand; p.f = RC_3; p.nw = 0;
	p.qs = o->x_pos_s; p.qe = o->x_pos_e+1;
	if(p.rev) {
		p.ts = ccov->ug->u.a[p.tn].len - (o->y_pos_e+1); 
		p.te = ccov->ug->u.a[p.tn].len - o->y_pos_s;
	} else {
		p.ts = o->y_pos_s; 
		p.te = o->y_pos_e+1;
	}

	if(append_cov_line_ug_rid_cov_t(uid, fc, &p, ccov, ccov->hom_max, sec_rate)) return 0;
	return 1;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x10(%rsp)
movl 0x10(%rsi), %eax
movl %eax, 0x1c(%rsp)
movb 0x1c(%rsi), %r8b
movb 0x30(%rsp), %r9b
shlb $0x6, %r8b
andb $0x40, %r8b
andb $-0x80, %r9b
orb %r8b, %r9b
orb $0x3, %r9b
movb %r9b, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movl 0x4(%rsi), %r9d
movl %r9d, 0x8(%rsp)
movl 0x8(%rsi), %r9d
incl %r9d
movl %r9d, 0xc(%rsp)
testb %r8b, %r8b
jne 0x1bc8a0
movl 0x14(%rsi), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsi), %r8d
incl %r8d
jmp 0x1bc8cf
movq (%rcx), %r8
movq 0x10(%r8), %r9
leaq (%rax,%rax,4), %rax
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl (%r9,%rax,8), %r10d
andl %r8d, %r10d
movl 0x18(%rsi), %r11d
notl %r11d
addl %r10d, %r11d
movl %r11d, 0x14(%rsp)
andl (%r9,%rax,8), %r8d
subl 0x14(%rsi), %r8d
leaq 0x8(%rsp), %rax
movl %r8d, 0x10(%rax)
movq 0x38(%rcx), %r8
movq %rdx, %rsi
movq %rax, %rdx
callq 0xc6725
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq %rcx, %rax
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_high_simi(overlap_region*, double, unsigned long, unsigned long, unsigned long*, unsigned long*)
uint64_t get_high_simi(overlap_region *z, double erate, uint64_t maxe, uint64_t minov, uint64_t *re0, uint64_t *re1)
{
	uint64_t ol, err = z->non_homopolymer_errors, e0, e1, f0 = 0, f1 = 0;
	ol = z->x_pos_e+1-z->x_pos_s; (*re0) = (*re1) = (uint64_t)-1;
	if(ol > (z->y_pos_e+1-z->y_pos_s)) ol = z->y_pos_e+1-z->y_pos_s;
	if((err <= (ol*erate)) && (err <= maxe)) return 1;
	if(ol <= minov) return 0;///too short
	e0 = cal_cigar_err(z, 0, minov, 0);
	e1 = cal_cigar_err(z, z->x_pos_e+1-minov, z->x_pos_e+1, 1);
	if((e0 <= (minov*erate)) && (e0 <= maxe)) f0 = 1;
	if((e1 <= (minov*erate)) && (e1 <= maxe)) f1 = 1;
	if(f0 && f1 && (ol <= (minov<<1))) {
		if(e0 >= e1) f0 = 0;
		else f1 = 0;
	}
	if((!f0) && (!f1)) return 0;
	if(f0) (*re0) = e0;
	if(f1) (*re1) = e1;
	return 2; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbp
movl 0x8(%rdi), %ecx
movl 0x30(%rdi), %eax
subl 0x4(%rdi), %ecx
incl %ecx
movq $-0x1, %rdx
movq %rdx, (%r8)
movq %rdx, (%r14)
movl 0x18(%rdi), %r13d
subl 0x14(%rdi), %r13d
incl %r13d
cmpl %r13d, %ecx
cmovbl %ecx, %r13d
cmpq %rsi, %rax
ja 0x1bddad
cvtsi2sd %rax, %xmm2
cvtsi2sd %r13, %xmm1
mulsd %xmm0, %xmm1
movl $0x1, %ecx
ucomisd %xmm2, %xmm1
jae 0x1bde9d
cmpq %r15, %r13
jbe 0x1bde9b
movq %r8, 0x8(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movsd %xmm0, 0x10(%rsp)
callq 0x1bd93c
movq %rax, %rbx
movl 0x8(%rbp), %edx
incl %edx
movq %rdx, %rsi
subq %r15, %rsi
movl $0x1, %ecx
movq %rbp, %rdi
callq 0x1bd93c
movq %rbx, %xmm0
movq 0x67448(%rip), %xmm1    # 0x225240
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x6744c(%rip), %xmm2    # 0x225250
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
cvtsi2sd %r15, %xmm4
addsd %xmm0, %xmm3
mulsd 0x10(%rsp), %xmm4
ucomisd %xmm3, %xmm4
setae %dl
cmpq %r12, %rbx
setbe %cl
andb %dl, %cl
movq %rax, %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm4
setae %sil
cmpq %r12, %rax
setbe %dl
andb %sil, %dl
cmpb $0x1, %cl
jne 0x1bde76
testb %dl, %dl
je 0x1bde76
addq %r15, %r15
movb $0x1, %cl
movb $0x1, %dl
cmpq %r13, %r15
jb 0x1bde76
cmpq %rax, %rbx
setb %cl
setae %dl
movl %ecx, %esi
orb %dl, %sil
cmpb $0x1, %sil
jne 0x1bde9b
testb %cl, %cl
je 0x1bde88
movq %rbx, (%r14)
movl $0x2, %ecx
testb %dl, %dl
je 0x1bde9d
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
jmp 0x1bde9d
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq