LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: get_ug_edge_src(ma_ug_t*, ma_hit_t_alloc*, long, long, unsigned int, unsigned int)
ma_hit_t *get_ug_edge_src(ma_ug_t *ug, ma_hit_t_alloc *src, int64_t max_hang, int64_t min_ovlp, uint32_t uv, uint32_t uw)
{
	if(ug->u.a[uv>>1].circ || ug->u.a[uw>>1].circ) return NULL;
	uint32_t v, w, k, qn, tn; int32_t r; asg_arc_t t;
    v = ((uv&1)?(ug->u.a[uv>>1].start^1):(ug->u.a[uv>>1].end^1));
    w = ((uw&1)?(ug->u.a[uw>>1].end):(ug->u.a[uw>>1].start));
    ma_hit_t_alloc *x = &(src[v>>1]);

	for (k = 0; k < x->length; k++) {
        qn = Get_qn(x->buffer[k]);
        tn = Get_tn(x->buffer[k]);
        if(qn == (v>>1) && tn == (w>>1)) {
            r = ma_hit2arc(&(x->buffer[k]), Get_READ_LENGTH(R_INF, v>>1), Get_READ_LENGTH(R_INF, w>>1),
			max_hang, asm_opt.max_hang_rate, min_ovlp, &t);
            if(r < 0) continue;
            if((t.ul>>32)!=v || t.v!=w) continue;
			return &(x->buffer[k]);
        }
    }

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x10(%rdi), %rax
movl %r8d, %ecx
shrl %ecx
imulq $0x28, %rcx, %rdx
cmpl $0x0, (%rax,%rdx)
js 0x1631e0
movl %r9d, %ecx
shrl %ecx
imulq $0x28, %rcx, %rcx
cmpl $0x0, (%rax,%rcx)
js 0x1631e0
xorl %edi, %edi
testb $0x1, %r8b
sete %dil
addq %rax, %rdx
movl 0x4(%rdx,%rdi,4), %r13d
movq %r13, %rdx
xorq $0x1, %rdx
movq %rdx, 0x8(%rsp)
addq %rax, %rcx
andl $0x1, %r9d
movl 0x4(%rcx,%r9,4), %ecx
shrl %r13d
imulq $0x18, %r13, %rax
leaq (%rsi,%rax), %rbx
movl 0xc(%rsi,%rax), %esi
movl %ecx, (%rsp)
movl %ecx, %r15d
shrl %r15d
leaq 0xf10e1(%rip), %rax     # 0x254230
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0xf05f9(%rip), %rax     # 0x253758
movss 0x158(%rax), %xmm0
movss %xmm0, 0x4(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %rsi, 0x18(%rsp)
cmpq %rsi, %rbp
jae 0x1631e0
movq (%rbx), %r12
cmpl 0x4(%r12,%r14), %r13d
jne 0x1631d7
cmpl %r15d, 0xc(%r12,%r14)
jne 0x1631d7
addq %r14, %r12
movq 0x10(%rsp), %rax
movl (%rax,%r13,8), %esi
movl (%rax,%r15,8), %edx
movq %r12, %rdi
movq 0x20(%rsp), %rcx
movss 0x4(%rsp), %xmm0
movq 0x28(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x15d560
movq 0x18(%rsp), %rsi
testl %eax, %eax
js 0x1631d7
movq 0x8(%rsp), %rax
cmpl %eax, 0x34(%rsp)
jne 0x1631d7
movl (%rsp), %eax
cmpl %eax, 0x38(%rsp)
je 0x1631e3
incq %rbp
addq $0x28, %r14
jmp 0x163177
xorl %r12d, %r12d
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: get_rr_tse(ul_idx_t const*, ul_ov_t*, unsigned int*, unsigned int*, unsigned int*)
void get_rr_tse(const ul_idx_t *uref, ul_ov_t *li, uint32_t *ts, uint32_t *te, uint32_t *tl)
{
	(*tl) = uref?uref->ug->g->seq[li->tn].len:Get_READ_LENGTH(R_INF, li->tn); 
	if(!(li->rev)) {
		(*ts) = li->ts; (*te) = li->te;
	} else {
		(*ts) = (*tl) - li->te; (*te) = (*tl) - li->ts;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x163422
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rdi
movl 0xc(%rsi), %r9d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rdi,%r9,8), %eax
jmp 0x163433
leaq 0xf0e07(%rip), %rax     # 0x254230
movq 0x18(%rax), %rax
movl 0xc(%rsi), %edi
movl (%rax,%rdi,8), %eax
movl %eax, (%r8)
cmpl $0x0, 0x18(%rsi)
js 0x163446
movl 0x10(%rsi), %eax
movl %eax, (%rdx)
movl 0x14(%rsi), %eax
jmp 0x163451
subl 0x14(%rsi), %eax
movl %eax, (%rdx)
movl (%r8), %eax
subl 0x10(%rsi), %eax
movl %eax, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: check_trans_rate(ul_ov_t*, long, float)
uint32_t check_trans_rate(ul_ov_t *a, int64_t a_n, float trans_thres)
{
	uint32_t sp = (uint32_t)-1, ep = (uint32_t)-1, tts = (uint32_t)-1, tte = 0, el = 0, iel = 0; 
	int64_t k;
	for (k = a_n-1; k >= 0; k--) {
		if(a[k].qs < tts) tts = a[k].qs;
		if(a[k].qe > tte) tte = a[k].qe;
		if(!(a[k].el)) continue;
		if(sp == (uint32_t)-1 || a[k].qe <= sp) {
			if(sp != (uint32_t)-1) el += ep - sp;
            sp = a[k].qs;
            ep = a[k].qe;
		} else {
			sp = MIN(sp, a[k].qs);
		}
	}
	if(sp != (uint32_t)-1) el += ep - sp;
	iel = (tte - tts) - el;
	// fprintf(stderr, "[M::%s] el:%u, iel:%u\n", __func__, el, iel);
	if((iel == 0) || (iel <= ((tte - tts)*trans_thres))) return 1;
	return 0;
}

// Assembly:
pushq %rbx
addq $-0x18, %rdi
xorl %ecx, %ecx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %r9d, %r11d
movl %r9d, %eax
xorl %edx, %edx
movl %r11d, %r8d
movl %r9d, %r10d
imulq $0x1c, %rsi, %rbx
addq %rdi, %rbx
testq %rsi, %rsi
jle 0x16463b
decq %rsi
movl (%rbx), %r9d
movl 0x4(%rbx), %r11d
cmpl %eax, %r9d
cmovbl %r9d, %eax
cmpl %ecx, %r11d
cmoval %r11d, %ecx
testb $0x40, 0x17(%rbx)
leaq -0x1c(%rbx), %rbx
je 0x1645f8
cmpl $-0x1, %r10d
je 0x1645eb
cmpl %r10d, %r11d
jbe 0x164633
cmpl %r9d, %r10d
cmovael %r9d, %r10d
jmp 0x1645f1
subl %r10d, %r8d
addl %r8d, %edx
jmp 0x1645eb
subl %r10d, %r8d
xorl %esi, %esi
cmpl $-0x1, %r10d
cmovnel %r8d, %esi
addl %esi, %edx
subl %eax, %ecx
movl $0x1, %eax
movl %ecx, %esi
subl %edx, %esi
je 0x16466e
cvtsi2ss %rsi, %xmm1
movl %ecx, %ecx
cvtsi2ss %rcx, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
jae 0x16466e
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: dump_chain(kv_ul_ov_t*, ul_ov_t*, ul_ov_t*, void*)
void dump_chain(kv_ul_ov_t *des, ul_ov_t *src, ul_ov_t *chain, void *km)
{
	///note: dump results to <des> may change <chain>, so we should save <chain> in advance
	uint64_t beg = chain->ts, occ = chain->te - chain->ts;
	kv_resize_km(km, ul_ov_t, *des, occ); des->n = occ;
	memcpy(des->a, src + beg, occ*sizeof((*src)));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdx), %r12d
movl 0x14(%rdx), %r15d
subl %r12d, %r15d
movq (%rdi), %rax
cmpq %r15, 0x10(%rdi)
jae 0x164971
leaq -0x1(%r15), %rdx
movq %rdx, %rsi
shrq %rsi
orq %rdx, %rsi
movq %rsi, %rdx
shrq $0x2, %rdx
orq %rsi, %rdx
movq %rdx, %rsi
shrq $0x4, %rsi
orq %rdx, %rsi
movq %rsi, %rdx
shrq $0x8, %rdx
orq %rsi, %rdx
movq %rdx, %rsi
shrq $0x10, %rsi
orq %rdx, %rsi
incq %rsi
movq %rsi, 0x10(%r14)
imulq $0x1c, %rsi, %rdx
movq %rcx, %rdi
movq %rax, %rsi
callq 0x1a3acc
movq %rax, (%r14)
movq %r15, 0x8(%r14)
imulq $0x1c, %r12, %rcx
addq %rcx, %rbx
imulq $0x1c, %r15, %rdx
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: quick_primary_assgin(ul_idx_t const*, ug_opt_t const*, long, double, ul_ov_t*, long)
uint32_t quick_primary_assgin(const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, double diff_ec_ul, ul_ov_t *a, int64_t a_n)
{
	int64_t k, qo, share, f = 1; ul_ov_t *li, *lk; uint32_t li_v, lk_v;
	for (k = a_n - 1, li = NULL; k >= 0; k--) {
		lk = &(a[k]); lk_v = (lk->tn<<1)|lk->rev; lk->sec = SEC_MODE; 
		if(!(lk->tn&((uint32_t)(0x80000000)))) continue;
		if(li && lk->qe > li->qs) { ///lk is overlapped with li
			li->tn <<= 1; li->tn >>= 1; lk->tn <<= 1; lk->tn >>= 1;
			qo = infer_rovlp(li, lk, NULL, NULL, NULL, NULL);
			li->tn |= ((uint32_t)(0x80000000)); lk->tn |= ((uint32_t)(0x80000000));
			if(qo && li_v != lk_v && get_ecov_adv(uref, uopt, li_v^1, lk_v^1, bw, diff_ec_ul, qo, 1, &share)) {
				li->sec = k; f++; ///the end of a chain is a cis overlap
			} else {
				f = 0;
				break;
			}
		}
		li = lk; li_v = lk_v; 
	}
	return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
pushq $0x1
popq %r8
xorl %ebp, %ebp
movl %r12d, %r14d
movq %rbp, %r15
imulq $0x1c, %rbx, %rbp
addq %rcx, %rbp
testq %rbx, %rbx
jle 0x16535d
decq %rbx
movl -0x10(%rbp), %r12d
movl -0x4(%rbp), %eax
movl %eax, %r9d
orl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
movl %r9d, -0x4(%rbp)
addq $-0x1c, %rbp
testl %r12d, %r12d
jns 0x165251
shldl $0x1, %eax, %r12d
testq %r15, %r15
je 0x165244
movl 0x8(%rbp), %eax
cmpl 0x4(%r15), %eax
jbe 0x165244
movq %rdi, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
andb $0x7f, 0xf(%r15)
andb $0x7f, 0xf(%rbp)
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3d261
orb $-0x80, 0xf(%r15)
orb $-0x80, 0xf(%rbp)
testq %rax, %rax
je 0x165360
cmpl %r12d, %r14d
je 0x165360
xorl $0x1, %r14d
movl %r12d, %ecx
xorl $0x1, %ecx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r14d, %edx
movq 0x18(%rsp), %r8
movsd 0x20(%rsp), %xmm0
movq %rax, %r9
leaq 0x30(%rsp), %rax
pushq %rax
pushq $0x1
callq 0x1631f5
popq %rcx
popq %rdx
testq %rax, %rax
je 0x165360
movl %ebx, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl 0x18(%r15), %ecx
movl $0xc0000000, %edx       # imm = 0xC0000000
andl %edx, %ecx
orl %eax, %ecx
movl %ecx, 0x18(%r15)
movl 0x4(%rsp), %r8d
incl %r8d
movq 0x28(%rsp), %rcx
movsd 0x20(%rsp), %xmm0
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
jmp 0x165244
movl %r8d, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: g_adjacent_dis(asg_t const*, unsigned int, unsigned int)
int64_t g_adjacent_dis(const asg_t *g, uint32_t v, uint32_t w)
{
	uint32_t nv, i; asg_arc_t *av = NULL;
	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	for (i = 0; i < nv; i++) {
        if(av[i].del || av[i].v != w) continue;
		return (uint32_t)av[i].ul;
	}
	return -1;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rax
movl %eax, %esi
shrq $0x20, %rax
imulq $0x18, %rsi, %r8
imulq $0x18, %rax, %rsi
leaq (%rsi,%rcx), %r9
addq $0xc, %r9
xorl %edi, %edi
pushq $-0x1
popq %rax
cmpq %rdi, %r8
je 0x166526
cmpl $0x0, (%r9,%rdi)
js 0x16651a
cmpl %edx, -0x4(%r9,%rdi)
je 0x166520
addq $0x18, %rdi
jmp 0x166507
addq %rcx, %rsi
movl (%rdi,%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: get_r_offset(ma_ug_t*, mg_lchain_t*, long*, long*, long*, long*)
void get_r_offset(ma_ug_t *ug, mg_lchain_t *x, int64_t *rs, int64_t *re, int64_t *qs, int64_t *qe)
{
	if(qs) *qs = x->qs; if(qe) *qe = x->qe;
	if(!(x->score&1)) {
		if(rs) *rs = x->rs + x->off;
		if(re) *re = x->re + x->off;
	} else {
		if(rs) *rs = x->off + ug->g->seq[x->score>>1].len - x->re;
		if(re) *re = x->off + ug->g->seq[x->score>>1].len - x->rs;
	}
}

// Assembly:
testq %r8, %r8
je 0x166533
movslq 0x14(%rsi), %rax
movq %rax, (%r8)
testq %r9, %r9
je 0x16653f
movslq 0x18(%rsi), %rax
movq %rax, (%r9)
movl 0x1c(%rsi), %eax
testb $0x1, %al
jne 0x166564
testq %rdx, %rdx
je 0x166558
movslq 0xc(%rsi), %rax
movslq (%rsi), %rdi
addq %rax, %rdi
movq %rdi, (%rdx)
testq %rcx, %rcx
je 0x1665b5
movl (%rsi), %eax
addl 0x10(%rsi), %eax
jmp 0x1665b0
testq %rdx, %rdx
je 0x166591
movq 0x18(%rdi), %r8
movq 0x20(%r8), %r8
movl %eax, %r9d
sarl %r9d
movslq %r9d, %r9
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andl (%r8,%r9,8), %r10d
addl (%rsi), %r10d
subl 0x10(%rsi), %r10d
movslq %r10d, %r8
movq %r8, (%rdx)
testq %rcx, %rcx
je 0x1665b5
movq 0x18(%rdi), %rdx
movq 0x20(%rdx), %rdx
sarl %eax
movslq %eax, %rdi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rdx,%rdi,8), %eax
addl (%rsi), %eax
subl 0xc(%rsi), %eax
cltq
movq %rax, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: get_u_offset(ma_ug_t*, mg_lchain_t*, long*, long*, long*, long*)
void get_u_offset(ma_ug_t *ug, mg_lchain_t *x, int64_t *rs, int64_t *re, int64_t *qs, int64_t *qe)
{
	if(qs) *qs = x->qs; if(qe) *qe = x->qe;
	if(!(x->v&1)) {
		if(rs) *rs = x->rs + x->off;
		if(re) *re = x->re + x->off;
	} else {
		if(rs) *rs = x->off + ug->g->seq[x->v>>1].len - x->re;
		if(re) *re = x->off + ug->g->seq[x->v>>1].len - x->rs;
	}
}

// Assembly:
testq %r8, %r8
je 0x1665c2
movslq 0x14(%rsi), %rax
movq %rax, (%r8)
testq %r9, %r9
je 0x1665ce
movslq 0x18(%rsi), %rax
movq %rax, (%r9)
movl 0x8(%rsi), %eax
testb $0x1, %al
jne 0x1665f3
testq %rdx, %rdx
je 0x1665e7
movslq 0xc(%rsi), %rax
movslq (%rsi), %rdi
addq %rax, %rdi
movq %rdi, (%rdx)
testq %rcx, %rcx
je 0x16663f
movl (%rsi), %edx
addl 0x10(%rsi), %edx
jmp 0x166639
testq %rdx, %rdx
je 0x16661d
movq 0x18(%rdi), %r8
movq 0x20(%r8), %r8
movl %eax, %r9d
shrl %r9d
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andl (%r8,%r9,8), %r10d
addl (%rsi), %r10d
subl 0x10(%rsi), %r10d
movslq %r10d, %r8
movq %r8, (%rdx)
testq %rcx, %rcx
je 0x16663f
movq 0x18(%rdi), %rdx
movq 0x20(%rdx), %rdi
shrl %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl (%rdi,%rax,8), %edx
addl (%rsi), %edx
subl 0xc(%rsi), %edx
movslq %edx, %rax
movq %rax, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: l2g_chain(ul_idx_t const*, kv_ul_ov_t*, vec_mg_lchain_t*)
void l2g_chain(const ul_idx_t *uref, kv_ul_ov_t *lidx, vec_mg_lchain_t *res)
{
	uint64_t k; 
	res->n = 0; kv_resize(mg_lchain_t, *res, lidx->n); res->n = lidx->n;
	for (k = 0; k < lidx->n; k++) {
		memset(&(res->a[k]), 0, sizeof(res->a[k]));
		res->a[k].v = (lidx->a[k].tn<<1)|(lidx->a[k].rev);
		res->a[k].off = lidx->a[k].qn; res->a[k].score = lidx->a[k].sec;
		res->a[k].qs = lidx->a[k].qs; res->a[k].qe = lidx->a[k].qe;
		res->a[k].rs = lidx->a[k].ts; res->a[k].re = lidx->a[k].te; 
		if(lidx->a[k].el) {
			res->a[k].score = retrieve_u_cov_region(uref, lidx->a[k].tn, 0, lidx->a[k].ts, lidx->a[k].te, NULL);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
andq $0x0, 0x8(%rdx)
movq %rdi, (%rsp)
movq 0x8(%rsi), %rax
cmpq %rax, 0x10(%rdx)
jae 0x1666b2
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
incq %rcx
movq %rcx, 0x10(%rbx)
movq (%rbx), %rdi
imulq $0x28, %rcx, %rsi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
pushq $0x18
popq %r12
xorl %r13d, %r13d
xorps %xmm3, %xmm3
movl $0x3fffffff, %ebp       # imm = 0x3FFFFFFF
xorl %r15d, %r15d
cmpq %rax, %r15
jae 0x166771
movq (%rbx), %rax
movups %xmm3, 0x10(%rax,%r13)
andq $0x0, 0x20(%rax,%r13)
movups %xmm3, (%rax,%r13)
movq (%r14), %rax
movl -0xc(%rax,%r12), %esi
movl (%rax,%r12), %ecx
shrdl $0x1f, %esi, %ecx
movq (%rbx), %rdx
movl %ecx, 0x8(%rdx,%r13)
movl -0x18(%rax,%r12), %ecx
movl %ecx, (%rdx,%r13)
movl (%rax,%r12), %ecx
andl %ebp, %ecx
movl %ecx, 0x1c(%rdx,%r13)
movq -0x14(%rax,%r12), %xmm1
movq -0x8(%rax,%r12), %xmm0
movdqa %xmm0, %xmm2
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
movdqu %xmm2, 0xc(%rdx,%r13)
testb $0x40, 0x3(%rax,%r12)
je 0x16675d
movd %xmm0, %ecx
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %r8d
movq (%rsp), %rdi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0xa240
xorps %xmm3, %xmm3
movq (%rbx), %rcx
movl %eax, 0x1c(%rcx,%r13)
incq %r15
movq 0x8(%r14), %rax
addq $0x28, %r13
addq $0x1c, %r12
jmp 0x1666c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: check_elen_gchain(ul_ov_t*, long, float)
int64_t check_elen_gchain(ul_ov_t *a, int64_t a_n, float trans_thres)
{
	uint32_t sp_e, ep_e, ts, te, tl = 0, el = 0, iel = 0; 
	sp_e = ep_e = ts = te = (uint32_t)-1;
	int64_t k;
	for (k = a_n-1; k >= 0; k--) {
		if(ts == (uint32_t)-1 || a[k].qe <= ts) {
			if(ts != (uint32_t)-1) tl += te - ts;
            ts = a[k].qs; te = a[k].qe;
		} else {
			ts = MIN(ts, a[k].qs);
		}
		if(!(a[k].el)) continue;

		if(sp_e == (uint32_t)-1 || a[k].qe <= sp_e) {
			if(sp_e != (uint32_t)-1) el += ep_e - sp_e;
            sp_e = a[k].qs;
            ep_e = a[k].qe;
		} else {
			sp_e = MIN(sp_e, a[k].qs);
		}
	}
	if(ts != (uint32_t)-1) tl += te - ts;
	if(sp_e != (uint32_t)-1) el += ep_e - sp_e;

	iel = tl - el;
	// fprintf(stderr, "[M::%s] el:%u, iel:%u\n", __func__, el, iel);
	if((iel == 0) || (iel <= (tl*trans_thres))) return 1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
addq $-0x18, %rdi
xorl %eax, %eax
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl %r11d, %ebx
movl %r11d, %r9d
movl %r11d, %edx
xorl %ecx, %ecx
movl %ebx, %r8d
movl %r11d, %r10d
imulq $0x1c, %rsi, %r14
addq %rdi, %r14
testq %rsi, %rsi
jle 0x166c65
cmpl $-0x1, %r9d
je 0x166c28
movl 0x4(%r14), %ebx
cmpl %r9d, %ebx
jbe 0x166c2e
movl (%r14), %r11d
cmpl %r11d, %r9d
cmovael %r11d, %r9d
jmp 0x166c3b
movl 0x4(%r14), %ebx
jmp 0x166c33
subl %r9d, %edx
addl %edx, %eax
movl (%r14), %r11d
movl %r11d, %r9d
movl %ebx, %edx
decq %rsi
testb $0x40, 0x17(%r14)
leaq -0x1c(%r14), %r14
je 0x166c08
cmpl $-0x1, %r10d
je 0x166bfb
cmpl %r10d, %ebx
jbe 0x166c5d
cmpl %r11d, %r10d
cmovael %r11d, %r10d
jmp 0x166c01
subl %r10d, %r8d
addl %r8d, %ecx
jmp 0x166bfb
subl %r9d, %edx
xorl %esi, %esi
cmpl $-0x1, %r9d
cmovel %esi, %edx
addl %eax, %edx
subl %r10d, %r8d
cmpl $-0x1, %r10d
cmovel %esi, %r8d
addl %r8d, %ecx
movabsq $0x1, %rax
movl %edx, %esi
subl %ecx, %esi
je 0x166ca8
cvtsi2ss %rsi, %xmm1
movl %edx, %ecx
cvtsi2ss %rcx, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
jae 0x166ca8
xorl %eax, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: check_trans_rate_gap(vec_mg_lchain_t*, kv_ul_ov_t*, overlap_region_alloc*, haplotype_evdience_alloc*, ul_idx_t const*, double, long, float)
int64_t check_trans_rate_gap(vec_mg_lchain_t *uc, kv_ul_ov_t *buf, overlap_region_alloc* olist, 
haplotype_evdience_alloc *hap, const ul_idx_t *uref, double diff_ec_ul, int64_t winLen, float trans_thres)
{
	if(uc->n <= 0) return 0;
	int64_t k, m, ucn = uc->n, k_cnt, z; mg_lchain_t *ix; buf->n = 0; 
	for (k = m = 0; k < ucn; k += k_cnt) {
		ix = &(uc->a[k]); assert(ix->v == (uint32_t)-1); k_cnt = ix->cnt + 1;
		if(ds_check_vec_mg_lchain_t(uc->a + k + 1, ix->cnt, buf, olist, hap, uref, diff_ec_ul, winLen, trans_thres)) {
			if(m == k) {
				m += k_cnt; 
			} else {
				for (z = 0; z < k_cnt; z++) uc->a[m++] = uc->a[k+z];
			}
		}
	}
	uc->n = m;
	if(uc->n) return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movss %xmm1, 0x14(%rsp)
movq %r9, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x16705e
movq %rsi, %rcx
movq %rdi, %r13
andq $0x0, 0x8(%rsi)
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq 0x40(%rsp), %r15
jge 0x167050
movq (%r13), %rdi
imulq $0x28, %r15, %r12
cmpl $-0x1, 0x8(%rdi,%r12)
jne 0x16706f
addq %r12, %rdi
movl 0x4(%rdi), %esi
leal (%rsi,%rsi), %eax
sarl %eax
incl %eax
movslq %eax, %rbp
addq $0x28, %rdi
shlq $0x21, %rsi
sarq $0x21, %rsi
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq %rcx, %rbx
movq %rcx, %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movsd 0x30(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
callq 0x166cac
testq %rax, %rax
je 0x167045
cmpq %r15, %r14
jne 0x166ff9
addq %rbp, %r14
jmp 0x167045
testq %rbp, %rbp
movl $0x0, %eax
cmovgq %rbp, %rax
imulq $0x28, %r14, %rcx
negq %rax
xorl %edx, %edx
cmpq %rdx, %rax
je 0x167042
movq (%r13), %rsi
movq 0x20(%rsi,%r12), %rdi
movq %rdi, 0x20(%rsi,%rcx)
movups (%rsi,%r12), %xmm0
movups 0x10(%rsi,%r12), %xmm1
movups %xmm1, 0x10(%rsi,%rcx)
movups %xmm0, (%rsi,%rcx)
decq %rdx
addq $0x28, %rcx
addq $0x28, %r12
jmp 0x16700e
subq %rdx, %r14
movq %rbx, %rcx
addq %rbp, %r15
jmp 0x166f80
movq %r14, 0x8(%r13)
xorl %eax, %eax
testq %r14, %r14
setne %al
jmp 0x167060
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8b9c9(%rip), %rdi     # 0x1f2a3f
leaq 0x8aaa6(%rip), %rsi     # 0x1f1b23
leaq 0x8b9d1(%rip), %rcx     # 0x1f2a55
movl $0x124a, %edx           # imm = 0x124A
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: adjust_utg_chain_qoffset(unsigned long*, long*, long*, long)
int64_t adjust_utg_chain_qoffset(uint64_t *r_srt, int64_t *r_pos, int64_t *q_pos, int64_t r_off)
{
	if(r_off < ((int64_t)(r_srt[0]>>32))) {
		// fprintf(stderr, "r_off:%ld, r_srt[0]:%ld\n", r_off, ((int64_t)(r_srt[0]>>32))); 
		return q_pos[(uint32_t)r_srt[0]]; ///have small chance
	}
	if(r_off >= ((int64_t)(r_srt[3]>>32))) {
		// fprintf(stderr, "r_off:%ld, r_srt[3]:%ld\n", r_off, ((int64_t)(r_srt[3]>>32))); 
		return q_pos[(uint32_t)r_srt[3]]; ///have small chance
	}
	int64_t k, rdis, qdis;
	for (k = 0; k < 3; k++) {
		if(r_off >= ((int64_t)(r_srt[k]>>32)) && r_off < ((int64_t)(r_srt[k+1]>>32))) break;
	}
	// if(k >= 3) {
	// 	if(rs >= ((int64_t)(r_srt[2]>>32)) && rs <= ((int64_t)(r_srt[3]>>32))) k = 2;
	// }
	if(k >= 3) {
		for (k = 0; k < 3; k++) {
			if(r_off >= ((int64_t)(r_srt[k]>>32)) && r_off <= ((int64_t)(r_srt[k+1]>>32))) break;
		}
	}
	assert(k < 3);

	qdis = q_pos[(uint32_t)r_srt[k+1]] - q_pos[(uint32_t)r_srt[k]]; 
	rdis = r_pos[(uint32_t)r_srt[k+1]] - r_pos[(uint32_t)r_srt[k]]; 
	if(qdis < 0) return -1;
	return q_pos[(uint32_t)r_srt[k]] + get_offset_adjust(r_off-r_pos[(uint32_t)r_srt[k]], rdis, qdis);
}

// Assembly:
movq (%rdi), %rax
movq %rax, %r8
shrq $0x20, %r8
cmpq %rcx, %r8
jg 0x1673fd
movq 0x18(%rdi), %rax
movq %rax, %r8
shrq $0x20, %r8
cmpq %rcx, %r8
jbe 0x1673fd
pushq $0x1
popq %r8
cmpq $0x4, %r8
je 0x167404
movq -0x8(%rdi,%r8,8), %rax
movq %rax, %r9
shrq $0x20, %r9
cmpq %rcx, %r9
jg 0x1673f8
movq (%rdi,%r8,8), %r9
movq %r9, %r10
shrq $0x20, %r10
cmpq %rcx, %r10
ja 0x167434
incq %r8
jmp 0x1673d1
movl %eax, %eax
movq (%rdx,%rax,8), %rax
retq
pushq $0x1
popq %r8
cmpq $0x4, %r8
je 0x16747b
movq -0x8(%rdi,%r8,8), %rax
movq %rax, %r9
shrq $0x20, %r9
cmpq %rcx, %r9
jg 0x16742f
movq (%rdi,%r8,8), %r9
movq %r9, %r10
shrq $0x20, %r10
cmpq %rcx, %r10
jae 0x167434
incq %r8
jmp 0x167408
movl %r9d, %r8d
movq (%rdx,%r8,8), %rdi
movl %eax, %r9d
movq (%rdx,%r9,8), %rax
subq %rax, %rdi
js 0x167477
movl (%rsi,%r8,8), %edx
movl (%rsi,%r9,8), %esi
subl %esi, %ecx
cvtsi2sd %rcx, %xmm0
subl %esi, %edx
cvtsi2sd %rdx, %xmm1
divsd %xmm1, %xmm0
movl %edi, %ecx
cvtsi2sd %rcx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movl %ecx, %ecx
addq %rcx, %rax
retq
pushq $-0x1
popq %rax
retq
pushq %rax
leaq 0x8b7f2(%rip), %rdi     # 0x1f2c75
leaq 0x8a699(%rip), %rsi     # 0x1f1b23
leaq 0x8b7ea(%rip), %rcx     # 0x1f2c7b
movl $0x12a3, %edx           # imm = 0x12A3
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: cal_qext_coor(long, long, long, long, long)
int64_t cal_qext_coor(int64_t pr, int64_t ar, int64_t pq, int64_t aq, int64_t r_off)
{
	int64_t q_off = -1, pd, ad; 
	if(r_off >= pr && r_off <= ar && ar >= pr && aq >= pq) {
		q_off = pq + get_offset_adjust(r_off - pr, ar - pr, aq - pq);
	} else {
		pd = ((r_off >= pr)?(r_off-pr):(pr-r_off));
		ad = ((r_off >= ar)?(r_off-ar):(ar-r_off));
		q_off = ((ad <= pd)?aq:pq);
	}
	return q_off;
}

// Assembly:
movq %rcx, %rax
movq %r8, %rcx
subq %rdi, %rcx
jl 0x1674dd
cmpq %rdx, %rax
jl 0x1674dd
cmpq %rdi, %rsi
jl 0x1674dd
cmpq %rsi, %r8
jg 0x1674dd
subl %edi, %esi
subl %edx, %eax
movl %ecx, %ecx
cvtsi2sd %rcx, %xmm0
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, %eax
addq %rdx, %rax
retq
movq %rcx, %rdi
negq %rdi
cmovsq %rcx, %rdi
subq %rsi, %r8
movq %r8, %rcx
negq %rcx
cmovsq %r8, %rcx
cmpq %rdi, %rcx
cmovaq %rdx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x167b91
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rax
movq 0x20(%rax), %rax
movl 0x8(%rsi), %esi
shrl %esi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl (%rax,%rsi,8), %esi
andl %edx, %esi
xorl %edi, %edi
testq %rbx, %rbx
movl $0x0, %r8d
cmovgq %rbx, %r8
decl %ecx
movq %r14, %r9
cmpq %rdi, %r8
je 0x167b37
movl 0x8(%r9), %r10d
shrl %r10d
movl (%rax,%r10,8), %r11d
andl %edx, %r11d
cmpl $0x0, (%r9)
jns 0x167b04
orq $-0x1, 0x14(%r9)
subl %r11d, %esi
movl %esi, (%r9)
leal (%rcx,%rdi), %r11d
cmpq $0x1, %rdi
movl $0x0, %ebp
sbbl %ebp, %ebp
orl %r11d, %ebp
movl %ebp, 0x24(%r9)
movl (%rax,%r10,8), %r10d
addl 0x20(%r9), %esi
andl %edx, %r10d
addl %r10d, %esi
incq %rdi
addq $0x28, %r9
jmp 0x167ae6
leaq 0x14(%r14), %r13
pushq $-0x1
popq %rsi
xorl %r12d, %r12d
cmpq %rbx, %r12
jg 0x167b83
je 0x167b4f
cmpl $0x0, (%r13)
js 0x167b74
movq %r12, %rcx
subq %rsi, %rcx
movq %r12, %rax
cmpq $0x2, %rcx
jl 0x167b77
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x1674fc
movq %r12, %rax
jmp 0x167b77
movq %rsi, %rax
incq %r12
addq $0x28, %r13
movq %rax, %rsi
jmp 0x167b41
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
je 0x16801f
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %r12, %rbp
jge 0x16801f
movq (%r14), %rax
imulq $0x28, %rbp, %rcx
cmpl $-0x1, 0x8(%rax,%rcx)
jne 0x16802e
addq %rcx, %rax
movl 0x4(%rax), %ecx
addl %ecx, %ecx
sarl %ecx
leal 0x1(%rcx), %edx
testl %ecx, %ecx
cmovlel %r13d, %ecx
movslq %edx, %r15
imulq $0x28, %rcx, %rcx
addq $0x28, %rcx
xorl %edx, %edx
leaq 0x28(%rdx), %rsi
cmpq %rsi, %rcx
je 0x16801a
cmpl $0x0, 0x28(%rax,%rdx)
movq %rsi, %rdx
jns 0x167fec
movq 0xeafda(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
leaq 0x8ac41(%rip), %rsi     # 0x1f2c51
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
addq %r15, %rbp
jmp 0x167fb9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8aa0a(%rip), %rdi     # 0x1f2a3f
leaq 0x89ae7(%rip), %rsi     # 0x1f1b23
leaq 0x8ae71(%rip), %rcx     # 0x1f2eb4
movl $0x13cf, %edx           # imm = 0x13CF
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, (%rsp)
andq $0x0, 0x8(%rcx)
movq %rdi, %r12
movq 0x10(%rdi), %rax
cmpq %rax, 0x10(%rcx)
jae 0x16b066
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
incq %rcx
movq %rcx, 0x10(%rbx)
movq (%rbx), %rdi
imulq $0x28, %rcx, %rsi
callq 0x2370
movq %rax, (%rbx)
pushq $0x30
popq %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq 0x10(%r12), %rcx
jae 0x16b159
movq (%rbx), %r8
movq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x8(%rbx)
imulq $0x28, %rsi, %r10
leaq (%r8,%r10), %rsi
andq $0x0, 0x20(%r8,%r10)
movups %xmm0, 0x10(%r8,%r10)
movups %xmm0, (%r8,%r10)
movq (%r12), %rdi
movl -0x20(%rdi,%rax), %r9d
movl -0x14(%rdi,%rax), %r11d
addl %r9d, %r9d
orl %r11d, %r9d
movl %r9d, 0x8(%r8,%r10)
movl %ecx, (%r8,%r10)
movl -0x10(%rdi,%rax), %ebp
movl -0x8(%rdi,%rax), %r13d
subl %r13d, %ebp
imull %r14d, %ebp
movl (%rdi,%rax), %r15d
shll $0x6, %r15d
addl %ebp, %r15d
subl %r15d, %r13d
movl %r13d, 0x1c(%r8,%r10)
movl -0x2c(%rdi,%rax), %ebp
movl %ebp, 0x14(%r8,%r10)
movl -0x28(%rdi,%rax), %ebp
incl %ebp
movl %ebp, 0x18(%r8,%r10)
testb $0x1, %r11b
jne 0x16b113
movl -0x1c(%rdi,%rax), %r8d
movl %r8d, 0xc(%rsi)
movl -0x18(%rdi,%rax), %r8d
incl %r8d
jmp 0x16b147
movq (%rsp), %r8
movq (%r8), %r8
movq 0x10(%r8), %r8
shrl %r9d
imulq $0x28, %r9, %r9
movl (%r8,%r9), %r10d
andl %edx, %r10d
movl -0x18(%rdi,%rax), %r11d
notl %r11d
addl %r10d, %r11d
movl %r11d, 0xc(%rsi)
movl (%r8,%r9), %r8d
andl %edx, %r8d
subl -0x1c(%rdi,%rax), %r8d
movl %r8d, 0x10(%rsi)
incq %rcx
addq $0xa8, %rax
jmp 0x16b073
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
andq $0x0, (%rdx)
movq 0x48(%rdi), %r8
testq %r8, %r8
je 0x16b1c9
pushq %r14
pushq %rbx
xorl %ecx, %ecx
xorl %eax, %eax
movq %r8, %r11
shlq $0x5, %r11
addq $-0x4, %r11
decq %r8
js 0x16b215
movq 0x58(%rdi), %r14
movslq -0x18(%r14,%r11), %r10
movq %r10, %r9
subq %rsi, %r9
jle 0x16b215
movslq -0x1c(%r14,%r11), %rbx
cmpq %rsi, %rbx
jle 0x16b1cc
movl (%r14,%r11), %r9d
addq $-0x20, %r11
testq %r9, %r9
je 0x16b187
addq %r9, %rcx
movq %rcx, (%rdx)
subl %ebx, %r10d
movslq %r10d, %r9
addq %r9, %rax
jmp 0x16b17c
xorl %eax, %eax
retq
movl (%r14,%r11), %esi
testl %esi, %esi
je 0x16b20f
cvtsi2sd %r9, %xmm0
subl %ebx, %r10d
cvtsi2sd %r10d, %xmm1
divsd %xmm1, %xmm0
movl %esi, %esi
cvtsi2sd %rsi, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
cmpq $0x2, %rsi
movabsq $0x1, %rdi
cmovgeq %rsi, %rdi
addq %rdi, %rcx
movq %rcx, (%rdx)
jmp 0x16b212
xorl %r9d, %r9d
addq %r9, %rax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq $-0x1
popq %rcx
testq %rdi, %rdi
je 0x16bff4
movl %edx, %r8d
imulq $0x28, %rdi, %rax
cmpl %edx, -0x10(%rax,%rsi)
jge 0x16bfbd
decq %rdi
movq %rdi, %rcx
jmp 0x16bff4
cmpl %r8d, 0x18(%rsi)
jge 0x16bff4
xorl %ecx, %ecx
pushq $0x2
popq %r9
movq %rdi, %rax
subq %rcx, %rax
jle 0x16bff2
cqto
idivq %r9
leaq (%rax,%rcx), %rdx
imulq $0x28, %rdx, %r10
cmpl %r8d, 0x18(%rsi,%r10)
leaq 0x1(%rax,%rcx), %rax
cmovlq %rax, %rcx
cmovgeq %rdx, %rdi
jmp 0x16bfc9
jne 0x16bff8
movq %rcx, %rax
retq
pushq %rax
leaq 0x861c4(%rip), %rdi     # 0x1f21c4
leaq 0x85b1c(%rip), %rsi     # 0x1f1b23
leaq 0x8709a(%rip), %rcx     # 0x1f30a8
movl $0x15d2, %edx           # imm = 0x15D2
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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), %r8d
testb $0x1, %r8b
jne 0x16c02e
movl 0xc(%rsi), %eax
movq 0x20(%rdi), %rcx
shrl %r8d
jmp 0x16c041
movq 0x20(%rdi), %rcx
shrl %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rcx,%r8,8), %eax
subl 0x10(%rsi), %eax
movslq 0x14(%rsi), %rsi
movslq 0x18(%rdx), %r9
movl (%rcx,%r8,8), %r8d
movl 0x8(%rdx), %edi
testb $0x1, %dil
jne 0x16c05e
movl 0x10(%rdx), %r10d
shrl %edi
jmp 0x16c06e
shrl %edi
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andl (%rcx,%rdi,8), %r10d
subl 0xc(%rdx), %r10d
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andq %rdx, %r8
cltq
addq %rax, %r9
subq %r9, %rsi
movslq %r10d, %rax
addq %r8, %rax
addq %rsi, %rax
movl (%rcx,%rdi,8), %ecx
andq %rdx, %rcx
subq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: primary_chain_check(unsigned long*, long, mg_lchain_t*)
uint64_t primary_chain_check(uint64_t *idx, int64_t idx_n, mg_lchain_t *a)
{
	if(idx_n <= 0) return 0;
	ul_ov_t m; memset(&m, 0, sizeof(m)); int64_t m_sc = -1, i, a_n; uint64_t s_idx, e_idx, ovlp, novlp;
	for (i = a_n = 0; i < idx_n; ++i) {
        if(((int64_t)(idx[i]>>32)) > m_sc) {
            m_sc = ((int64_t)(idx[i]>>32)); m.qn = i;
            m.ts = a_n; m.te = a_n + ((uint32_t)idx[i]);
            m.qs = a[m.ts].qs; m.qe = a[m.te-1].qe;
        }
        a_n += ((uint32_t)idx[i]);
    }
	assert(a[m.ts].qs<=a[m.te-1].qs && a[m.te-1].qe>=a[m.ts].qe);

	for (i = a_n = 0; i < idx_n; ++i) {
		s_idx = a[a_n].qs; a_n += ((uint32_t)idx[i]); e_idx = a[a_n-1].qe;
		if(i == m.qn) continue;
		ovlp = ((MIN(m.qe, e_idx) > MAX(m.qs, s_idx))? (MIN(m.qe, e_idx) - MAX(m.qs, s_idx)):0);
		novlp = (e_idx - s_idx) - ovlp;
		if(novlp > ((m.qe-m.qs)*GC_OFFSET_RATE) && novlp > GC_OFFSET_POS) break;
	}
	if(i >= idx_n) return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %eax, %eax
testq %rsi, %rsi
jle 0x16c1d9
pushq $-0x1
popq %rbx
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %ecx, %ecx
xorl %r11d, %r11d
cmpq %r8, %rsi
je 0x16c0fc
movq (%rdi,%r8,8), %r14
movq %r14, %r15
shrq $0x20, %r15
cmpq %rbx, %r15
jle 0x16c0f4
movl %r9d, %eax
imulq $0x28, %rax, %rax
movl 0x14(%rdx,%rax), %ecx
leal (%r14,%r9), %eax
leal (%r14,%r9), %r10d
decl %r10d
imulq $0x28, %r10, %r10
movl 0x18(%rdx,%r10), %r10d
movl %r9d, %ebp
movq %r15, %rbx
movl %r8d, %r11d
addq %r14, %r9
incq %r8
jmp 0x16c0b7
movl %ebp, %r8d
imulq $0x28, %r8, %r8
movl 0x14(%rdx,%r8), %r9d
decl %eax
imulq $0x28, %rax, %rax
cmpl 0x14(%rdx,%rax), %r9d
jg 0x16c1e2
addq %rdx, %r8
addq %rdx, %rax
movl 0x18(%rax), %eax
cmpl 0x18(%r8), %eax
jl 0x16c1e2
leaq -0x10(%rdx), %rax
movl %r11d, %r8d
movl %r10d, %r9d
movl %ecx, %r11d
subl %ecx, %r10d
cvtsi2sd %r10, %xmm0
mulsd 0x858df(%rip), %xmm0    # 0x1f1a28
xorl %ecx, %ecx
movq 0x7711d(%rip), %xmm1    # 0x1e3270
movapd 0x77125(%rip), %xmm2    # 0x1e3280
xorl %r14d, %r14d
cmpq %rcx, %rsi
je 0x16c1d1
movl (%rdi,%rcx,8), %r10d
addq %r14, %r10
cmpq %rcx, %r8
je 0x16c1c9
imulq $0x28, %r10, %rbx
movslq (%rax,%rbx), %rbx
movq %r9, %r15
cmpq %rbx, %r9
jb 0x16c182
movq %rbx, %r15
imulq $0x28, %r14, %r14
movslq 0x14(%rdx,%r14), %r14
movq %r11, %r12
cmpq %r14, %r11
ja 0x16c196
movq %r14, %r12
subq %r12, %r15
jae 0x16c19e
xorl %r15d, %r15d
addq %r14, %r15
subq %r15, %rbx
movq %rbx, %xmm3
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
cmpq $0x9, %rbx
jb 0x16c1c9
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
ucomisd %xmm0, %xmm4
ja 0x16c1d1
incq %rcx
movq %r10, %r14
jmp 0x16c15e
xorl %eax, %eax
cmpq %rsi, %rcx
setge %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x86f01(%rip), %rdi     # 0x1f30ea
leaq 0x85933(%rip), %rsi     # 0x1f1b23
leaq 0x86f28(%rip), %rcx     # 0x1f311f
movl $0x1609, %edx           # imm = 0x1609
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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
movq 0x48(%rsi), %rcx
orq $-0x1, (%rdx)
addq %rdi, %r8
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
pushq $0x14
popq %rdi
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x16fd1f
movq 0x58(%rsi), %r10
movslq -0x14(%r10,%rdi), %r11
cmpq %r11, %r8
jle 0x16fd1c
cmpl $-0x1, -0x8(%r10,%rdi)
je 0x16fd13
movswq (%r10,%rdi), %r10
addq %r10, %rax
incq %r9
addq $0x20, %rdi
jmp 0x16fcf0
movq %r9, %rcx
subq $0x1, %rcx
jae 0x16fd28
xorl %eax, %eax
retq
movq 0x58(%rsi), %rdi
movq %rcx, %rsi
shlq $0x5, %rsi
cmpl $-0x1, 0xc(%rdi,%rsi)
je 0x16fd7c
addq %rsi, %rdi
movslq 0x4(%rdi), %rsi
cmpq %rsi, %r8
jg 0x16fd7c
movswq 0x14(%rdi), %r9
subq %r9, %rax
movslq (%rdi), %rdi
subq %rdi, %r8
cvtsi2sd %r8, %xmm0
subl %edi, %esi
incl %esi
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %r9d, %xmm1
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rax
movq %rcx, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %rsi
addq $0x14, %rdi
subq $0x1, %rsi
jb 0x16fda6
cmpl $-0x1, -0x8(%rdi)
je 0x16fda0
movswq (%rdi), %rcx
addq %rcx, %rax
addq $0x20, %rdi
jmp 0x16fd8d
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
movq %rdx, %r8
movq 0x48(%rdi), %rax
xorl %r10d, %r10d
testq %rax, %rax
cmovgq %rax, %r10
movabsq $0x14, %r11
subq $0x1, %r10
jb 0x1707b1
movq 0x58(%rdi), %rbx
movslq -0x14(%rbx,%r11), %r9
movq %r9, %rax
cqto
idivq %r8
movq %rax, %rdx
imulq %r8, %rdx
cmpq %r9, %rdx
jne 0x1707ab
addq %r8, %r9
cmpq %rcx, %r9
cmovgeq %rcx, %r9
decq %r9
movslq -0x10(%rbx,%r11), %rdx
cmpq %rdx, %r9
jne 0x1707ab
cmpl $-0x1, -0x8(%rbx,%r11)
je 0x1707ab
movq (%rsi,%rax,8), %r9
cmpq $-0x1, %r9
je 0x1707a2
movswq (%rbx,%r11), %rdx
cmpq %rdx, %r9
ja 0x1707a7
jmp 0x1707ab
movswq (%rbx,%r11), %rdx
movq %rdx, (%rsi,%rax,8)
addq $0x20, %r11
jmp 0x17074a
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r8, -0x8(%rsp)
movq %rdx, %r9
movq 0x48(%rdi), %rbx
xorl %r15d, %r15d
testq %rbx, %rbx
cmovleq %r15, %rbx
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r11d, %r11d
subq $0x1, %rbx
jb 0x170856
movq 0x58(%rdi), %r13
movslq (%r13,%r15), %r10
movq %r10, %rax
cqto
idivq %r9
movq (%rsi,%rax,8), %rdx
cmpq $-0x1, %rdx
je 0x170850
imulq %r9, %rax
leaq (%rax,%r9), %rbp
cmpq %rcx, %rbp
cmovgeq %rcx, %rbp
cmpl $-0x1, 0xc(%r13,%r15)
movabsq $0x20, %r8
je 0x170824
movswq 0x14(%r13,%r15), %r8
cmpq %r10, %rax
jne 0x170850
leaq -0x1(%rbp), %rax
movslq 0x4(%r13,%r15), %r13
cmpq %r13, %rax
jne 0x170850
cmpq %rdx, %r8
jbe 0x17084a
subq %r10, %r14
addq %rbp, %r14
subq %rdx, %r11
addq %r8, %r11
jmp 0x170850
subq %r10, %r12
addq %rbp, %r12
addq $0x20, %r15
jmp 0x1707dc
movq -0x8(%rsp), %rax
testq %rax, %rax
je 0x170863
movq %r11, (%rax)
cvtsi2sd %r12, %xmm0
cvtsi2sd %r14, %xmm1
mulsd 0x811cb(%rip), %xmm1    # 0x1f1a40
addsd %xmm0, %xmm1
leaq (%r11,%r11,4), %rax
cvtsi2sd %rax, %xmm0
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
movq 0x48(%rdi), %r11
xorl %ebx, %ebx
testq %r11, %r11
cmovleq %rbx, %r11
xorl %r15d, %r15d
xorl %r10d, %r10d
xorl %r14d, %r14d
subq $0x1, %r11
jb 0x1709b6
movq 0x58(%rdi), %r13
movslq (%r13,%rbx), %r9
movq %r9, %rax
cqto
idivq %r8
movq (%rsi,%rax,8), %rdx
cmpq $-0x1, %rdx
je 0x17099e
imulq %r8, %rax
leaq (%rax,%r8), %r12
cmpq %rcx, %r12
cmovgeq %rcx, %r12
cmpq %r9, %rax
jne 0x17099e
leaq -0x1(%r12), %rax
movslq 0x4(%r13,%rbx), %rbp
cmpq %rbp, %rax
jne 0x17099e
subq %r9, %r12
addq %r15, %r12
addq %r14, %rdx
cmpl $-0x1, 0xc(%r13,%rbx)
je 0x1709b0
movswq 0x14(%r13,%rbx), %rax
addq %rax, %r10
jmp 0x1709a4
movq %r15, %r12
movq %r14, %rdx
addq $0x20, %rbx
movq %r12, %r15
movq %rdx, %r14
jmp 0x17093e
addq $0x20, %r10
jmp 0x1709a4
leaq 0x40(%r14), %rcx
movl $0x1, %eax
cmpq %rcx, %r10
jle 0x1709ee
cvtsi2sd %r10, %xmm0
cvtsi2sd %r14, %xmm1
cvtsi2sd %r15, %xmm2
mulsd 0x7c745(%rip), %xmm2    # 0x1ed120
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1709ee
subl %r14d, %r10d
movl %r10d, 0x30(%rdi)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq $-0x2, (%r8)
movq 0x58(%rdi), %rax
testq %rsi, %rsi
je 0x171dda
shlq $0x5, %rsi
movslq 0xc(%rax,%rsi), %rdi
cmpq $-0x1, %rdi
je 0x171de3
movslq -0x14(%rax,%rsi), %r9
cmpl $-0x1, %r9d
sete %r10b
cmpl %r9d, %edi
setle %r11b
orb %r10b, %r11b
jne 0x171de0
incq %r9
movq %r9, (%rdx)
movq %rdi, (%rcx)
movswq 0x14(%rax,%rsi), %rax
movq %rax, (%r8)
jmp 0x171dec
cmpl $-0x1, 0xc(%rax)
je 0x171de3
xorl %eax, %eax
retq
pushq $-0x3
popq %rax
movq %rax, (%rcx)
movq %rax, (%rdx)
pushq $0x1
popq %rax
retq