LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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
shlb $0x6, %r8b
andb $0x40, %r8b
leal 0x3(%r8), %r9d
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 0x1c6699
movl 0x14(%rsi), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsi), %r8d
incl %r8d
jmp 0x1c66be
movq (%rcx), %r8
movq 0x10(%r8), %r9
leaq (%rax,%rax,4), %rax
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl (%r9,%rax,8), %r8d
movl 0x18(%rsi), %eax
notl %eax
addl %r8d, %eax
movl %eax, 0x14(%rsp)
subl 0x14(%rsi), %r8d
leaq 0x8(%rsp), %rax
movl %r8d, 0x10(%rax)
movq 0x38(%rcx), %r8
movq %rdx, %rsi
movq %rax, %rdx
callq 0xc74f4
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq %rcx, %rax
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c7be5
cvtsi2sd %rax, %xmm2
cvtsi2sd %r13, %xmm1
mulsd %xmm0, %xmm1
movl $0x1, %ecx
ucomisd %xmm2, %xmm1
jae 0x1c7ce0
cmpq %r15, %r13
jbe 0x1c7cde
movq %r8, 0x8(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movsd %xmm0, 0x10(%rsp)
callq 0x1c7780
movq %rax, %rbx
movl 0x8(%rbp), %edx
incl %edx
movq %rdx, %rsi
subq %r15, %rsi
movl $0x1, %ecx
movq %rbp, %rdi
callq 0x1c7780
movq %rbx, %xmm0
movq 0x69650(%rip), %xmm1    # 0x231280
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x69654(%rip), %xmm2    # 0x231290
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 0x1c7cb4
testb %dl, %dl
je 0x1c7cb4
addq %r15, %r15
cmpq %r13, %r15
jae 0x1c7cab
movq %rbx, (%r14)
movq 0x8(%rsp), %rdx
jmp 0x1c7cd4
cmpq %rax, %rbx
setb %cl
setae %dl
movl %ecx, %esi
orb %dl, %sil
cmpb $0x1, %sil
jne 0x1c7cde
testb %cl, %cl
je 0x1c7cc6
movq %rbx, (%r14)
movl $0x2, %ecx
testb %dl, %dl
movq 0x8(%rsp), %rdx
je 0x1c7ce0
movq %rax, (%rdx)
movl $0x2, %ecx
jmp 0x1c7ce0
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: hpc_check_naive(hpc_ss_t*, long, long, long, long)
int64_t hpc_check_naive(hpc_ss_t *a, int64_t n, int64_t s, int64_t e, int64_t bd)
{
	int64_t k, os, oe;
	for (k = 0; k < n; k++) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) return 1;
		if(a[k].s > (uint64_t)(e + bd)) break;
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
jle 0x1c7d40
pushq %rbx
leaq (%r8,%rcx), %r9
negq %r8
decq %rsi
addq $0x4, %rdi
xorl %eax, %eax
movl -0x4(%rdi), %r10d
movl (%rdi), %r11d
cmpq %rdx, %r10
movq %rdx, %rbx
cmovgq %r10, %rbx
cmpq %rcx, %r11
cmovgeq %rcx, %r11
subq %rbx, %r11
cmpq %r8, %r11
jge 0x1c7d43
subq $0x1, %rsi
setb %r11b
cmpq %r10, %r9
jb 0x1c7d48
addq $0xc, %rdi
testb %r11b, %r11b
je 0x1c7d08
jmp 0x1c7d48
xorl %eax, %eax
retq
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: hpc_check(hpc_ss_t*, long, long, long, long*, long)
int64_t hpc_check(hpc_ss_t *a, int64_t n, int64_t s, int64_t e, int64_t *idx, int64_t bd)
{
	if(n<=0) return 0;
	if((*idx) >= n) (*idx) = n - 1;
	if((*idx) < 0) (*idx) = 0;
	int64_t k = (*idx), os, oe;
	for (; k < n; k++) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) {
			(*idx) = k; return 1;
		}
		if(a[k].s > (uint64_t)(e + bd)) break;
	}
	os = (*idx); (*idx) = k; k = os - 1;
	for (; k >= 0; k--) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) {
			(*idx) = k; return 1;
		}
	}
	// assert(!hpc_check_naive(a, n, s, e, bd));
	return 0;
}

// Assembly:
testq %rsi, %rsi
jle 0x1c7df7
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%r8), %rax
leaq -0x1(%rsi), %r11
xorl %r10d, %r10d
testq %rax, %rax
cmovgq %rax, %r10
cmpq %rsi, %rax
cmovgeq %r11, %r10
movq %r9, %r11
negq %r11
addq %rcx, %r9
leaq (%r10,%r10,2), %rax
leaq (%rdi,%rax,4), %r14
addq $0x4, %r14
movq %r10, %rbx
movl -0x4(%r14), %r15d
movl (%r14), %r12d
cmpq %rdx, %r15
movq %rdx, %r13
cmovgq %r15, %r13
cmpq %rcx, %r12
cmovgeq %rcx, %r12
subq %r13, %r12
cmpq %r11, %r12
jge 0x1c7dfa
cmpq %r15, %r9
jb 0x1c7dc0
incq %rbx
addq $0xc, %r14
cmpq %rbx, %rsi
jne 0x1c7d8c
movq %rsi, %rbx
movq %rbx, (%r8)
leaq (%rdi,%rax,4), %rsi
addq $-0x8, %rsi
xorl %eax, %eax
testq %r10, %r10
jle 0x1c7e05
decq %r10
movl -0x4(%rsi), %edi
cmpq %rdx, %rdi
cmovleq %rdx, %rdi
movl (%rsi), %r9d
cmpq %rcx, %r9
cmovgeq %rcx, %r9
subq %rdi, %r9
addq $-0xc, %rsi
cmpq %r11, %r9
jl 0x1c7dcd
jmp 0x1c7dfd
xorl %eax, %eax
retq
movq %rbx, %r10
movq %r10, (%r8)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: cal_s_interval(ma_ug_t*, asg_arc_t*, ul_ov_t*)
void cal_s_interval(ma_ug_t *ug, asg_arc_t *p, ul_ov_t *res)
{
	memset(res, 0, sizeof((*res)));
	res->rev = (((p->ul>>32)^(p->v))&((uint32_t)1));
	res->qn = p->ul>>33; res->tn = p->v>>1;
	uint32_t ql = ug->g->seq[res->qn].len, tl = ug->g->seq[res->tn].len;
	if((p->ul>>32)&1) {
		res->qs = 0; res->qe = ((p->ol<=ql)?(p->ol):(ql));
	} else {
		res->qe = ql; res->qs = ((p->ol<=res->qe)?(res->qe-p->ol):(0));
	}

	if(p->v&1) {
		res->te = tl; res->ts = ((p->ol<=res->te)?(res->te-p->ol):(0));
	} else {
		res->ts = 0; res->te = ((p->ol<=tl)?(p->ol):(tl));
	}
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdx)
movups %xmm0, (%rdx)
movl 0x8(%rsi), %eax
xorl 0x4(%rsi), %eax
shll $0x1f, %eax
movl %eax, 0x18(%rdx)
movq (%rsi), %r9
movq %r9, %rax
shrq $0x21, %rax
movl %eax, (%rdx)
movl 0x8(%rsi), %ecx
movl %ecx, %r10d
shrl %r10d
movl %r10d, 0xc(%rdx)
movq 0x18(%rdi), %rdi
movq 0x20(%rdi), %r11
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl (%r11,%rax,8), %r8d
andl %edi, %r8d
movl (%r11,%r10,8), %eax
andl %edi, %eax
btq $0x20, %r9
jb 0x1c842c
movl %r8d, 0x8(%rdx)
andl 0xc(%rsi), %edi
xorl %r9d, %r9d
subl %edi, %r8d
cmovbl %r9d, %r8d
movl $0x4, %r9d
movl %r8d, %edi
jmp 0x1c843c
andl 0xc(%rsi), %edi
cmpl %r8d, %edi
cmovael %r8d, %edi
movl $0x8, %r9d
movl %edi, (%rdx,%r9)
testb $0x1, %cl
jne 0x1c8460
movl $0x0, 0x10(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0xc(%rsi), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
movl $0x14, %ecx
jmp 0x1c8477
movl %eax, 0x14(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0xc(%rsi), %ecx
xorl %esi, %esi
subl %ecx, %eax
cmovbl %esi, %eax
movl $0x10, %ecx
movl %eax, (%rdx,%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: infer_se(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int*, unsigned int*)
uint32_t infer_se(uint32_t qs, uint32_t qe, uint32_t ts, uint32_t te, uint32_t rev, 
uint32_t rqs, uint32_t rqe, uint32_t *rts, uint32_t *rte)
{
	if(rqs <= rqe && rqs >= qs && rqe <= qe) {
		uint32_t s_shift, e_shift, m;
		s_shift = get_offset_adjust(rqs-qs, qe-qs, te-ts);
		e_shift = get_offset_adjust(qe-rqe, qe-qs, te-ts);
		if(rev) {
			m = s_shift; s_shift = e_shift; e_shift = m;
		}
		// if(rqs == 2623 && rqe == 17620) {
		// 	fprintf(stderr, "[M::%s]\tqs::%u\tqe::%u\tts::%u\tte::%u\trqs::%u\trqe::%u\ts_shift::%u\te_shift::%u\n", __func__, 
		// 		qs, qe, ts, te, rqs, rqe, s_shift, e_shift);
		// }
		(*rts) = ts + s_shift; (*rte) = te - e_shift;
		if((*rts) <= (*rte) && (*rts) >= ts && (*rte) <= te) return 1;
	}
	(*rts) = (*rte) = (uint32_t)-1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r10
movl 0x18(%rsp), %ebp
movl %esi, %eax
subl %ebp, %eax
jb 0x1c84fb
movl %r9d, %ebx
subl %edi, %ebx
jb 0x1c84fb
cmpl %ebp, %r9d
ja 0x1c84fb
subl %edi, %esi
movl %ecx, %edi
subl %edx, %edi
cvtsi2sd %rbx, %xmm0
cvtsi2sd %rsi, %xmm1
cvtsi2sd %rdi, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rsi
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
testl %r8d, %r8d
movl %eax, %edi
cmovel %esi, %edi
cmovel %eax, %esi
addl %edx, %edi
movl %edi, (%r10)
subl %esi, %ecx
movl %ecx, (%r11)
jb 0x1c84fb
movl (%r10), %esi
cmpl %ecx, %esi
ja 0x1c84fb
movl $0x1, %eax
cmpl %edx, %esi
jae 0x1c8508
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%r11)
movl %eax, (%r10)
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: extend_batch(ul_ov_t*, long, long, long*, long*, long*, long*)
void extend_batch(ul_ov_t *z, int64_t ql, int64_t tl, int64_t *rqs, int64_t *rqe, int64_t *rts, int64_t *rte)
{
	int64_t q0, t0, q1, t1;
	(*rqs) = (*rqe) = (*rts) = (*rte) = -1;
	if(!(z->rev)) {
		q0 = z->qs; t0 = z->ts;
		if(q0 <= t0) {
			(*rqs) = z->qs - q0; (*rts) = z->ts - q0;
		} else {
			(*rqs) = z->qs - t0; (*rts) = z->ts - t0;
		}

		q1 = ql - z->qe; t1 = tl - z->te;
		if(q1 <= t1) {
			(*rqe) = z->qe + q1; (*rte) = z->te + q1;
		} else {
			(*rqe) = z->qe + t1; (*rte) = z->te + t1;
		}
	} else {
		q0 = z->qs; t0 = tl - z->te;
		if(q0 <= t0) {
			(*rqs) = z->qs - q0; (*rte) = z->te + q0;
		} else {
			(*rqs) = z->qs - t0; (*rte) = z->te + t0;
		}

		q1 = ql - z->qe; t1 = z->ts;
		if(q1 <= t1) {
			(*rqe) = z->qe + q1; (*rts) = z->ts - q1;
		} else {
			(*rqe) = z->qe + t1; (*rts) = z->ts - t1;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x20(%rsp), %rax
movq $-0x1, %r10
movq %r10, (%rax)
movq %r10, (%r9)
movq %r10, (%r8)
movq %r10, (%rcx)
cmpl $0x0, 0x18(%rdi)
movl 0x4(%rdi), %r10d
js 0x1ca989
movl 0x10(%rdi), %r11d
movq %r10, %rbx
subq %r11, %rbx
movq %r11, %r14
subq %r10, %r14
xorl %r15d, %r15d
cmpl %r11d, %r10d
cmovbeq %r15, %rbx
cmovaq %r15, %r14
movq %rbx, (%rcx)
movq %r14, (%r9)
movl 0x8(%rdi), %ecx
movl 0x14(%rdi), %edi
movq %rsi, %r9
subq %rcx, %r9
movq %rdx, %r10
subq %rdi, %r10
cmpq %r10, %r9
jle 0x1ca9cd
addq %rcx, %r10
movq %r10, (%r8)
movq %rdx, (%rax)
jmp 0x1ca9de
movl 0x14(%rdi), %r11d
movq %rdx, %rbx
subq %r11, %rbx
addq %r10, %r11
xorl %r14d, %r14d
subq %rbx, %r10
cmovgq %r10, %r14
cmovgq %rdx, %r11
movq %r14, (%rcx)
movq %r11, (%rax)
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %ecx
movq %rsi, %rdi
subq %rax, %rdi
movq %rcx, %rdx
subq %rdi, %rdx
jge 0x1ca9d8
addq %rax, %rcx
movq %rcx, (%r8)
movq $0x0, (%r9)
jmp 0x1ca9de
movq %rsi, (%r8)
addq %rdi, %r9
movq %r9, (%rax)
jmp 0x1ca9de
movq %rsi, (%r8)
movq %rdx, (%r9)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: check_ul_ov_t_consist(ul_ov_t*, ul_ov_t*, long, long, double)
uint64_t check_ul_ov_t_consist(ul_ov_t *x, ul_ov_t *y, int64_t ql, int64_t tl, double diff)
{
	if(x->qn == y->qn && x->tn == y->tn && x->rev == y->rev) {
		int64_t xqs, xqe, xts, xte, yqs, yqe, yts, yte, os, oe, ovlp;
		extend_batch(x, ql, tl, &xqs, &xqe, &xts, &xte);
		extend_batch(y, ql, tl, &yqs, &yqe, &yts, &yte);

		os = MAX(xqs, yqs); oe = MIN(xqe, yqe);
		if(oe <= os) return 0;
		ovlp = oe - os;
		if(ovlp <= ((xqe-xqs)*(1-diff))) return 0;
		if(ovlp <= ((yqe-yqs)*(1-diff))) return 0;

		os = MAX(xts, yts); oe = MIN(xte, yte);
		if(oe <= os) return 0;
		if(ovlp <= ((xte-xts)*(1-diff))) return 0;
		if(ovlp <= ((yte-yts)*(1-diff))) return 0;
		return 1;
	}
	return 0;
}

// Assembly:
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x1cab3d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movl 0xc(%rdi), %eax
cmpl 0xc(%rsi), %eax
jne 0x1cab40
movl 0x18(%r15), %eax
xorl 0x18(%rdi), %eax
js 0x1cab40
movq %rcx, %rbx
movq %rdx, %r14
movsd %xmm0, 0x10(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, (%rsp)
leaq 0x50(%rsp), %r12
leaq 0x38(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r12, %rcx
callq 0x1ca91c
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %rbp
leaq 0x40(%rsp), %r13
leaq 0x20(%rsp), %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x1ca91c
movq (%r12), %rdx
movq (%rbp), %rax
cmpq %rax, %rdx
movq %rax, %r8
cmovgq %rdx, %r8
leaq 0x38(%rsp), %rcx
movq (%rcx), %rsi
movq (%r13), %rcx
cmpq %rcx, %rsi
movq %rcx, %rdi
cmovlq %rsi, %rdi
subq %r8, %rdi
jle 0x1cab40
cvtsi2sd %rdi, %xmm0
subq %rdx, %rsi
cvtsi2sd %rsi, %xmm2
movsd 0x66854(%rip), %xmm1    # 0x231310
subsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1cab40
subq %rax, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1cab40
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rax
cmpq %rax, %rdx
movq %rax, %rdi
cmovgq %rdx, %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rcx
cmpq %rcx, %rsi
movq %rcx, %r8
cmovlq %rsi, %r8
cmpq %rdi, %r8
jle 0x1cab40
subq %rdx, %rsi
xorps %xmm2, %xmm2
cvtsi2sd %rsi, %xmm2
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1cab40
subq %rax, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm2, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setb %al
jmp 0x1cab42
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: push_emask0(kv_emask_t*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ul_ov_t*)
void push_emask0(kv_emask_t *res, uint64_t q0l, uint64_t t0l, uint64_t e0l, uint64_t q1l, uint64_t t1l, uint64_t e1l,
uint64_t end, uint64_t is_pe, uint64_t minov, ul_ov_t *p)
{
	emask_t *m;
	m = &(res->a[res->n++]); memset(m, 0, sizeof((*m))); 
	m->dir = end; m->pe = is_pe;
	m->tn = p->tn; m->rev = p->rev; m->rn = (uint32_t)-1;
	if(!end) {///left end
		assert(q0l >= minov && t0l >= minov);
		m->el = e0l; 
		m->qs = p->qs; m->qe = p->qs + q0l;
		if(!(m->rev)) {
			m->ts = p->ts; m->te = p->ts + t0l;
		} else {
			m->te = p->te; m->ts = p->te - t0l;
		}
	} else {///right end
		assert(q1l >= minov && t1l >= minov);
		m->el = e1l;
		m->qe = p->qe; m->qs = p->qe - q1l;
		if(!(m->rev)) {
			m->te = p->te; m->ts = p->te - t1l;
		} else {
			m->ts = p->ts; m->te = p->ts + t1l;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %r11
movb 0x40(%rsp), %bpl
movq 0x38(%rsp), %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x8(%rdi)
shlq $0x5, %r15
leaq (%r14,%r15), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14,%r15)
movups %xmm0, (%r14,%r15)
movl %ebx, %edi
andb $0x1f, %dil
shlb $0x5, %bpl
andb $0x20, %bpl
orb %dil, %bpl
movb %bpl, 0x1c(%r14,%r15)
movl 0xc(%r10), %edi
movl %edi, (%r14,%r15)
movl 0x18(%r10), %edi
movl %edi, %r12d
shrl $0x18, %r12d
andb $-0x80, %r12b
orb %bpl, %r12b
movb %r12b, 0x1c(%r14,%r15)
movl $0xffffffff, 0x4(%r14,%r15) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x1cbcd4
cmpq %r11, %r8
jb 0x1cbd31
cmpq %r11, %r9
jb 0x1cbd31
movq 0x30(%rsp), %rcx
movl %ecx, 0x8(%rax)
movl 0x8(%r10), %ecx
movl %ecx, 0x10(%rax)
subl %r8d, %ecx
movl %ecx, 0xc(%rax)
testl %edi, %edi
js 0x1cbd01
movl 0x14(%r10), %edx
movl %edx, 0x18(%rax)
subl %r9d, %edx
movl $0x14, %ecx
jmp 0x1cbd25
cmpq %r11, %rsi
jb 0x1cbd50
cmpq %r11, %rdx
jb 0x1cbd50
movl %ecx, 0x8(%rax)
movl 0x4(%r10), %ecx
movl %ecx, 0xc(%rax)
addl %ecx, %esi
movl %esi, 0x10(%rax)
testl %edi, %edi
js 0x1cbd15
movl 0x10(%r10), %ecx
movl %ecx, 0x14(%rax)
addl %ecx, %edx
movl $0x18, %ecx
jmp 0x1cbd25
movl 0x10(%r10), %ecx
movl %ecx, 0x14(%rax)
addl %ecx, %r9d
movl $0x18, %ecx
movl %r9d, %edx
jmp 0x1cbd25
movl 0x14(%r10), %esi
movl %esi, 0x18(%rax)
subl %edx, %esi
movl $0x14, %ecx
movl %esi, %edx
movl %edx, (%rax,%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7629a(%rip), %rdi     # 0x241fd2
leaq 0x73f1c(%rip), %rsi     # 0x23fc5b
leaq 0x76208(%rip), %rcx     # 0x241f4e
movl $0x2f92, %edx           # imm = 0x2F92
callq 0x2110
leaq 0x761da(%rip), %rdi     # 0x241f31
leaq 0x73efd(%rip), %rsi     # 0x23fc5b
leaq 0x761e9(%rip), %rcx     # 0x241f4e
movl $0x2f89, %edx           # imm = 0x2F89
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: get_emask_ovlp(idx_emask_t*, unsigned int, unsigned int, unsigned int*, unsigned int*)
emask_t* get_emask_ovlp(idx_emask_t *idx, uint32_t qn, uint32_t tn, uint32_t *occ, uint32_t *st)
{
	emask_t *a = NULL; (*occ) = 0; if(st) (*st) = (uint32_t)-1;
	if(qn >= idx->n) return a;
	uint32_t k;
	for (k = 0; k < idx->a[qn].n && idx->a[qn].a[k].tn < tn; k++);
	if(k < idx->a[qn].n && idx->a[qn].a[k].tn == tn) {
		a = idx->a[qn].a + k; if(st) (*st) = k;
		for ((*occ) = k; k < idx->a[qn].n && idx->a[qn].a[k].tn == tn; k++);
		(*occ) = k - (*occ);
		return a;
	}
	return a;
}

// Assembly:
movl $0x0, (%rcx)
testq %r8, %r8
je 0x1cd06d
movl $0xffffffff, (%r8)      # imm = 0xFFFFFFFF
cmpl %esi, 0x8(%rdi)
jbe 0x1cd0e3
movq (%rdi), %rax
movl %esi, %esi
leaq (%rsi,%rsi,2), %rdi
movq 0x8(%rax,%rdi,8), %rsi
testq %rsi, %rsi
je 0x1cd0e3
leaq (%rax,%rdi,8), %rax
movq (%rax), %rax
xorl %r9d, %r9d
xorl %edi, %edi
shlq $0x5, %r9
movl (%rax,%r9), %r10d
cmpl %edx, %r10d
jae 0x1cd0aa
incl %edi
movq %rdi, %r9
cmpq %rdi, %rsi
ja 0x1cd091
jmp 0x1cd0e3
jne 0x1cd0e3
testq %r8, %r8
je 0x1cd0b4
movl %edi, (%r8)
movl %edi, (%rcx)
movl %edi, %r10d
movl %edi, %r8d
cmpq %r10, %rsi
jbe 0x1cd0d9
movl %edi, %r8d
shlq $0x5, %r10
cmpl %edx, (%rax,%r10)
jne 0x1cd0d9
incl %r8d
movq %r8, %r10
cmpq %r8, %rsi
ja 0x1cd0c4
addq %r9, %rax
subl %edi, %r8d
movl %r8d, (%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: detect_sysm_graph_bin(idx_emask_t*, unsigned int)
void detect_sysm_graph_bin(idx_emask_t *idx, uint32_t rid)
{
	kv_emask_t *r = &(idx->a[rid]); uint32_t k, an, st; 
	for (k = 0; k < r->n; k++) {
		get_emask_ovlp(idx, r->a[k].tn, rid, &an, &st);
		r->a[k].rn = (uint32_t)-1;
		if(!an) r->a[k].rn = st;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %r13
testq %r13, %r13
je 0x1cd15c
movl %esi, %ebx
movq %rdi, %r14
leaq (%rax,%rcx,8), %rax
movq (%rax), %rbp
movl $0x1, %r15d
xorl %r12d, %r12d
shlq $0x5, %r12
movl (%rbp,%r12), %esi
movq %r14, %rdi
movl %ebx, %edx
leaq 0x4(%rsp), %rcx
movq %rsp, %r8
callq 0x1cd05b
movl $0xffffffff, 0x4(%rbp,%r12) # imm = 0xFFFFFFFF
cmpl $0x0, 0x4(%rsp)
jne 0x1cd151
leaq (%r12,%rbp), %rax
addq $0x4, %rax
movl (%rsp), %ecx
movl %ecx, (%rax)
movl %r15d, %r12d
incl %r15d
cmpq %r12, %r13
ja 0x1cd119
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: get_trans_ul_ov_t(ug_trans_t*, unsigned int, unsigned int)
ul_ov_t* get_trans_ul_ov_t(ug_trans_t *s, uint32_t qn, uint32_t tn)
{
	ha_mzl_t *f = &(s->srt_a.a[qn]);
	if(!(f->rev)) return NULL;
	kv_ul_ov_t *bl = &(s->ll[(uint32_t)(f->x)].tk);
	uint64_t k = f->rid; k <<= 32; k += f->pos;
	// if(!(bl->a[k].qn == (f->x>>32))) {
	// 	fprintf(stderr, "[M::%s::] k::%lu, qn::%u, tn::%u, x>>32::%lu, (uint32_t)x::%u\n", 
	// 	__func__, k, qn, tn, (f->x>>32), (uint32_t)(f->x));
	// }
	// if(!(bl->a[k].qn == (f->x>>32))) {
	// 	fprintf(stderr, "[M::%s::] k::%lu, bl->a[k].qn::%u, (f->x>>32)::%lu, (uint32_t)(f->x)::%u\n", 
	// 				__func__, k, bl->a[k].qn, (f->x>>32), (uint32_t)(f->x));
	// }
	assert(bl->a[k].qn == (f->x>>32));
	for (; (k < bl->n) && (bl->a[k].qn == (f->x>>32)); k++) {
		if(bl->a[k].qn == bl->a[k].tn) continue;
		if(bl->a[k].tn == tn) return &(bl->a[k]);
	}
	return NULL;
}

// Assembly:
pushq %rax
movq 0x98(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rsi
movq 0x8(%rax,%rsi,8), %rcx
testl %ecx, %ecx
jns 0x1cd1f8
leaq (%rax,%rsi,8), %rax
movq 0x20(%rdi), %rdi
movq (%rax), %r10
movl %r10d, %eax
imulq $0x68, %rax, %r8
rolq $0x20, %rcx
btrq $0x3f, %rcx
movq 0x18(%rdi,%r8), %rax
leaq (%rcx,%rcx,8), %rsi
leaq (%rsi,%rsi,2), %r9
addq %rcx, %r9
movl (%rax,%r9), %esi
shrq $0x20, %r10
cmpl %esi, %r10d
jne 0x1cd1fc
addq %r8, %rdi
addq $0x18, %rdi
movq 0x8(%rdi), %rdi
cmpq %rdi, %rcx
jae 0x1cd1f8
addq %r9, %rax
movl (%rax), %r8d
cmpl %r8d, %esi
jne 0x1cd1f8
movl 0xc(%rax), %r9d
cmpl %r9d, %r8d
sete %r8b
cmpl %edx, %r9d
setne %r9b
orb %r8b, %r9b
je 0x1cd1fa
incq %rcx
addq $0x1c, %rax
cmpq %rdi, %rcx
jb 0x1cd1cd
xorl %eax, %eax
popq %rcx
retq
leaq 0x74eae(%rip), %rdi     # 0x2420b1
leaq 0x72a51(%rip), %rsi     # 0x23fc5b
leaq 0x74eba(%rip), %rcx     # 0x2420cb
movl $0x310a, %edx           # imm = 0x310A
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: get_utepdat_t_mem(utepdat_t const*, long)
int64_t get_utepdat_t_mem(const utepdat_t *b, int64_t is_print)
{
	int64_t i, mem[7] = {0}, tt[6] = {0};
	for (i = 0; i < b->n_thread; i++) {
		get_utepdat_t_mem_tid(b, i, tt, NULL);
		mem[0] += tt[0]; mem[1] += tt[1]; mem[2] += tt[2]; mem[3] += tt[3]; mem[4] += tt[4]; mem[5] += tt[5];
	}

	for (i = 0; i < b->n; ++i) mem[6] += b->len[i];
	mem[6] += (sizeof(*(b->len))*b->n) + (sizeof(*(b->seq))*b->n);
	if(is_print) {
		for (i = 0; i < 7; i++) {
			fprintf(stderr, "[M::%s] size of buffer[%ld]: %.3fGB, %.3fKB, %ldB\n", 
				__func__, i, mem[i]/1073741824.0, mem[i]/1048576.0, mem[i]);
		}
	}

	return mem[0] + mem[1] + mem[2] + mem[3] + mem[4] + mem[5] + mem[6];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
cmpq $0x0, 0xc0(%rdi)
jle 0x1cd57d
movq %rsi, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r10d, %r10d
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %rbx, 0x18(%rsp)
movq %r10, 0x8(%rsp)
movq %r13, %rsi
leaq 0x20(%rsp), %rdx
xorl %ecx, %ecx
movq %r14, %rbx
movq %rbp, %r14
movq %r12, %rbp
movq %rdi, %r12
callq 0x1bcce9
movq %r12, %rdi
movq %rbp, %r12
movq %r14, %rbp
movq %rbx, %r14
movq 0x8(%rsp), %r10
movq 0x18(%rsp), %rbx
addq 0x20(%rsp), %r12
addq 0x28(%rsp), %r14
addq 0x30(%rsp), %rbp
addq 0x38(%rsp), %r15
addq 0x40(%rsp), %r10
addq 0x48(%rsp), %rbx
incq %r13
cmpq 0xc0(%rdi), %r13
jl 0x1cd4f8
movq %r14, 0x58(%rsp)
movq %rbp, 0x60(%rsp)
movq %r15, 0x68(%rsp)
movq %r10, 0x70(%rsp)
movq %rbx, 0x78(%rsp)
movq 0x10(%rsp), %rsi
jmp 0x1cd58d
xorl %ebx, %ebx
xorl %r10d, %r10d
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %r12, 0x50(%rsp)
movslq 0x38(%rdi), %r13
testq %r13, %r13
jle 0x1cd5b1
movq 0x48(%rdi), %rcx
xorl %eax, %eax
xorl %edx, %edx
addq (%rcx,%rdx,8), %rax
incq %rdx
cmpq %rdx, %r13
jne 0x1cd5a3
jmp 0x1cd5b3
xorl %eax, %eax
shlq $0x4, %r13
addq %rax, %r13
movq %r13, 0x80(%rsp)
testq %rsi, %rsi
jne 0x1cd5ee
addq %r13, %r12
addq %rbp, %r14
addq %r15, %r14
addq %r10, %r14
addq %rbx, %r14
addq %r12, %r14
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r10, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x2970d
movq 0x8(%rsp), %r10
jmp 0x1cd5c7
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: alignment_ul_pipeline(uldat_t*, enzyme const*)
int alignment_ul_pipeline(uldat_t* sl, const enzyme *fn)
{
    double index_time = yak_realtime();
    int i;
    for (i = 0; i < fn->n; i++){
        gzFile fp;
        if ((fp = gzopen(fn->a[i], "r")) == 0) return 0;
        sl->ks = kseq_init(fp);
        kt_pipeline(3, worker_ul_pipeline, sl, 3);
        kseq_destroy(sl->ks);
        gzclose(fp);
    }
	sl->hits.total_base = sl->total_base;
	sl->hits.total_pair = sl->total_pair;
    fprintf(stderr, "[M::%s::%.3f] ==> Qualification\n", __func__, yak_realtime()-index_time);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1365ef
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1cd68d
leaq 0x721ca(%rip), %r12     # 0x23f7f7
leaq 0xc8(%rip), %r13        # 0x1cd6fc
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1cd6a1
movq %rax, %rbp
movq %rax, %rdi
callq 0x1cd6b2
movq %rax, 0x48(%rbx)
movl $0x3, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x1090f4
movq 0x48(%rbx), %rdi
callq 0x1cdb7d
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1cd637
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x29775
movl $0x1, %eax
jmp 0x1cd6a3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: push_uc_block_t(ug_opt_t const*, kv_ul_ov_t*, char**, unsigned long*, unsigned long)
void push_uc_block_t(const ug_opt_t *uopt, kv_ul_ov_t *z, char **seq, uint64_t *len, uint64_t b_id)
{
	uint64_t k, l, rid;
	for (k = 1, l = 0; k <= z->n; k++) {
        if(k == z->n || z->a[k].qn != z->a[l].qn) {
			rid = b_id + z->a[l].qn;
			// fprintf(stderr, "rid->%lu, b_id->%lu, l->%lu, z->a[l].qn->%u, len[z->a[l].qn]->%lu, seq[z->a[l].qn]->%u\n", rid, b_id, l, z->a[l].qn, len[z->a[l].qn], seq[z->a[l].qn]?1:0);
			append_ul_t(&UL_INF, &rid, NULL, 0, seq[z->a[l].qn], len[z->a[l].qn], z->a + l, k - l, P_CHAIN_COV, uopt, 0);
			// append_ul_t_back(&UL_INF, &rid, NULL, 0, seq[z->a[l].qn], len[z->a[l].qn], z->a + l, k - l, P_CHAIN_COV);
			l = k;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x1cdca1
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x1, %ebp
movl $0x1c, %ebx
xorl %eax, %eax
movq (%r12), %r10
leaq (%rax,%rax,8), %rdx
cmpq %rcx, %rbp
jne 0x1cdc28
leaq (%rdx,%rdx,2), %rcx
addq %rax, %rcx
movl (%r10,%rcx), %esi
jmp 0x1cdc39
leaq (%rdx,%rdx,2), %rsi
addq %rax, %rsi
movl (%r10,%rsi), %esi
cmpl %esi, (%r10,%rbx)
je 0x1cdc91
leaq (%rdx,%rdx,2), %rcx
addq %rax, %rcx
addq %rcx, %r10
movl %esi, %ecx
movq 0x8(%rsp), %rdx
addq %rcx, %rdx
movq %rdx, 0x10(%rsp)
movq (%r15,%rcx,8), %r8
movq (%r14,%rcx,8), %r9
movq %rbp, %r11
subq %rax, %r11
leaq 0xc86b1(%rip), %rdi     # 0x296318
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movss 0x71f40(%rip), %xmm0    # 0x23fbb8
pushq $0x0
pushq %r13
pushq %r11
pushq %r10
callq 0x3535a
addq $0x20, %rsp
movq 0x8(%r12), %rcx
movq %rbp, %rax
incq %rbp
addq $0x1c, %rbx
cmpq %rcx, %rbp
jbe 0x1cdc0e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: init_ucr_file_t(uldat_t*, char*, unsigned long)
int32_t init_ucr_file_t(uldat_t *sl, char* file, uint64_t mode)
{
	if(mode == 1 || mode == 2) {
		char *gfa_name = (char*)malloc(strlen(file)+25);
		sprintf(gfa_name, "%s.uidx.ucr.bin", file);
		CALLOC(sl->ucr_s, 1); 
		sl->ucr_s->flag = mode;
		sl->ucr_s->fp = fopen(gfa_name, mode==1?"w":"r");
		if (!(sl->ucr_s->fp)) {
			free(gfa_name);
			return 0;
		}
		free(gfa_name);
		return 1;
	}	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq -0x1(%rdx), %rax
xorl %ebp, %ebp
cmpq $0x1, %rax
ja 0x1cdd42
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x7bb3b(%rip), %rsi     # 0x249823
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
movl $0x1, %edi
movl $0x68, %esi
callq 0x2120
cmpq $0x1, %r14
movq %rax, 0x40(%rbx)
movq %r14, 0x60(%rax)
leaq 0x7a9cb(%rip), %rax     # 0x2486e2
leaq 0x71ad9(%rip), %rsi     # 0x23f7f7
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x2210
movq 0x40(%rbx), %rcx
movq %rax, (%rcx)
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
movq %r15, %rdi
callq 0x2220
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: destory_ucr_file_t(uldat_t*)
void destory_ucr_file_t(uldat_t *sl)
{
	if(sl->ucr_s) {
		free(sl->ucr_s->u.r_base.a);
		free(sl->ucr_s->u.bb.a);
		free(sl->ucr_s->u.N_site.a);

		fclose(sl->ucr_s->fp);
		free(sl->ucr_s);
		sl->ucr_s = NULL;
	}
}

// Assembly:
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x1cdd9b
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq 0x38(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq (%rax), %rdi
callq 0x2190
movq 0x40(%rbx), %rdi
callq 0x2220
movq $0x0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: rov2uov(unsigned long, ul_idx_t const*, utg_rid_dt*, uc_block_t*, ul_ov_t*, unsigned int, long)
uint64_t rov2uov(uint64_t rid, const ul_idx_t *uref, utg_rid_dt *ru_map, uc_block_t *rovlp, ul_ov_t *res, uint32_t adjust_rev, int64_t ulid)
{
	uint64_t ori = ru_map->u&1, ts, te;
	if(!ori) {
		ts = rovlp->ts; te = rovlp->te;
	} else {
		ts = uref->r_ug->rg->seq[rid].len - rovlp->te;
		te = uref->r_ug->rg->seq[rid].len - rovlp->ts;
	}
	// if(ulid == 14714) {
	// 	fprintf(stderr, "[M::%s::]\tori::%lu\trovlp->rev::%u\tro_t::[%u, %u)\tt::[%lu, %lu)\toff::%u\n", __func__, 
	// 		ori, rovlp->rev, rovlp->ts, rovlp->te, ts, te, ru_map->off);
	// }
	ts += ru_map->off; te += ru_map->off;
	if(ts >= 0 && te <= uref->ug->g->seq[ru_map->u>>1].len) {
		memset(res, 0, sizeof(*res));
		res->qn = 0; res->qs = rovlp->qs; res->qe = rovlp->qe; 
		res->tn = ru_map->u>>1; res->ts = ts; res->te = te; 
		res->el = rovlp->el; res->rev = (rovlp->rev == ori?0:1);
		if(adjust_rev && res->rev) {///for linear chaining
			res->ts = uref->ug->g->seq[res->tn].len - te;
			res->te = uref->ug->g->seq[res->tn].len - ts;
		}
		return 1;
	} 
	return 0;
	// if(ulid == 14714) {
	// 	fprintf(stderr, "[M::%s::]\tulen::%u\trlen::%u\tro_t::[%u, %u)\tt::[%lu, %lu)\toff::%u\n", __func__, 
	// 		uref->ug->g->seq[res->tn].len, uref->r_ug->rg->seq[rid].len, rovlp->ts, rovlp->te, ts, te, ru_map->off);
	// }
}

// Assembly:
movl (%rdx), %r10d
testb $0x1, %r10b
jne 0x1ce42f
movl 0xc(%rcx), %eax
movl 0x10(%rcx), %r11d
jmp 0x1ce44f
movq 0x28(%rsi), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
andl (%rax,%rdi,8), %r11d
movl %r11d, %eax
subl 0x10(%rcx), %eax
subl 0xc(%rcx), %r11d
pushq %r14
pushq %rbx
movl %r11d, %r11d
movl 0x4(%rdx), %edi
addq %rdi, %r11
movq (%rsi), %rbx
movq 0x18(%rbx), %rbx
movq 0x20(%rbx), %rbx
movl %r10d, %r14d
shrl %r14d
movl (%rbx,%r14,8), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpq %rbx, %r11
jbe 0x1ce482
xorl %eax, %eax
jmp 0x1ce50b
andl $0x1, %r10d
addl %eax, %edi
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r8)
movups %xmm0, (%r8)
movq 0x4(%rcx), %rax
movq %rax, 0x4(%r8)
movl (%rdx), %edx
shrl %edx
movl %edx, 0xc(%r8)
movl %edi, 0x10(%r8)
movl %r11d, 0x14(%r8)
movl 0x20(%rcx), %eax
shll $0x17, %eax
andl $0x40000000, %eax       # imm = 0x40000000
movl %eax, 0x18(%r8)
movl 0x20(%rcx), %ecx
shrl $0x5, %ecx
andl $0x1, %ecx
xorl %ebx, %ebx
cmpl %ecx, %r10d
setne %bl
shll $0x1f, %ebx
orl %eax, %ebx
movl %ebx, 0x18(%r8)
movl $0x1, %eax
testl %r9d, %r9d
je 0x1ce50b
cmpl %ecx, %r10d
je 0x1ce50b
movq (%rsi), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl (%rcx,%rdx,8), %r9d
andl %esi, %r9d
subl %r11d, %r9d
movl %r9d, 0x10(%r8)
andl (%rcx,%rdx,8), %esi
subl %edi, %esi
movl %esi, 0x14(%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: get_add_cov_score(ul_idx_t const*, long, long, long, long, long, long*)
uint64_t get_add_cov_score(const ul_idx_t *uref, int64_t ps, int64_t pe, int64_t cs, int64_t ce, int64_t uid, int64_t *cov_i)
{
	int64_t os = MAX(ps, cs), oe = MIN(pe, ce);
	int64_t ovlp = ((oe > os)? (oe - os):0);
	// fprintf(stderr, "ovlp:%ld, os:%ld, oe:%ld, ps:%ld, pe:%ld, cs:%ld, ce::%ld\n", ovlp, os, oe, ps, pe, cs, ce);
	if(ovlp > 0) {
		return (os>cs?retrieve_u_cov_region(uref, uid, 0, cs, os, cov_i):0) + 
						(ce>oe?retrieve_u_cov_region(uref, uid, 0, oe, ce, cov_i):0);
	} 

	return retrieve_u_cov_region(uref, uid, 0, cs, ce, cov_i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbx
movq %rdi, %r12
movq 0x40(%rsp), %r14
cmpq %rcx, %rsi
movq %rcx, %r8
cmovgq %rsi, %r8
cmpq %rbx, %rdx
movq %rbx, %rbp
cmovlq %rdx, %rbp
cmpq %r8, %rbp
jle 0x1ce71b
movq %rdx, %r13
cmpq %rcx, %rsi
jle 0x1ce73c
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %r9
callq 0x363d1
movq %rax, %rcx
jmp 0x1ce73e
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %r8
movq %r14, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x363d1
xorl %ecx, %ecx
cmpq %rbx, %r13
jge 0x1ce761
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rcx, %r15
movq %rbp, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x363d1
movq %r15, %rcx
jmp 0x1ce763
xorl %eax, %eax
addq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: gen_end_coord(ul_ov_t*, long, long, long*, long*, long*, long*)
void gen_end_coord(ul_ov_t *z, int64_t qlen, int64_t tlen, int64_t *r_qs, int64_t *r_qe, int64_t *r_ts, int64_t *r_te)
{
    int64_t qs, qe, ts, te, qtail, ttail;
    qs = z->qs; qe = z->qe; ts = z->ts; te = z->te;
    if(z->rev) {
        ts = tlen - z->te; te = tlen - z->ts;
    }
    
    if(qs <= ts) {
        ts -= qs; qs = 0;
    } else {
        qs -= ts; ts = 0;
    }

    qtail = qlen - qe; ttail = tlen - te;
    if(qtail <= ttail) {
        qe = qlen; te += qtail;
    }
    else {
        te = tlen; qe += ttail; 
    }

	if(r_qs) (*r_qs) = qs; if(r_qe) (*r_qe) = qe;
	if(r_ts) (*r_ts) = ts; if(r_te) (*r_te) = te;
    if(z->rev) {
        if(r_ts) (*r_ts) = tlen - te; 
		if(r_te) (*r_te) = tlen - ts;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x4(%rdi), %ebx
movl 0x8(%rdi), %r11d
movl 0x10(%rdi), %eax
movl 0x14(%rdi), %r15d
movq %rdx, %r14
subq %r15, %r14
movq %rdx, %r10
subq %rax, %r10
cmpl $0x0, 0x18(%rdi)
cmovnsq %rax, %r14
cmovnsq %r15, %r10
xorl %eax, %eax
movq %r14, %r15
subq %rbx, %r15
cmovgeq %r15, %rax
movq %rsi, %r15
subq %r11, %r15
movq %rdx, %r12
subq %r10, %r12
addq %r15, %r10
addq %r12, %r11
cmpq %r12, %r15
cmovgq %rdx, %r10
cmovleq %rsi, %r11
testq %rcx, %rcx
je 0x1cf96b
xorl %esi, %esi
subq %r14, %rbx
cmovgq %rbx, %rsi
movq %rsi, (%rcx)
testq %r8, %r8
je 0x1cf973
movq %r11, (%r8)
movq 0x28(%rsp), %rcx
testq %r9, %r9
je 0x1cf980
movq %rax, (%r9)
testq %rcx, %rcx
je 0x1cf988
movq %r10, (%rcx)
cmpl $0x0, 0x18(%rdi)
jns 0x1cf9a7
testq %r9, %r9
je 0x1cf99c
movq %rdx, %rsi
subq %r10, %rsi
movq %rsi, (%r9)
testq %rcx, %rcx
je 0x1cf9a7
subq %rax, %rdx
movq %rdx, (%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: is_end_check(unsigned int, ul_ov_t*, asg_t*)
uint32_t is_end_check(uint32_t v, ul_ov_t *z, asg_t *g)
{
	if(v&1) {
		if(z->ts==0) return 1;
	} else {
		if(z->te==g->seq[v>>1].len) return 1;
	}
	
	return 0;
}

// Assembly:
testb $0x1, %dil
jne 0x1cf9ce
movq 0x20(%rdx), %rax
shrl %edi
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl (%rax,%rdi,8), %ecx
movl $0x1, %eax
cmpl %ecx, 0x14(%rsi)
jne 0x1cf9d4
retq
cmpl $0x0, 0x10(%rsi)
je 0x1cf9d7
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: extend_end_coord(mg_lchain_t*, ul_ov_t*, long, long, long*, long*, long*, long*)
void extend_end_coord(mg_lchain_t *li, ul_ov_t *ui, const int64_t qlen, const int64_t rlen, int64_t *r_qs, int64_t *r_qe, int64_t *r_rs, int64_t *r_re)
{
    int64_t qs = 0, qe = 0, rs = 0, re = 0, rev = 0, qtail = 0, rtail = 0;
	if(li) {
		qs = li->qs; qe = li->qe; rs = li->rs; re = li->re; rev = li->v&1; 
		if(rev) {
			rs = rlen - li->re; re = rlen - li->rs;
		}
	}
	if(ui) {
		qs = ui->qs; qe = ui->qe; rs = ui->ts; re = ui->te; rev = ui->rev; 
		if(rev) {
        rs = rlen - ui->te; re = rlen - ui->ts;
    	}
	}
    
    
    
    if(qs <= rs) {
        rs -= qs; qs = 0;
    } else {
        qs -= rs; rs = 0;
    }

    qtail = qlen - qe; rtail = rlen - re;
    if(qtail <= rtail) {
        qe = qlen; re += qtail;
    }
    else {
        re = rlen; qe += rtail; 
    }

	if(r_qs) (*r_qs) = qs; if(r_qe) (*r_qe) = qe;
	if(r_rs) (*r_rs) = rs; if(r_re) (*r_re) = re;
    if(rev) {
        if(r_rs) (*r_rs) = rlen - re; 
		if(r_re) (*r_re) = rlen - rs;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1d0337
movslq 0x14(%rdi), %r11
movslq 0x18(%rdi), %r10
movslq 0xc(%rdi), %rbx
movslq 0x10(%rdi), %rax
testb $0x1, 0x8(%rdi)
je 0x1d0341
movq %rcx, %r14
subq %rax, %r14
movq %rcx, %rax
subq %rbx, %rax
movl $0x1, %edi
movq %r14, %rbx
jmp 0x1d0343
xorl %r11d, %r11d
xorl %r10d, %r10d
xorl %ebx, %ebx
xorl %eax, %eax
xorl %edi, %edi
testq %rsi, %rsi
je 0x1d0374
movl 0x4(%rsi), %r11d
movl 0x8(%rsi), %r10d
movl 0x10(%rsi), %ebx
movl 0x14(%rsi), %eax
cmpl $0x0, 0x18(%rsi)
js 0x1d0360
xorl %edi, %edi
jmp 0x1d0374
movq %rcx, %rsi
subq %rax, %rsi
movq %rcx, %rax
subq %rbx, %rax
movl $0x1, %edi
movq %rsi, %rbx
xorl %esi, %esi
movq %rbx, %r14
subq %r11, %r14
cmovgeq %r14, %rsi
movq %rdx, %r14
subq %r10, %r14
movq %rcx, %r15
subq %rax, %r15
addq %r14, %rax
addq %r15, %r10
cmpq %r15, %r14
cmovleq %rdx, %r10
cmovgq %rcx, %rax
testq %r8, %r8
je 0x1d03ae
xorl %edx, %edx
subq %rbx, %r11
cmovgq %r11, %rdx
movq %rdx, (%r8)
movq 0x20(%rsp), %r8
testq %r9, %r9
je 0x1d03bb
movq %r10, (%r9)
movq 0x28(%rsp), %rdx
testq %r8, %r8
je 0x1d03c8
movq %rsi, (%r8)
testq %rdx, %rdx
je 0x1d03d0
movq %rax, (%rdx)
testq %rdi, %rdi
je 0x1d03ee
testq %r8, %r8
je 0x1d03e3
movq %rcx, %rdi
subq %rax, %rdi
movq %rdi, (%r8)
testq %rdx, %rdx
je 0x1d03ee
subq %rsi, %rcx
movq %rcx, (%rdx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: select_mul_way_nodes(mg_pathv_t*, long, vec_sp_node_t*, float, int, unsigned long*)
int64_t select_mul_way_nodes(mg_pathv_t *a, int64_t a_n, vec_sp_node_t *out, float len_dif, int32_t m_pathn, uint64_t *flag)
{
	int64_t i, k, pd, kd, occ, tt = 0; uint32_t pp; mg_pathv_t *p = NULL;
	if(a_n > 1) radix_sort_mg_pathv_t_d_srt(a, a + a_n);
	for (i = 0; i < a_n; i++) {
		p = &(a[i]); pp = (p->d<<1)>>1; pd = out->a[p->pre]->di>>32; occ = 1;
		
		if(p->d&0x80000000) break;
		for (k = 0; k < a_n; k++) {
			if(k == i) continue; ///same alignment
			if(((a[k].d<<1)>>1) == pp) continue; //same path
			if(a[k].v!=p->v) continue;
			kd = out->a[a[k].pre]->di>>32;
			if(kd >= (pd*(1-len_dif)) && kd <= (pd*(1+len_dif))) occ++;
		}
		if(occ >= m_pathn) {
			flag[p->pre] = 1; tt++;
		}
	}

	return tt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x2, %rsi
jl 0x1d05f5
leaq (%r14,%r14,2), %rax
leaq (%r15,%rax,4), %rsi
movq %r15, %rdi
movss %xmm0, 0xc(%rsp)
callq 0x1a0320
movss 0xc(%rsp), %xmm0
jmp 0x1d05ff
cmpq $0x1, %r14
jne 0x1d06dc
movq (%r12), %rcx
movss 0x5dac5(%rip), %xmm1    # 0x22e0d0
movaps %xmm1, %xmm5
subss %xmm0, %xmm5
addss %xmm1, %xmm0
movslq %ebp, %rdx
leaq 0x8(%r15), %rsi
xorl %edi, %edi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %eax, %eax
leaq (%rdi,%rdi,2), %r10
movl 0x4(%r15,%r10,4), %r9d
testl %r9d, %r9d
js 0x1d06de
leaq (%r15,%r10,4), %r11
movslq 0x8(%r11), %r10
movq (%rcx,%r10,8), %r12
movl 0x4(%r12), %r12d
xorps %xmm1, %xmm1
cvtsi2ss %r12, %xmm1
movaps %xmm5, %xmm2
mulss %xmm1, %xmm2
mulss %xmm0, %xmm1
movl $0x1, %r12d
movq %rsi, %r13
xorl %ebp, %ebp
cmpq %rbp, %rdi
je 0x1d06ad
movl -0x4(%r13), %ebx
andl %r8d, %ebx
cmpl %r9d, %ebx
je 0x1d06ad
movl -0x8(%r13), %ebx
cmpl (%r11), %ebx
jne 0x1d06ad
movslq (%r13), %rbx
movq (%rcx,%rbx,8), %rbx
movl 0x4(%rbx), %ebx
xorps %xmm3, %xmm3
cvtsi2ss %rbx, %xmm3
movaps %xmm2, %xmm4
cmpleps %xmm3, %xmm4
cmpleps %xmm1, %xmm3
andps %xmm4, %xmm3
movd %xmm3, %ebx
andl $0x1, %ebx
addq %rbx, %r12
incq %rbp
addq $0xc, %r13
cmpq %rbp, %r14
jne 0x1d0668
cmpq %rdx, %r12
jl 0x1d06ce
movq 0x10(%rsp), %r9
movq $0x1, (%r9,%r10,8)
incq %rax
incq %rdi
cmpq %r14, %rdi
jne 0x1d0627
jmp 0x1d06de
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: hc_chain_backtrack(long, long const*, unsigned long const*, unsigned long*, unsigned long*, unsigned long*, long*, long*)
int64_t hc_chain_backtrack(int64_t n, const int64_t *f, const uint64_t *p, uint64_t *srt, uint64_t *u, uint64_t *v, 
int64_t *n_u_, int64_t *n_v_)
{
	if(n_u_) *n_u_ = 0; if(n_v_) *n_v_ = 0;
	int64_t i, k, n_v, n_srt, n_v0, n_u, sc;
	if (n == 0) return 0;
	// v[] keeps the peak score up to i; f[] is the score ending at i, not always the peak
	*n_u_ = *n_v_ = 0;	
	for (i = 0, k = 0; i < n; ++i) {
		if(f[i] >= 0) {
			srt[k] = (uint64_t)f[i]; srt[k] <<= 32; srt[k] |= (((uint64_t)i)<<1); k++;
		}
	}
	n_srt = k;
	radix_sort_gfa64(srt, srt + n_srt); ///sort by score

	///from the largest to the smallest
	for (k = n_srt-1, n_v = n_u = 0; k >= 0; --k) { // precompute n_u
		n_v0 = n_v;
		for (i = ((uint32_t)srt[k])>>1; i >= 0 && (srt[i]&1) == 0; i = (p[i]==(uint64_t)-1?-1:p[i])) {
			v[n_v++] = i; srt[i] |= 1;
		}
		if(n_v <= n_v0) continue;
		sc = i < 0? srt[k]>>32: (int64_t)(srt[k]>>32)-f[i]; 
		u[n_u++] = (((uint64_t)sc)<<32) | ((uint64_t)(n_v-n_v0));
	}

	if(n_u_) *n_u_ = n_u; if(n_v_) *n_v_ = n_v;
	return n_u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
testq %rdx, %rdx
je 0x1d0eb1
movq $0x0, (%rdx)
testq %rcx, %rcx
je 0x1d0ebd
movq $0x0, (%rcx)
xorl %eax, %eax
testq %rdi, %rdi
je 0x1d0f85
movq %rax, (%rcx)
movq %rax, (%rdx)
testq %rdi, %rdi
jle 0x1d0f66
xorl %eax, %eax
xorl %ebp, %ebp
movq (%r13,%rax,4), %rcx
testq %rcx, %rcx
js 0x1d0ef3
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, (%rbx,%rbp,8)
incq %rbp
addq $0x2, %rax
decq %rdi
jne 0x1d0edb
leaq (%rbx,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x19dd99
testq %rbp, %rbp
jle 0x1d0f71
xorl %eax, %eax
xorl %ecx, %ecx
movq %rcx, %rdi
movq %rbp, %rdx
decq %rbp
movl -0x8(%rbx,%rdx,8), %esi
shrl %esi
testb $0x1, (%rbx,%rsi,8)
jne 0x1d0f3a
movq %rsi, (%r14,%rcx,8)
orb $0x1, (%rbx,%rsi,8)
incq %rcx
movq (%r12,%rsi,8), %rsi
testq %rsi, %rsi
jns 0x1d0f20
movq %rcx, %r8
subq %rdi, %r8
jle 0x1d0f5e
movl 0x4(%rbx,%rbp,8), %edi
testq %rsi, %rsi
js 0x1d0f50
subq (%r13,%rsi,8), %rdi
shlq $0x20, %rdi
orq %r8, %rdi
movq %rdi, (%r15,%rax,8)
incq %rax
cmpq $0x1, %rdx
jg 0x1d0f11
jmp 0x1d0f75
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x19dd99
xorl %ecx, %ecx
xorl %eax, %eax
movq 0x40(%rsp), %rdx
movq %rax, (%rdx)
movq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: ck_hq_chain(mg_lchain_t*, mg_lchain_t*, ma_ug_t*, ul_idx_t const*, ug_opt_t const*, long, double)
uint64_t ck_hq_chain(mg_lchain_t *li, mg_lchain_t *lj, ma_ug_t *ug, const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, double ng_diff_thre)
{
	if(lj->qe+G_CHAIN_INDEL <= li->qs) return 0;
	if(lj->qs >= li->qs/**+G_CHAIN_INDEL**/) return 0;
	ul_ov_t ui, uj; int64_t qo, share
;	set_ul_ov_t_by_mg_lchain_t(&ui, li); set_ul_ov_t_by_mg_lchain_t(&uj, lj);
	qo = infer_rovlp(&ui, &uj, NULL, NULL, NULL, ug); ///overlap length in query (UL read)
	if(li->v!=lj->v && get_ecov_adv(uref, uopt, li->v^1, lj->v^1, bw, ng_diff_thre, qo, 0, &share)) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %r9, %rbx
movq %rcx, %r15
movq %rdx, %r9
movl 0x18(%rsi), %eax
leal 0x80(%rax), %ecx
movl 0x14(%rdi), %edx
cmpl %edx, %ecx
jle 0x1d107b
movq %rsi, %r12
movl 0x14(%rsi), %ecx
cmpl %edx, %ecx
jge 0x1d107b
movq %r8, %r14
movq %rdi, %r13
movsd %xmm0, 0x8(%rsp)
movl 0x8(%rdi), %esi
movl %esi, %r8d
shrl %r8d
leaq 0x34(%rsp), %rdi
movl %r8d, 0xc(%rdi)
shll $0x1f, %esi
movl %esi, 0x18(%rdi)
movq 0xc(%r13), %rsi
movq %rsi, 0x10(%rdi)
movl %edx, 0x4(%rdi)
movl 0x18(%r13), %edx
movl %edx, 0x8(%rdi)
movl 0x8(%r12), %edx
movl %edx, %r8d
shrl %r8d
leaq 0x18(%rsp), %rsi
movl %r8d, 0xc(%rsi)
shll $0x1f, %edx
movl %edx, 0x18(%rsi)
movq 0xc(%r12), %rdx
movq %rdx, 0x10(%rsi)
movl %ecx, 0x4(%rsi)
movl %eax, 0x8(%rsi)
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6ea22
movl 0x8(%r13), %edx
movl 0x8(%r12), %ecx
cmpl %ecx, %edx
je 0x1d107b
xorl $0x1, %edx
xorl $0x1, %ecx
leaq 0x10(%rsp), %r10
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %r8
movsd 0x8(%rsp), %xmm0
movq %rax, %r9
pushq %r10
pushq $0x0
callq 0x1ab640
addq $0x10, %rsp
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x1d107d
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq