LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: update_exist_chain_adv(ul_idx_t const*, ul_ov_t*, unsigned long*, long, long, mg_lchain_t*)
void update_exist_chain_adv(const ul_idx_t *uref, ul_ov_t *ch, uint64_t *idx, int64_t idx_n, int64_t tid, mg_lchain_t *res)
{
	int64_t i, j, cov_i, sc = 0; memset(res, 0, sizeof(*res));
	ul_ov_t *li, *lj;
	if(idx_n <= 0) return;
	i = 0; 
	res->qs = (ch[idx[i]].qs<<1)>>1; res->qe = ch[idx[i]].qe;
	res->rs = ch[idx[i]].ts; res->re = ch[idx[i]].te;
	for (i = 0; i < idx_n; i++) {
		li = &(ch[idx[i]]); 

		if((int64_t)((li->qs<<1)>>1) < res->qs) res->qs = ((li->qs<<1)>>1); 
		if((int64_t)li->ts < res->rs) res->rs = li->ts;
		if((int64_t)li->qe > res->qe) res->qe = li->qe;
		if((int64_t)li->te > res->re) res->re = li->te;

		cov_i = 0; j = i - 1;
		if(j >= 0) {
			lj = &(ch[idx[j]]); 
			sc += get_add_cov_score(uref, lj->ts, lj->te, li->ts, li->te, tid, &cov_i);
		} else {
			sc += retrieve_u_cov_region(uref, tid, 0, li->ts, li->te, &cov_i);
		}
	}
	res->score = (sc>0x3FFFFFFF?0x3FFFFFFF:sc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r9)
movups %xmm0, (%r9)
movq $0x0, 0x20(%r9)
testq %rcx, %rcx
jle 0x1c89ed
movq %r9, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq (%rdx), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl 0x4(%rsi,%rcx), %eax
andl %edx, %eax
movl %eax, 0x14(%r9)
movl 0x8(%rsi,%rcx), %eax
movl %eax, 0x18(%r9)
movl 0x10(%rsi,%rcx), %eax
movl %eax, 0xc(%r9)
movl 0x14(%rsi,%rcx), %eax
movl %eax, 0x10(%r9)
xorl %ebp, %ebp
xorl %r14d, %r14d
movq (%r12,%rbp,8), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movl 0x4(%r13,%rax), %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl %edx, %ecx
cmpl 0x14(%rbx), %ecx
jge 0x1c8945
movl %ecx, 0x14(%rbx)
addq %r13, %rax
movl 0x10(%rax), %ecx
movslq 0xc(%rbx), %rdx
cmpq %rdx, %rcx
jge 0x1c8957
movl %ecx, 0xc(%rbx)
movl 0x8(%rax), %edx
movslq 0x18(%rbx), %rsi
cmpq %rsi, %rdx
jle 0x1c8966
movl %edx, 0x18(%rbx)
movl 0x14(%rax), %r8d
movslq 0x10(%rbx), %rax
cmpq %rax, %r8
jle 0x1c8977
movl %r8d, 0x10(%rbx)
movq $0x0, 0x20(%rsp)
testq %rbp, %rbp
je 0x1c89b9
movq -0x8(%r12,%rbp,8), %rax
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
movl 0x10(%r13,%rdx), %esi
movl 0x14(%r13,%rdx), %edx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r9
callq 0x1c4710
jmp 0x1c89cf
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %r9
callq 0x36ec9
addq %rax, %r14
incq %rbp
cmpq %rbp, %r15
jne 0x1c8922
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq %rax, %r14
cmovlq %r14, %rax
movl %eax, 0x1c(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: extract_rovlp_by_ug(utg_ct_t*, mg_lchain_t*, vec_mg_lchain_t*, long)
int64_t extract_rovlp_by_ug(utg_ct_t *p, mg_lchain_t* o, vec_mg_lchain_t *chains, int64_t tOff)
{
	int64_t rs, re;
	rs = MAX((int32_t)p->s, o->rs); re = MIN((int32_t)p->e, o->re);
	if(rs > re) return 0;
	mg_lchain_t *x = NULL;
	kv_pushp(mg_lchain_t, *chains, &x); memset(x, 0, sizeof(*x));
	x->v = (p->x>>1)<<1; x->v += (((o->v&1) == (p->x&1))?0:1); x->rs = rs; x->re = re; x->off = tOff; 
	x->hash_pre = (uint32_t)-1; x->dist_pre = -1; x->qs = x->qe = -1;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl 0x4(%rdi), %eax
movl 0x8(%rdi), %ecx
movl 0xc(%rsi), %ebp
movl 0x10(%rsi), %r13d
cmpl %ebp, %eax
cmovgl %eax, %ebp
cmpl %r13d, %ecx
cmovll %ecx, %r13d
cmpl %r13d, %ebp
jle 0x1c8eb2
xorl %eax, %eax
jmp 0x1c8f55
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdx), %rax
cmpq %rax, 0x8(%rdx)
jne 0x1c8eef
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x10(%r12)
movq (%r12), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, (%r12)
movq (%r12), %rax
movq 0x8(%r12), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r12)
leaq (%rcx,%rcx,4), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
movq $0x0, 0x20(%rax,%rcx,8)
movl (%r15), %edx
movl %edx, %esi
andl $-0x2, %esi
movl %esi, 0x8(%rax,%rcx,8)
movl 0x8(%r14), %esi
andl $0x1, %esi
xorl %edx, %esi
movl %esi, 0x8(%rax,%rcx,8)
movl %ebp, 0xc(%rax,%rcx,8)
movl %r13d, 0x10(%rax,%rcx,8)
movl %ebx, (%rax,%rcx,8)
movq $-0x1, %rdx
movq %rdx, 0x20(%rax,%rcx,8)
movq %rdx, 0x14(%rax,%rcx,8)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: convert_mg_lchain_t(utg_ct_t*, mg_lchain_t*)
int64_t convert_mg_lchain_t(utg_ct_t *p, mg_lchain_t *o)
{
	int64_t rs = p->s, re = p->e;
	rs = MAX(rs, o->rs); re = MIN(re, o->re);
	assert(rs < re);	
	if(!(p->x&1)) {
		o->rs = rs-p->s; o->re = re-p->s;
	} else {
		o->rs = p->e-re; o->re = p->e-rs;
	}
	return 1;
}

// Assembly:
movl 0x4(%rdi), %edx
movl 0x8(%rdi), %r8d
movslq 0xc(%rsi), %rcx
cmpq %rcx, %rdx
cmovgq %rdx, %rcx
movslq 0x10(%rsi), %rax
cmpq %rax, %r8
cmovlq %r8, %rax
cmpq %rax, %rcx
jge 0x1caa19
testb $0x1, (%rdi)
jne 0x1caa02
subl %edx, %ecx
movl %ecx, 0xc(%rsi)
subl %edx, %eax
jmp 0x1caa10
movl %r8d, %edx
subl %eax, %edx
movl %edx, 0xc(%rsi)
subl %ecx, %r8d
movl %r8d, %eax
movl %eax, 0x10(%rsi)
movl $0x1, %eax
retq
pushq %rax
leaq 0x6c327(%rip), %rdi     # 0x236d48
leaq 0x68f63(%rip), %rsi     # 0x23398b
leaq 0x6c321(%rip), %rcx     # 0x236d50
movl $0x3d66, %edx           # imm = 0x3D66
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: g_adjacent_dis_mul(asg_t const*, ma_hit_t_alloc*, long, long, unsigned int, unsigned int)
int64_t g_adjacent_dis_mul(const asg_t *g, ma_hit_t_alloc *src, int64_t max_hang, int64_t min_ovlp, uint32_t v, uint32_t w)
{
	uint32_t i;
	if(g) {
		uint32_t nv; 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;
		}
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
testq %rdi, %rdi
je 0x1cada3
movq 0x28(%rdi), %rax
movl %r8d, %ecx
movq (%rax,%rcx,8), %rcx
movq %rcx, %rax
shlq $0x20, %rax
setne %bl
je 0x1cada5
movq 0x8(%rdi), %rdx
movq %rcx, %rdi
shrq $0x20, %rdi
movl %ecx, %ecx
leaq (%rdi,%rdi,2), %rdi
leaq (%rdx,%rdi,8), %rdx
addq $0xc, %rdx
movq %rcx, %rdi
negq %rdi
movl $0x1, %r11d
cmpl $0x0, (%rdx)
js 0x1cad87
cmpl %r9d, -0x4(%rdx)
je 0x1cada7
cmpq %rcx, %r11
setb %bl
addq $0x18, %rdx
leaq (%rdi,%r11), %r10
incq %r10
incq %r11
cmpq $0x1, %r10
jne 0x1cad7c
jmp 0x1cadaa
jmp 0x1cadb3
jmp 0x1cadaa
movl -0xc(%rdx), %eax
testb $0x1, %bl
jne 0x1caed0
testq %rsi, %rsi
je 0x1caec9
movl %r8d, %r10d
shrl %r10d
leaq (%r10,%r10,2), %rcx
movl 0xc(%rsi,%rcx,8), %edi
testq %rdi, %rdi
setne %bpl
je 0x1caec3
movq %rax, 0x10(%rsp)
leaq (%rsi,%rcx,8), %rax
movq (%rax), %r13
movl %r9d, 0x8(%rsp)
movl %r9d, %r14d
shrl %r14d
leaq 0xc043b(%rip), %rax     # 0x28b230
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0xbf953(%rip), %rax     # 0x28a758
movss 0x158(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movl %r8d, %eax
movq %rax, 0x18(%rsp)
movq %rdi, %r12
negq %r12
movl $0x1, %r15d
movq %rdi, 0x20(%rsp)
movq (%r13), %rax
shrq $0x20, %rax
movl 0xc(%r13), %ecx
movl %r10d, %edx
xorl %eax, %edx
movl %ecx, %esi
xorl %r14d, %esi
orl %edx, %esi
jne 0x1cae9b
movl %ecx, %ecx
movq 0x28(%rsp), %rdx
movl (%rdx,%rax,8), %esi
movl (%rdx,%rcx,8), %edx
movq %r13, %rdi
movq 0x30(%rsp), %rcx
movss 0xc(%rsp), %xmm0
movq 0x38(%rsp), %r8
leaq 0x40(%rsp), %r9
movq %r10, %rbx
callq 0x19c0d3
movq %rbx, %r10
movq 0x20(%rsp), %rdi
testl %eax, %eax
js 0x1cae9b
movq 0x40(%rsp), %rax
movq %rax, %rcx
shrq $0x20, %rcx
cmpl 0x18(%rsp), %ecx
jne 0x1cae9b
movl 0x8(%rsp), %ecx
cmpl %ecx, 0x48(%rsp)
je 0x1caec1
cmpq %rdi, %r15
setb %bpl
addq $0x28, %r13
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x1cae2c
movq 0x10(%rsp), %rax
jmp 0x1caec3
movl %eax, %eax
testb $0x1, %bpl
jne 0x1caed0
movq $-0x1, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: update_ul_vec_t(ul_idx_t const*, kv_ul_ov_t*, kv_ul_ov_t*, ul_vec_t*, vec_mg_lchain_t*, vec_mg_lchain_t*, long, asg_t const*, Chain_Data*, long, long, long)
void update_ul_vec_t(const ul_idx_t *uref, kv_ul_ov_t *raw_idx, kv_ul_ov_t *raw_chn, ul_vec_t *rch, 
vec_mg_lchain_t *uc, vec_mg_lchain_t *swap, int64_t ulid, const asg_t *rg, Chain_Data* dp, 
int64_t dp_max_skip, int64_t dp_max_iter, int64_t dp_max_dis)
{
	// fprintf(stderr, "\n++[M::%s::%.*s(id:%ld), len:%u]\n", __func__, 
	// UL_INF.nid.a[ulid].n, UL_INF.nid.a[ulid].a, ulid, rch->rlen);

	int64_t k, ucn = uc->n; mg_lchain_t *ix; 
	for (k = 0, swap->n = 0; k < ucn; k += ix->cnt + 1) {
		ix = &(uc->a[k]); assert(ix->v == (uint32_t)-1);
		// if(ulid == 14714) {
		// 	fprintf(stderr, "\n[M::%s::ucn->%ld, k->%ld, kcnt->%d]\n", __func__, ucn, k, ix->cnt);
		// 	print_debug_gchain(uref, uc->a + k + 1, ix->cnt, rch);
		// }
		gen_rovlp_chain_by_ul(rg, rch, uref, raw_idx, raw_chn, uc->a + k + 1, ix->cnt, swap, dp, 
		dp_max_skip, dp_max_iter, dp_max_dis, ulid);
	}

	///up to now, given a <x> in swap
	///x->ts and x->te are the coordinates in unitig (x->score>>1), instead of HiFi read (x->v>>1)
	///x->qs and x->qe are the coordinates in UL
	///x->dist_pre is the idx of this chain at rch 
	// debug_intermediate_chain(uref->ug, swap->a, swap->n);
	dd_ul_vec_t(uref, swap->a, swap->n, rch, ulid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movq %rcx, 0x10(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, 0x8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x88(%rsp), %rbx
movq 0x8(%r8), %r12
movq $0x0, 0x8(%r9)
testq %r12, %r12
jle 0x1cb5d7
movq %r8, %r15
xorl %ebp, %ebp
movq (%r15), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
cmpl $-0x1, 0x8(%rax,%rcx,8)
jne 0x1cb5fb
leaq (%rax,%rcx,8), %r13
leaq 0x28(%r13), %r9
movl 0x4(%r13), %eax
shlq $0x21, %rax
sarq $0x21, %rax
subq $0x10, %rsp
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq %r14
pushq %rax
callq 0x1ca7a8
addq $0x40, %rsp
movl 0x4(%r13), %eax
shlq $0x21, %rax
sarq $0x21, %rax
addq %rax, %rbp
incq %rbp
cmpq %r12, %rbp
jl 0x1cb55c
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1caedf
leaq 0x692a5(%rip), %rdi     # 0x2348a7
leaq 0x68382(%rip), %rsi     # 0x23398b
leaq 0x6b8cc(%rip), %rcx     # 0x236edc
movl $0x3ea5, %edx           # imm = 0x3EA5
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_seq_bub_id(unsigned long, bubble_type*, unsigned long*, unsigned long*)
uint64_t get_seq_bub_id(uint64_t v, bubble_type *bub, uint64_t *bid, uint64_t *nxt)
{
	uint64_t id0, id1, id; uint32_t beg, sink;

	(*bid) = (*nxt) = (uint64_t)-1;
	get_bub_id(bub, v>>1, &id0, &id1, 1);
	
	id = id0;
	if((id != (uint64_t)-1) && (id < bub->f_bub)) {///no need broken bubble
		get_bubbles(bub, id, &beg, &sink, NULL, NULL, NULL);
		if(v == beg) {
			(*bid) = id; (*nxt) = sink^1; return 1;
		}

		if(v == sink) {
			(*bid) = id; (*nxt) = beg^1; return 1;
		}
	}

	id = id1;
	if((id != (uint64_t)-1) && (id < bub->f_bub)) {///no need broken bubble
		get_bubbles(bub, id, &beg, &sink, NULL, NULL, NULL);
		if(v == beg) {
			(*bid) = id; (*nxt) = sink^1; return 1;
		}

		if(v == sink) {
			(*bid) = id; (*nxt) = beg^1; return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq $-0x1, %rbp
movq %rbp, (%rcx)
movq %rbp, (%rdx)
movq %rdi, %rsi
shrq %rsi
leaq 0x20(%rsp), %r13
leaq 0x18(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rdx
movl $0x1, %r8d
callq 0x1445e7
movq (%r13), %r13
cmpq %rbp, %r13
je 0x1cd12d
cmpq 0x80(%r12), %r13
jae 0x1cd12d
movq $0x0, (%rsp)
leaq 0x14(%rsp), %rbp
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x13812e
movl (%rbp), %eax
cmpq %r15, %rax
je 0x1cd170
movl 0x10(%rsp), %ecx
cmpq %r15, %rcx
je 0x1cd182
movq 0x18(%rsp), %r13
cmpq $-0x1, %r13
je 0x1cd192
cmpq 0x80(%r12), %r13
jae 0x1cd192
movq $0x0, (%rsp)
leaq 0x14(%rsp), %rbp
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x13812e
movl (%rbp), %eax
cmpq %r15, %rax
jne 0x1cd179
movq %r13, (%r14)
movl 0x10(%rsp), %eax
jmp 0x1cd185
movl 0x10(%rsp), %ecx
cmpq %r15, %rcx
jne 0x1cd192
movq %r13, (%r14)
xorl $0x1, %eax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x1cd194
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: pick_bubble(uc_block_t*, unsigned long, bubble_type*, unsigned long*)
uint64_t pick_bubble(uc_block_t *a, uint64_t a_n, bubble_type *bub, uint64_t *r_bid)
{
	uint64_t k = 0, v, bid = (uint64_t)-1, w = (uint64_t)-1; (*r_bid) = (uint64_t)-1;
	if(a_n <= 1) return 0;///no bubble
	v = (((uint32_t)a[k].hid)<<1)|((uint32_t)a[k].rev);
	if(!get_seq_bub_id(v, bub, &bid, &w)) return 0;
	(*r_bid) = bid;
	for (k = 1; k < a_n; k++) {
		v = (((uint32_t)a[k].hid)<<1)|((uint32_t)a[k].rev);
		if(v == w) return k;
		if(bub->index[v>>1] != bid) return 0;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq %rax, (%rcx)
cmpq $0x2, %rsi
jb 0x1cd246
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%rdi), %eax
movl 0x20(%rdi), %ecx
shrl $0x5, %ecx
andl $0x1, %ecx
leal (%rcx,%rax,2), %edi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rsi
callq 0x1cd09b
testq %rax, %rax
je 0x1cd246
movq 0x10(%rsp), %rcx
movq %rcx, (%r12)
movq 0x8(%rsp), %rdx
addq $0x44, %r15
movl $0x1, %esi
xorl %eax, %eax
movl -0x20(%r15), %edi
movl (%r15), %r8d
shrl $0x5, %r8d
andl $0x1, %r8d
leal (%r8,%rdi,2), %edi
cmpq %rdi, %rdx
je 0x1cd254
movq (%rbx), %r8
shrl %edi
movl (%r8,%rdi,4), %edi
cmpq %rdi, %rcx
jne 0x1cd248
incq %rsi
addq $0x24, %r15
cmpq %r14, %rsi
jb 0x1cd212
jmp 0x1cd248
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %rax
jmp 0x1cd248
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: cc_bub_match(ul_ov_t*, long)
uint64_t cc_bub_match(ul_ov_t *ch, int64_t ch_n) {
	if(ch_n == 0) return 0;
    int64_t i, j, k;

    radix_sort_ul_ov_srt_qs(ch, ch + ch_n);
	for (i = 1, j = 0; i <= ch_n; i++) {
        if (i == ch_n || ch[i].qs != ch[j].qs) {
            if(i - j > 1) radix_sort_ul_ov_srt_qe(ch+j, ch+i);
            j = i;
        }
    }

	for (i = k = 0; i < ch_n; ++i) {
		if(ch[i].tn == (uint32_t)-1) continue;
		for (j = i + 1; j < ch_n && ch[i].qe >= ch[j].qs; j++) {
			if(ch[j].tn == (uint32_t)-1) continue;
			if((ch[i].qe == ch[j].qs) && (ch[i].rev == ch[j].rev) && (ch[i].qn == ch[j].qn)) {
				if(!ch[i].rev) {
					if(ch[i].te == ch[j].ts) {
						ch[i].qe = ch[j].qe;
						ch[i].te = ch[j].te;
						ch[j].tn = (uint32_t)-1;
					}
				} else {
					if(ch[j].te == ch[i].ts) {
						ch[i].qe = ch[j].qe;
						ch[i].ts = ch[j].ts;
						ch[j].tn = (uint32_t)-1;
					}
				}
			}
		}

		ch[k++] = ch[i];
	}

	return k;
}

// Assembly:
testq %rsi, %rsi
je 0x1cd9ed
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rsi,%rsi,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rdi, %rsi
addq %rbx, %rsi
callq 0x1957bd
testq %rbx, %rbx
jle 0x1cd90f
movq %rbx, %r12
negq %r12
leaq 0x1c(%r14), %r15
movl $0x1, %r13d
xorl %edi, %edi
movq %r12, %rax
addq %r13, %rax
je 0x1cd8d0
movl 0x4(%r15), %eax
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rdi, %rcx
cmpl 0x4(%r14,%rcx), %eax
jne 0x1cd8d0
movq %rdi, %rax
jmp 0x1cd8f8
movq %r13, %rcx
subq %rdi, %rcx
movq %r13, %rax
cmpq $0x2, %rcx
jl 0x1cd8f8
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %r14, %rdi
addq %rax, %rdi
movq %r15, %rsi
callq 0x195511
movq %r13, %rax
leaq (%r12,%r13), %rcx
incq %rcx
incq %r13
addq $0x1c, %r15
movq %rax, %rdi
cmpq $0x1, %rcx
jne 0x1cd8ad
testq %rbx, %rbx
jle 0x1cd9f0
leaq 0x1c(%r14), %rcx
xorl %eax, %eax
xorl %edx, %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
cmpl $-0x1, 0xc(%r14,%rsi)
je 0x1cd9db
addq %r14, %rsi
leaq 0x1(%rdx), %rdi
cmpq %rbx, %rdi
jge 0x1cd9bb
movl 0x8(%rsi), %r9d
movq %rcx, %r8
cmpl 0x4(%r8), %r9d
jb 0x1cd9bb
jne 0x1cd99b
cmpl $-0x1, 0xc(%r8)
je 0x1cd99b
movl 0x18(%rsi), %r10d
movl 0x18(%r8), %r11d
xorl %r10d, %r11d
js 0x1cd99b
movl (%rsi), %r11d
cmpl (%r8), %r11d
jne 0x1cd99b
testl %r10d, %r10d
js 0x1cd9a9
movl 0x14(%rsi), %r11d
movl $0x14, %r10d
cmpl 0x10(%r8), %r11d
jne 0x1cd99b
movl 0x8(%r8), %r9d
movl %r9d, 0x8(%rsi)
movl (%r8,%r10), %r11d
movl %r11d, (%rsi,%r10)
movl $0xffffffff, 0xc(%r8)   # imm = 0xFFFFFFFF
incq %rdi
addq $0x1c, %r8
cmpq %rbx, %rdi
jl 0x1cd94a
jmp 0x1cd9bb
movl 0x14(%r8), %r11d
movl $0x10, %r10d
cmpl 0x10(%rsi), %r11d
je 0x1cd983
jmp 0x1cd99b
leaq (%rax,%rax,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rax, %rdi
incq %rax
movups (%rsi), %xmm0
movups 0xc(%rsi), %xmm1
movups %xmm1, 0xc(%r14,%rdi)
movups %xmm0, (%r14,%rdi)
incq %rdx
addq $0x1c, %rcx
cmpq %rbx, %rdx
jne 0x1cd920
jmp 0x1cd9f2
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: extract_scaf_res_t(uc_block_t*, ul_idx_t const*, scaf_res_t*, unsigned int, kv_ul_ov_t*)
uint64_t extract_scaf_res_t(uc_block_t *in, const ul_idx_t *uref, scaf_res_t *ref_sc, uint32_t avid, kv_ul_ov_t *res)
{
	utg_rid_dt *a; uint64_t i, a_n, nn, nw; uc_block_t *ou; ul_ov_t p; memset(&p, 0, sizeof(p));
	a = get_r_ug_region(uref->r_ug, &a_n, in->hid);
    for (i = nn = 0; i < a_n; i++) {
		if((a[i].u>>1) == avid) continue;
		ou = &(ref_sc->a[a[i].u>>1].bb.a[a[i].off]);
		p.qn = (uint32_t)-1; p.qs = in->qs; p.qe = in->qe;
		p.tn = a[i].u>>1; p.ts = ou->qs; p.te = ou->qe; 
		p.el = 1; p.rev = ((in->rev == ou->rev)?0:1);
		nw = MAX(p.te-p.ts, p.qe-p.qs); nw *= CHAIN_MATCH; 
		p.sec = ((nw>=0x3fffffff)?(0x3fffffff):(nw));
		kv_push(ul_ov_t, *res, p);

		nn++;
    }
	return nn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl %ecx, 0xc(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, %r9
movq 0x28(%rsi), %rsi
movl (%rdi), %eax
movq (%rsi), %r8
movl (%r8,%rax,4), %edi
movl 0x4(%r8,%rax,4), %r8d
movl %r8d, %eax
subl %edi, %eax
jne 0x1cda37
xorl %r10d, %r10d
jmp 0x1cda43
leaq (%rdi,%rdi,2), %r10
shlq $0x2, %r10
addq 0x18(%rsi), %r10
cmpl %edi, %r8d
jne 0x1cda4f
xorl %edx, %edx
jmp 0x1cdb9d
cmpl $0x1, %eax
adcl $0x0, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rcx
xorl %ebp, %ebp
xorl %edx, %edx
movq %r9, 0x20(%rsp)
movq %r10, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movl (%r10,%rbp), %r14d
shrl %r14d
cmpl 0xc(%rsp), %r14d
je 0x1cdb90
movq 0x30(%rsp), %rax
movq (%rax), %rax
imulq $0x58, %r14, %rsi
movq 0x30(%rax,%rsi), %rax
movl 0x4(%r10,%rbp), %esi
leaq (%rsi,%rsi,8), %rsi
movl 0x4(%r9), %r11d
movl 0x8(%r9), %r12d
movl 0x4(%rax,%rsi,4), %edi
movl 0x8(%rax,%rsi,4), %r8d
movb 0x20(%rax,%rsi,4), %r15b
xorb 0x20(%r9), %r15b
movl %r8d, 0x4(%rsp)
movl %r8d, %eax
movl %edi, 0x8(%rsp)
subl %edi, %eax
movl %r12d, %r13d
movl %r11d, (%rsp)
subl %r11d, %r12d
cmpl %r12d, %eax
cmoval %eax, %r12d
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl %eax, %r12d
cmovael %eax, %r12d
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
jne 0x1cdb2e
leaq (%rax,%rax), %r8
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r8
movq %r8, 0x10(%rbx)
movq (%rbx), %rdi
leaq (%r8,%r8,8), %rax
leaq (%rax,%rax,2), %rsi
addq %r8, %rsi
movq %rdx, 0x28(%rsp)
callq 0x2370
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r10
movq 0x20(%rsp), %r9
movq 0x28(%rsp), %rdx
movq %rax, (%rbx)
shrb $0x5, %r15b
movzbl %r15b, %eax
shll $0x1f, %eax
orl %r12d, %eax
orl $0x40000000, %eax       # imm = 0x40000000
movq (%rbx), %rdi
movq 0x8(%rbx), %r8
leaq 0x1(%r8), %rsi
movq %rsi, 0x8(%rbx)
leaq (%r8,%r8,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %r8, %rsi
movl $0xffffffff, (%rdi,%rsi) # imm = 0xFFFFFFFF
movl (%rsp), %r8d
movl %r8d, 0x4(%rdi,%rsi)
movl %r13d, 0x8(%rdi,%rsi)
movl %r14d, 0xc(%rdi,%rsi)
movl 0x8(%rsp), %r8d
movl %r8d, 0x10(%rdi,%rsi)
movl 0x4(%rsp), %r8d
movl %r8d, 0x14(%rdi,%rsi)
movl %eax, 0x18(%rdi,%rsi)
incq %rdx
addq $0xc, %rbp
cmpq %rbp, %rcx
jne 0x1cda70
movq %rdx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_trans_ovlp_scaf(ma_ug_t*, u_trans_t*, uc_block_t*, uc_block_t*, ul_ov_t*)
uint64_t gen_trans_ovlp_scaf(ma_ug_t *gfa, u_trans_t *map, uc_block_t *qin, uc_block_t *rin, ul_ov_t *res)
{
	uint64_t s, e, s0, e0; uc_block_t *z;

	z = qin; s0 = map->qs; e0 = map->qe;
	if(s0 > gfa->u.a[z->hid].len || e0 > gfa->u.a[z->hid].len) return 0;
	if(!(z->rev)) {
		s = s0; e = e0;
	} else {
		s = gfa->u.a[z->hid].len - e0; 
		e = gfa->u.a[z->hid].len - s0;
	}
	s += z->qs; e += z->qs;
	if(s >= e) return 0;
	res->qs = s; res->qe = e;


	z = rin; s0 = map->ts; e0 = map->te;
	if(s0 > gfa->u.a[z->hid].len || e0 > gfa->u.a[z->hid].len) return 0;
	if(!(z->rev)) {
		s = s0; e = e0;
	} else {
		s = gfa->u.a[z->hid].len - e0; 
		e = gfa->u.a[z->hid].len - s0;
	}
	s += z->qs; e += z->qs;
	if(s >= e) return 0;
	res->ts = s; res->te = e;

	res->rev = map->rev^(qin->rev^rin->rev); 

	return 1;
}

// Assembly:
pushq %rbx
movl (%rsi), %r9d
movl 0x4(%rsi), %r10d
movq 0x10(%rdi), %rax
movl (%rdx), %edi
leaq (%rdi,%rdi,4), %rdi
movl (%rax,%rdi,8), %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
cmpl %edi, %r9d
seta %r11b
cmpl %edi, %r10d
seta %bl
orb %r11b, %bl
jne 0x1cdc97
movl %r10d, %r11d
movq %rdi, %r10
subq %r11, %r10
subq %r9, %rdi
testb $0x20, 0x20(%rdx)
cmoveq %r9, %r10
cmoveq %r11, %rdi
movl 0x4(%rdx), %r9d
addq %r9, %r10
addq %r9, %rdi
cmpq %rdi, %r10
jae 0x1cdc97
movl %r10d, 0x4(%r8)
movl %edi, 0x8(%r8)
movl 0xc(%rsi), %edi
movl 0x10(%rsi), %r9d
movl (%rcx), %r10d
leaq (%r10,%r10,4), %r10
movl (%rax,%r10,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl %eax, %edi
seta %r10b
cmpl %eax, %r9d
seta %r11b
orb %r10b, %r11b
jne 0x1cdc97
movl %r9d, %r10d
movq %rax, %r9
subq %r10, %r9
subq %rdi, %rax
testb $0x20, 0x20(%rcx)
cmoveq %rdi, %r9
cmoveq %r10, %rax
movl 0x4(%rcx), %edi
addq %rdi, %r9
addq %rdi, %rax
cmpq %rax, %r9
jae 0x1cdc97
movl %r9d, 0x10(%r8)
movl %eax, 0x14(%r8)
movb 0x28(%rsi), %al
shrb $0x6, %al
movb 0x20(%rcx), %cl
xorb 0x20(%rdx), %cl
shrb $0x5, %cl
xorb %al, %cl
movzbl %cl, %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0x18(%r8), %ecx
shll $0x1f, %eax
orl %eax, %ecx
movl %ecx, 0x18(%r8)
movl $0x1, %eax
jmp 0x1cdc99
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: cal_reliable_ovlp(ul_ov_t*, asg64_v*, unsigned long, unsigned long)
uint64_t cal_reliable_ovlp(ul_ov_t *z, asg64_v *in, uint64_t s, uint64_t e)
{
	if(z->sec >= in->n) return 0;
	uint64_t k, zs, ze, os, oe, ovq, l = 0;
	for (k = z->sec - in->a[z->sec]; k < z->sec; k++) {
		zs = (in->a[k]>>32); ze = ((uint32_t)in->a[k]);
		if(zs >= e) break;
		if(ze <= s) continue;
		os = MAX(s, zs); oe = MIN(e, ze);
		ovq = ((oe > os)? (oe - os):0);
		l += ovq;
	}
	return l;
}

// Assembly:
movl 0x18(%rdi), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq %rax, (%rsi)
jbe 0x1cf337
movq 0x10(%rsi), %rdi
movq (%rdi,%rax,8), %rsi
movq %rax, %r8
subq %rsi, %r8
cmpq %rax, %r8
jae 0x1cf337
leaq (%rdi,%rax,8), %rdi
negq %rsi
xorl %eax, %eax
movq (%rdi,%rsi,8), %r9
movq %r9, %r8
shrq $0x20, %r8
cmpq %rcx, %r8
jae 0x1cf336
movl %r9d, %r9d
cmpq %rdx, %r9
jbe 0x1cf331
cmpq %rdx, %r8
cmovbeq %rdx, %r8
cmpq %rcx, %r9
cmovaeq %rcx, %r9
subq %r8, %r9
movl $0x0, %r8d
cmovaeq %r9, %r8
addq %r8, %rax
incq %rsi
jne 0x1cf2fb
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: push_ctg_trans_res(unsigned int, kv_ul_ov_t*, kv_ul_ov_t*)
void push_ctg_trans_res(uint32_t id, kv_ul_ov_t *in, kv_ul_ov_t *ou)
{
	uint32_t k;
	kv_resize(ul_ov_t, *ou, ou->n + in->n);
	for (k = 0; k < in->n; k++) {
		in->a[k].sec = ((in->a[k].qn>=(0x3fffffff))?(0x3fffffff):(in->a[k].qn));
		in->a[k].qn = id; kv_push(ul_ov_t, *ou, in->a[k]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq 0x8(%rsi), %rax
addq 0x8(%rdx), %rax
cmpq %rax, 0x10(%rdx)
jae 0x1cfab2
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
leaq (%rax,%rax,8), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax), %rsi
incq %rsi
callq 0x2370
movq %rax, (%rbx)
cmpq $0x0, 0x8(%r14)
je 0x1cfb78
movl $0x1, %r15d
xorl %eax, %eax
movl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
movl $0xc0000000, %edi       # imm = 0xC0000000
movq (%r14), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %r13
addq %rax, %r13
movl (%rcx,%r13), %eax
cmpl %r12d, %eax
cmovael %r12d, %eax
movl 0x18(%rcx,%r13), %edx
andl %edi, %edx
orl %eax, %edx
movl %edx, 0x18(%rcx,%r13)
movq (%r14), %rax
movl %ebp, (%rax,%r13)
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
jne 0x1cfb37
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%rbx)
movq (%rbx), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2370
movl $0xc0000000, %edi       # imm = 0xC0000000
movq %rax, (%rbx)
movq (%r14), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movups (%rax,%r13), %xmm0
movups 0xc(%rax,%r13), %xmm1
movups %xmm1, 0xc(%rcx,%rsi)
movups %xmm0, (%rcx,%rsi)
movl %r15d, %eax
incl %r15d
cmpq %rax, 0x8(%r14)
ja 0x1cfad0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: refine_rid_chain(asg_t const*, mg_tbuf_s*, ul_vec_t*, unsigned long)
uint32_t refine_rid_chain(const asg_t *rg, mg_tbuf_t *b, ul_vec_t *rch, uint64_t ulid)
{
	if(rch->bb.n == 1 && rch->bb.a[0].base) return 1;///no alignment
	if(rch->bb.n == 0) return 1;///no alignment
	uint64_t i, m, c[2], nc, cc/**, ni[2]**/; 
	for (i = c[1] = rch->bb.n-1, m = nc = 0; i != (uint32_t)-1; i = rch->bb.a[i].pidx) {
		m++; c[0] = i; if(!(rg->seq[rch->bb.a[i].hid].del)) nc++; 
	}
	if(m == rch->bb.n) {///only one chain
		if(nc == m || nc == 0) return 1;///all alignments are non-contained/contained
		cc = 0;
		for (i = c[1]; i != (uint32_t)-1; i = rch->bb.a[i].pidx) {
			if(rg->seq[rch->bb.a[i].hid].del) cc++;
			else break;
		}
		// ni[1] = i;
		for (i = c[0]; i != (uint32_t)-1; i = rch->bb.a[i].aidx) {
			if(rg->seq[rch->bb.a[i].hid].del) cc++;
			else break;
		}
		// ni[0] = i;
		if(nc + cc == m) return 1;
		// assert(ni[1] > ni[0] && ni[0] != (uint32_t)-1 && ni[1] != (uint32_t)-1);
		return 2;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x20(%rdx), %r10
movl $0x1, %eax
testq %r10, %r10
je 0x1cfeac
cmpq $0x1, %r10
jne 0x1cfdc8
testq %r10, %r10
je 0x1cfeac
movq 0x30(%rdx), %rcx
movb 0x20(%rcx), %cl
andb $0x40, %cl
jne 0x1cfeac
leaq -0x1(%r10), %r9
xorl %eax, %eax
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
cmpq %r11, %r9
jne 0x1cfddf
xorl %ecx, %ecx
xorl %esi, %esi
jmp 0x1cfe15
movq 0x20(%rdi), %rbx
movq 0x30(%rdx), %r14
xorl %esi, %esi
xorl %ecx, %ecx
movq %r9, %r15
movq %r15, %r8
incq %rcx
leaq (%r15,%r15,8), %r15
movl (%r14,%r15,4), %r12d
xorl %r13d, %r13d
cmpl $0x0, (%rbx,%r12,8)
movl 0x14(%r14,%r15,4), %r15d
setns %r13b
addq %r13, %rsi
cmpq %r11, %r15
jne 0x1cfdee
cmpq %r10, %rcx
jne 0x1cfeac
cmpq %rcx, %rsi
sete %al
testq %rsi, %rsi
sete %r10b
orb %al, %r10b
movl $0x1, %eax
jne 0x1cfeac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r9
jne 0x1cfe44
xorl %r10d, %r10d
jmp 0x1cfe6e
movq 0x20(%rdi), %r11
movq 0x30(%rdx), %rbx
xorl %r10d, %r10d
leaq (%r9,%r9,8), %r9
movl (%rbx,%r9,4), %r14d
cmpl $0x0, (%r11,%r14,8)
jns 0x1cfe6e
leaq (%rbx,%r9,4), %r9
incq %r10
movl 0x14(%r9), %r9d
cmpq %rax, %r9
jne 0x1cfe4f
cmpq %rax, %r8
je 0x1cfe9f
movq 0x20(%rdi), %rax
movq 0x30(%rdx), %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq (%r8,%r8,8), %r8
movl (%rdx,%r8,4), %r9d
cmpl $0x0, (%rax,%r9,8)
jns 0x1cfe9f
leaq (%rdx,%r8,4), %r8
incq %r10
movl 0x1c(%r8), %r8d
cmpq %rdi, %r8
jne 0x1cfe80
addq %rsi, %r10
xorl %eax, %eax
cmpq %rcx, %r10
setne %al
incl %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gconnect_test(asg_t const*, unsigned int, unsigned int, long, double, long)
int64_t gconnect_test(const asg_t *g, uint32_t v, uint32_t w, int64_t bw, double diff_ec_ul, int64_t dq)
{
	int64_t dt = -1, dif, mm; 
	uint32_t nv, i; asg_arc_t *av = NULL; ///ma_hit_t *x = 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;
		dt = av[i].ol; 
		break;
	}

	if(dt < 0) return 0;
	dif = (dq>dt? dq-dt:dt-dq);
	mm = MAX(dq, dt); mm *= diff_ec_ul; if(mm < bw) mm = bw;
	if(dif <= mm) return 1;
	return 0;
}

// Assembly:
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rax
testl %eax, %eax
je 0x1d1bbb
movq 0x8(%rdi), %rsi
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %r9d
leaq (%rdi,%rdi,2), %rax
leaq (%rsi,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %r9
leaq (%r9,%r9,2), %rsi
xorl %edi, %edi
movslq (%rax,%rdi), %r9
testq %r9, %r9
js 0x1d1bb2
cmpl %edx, -0x4(%rax,%rdi)
je 0x1d1bc2
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0x1d1ba3
movq $-0x1, %r9
testq %r9, %r9
js 0x1d1bf9
movq %r9, %rax
subq %r8, %rax
cmovgq %r9, %r8
movq %rax, %rdx
negq %rdx
cmovsq %rax, %rdx
cvtsi2sd %r8, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
cmpq %rcx, %rax
cmovgq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rdx
setle %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: detect_outlier_len(char const*)
void detect_outlier_len(const char* cmd)
{
	uint64_t k;
	for (k = 0; k < UL_INF.n; k++) {
        if(UL_INF.a[k].rlen == 0) {
            fprintf(stderr, "[%s] rid->%lu, rlen->%u, %.*s\n", 
                    cmd, k, UL_INF.a[k].rlen, (int32_t)UL_INF.nid.a[k].n, UL_INF.nid.a[k].a);
        }
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb6620(%rip), %r15     # 0x28b318
cmpq $0x0, 0x50(%r15)
je 0x1d4d32
movq %rdi, %rbx
movl $0x18, %r12d
xorl %r14d, %r14d
movq 0x48(%r15), %rax
cmpl $0x0, (%rax,%r12)
je 0x1d4d25
incq %r14
addq $0x58, %r12
cmpq 0x50(%r15), %r14
jb 0x1d4d0b
jmp 0x1d4d32
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a5a3
jmp 0x1d4d16
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_ul_gchains_alignment(void*, long, int)
static void worker_for_ul_gchains_alignment(void *data, long i, int tid)
{
	ul_vec_t *p = &(UL_INF.a[i]); 
	utepdat_t *s = (utepdat_t*)data; uint32_t ff;
	ff = refine_rid_chain(s->rg, s->buf[tid], p, i);
	// fprintf(stderr, "[M::%s::%.*s(id:%ld), len:%u] ff:%u\n", __func__, 
	// UL_INF.nid.a[i].n, UL_INF.nid.a[i].a, i, p->rlen, ff);
	if(ff == 1) return;
	// if(p->dd == 1) return; //fully aligned
	// if(p->bb.n == 1 && p->bb.a[0].base) return;///no alignment
	// if(p->bb.n == 0) return;///no alignment
	s->hab[tid]->num_read_base++; 
	s->hab[tid]->num_correct_base += direct_gchain(s->buf[tid], p, &(s->ll[tid]), &(s->gdp[tid]), &(s->sps[tid]), &(s->hab[tid]->hap), s->uu, s->uopt, G_CHAIN_BW, s->opt->diff_ec_ul, UG_SKIP, i, &(s->hab[tid]->clist.chainDP), s->rg, ((ff==2)?1:0));
	// gl_chain_refine_advance(&b->olist, &b->correct, &b->hap, bl, s->uu, s->opt->diff_ec_ul, winLen, s->len[i], s->uopt, s->id+i, km);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xb65c2(%rip), %rax     # 0x28b318
imulq $0x58, %rsi, %r14
addq 0x48(%rax), %r14
movq 0x20(%rdi), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x1cfd8e
cmpl $0x1, %eax
je 0x1d4e14
movslq %ebp, %r12
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rdx
movq (%rcx,%r12,8), %rdi
movq (%rdx,%r12,8), %rsi
incq 0xf0(%rsi)
imulq $0x68, %r12, %rdx
addq 0x88(%rbx), %rdx
leaq (%r12,%r12,2), %r8
movq %r8, %rcx
shlq $0x6, %rcx
addq 0x90(%rbx), %rcx
shlq $0x3, %r8
addq 0x68(%rbx), %r8
movq 0x30(%rbx), %r9
movq (%rbx), %r10
movq 0x28(%rbx), %r11
movsd 0x68(%r10), %xmm0
addq $0x60, %rsi
xorl %r10d, %r10d
cmpl $0x2, %eax
sete %r10b
movq %r10, 0x38(%rsp)
movq %r15, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %r11, 0x8(%rsp)
movq %r9, (%rsp)
movq $0x10, 0x10(%rsp)
movq %r14, %rsi
callq 0x1cbade
movl %eax, %eax
movq 0x80(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
addq %rax, 0xf8(%rcx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_ctg_trans_alignment(void*, long, int)
static void worker_for_ctg_trans_alignment(void *data, long i, int tid)
{
	ctdat_t *c = (ctdat_t*)data;
	utepdat_t *s = c->s; 
	// ul_vec_t *q = &(c->qry_sc->a[i]); 

	s->hab[tid]->num_read_base++; 
	s->hab[tid]->num_correct_base += direct_ctg_trans_chain(s->buf[tid], i, &(s->ll[tid]), &(s->gdp[tid]), &(s->sps[tid]), &(s->hab[tid]->hap), s->uu, s->uopt, G_CHAIN_BW, s->opt->diff_ec_ul, UG_SKIP, i, &(s->hab[tid]->clist.chainDP), 
	c->qry, c->qry_sc, c->ref, c->ref_sc, c->gfa, c->bub, c->ta, s->rg, c->soff, c->is_exact);
}

// Assembly:
subq $0x88, %rsp
movq (%rdi), %rax
movq 0x80(%rax), %rcx
movslq %edx, %r8
movq (%rcx,%r8,8), %rcx
incq 0xf0(%rcx)
imulq $0x68, %r8, %rdx
addq 0x88(%rax), %rdx
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x68(%rax), %r8
movq (%rax), %r9
movq 0x30(%rax), %rax
movsd 0x68(%r9), %xmm0
addq $0x60, %rcx
movups 0x8(%rdi), %xmm1
movups 0x18(%rdi), %xmm2
movups 0x28(%rdi), %xmm3
movq 0x38(%rdi), %r9
movups 0x48(%rdi), %xmm4
movups %xmm4, 0x70(%rsp)
movq %r9, 0x60(%rsp)
movups %xmm3, 0x50(%rsp)
movups %xmm2, 0x40(%rsp)
movups %xmm1, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rax, (%rsp)
movq $0x10, 0x10(%rsp)
callq 0x1cfb87
addq $0x88, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: update_contain_dedup_arr(asg64_v*, unsigned long, asg64_v*)
void update_contain_dedup_arr(asg64_v *in, uint64_t prefix, asg64_v *res)
{
	if(in->n == 0) return;
	uint64_t i, m;
	for (i = 0; i < in->n; i++) {
		if(in->a[i] == ((uint64_t)-1)) continue;
		if(((uint32_t)in->a[i]) == ((uint32_t)-1)) {
			m = prefix; m <<= 32; m += i;
			kv_push(uint64_t, *res, m);
		}
	}
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x1d5711
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
cmpq $0x0, (%rdi)
je 0x1d5708
movq %rdx, %rbx
movq %rsi, %r14
shlq $0x20, %r14
xorl %r12d, %r12d
movl $0x2, %r13d
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rax
cmpq $-0x1, %rax
sete %cl
cmpl $-0x1, %eax
setne %al
orb %cl, %al
jne 0x1d5700
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x1d56ea
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r13, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
leaq (%r14,%r12), %rax
movq (%rbx), %rcx
movq 0x10(%rbx), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movq %rax, (%rdx,%rcx,8)
incq %r12
cmpq (%r15), %r12
jb 0x1d56a8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: path_del_topo(asg_t*, unsigned long)
uint64_t path_del_topo(asg_t *g, uint64_t v)
{
	uint64_t nv, nw, kw, k, z, w; asg_arc_t *av, *aw;
	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	for (k = 0; k < nv; k++){
		if(av[k].del) continue;
		w = av[k].v^1;
		nw = asg_arc_n(g, w); aw = asg_arc_a(g, w);
		for (z = kw = 0; z < nw; z++) {
			if(aw[z].del) continue;
			if((aw[z].v>>1) != (v>>1)) continue;
			kw++;
		}
		if(kw <= 0) return 0; 
	}
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x28(%rdi), %rcx
movq (%rcx,%rsi,8), %r9
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r9, %r8
movl $0x1, %eax
andq %rdx, %r8
je 0x1d57c7
movq 0x8(%rdi), %rdi
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
leaq (%rdi,%r9,8), %r9
shrq %rsi
addq $0xc, %rdi
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
cmpl $0x0, 0xc(%r9,%r11,8)
js 0x1d57bb
leaq (%r9,%r11,8), %r11
movl 0x8(%r11), %r11d
xorq $0x1, %r11
movq (%rcx,%r11,8), %rbx
movq %rbx, %r11
andq %rdx, %r11
je 0x1d57c5
shrq $0x20, %rbx
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rbx,%rbx,2), %rbx
leaq (%rdi,%rbx,8), %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r15)
js 0x1d57ad
movl -0x4(%rbx,%r15), %r12d
shrl %r12d
xorl %r13d, %r13d
cmpq %r12, %rsi
sete %r13b
addq %r13, %r14
addq $0x18, %r15
cmpq %r15, %r11
jne 0x1d5791
testq %r14, %r14
je 0x1d57c5
incq %r10
cmpq %r8, %r10
jne 0x1d5753
jmp 0x1d57c7
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: ugl_cover_check(unsigned long, unsigned long, ma_utg_t*)
uint32_t ugl_cover_check(uint64_t is, uint64_t ie, ma_utg_t *u)
{
	if(is == 0 && ie == u->len) return 1;
	uint64_t l, i, us, ue;
	for (i = l = 0; i < u->n; i++) {
		us = l; ue = l + Get_READ_LENGTH(R_INF, (u->a[i]>>33));
		if(is <= us && ie >= ue) return 1;
		if(us >= ie) break;
		l += (uint32_t)u->a[i];
	}
	return 0;
}

// Assembly:
testq %rdi, %rdi
jne 0x1d6d5c
movl (%rdx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x1, %eax
cmpq %rsi, %rcx
je 0x1d6dac
movl 0x10(%rdx), %ecx
testq %rcx, %rcx
je 0x1d6dad
leaq 0xb44c5(%rip), %rax     # 0x28b230
movq 0x18(%rax), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %rdi, %r9
jb 0x1d6d92
movq 0x18(%rdx), %rax
movq (%rax,%r10,8), %rax
shrq $0x21, %rax
movq (%r8,%rax,8), %rax
addq %r9, %rax
cmpq %rsi, %rax
jbe 0x1d6db0
xorl %eax, %eax
cmpq %rsi, %r9
jae 0x1d6dac
movq 0x18(%rdx), %r11
movl (%r11,%r10,8), %r11d
addq %r11, %r9
incq %r10
cmpq %r10, %rcx
jne 0x1d6d75
retq
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: find_ul_block_max_reverse(int, uc_block_t const*, unsigned int)
int32_t find_ul_block_max_reverse(int32_t n, const uc_block_t *a, uint32_t x)
{
    int32_t s = 0, e = n;
    if (n == 0) return n;
    if (a[0].qe < x) return 0;///max qe
    if (a[n-1].qe >= x) return n;///min qe

    while (e > s) { // TODO: finish this block
        int32_t m = s + (e - s) / 2;
        // if (a[m].qe >= x) e = m;
        // else s = m + 1;
		if (a[m].qe > x) s = m + 1;
		else e = m;
    }
    assert(s == e);
    return s;
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
je 0x1d74a9
cmpl %edx, 0x8(%rsi)
jb 0x1d74a9
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
cmpl %edx, -0x1c(%rsi,%rax,4)
jae 0x1d74aa
xorl %eax, %eax
testl %edi, %edi
jle 0x1d74a5
movl %edi, %r8d
subl %eax, %r8d
movl %r8d, %ecx
shrl $0x1f, %ecx
addl %r8d, %ecx
sarl %ecx
leal (%rcx,%rax), %r8d
movslq %r8d, %r9
leaq (%r9,%r9,8), %r9
cmpl %edx, 0x8(%rsi,%r9,4)
ja 0x1d749d
movl %r8d, %edi
jmp 0x1d74a1
addl %ecx, %eax
incl %eax
cmpl %eax, %edi
jg 0x1d7475
cmpl %edi, %eax
jne 0x1d74ad
retq
movl %edi, %eax
retq
pushq %rax
leaq 0x5cb77(%rip), %rdi     # 0x23402c
leaq 0x5c4cf(%rip), %rsi     # 0x23398b
leaq 0x609f2(%rip), %rcx     # 0x237eb5
movl $0x4d48, %edx           # imm = 0x4D48
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: find_ul_block_max(int, uc_block_t const*, unsigned int)
int32_t find_ul_block_max(int32_t n, const uc_block_t *a, uint32_t x)
{
    int32_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
        int32_t m = s + (e - s) / 2;
        if (a[m].qe >= x) e = m;
        else s = m + 1;
    }
    assert(s == e);
    return s;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edi, %edi
je 0x1d752a
leal -0x1(%rdi), %eax
movslq %eax, %rcx
leaq (%rcx,%rcx,8), %rcx
cmpl %edx, 0x8(%rsi,%rcx,4)
jb 0x1d752a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, 0x8(%rsi)
jae 0x1d752a
xorl %eax, %eax
testl %edi, %edi
jle 0x1d7526
movl %edi, %r8d
subl %eax, %r8d
movl %r8d, %ecx
shrl $0x1f, %ecx
addl %r8d, %ecx
sarl %ecx
leal (%rcx,%rax), %r8d
movslq %r8d, %r9
leaq (%r9,%r9,8), %r9
cmpl %edx, 0x8(%rsi,%r9,4)
jb 0x1d751e
movl %r8d, %edi
jmp 0x1d7522
addl %ecx, %eax
incl %eax
cmpl %eax, %edi
jg 0x1d74f6
cmpl %edi, %eax
jne 0x1d752b
retq
pushq %rax
leaq 0x5caf9(%rip), %rdi     # 0x23402c
leaq 0x5c451(%rip), %rsi     # 0x23398b
leaq 0x609bd(%rip), %rcx     # 0x237efe
movl $0x4d57, %edx           # imm = 0x4D57
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: scall_ul_pipeline(uldat_t*, enzyme const*)
int scall_ul_pipeline(uldat_t* sl, const enzyme *fn)
{
    double index_time = yak_realtime();
    int i;

	init_all_ul_t(&UL_INF, &R_INF);
    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_scall_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);
	fprintf(stderr, "[M::%s::] ==> # reads: %lu, # bases: %lu\n", __func__, UL_INF.n, sl->total_base);
	// fprintf(stderr, "[M::%s::] ==> # bases: %lu; # corrected bases: %lu; # recorrected bases: %lu\n", 
	// __func__, sl->num_bases, sl->num_corrected_bases, sl->num_recorrected_bases);
	fprintf(stderr, "[M::%s::] ==> # fully covered reads: %lu\n", __func__, sl->num_bases);
	gen_ul_vec_rid_t(&UL_INF, &R_INF, NULL);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1303c7
movsd %xmm0, (%rsp)
leaq 0xb38e1(%rip), %rdi     # 0x28b318
leaq 0xb37f2(%rip), %rsi     # 0x28b230
callq 0x347e4
cmpl $0x0, 0x8(%r14)
jle 0x1d7ab1
leaq 0x5bb56(%rip), %r12     # 0x2335a7
leaq 0x7e(%rip), %r13        # 0x1d7ad6
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1d7ac5
movq %rax, %rbp
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movl $0x3, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x104984
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1d7a5b
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x2a5e6
movl $0x1, %eax
jmp 0x1d7ac7
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_O1/chhylp123[P]hifiasm/inter.cpp
// Function: rescall_ul_pipeline(uldat_t*, enzyme const*)
int rescall_ul_pipeline(uldat_t* sl, const enzyme *fn)
{
    double index_time = yak_realtime();
    int32_t i; 
	///debug
	// overall_zdbg = init_mul_debug_prt_t(UL_INF.n);

    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_rescall_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);
	fprintf(stderr, "[M::%s::] ==> # reads: %lu, # bases: %lu, # fully corrected reads: %lu\n", 
	__func__, UL_INF.n, sl->total_base, sl->num_corrected_bases);
	// fprintf(stderr, "[M::%s::] ==> # bases: %lu; # corrected bases: %lu; # recorrected bases: %lu\n", 
	// __func__, sl->num_bases, sl->num_corrected_bases, sl->num_recorrected_bases);
	// gen_ul_vec_rid_t(&UL_INF);
	// for (i = 0; i < UL_INF.n; i++) {
	// 	fprintf(stderr, "[M::%s] rid::%d, dd::%u\n", __func__, i, UL_INF.a[i].dd);
	// }
	// print_mul_debug_prt_t(asm_opt.output_file_name, overall_zdbg);
	// print_raw_uls_seq_direct(sl->uu->ug, &UL_INF, asm_opt.output_file_name);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1303c7
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1d7f80
leaq 0x5b687(%rip), %r12     # 0x2335a7
leaq 0x7e(%rip), %r13        # 0x1d7fa5
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1d7f94
movq %rax, %rbp
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movl $0x3, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x104984
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1d7f2a
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x2a68f
movl $0x1, %eax
jmp 0x1d7f96
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_O1/chhylp123[P]hifiasm/inter.cpp
// Function: recorrect_ul_pipeline(uldat_t*, enzyme const*)
int recorrect_ul_pipeline(uldat_t* sl, const enzyme *fn)
{
    double index_time = yak_realtime();
    int32_t 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(2, worker_ul_recorrect_pipeline, sl, 2);
        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);
	fprintf(stderr, "[M::%s::] ==> # reads: %lu, # processed reads: %lu, # fixed reads: %lu\n", 
	__func__, UL_INF.n, sl->num_bases, sl->num_corrected_bases);
	// fprintf(stderr, "[M::%s::] ==> # bases: %lu; # corrected bases: %lu; # recorrected bases: %lu\n", 
	// __func__, sl->num_bases, sl->num_corrected_bases, sl->num_recorrected_bases);
	// gen_ul_vec_rid_t(&UL_INF);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1303c7
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1d848e
leaq 0x5b179(%rip), %r12     # 0x2335a7
leaq 0x7e(%rip), %r13        # 0x1d84b3
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1d84a2
movq %rax, %rbp
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movl $0x2, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0x104984
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1d8438
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x2a712
movl $0x1, %eax
jmp 0x1d84a4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq