LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: debug_gchain2(asg_t const*, mg_pathv_t*, unsigned long)
void debug_gchain2(const asg_t *g, mg_pathv_t *a, uint64_t n)
{
	uint64_t k, i, v, w, nv; asg_arc_t *av;
	for (k = 1; k < n; k++) {
		v = a[k-1].v; w = a[k].v;
		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (i = 0; i < nv; i++) {
			if(av[i].v == w) break;
		}
		if(i >= nv) {
			// fprintf(stderr, "[M::%s::]\n", __func__);
			fprintf(stderr, "[M::%s::]\tutg%.6dl(%c)\t->\tutg%.6dl(%c)\n", __func__, (int32_t)(v>>1)+1, "+-"[v&1], (int32_t)(w>>1)+1, "+-"[w&1]);
		}
	}
}

// Assembly:
cmpq $0x2, %rdx
jb 0x1d12a4
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
leaq (%r12,%r12,2), %rax
movl -0xc(%r14,%rax,4), %edi
movl (%r14,%rax,4), %edx
movq 0x28(%r15), %rax
movq (%rax,%rdi,8), %rcx
movq %rcx, %rax
andq %r13, %rax
je 0x1d128b
movq 0x8(%r15), %rsi
shrq $0x20, %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0x8, %rcx
xorl %esi, %esi
cmpl %edx, (%rcx,%rsi)
je 0x1d1293
addq $0x18, %rsi
cmpq %rsi, %rax
jne 0x1d127d
movq %rdi, %rsi
callq 0x29807
incq %r12
cmpq %rbx, %r12
jne 0x1d1242
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: reverse_track(mg_pathv_t*, unsigned long)
void reverse_track(mg_pathv_t *a, uint64_t a_n)
{
	int64_t k, hn = (a_n>>1); mg_pathv_t z;
	for (k = a_n-1; k >= 1; k--) a[k].d -= a[k-1].d;

	for (k = 0; k < hn; k++) {
		z = a[k]; a[k] = a[a_n - k - 1]; a[a_n - k - 1] = z;
		a[k].v ^= 1; a[a_n - k - 1].v ^= 1;
	}
	if(a_n&1) a[k].v ^= 1;
}

// Assembly:
leaq -0x1(%rsi), %rax
leaq (%rsi,%rsi,2), %rcx
testq %rax, %rax
jle 0x1d12d1
leaq (%rdi,%rcx,4), %rdx
addq $-0x8, %rdx
movq %rsi, %rax
movl -0xc(%rdx), %r8d
subl %r8d, (%rdx)
addq $-0xc, %rdx
decq %rax
cmpq $0x1, %rax
ja 0x1d12bd
cmpq $0x2, %rsi
jae 0x1d12db
xorl %eax, %eax
jmp 0x1d1332
movq %rsi, %rax
shrq %rax
leaq (%rdi,%rcx,4), %rcx
addq $-0xc, %rcx
movq %rdi, %rdx
movq %rax, %r8
movl 0x8(%rdx), %r9d
movl %r9d, -0x8(%rsp)
movq (%rdx), %r9
movq %r9, -0x10(%rsp)
movl 0x8(%rcx), %r9d
movl %r9d, 0x8(%rdx)
movq (%rcx), %r9
movq %r9, (%rdx)
movq -0x10(%rsp), %r9
movq %r9, (%rcx)
movl -0x8(%rsp), %r9d
movl %r9d, 0x8(%rcx)
xorb $0x1, (%rdx)
xorb $0x1, (%rcx)
addq $0xc, %rdx
addq $-0xc, %rcx
decq %r8
jne 0x1d12ef
testb $0x1, %sil
je 0x1d1340
leaq (%rax,%rax,2), %rax
xorb $0x1, (%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: print_chain(mg_lchain_t*, unsigned int)
void print_chain(mg_lchain_t *a, uint32_t a_n)
{
	uint32_t k;
	for (k = 0; k < a_n; k++) {
		if(a[k].off!=-1) {
			fprintf(stderr, "%u\t%u\t%c\tutg%.6dl\t%u\t%u\n", 
					a[k].qs, a[k].qe, "+-"[a[k].v&1], (int32_t)(a[k].v>>1)+1, a[k].rs, a[k].re);
		} else {
			fprintf(stderr, "*\t*\t%c\tutg%.6dl\t*\t*\n", "+-"[a[k].v&1], (int32_t)(a[k].v>>1)+1);
		}
	}
}

// Assembly:
testl %esi, %esi
je 0x1d13a3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq 0xc3c62(%rip), %r15     # 0x294fe0
cmpl $-0x1, (%rbx)
movq (%r15), %rsi
movq %rbx, %rdi
jne 0x1d1390
callq 0x29937
jmp 0x1d1395
callq 0x298f0
addq $0x28, %rbx
decq %r14
jne 0x1d137e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d28bb
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)
movq 0x10(%rsi,%rcx), %rax
movq %rax, 0xc(%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 0x1d2813
movl %ecx, 0x14(%rbx)
addq %r13, %rax
movl 0x10(%rax), %ecx
movslq 0xc(%rbx), %rdx
cmpq %rdx, %rcx
jge 0x1d2825
movl %ecx, 0xc(%rbx)
movl 0x8(%rax), %edx
movslq 0x18(%rbx), %rsi
cmpq %rsi, %rdx
jle 0x1d2834
movl %edx, 0x18(%rbx)
movl 0x14(%rax), %r8d
movslq 0x10(%rbx), %rax
cmpq %rax, %r8
jle 0x1d2845
movl %r8d, 0x10(%rbx)
movq $0x0, 0x20(%rsp)
testq %rbp, %rbp
je 0x1d2887
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 0x1ce6cc
jmp 0x1d289d
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %r9
callq 0x363d1
addq %rax, %r14
incq %rbp
cmpq %rbp, %r15
jne 0x1d27f0
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_O3/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 0x1d2d80
xorl %eax, %eax
jmp 0x1d2e21
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1d2dc4
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rdx, %rcx
movq %rcx, 0x10(%r12)
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%r12)
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_O3/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), %ecx
movl 0x8(%rdi), %eax
movslq 0xc(%rsi), %r8
cmpq %r8, %rcx
cmovgq %rcx, %r8
movslq 0x10(%rsi), %rdx
cmpq %rdx, %rax
cmovlq %rax, %rdx
cmpq %rdx, %r8
jge 0x1d4947
movl %r8d, %r9d
subl %ecx, %r9d
movl %eax, %r10d
subl %edx, %r10d
subl %ecx, %edx
subl %r8d, %eax
testb $0x1, (%rdi)
cmovel %r9d, %r10d
cmovel %edx, %eax
movl %r10d, 0xc(%rsi)
movl %eax, 0x10(%rsi)
movl $0x1, %eax
retq
pushq %rax
leaq 0x6e6c9(%rip), %rdi     # 0x243018
leaq 0x6b305(%rip), %rsi     # 0x23fc5b
leaq 0x6e6c3(%rip), %rcx     # 0x243020
movl $0x3d66, %edx           # imm = 0x3D66
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/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, %r13
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 0x1d5598
movq %r8, %rbp
xorl %r15d, %r15d
movq (%rbp), %rax
leaq (%r15,%r15,4), %rcx
cmpl $-0x1, 0x8(%rax,%rcx,8)
jne 0x1d55bb
leaq (%rax,%rcx,8), %r14
leaq 0x28(%r14), %r9
movl 0x4(%r14), %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 %r13
pushq %rax
callq 0x1d46b3
addq $0x40, %rsp
movl 0x4(%r14), %eax
shlq $0x21, %rax
sarq $0x21, %rax
addq %rax, %r15
incq %r15
cmpq %r12, %r15
jl 0x1d551d
movq 0x8(%r13), %rdx
jmp 0x1d559a
xorl %edx, %edx
movq (%r13), %rsi
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d4e4d
leaq 0x6b5b5(%rip), %rdi     # 0x240b77
leaq 0x6a692(%rip), %rsi     # 0x23fc5b
leaq 0x6dbdc(%rip), %rcx     # 0x2431ac
movl $0x3ea5, %edx           # imm = 0x3EA5
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: rov2uov_ctg(unsigned long, ul_idx_t const*, utg_rid_dt*, uc_block_t*, ul_ov_t*, unsigned int, unsigned int)
uint64_t rov2uov_ctg(uint64_t rid, const ul_idx_t *uref, utg_rid_dt *ru_map, uc_block_t *rovlp, ul_ov_t *res, uint32_t qidx, uint32_t adjust_rev)
{
    uint64_t ori = ru_map->u&1, ts, te;
    if(!ori) {
        ts = rovlp->ts; te = rovlp->te;
    } else {
        ts = Get_READ_LENGTH(R_INF, rid) - rovlp->te;
        te = Get_READ_LENGTH(R_INF, rid) - rovlp->ts;
    }
    
    ts += ru_map->pos; te += ru_map->pos;
    if(ts >= 0 && te <= uref->ug->g->seq[ru_map->u>>1].len) {
        memset(res, 0, sizeof(*res));
        res->qn = qidx; 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); res->sec = ru_map->off;
        if(adjust_rev && res->rev) {///for linear chaining
            res->ts = uref->ug->g->seq[ru_map->u>>1].len - te;
            res->te = uref->ug->g->seq[ru_map->u>>1].len - ts;
			res->sec = uref->ug->u.a[ru_map->u>>1].n - ru_map->off;
        }
        return 1;
    } 
    return 0;
}

// Assembly:
movl (%rdx), %r10d
testb $0x1, %r10b
jne 0x1d5d87
movl 0xc(%rcx), %eax
movl 0x10(%rcx), %edi
jmp 0x1d5da3
leaq 0xc04a2(%rip), %rax     # 0x296230
movq 0x18(%rax), %rax
movq (%rax,%rdi,8), %rax
movl 0xc(%rcx), %r11d
movq %rax, %rdi
subq %r11, %rdi
subl 0x10(%rcx), %eax
pushq %rbp
pushq %r14
pushq %rbx
movl 0x8(%rdx), %r11d
addq %r11, %rdi
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, %rdi
jbe 0x1d5dd5
xorl %eax, %eax
jmp 0x1d5e9d
movl 0x20(%rsp), %ebx
andl $0x1, %r10d
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%r8)
movq $0x0, 0x14(%r8)
movl %r9d, (%r8)
movq 0x4(%rcx), %r9
movq %r9, 0x4(%r8)
movl (%rdx), %r9d
shrl %r9d
movl %r9d, 0xc(%r8)
addl %eax, %r11d
movl %r11d, 0x10(%r8)
movl %edi, 0x14(%r8)
movl 0x20(%rcx), %eax
shll $0x17, %eax
andl $0x40000000, %eax       # imm = 0x40000000
movl %eax, 0x18(%r8)
movl 0x20(%rcx), %r9d
shrl $0x5, %r9d
andl $0x1, %r9d
xorl %ecx, %ecx
cmpl %r9d, %r10d
setne %cl
shll $0x1f, %ecx
orl %eax, %ecx
movl %ecx, 0x18(%r8)
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl 0x4(%rdx), %eax
orl %ecx, %eax
movl %eax, 0x18(%r8)
movl $0x1, %eax
testl %ebx, %ebx
je 0x1d5e9d
cmpl %r9d, %r10d
je 0x1d5e9d
movq (%rsi), %rsi
movq 0x18(%rsi), %r9
movq 0x20(%r9), %r9
movl (%rdx), %r10d
shrl %r10d
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl (%r9,%r10,8), %ebp
andl %ebx, %ebp
subl %edi, %ebp
movl %ebp, 0x10(%r8)
andl (%r9,%r10,8), %ebx
subl %r11d, %ebx
movl %ebx, 0x14(%r8)
movq 0x10(%rsi), %rsi
leaq (%r10,%r10,4), %rdi
movl 0x10(%rsi,%rdi,8), %esi
subl 0x4(%rdx), %esi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
orl %ecx, %esi
movl %esi, 0x18(%r8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14ac07
movq (%r13), %r13
cmpq %rbp, %r13
je 0x1d70a3
cmpq 0x80(%r12), %r13
jae 0x1d70a3
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 0x13df01
movl (%rbp), %eax
cmpq %r15, %rax
je 0x1d70e6
movl 0x10(%rsp), %ecx
cmpq %r15, %rcx
je 0x1d70f8
movq 0x18(%rsp), %r13
cmpq $-0x1, %r13
je 0x1d7108
cmpq 0x80(%r12), %r13
jae 0x1d7108
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 0x13df01
movl (%rbp), %eax
cmpq %r15, %rax
jne 0x1d70ef
movq %r13, (%r14)
movl 0x10(%rsp), %eax
jmp 0x1d70fb
movl 0x10(%rsp), %ecx
cmpq %r15, %rcx
jne 0x1d7108
movq %r13, (%r14)
xorl $0x1, %eax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x1d710a
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_O3/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 0x1d71bc
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 0x1d7011
testq %rax, %rax
je 0x1d71bc
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 0x1d71ca
movq (%rbx), %r8
shrl %edi
movl (%r8,%rdi,4), %edi
cmpq %rdi, %rcx
jne 0x1d71be
incq %rsi
addq $0x24, %r15
cmpq %r14, %rsi
jb 0x1d7188
jmp 0x1d71be
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %rax
jmp 0x1d71be
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d79a1
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 0x19e55c
testq %rbx, %rbx
jle 0x1d79a4
movq %rbx, %r12
negq %r12
leaq 0x1c(%r14), %r15
movl $0x1, %r13d
xorl %edi, %edi
movq %r12, %rax
addq %r13, %rax
je 0x1d7884
movl 0x4(%r15), %eax
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rdi, %rcx
cmpl 0x4(%r14,%rcx), %eax
jne 0x1d7884
movq %rdi, %rax
jmp 0x1d78ac
movq %r13, %rcx
subq %rdi, %rcx
movq %r13, %rax
cmpq $0x2, %rcx
jl 0x1d78ac
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %r14, %rdi
addq %rax, %rdi
movq %r15, %rsi
callq 0x19e2b4
movq %r13, %rax
leaq (%r12,%r13), %rcx
incq %rcx
incq %r13
addq $0x1c, %r15
movq %rax, %rdi
cmpq $0x1, %rcx
jne 0x1d7861
leaq 0x1c(%r14), %rcx
xorl %eax, %eax
xorl %edx, %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %r9
leaq (%r9,%rdx), %rdi
cmpl $-0x1, 0xc(%r14,%rdi)
je 0x1d7990
addq %r14, %rdi
leaq 0x1(%rdx), %rsi
cmpq %rbx, %rsi
jge 0x1d796b
movl 0x8(%rdi), %r8d
addq %rcx, %rdx
addq %r9, %rdx
movq %rsi, %r9
cmpl 0x4(%rdx), %r8d
jb 0x1d796b
jne 0x1d794b
cmpl $-0x1, 0xc(%rdx)
je 0x1d794b
movl 0x18(%rdi), %r10d
movl 0x18(%rdx), %r11d
xorl %r10d, %r11d
js 0x1d794b
movl (%rdi), %r11d
cmpl (%rdx), %r11d
jne 0x1d794b
testl %r10d, %r10d
js 0x1d7959
movl 0x14(%rdi), %r11d
movl $0x14, %r10d
cmpl 0x10(%rdx), %r11d
jne 0x1d794b
movl 0x8(%rdx), %r8d
movl %r8d, 0x8(%rdi)
movl (%rdx,%r10), %r11d
movl %r11d, (%rdi,%r10)
movl $0xffffffff, 0xc(%rdx)  # imm = 0xFFFFFFFF
incq %r9
addq $0x1c, %rdx
cmpq %rbx, %r9
jl 0x1d78fc
jmp 0x1d796b
movl 0x14(%rdx), %r11d
movl $0x10, %r10d
cmpl 0x10(%rdi), %r11d
je 0x1d7934
jmp 0x1d794b
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
incq %rax
movups (%rdi), %xmm0
movups 0xc(%rdi), %xmm1
movups %xmm1, 0xc(%r14,%rdx)
movups %xmm0, (%r14,%rdx)
movq %rsi, %rdx
jmp 0x1d7996
incq %rdx
movq %rdx, %rsi
cmpq %rbx, %rsi
jne 0x1d78cb
jmp 0x1d79a6
xorl %eax, %eax
retq
xorl %eax, %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_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 0x1d938f
movq 0x10(%rsi), %rdi
movq (%rdi,%rax,8), %rsi
movq %rax, %r8
subq %rsi, %r8
cmpq %rax, %r8
jae 0x1d938f
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 0x1d938e
movl %r9d, %r9d
cmpq %rdx, %r9
jbe 0x1d9389
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 0x1d9353
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
movq 0x8(%rdx), %rax
addq %rcx, %rax
cmpq %rax, 0x10(%rdx)
jae 0x1d9b2d
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)
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x1d9bf1
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), %rcx
movl %ebp, (%rcx,%r13)
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jne 0x1d9bba
leaq (%rdx,%rdx), %rcx
testq %rdx, %rdx
movl $0x2, %edx
cmoveq %rdx, %rcx
movq %rcx, 0x10(%rbx)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rsi
addq %rcx, %rsi
movq %rax, %rdi
callq 0x2370
movl $0xc0000000, %edi       # imm = 0xC0000000
movq %rax, (%rbx)
movq (%r14), %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 (%rcx,%r13), %xmm0
movups 0xc(%rcx,%r13), %xmm1
movups %xmm1, 0xc(%rax,%rsi)
movups %xmm0, (%rax,%rsi)
movl %r15d, %eax
incl %r15d
cmpq %rax, 0x8(%r14)
ja 0x1d9b49
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: 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:
movq 0x20(%rdx), %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x1d9f18
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq $0x1, %rcx
jne 0x1d9e1d
movq 0x30(%rdx), %rsi
testb $0x40, 0x20(%rsi)
jne 0x1d9f11
xorl %eax, %eax
jmp 0x1d9e36
leaq -0x1(%rcx), %rax
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
cmpq %r10, %rax
jne 0x1d9e36
movb $0x1, %r11b
xorl %r9d, %r9d
xorl %esi, %esi
jmp 0x1d9e78
movq 0x20(%rdi), %r10
movq 0x30(%rdx), %r11
xorl %esi, %esi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movq %rax, %r14
movq %r14, %r8
incq %r9
leaq (%r14,%r14,8), %r14
movl (%r11,%r14,4), %r15d
xorl %r12d, %r12d
cmpl $0x0, (%r10,%r15,8)
movl 0x14(%r11,%r14,4), %r14d
setns %r12b
addq %r12, %rsi
cmpq %rbx, %r14
jne 0x1d9e4b
xorl %r11d, %r11d
movq %rax, %r10
xorl %eax, %eax
cmpq %rcx, %r9
jne 0x1d9f11
cmpq %rcx, %rsi
sete %al
testq %rsi, %rsi
sete %r9b
orb %al, %r9b
movl $0x1, %eax
jne 0x1d9f11
testb %r11b, %r11b
je 0x1d9ea4
xorl %r9d, %r9d
jmp 0x1d9ed3
movq 0x20(%rdi), %rax
movq 0x30(%rdx), %r11
xorl %r9d, %r9d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq (%r10,%r10,8), %r10
movl (%r11,%r10,4), %r14d
cmpl $0x0, (%rax,%r14,8)
jns 0x1d9ed3
leaq (%r11,%r10,4), %r10
incq %r9
movl 0x14(%r10), %r10d
cmpq %rbx, %r10
jne 0x1d9eb4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r8
je 0x1d9f04
movq 0x20(%rdi), %rdi
movq 0x30(%rdx), %rdx
leaq (%r8,%r8,8), %r8
movl (%rdx,%r8,4), %r10d
cmpl $0x0, (%rdi,%r10,8)
jns 0x1d9f04
leaq (%rdx,%r8,4), %r8
incq %r9
movl 0x1c(%r8), %r8d
cmpq %rax, %r8
jne 0x1d9ee5
addq %rsi, %r9
xorl %eax, %eax
cmpq %rcx, %r9
setne %al
incl %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1dbc2d
movq 0x8(%rdi), %rsi
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %eax
leaq (%rdi,%rdi,2), %rdi
leaq (%rsi,%rdi,8), %rsi
addq $0xc, %rsi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
xorl %eax, %eax
xorl %r9d, %r9d
movslq (%rsi,%r9), %r10
testq %r10, %r10
js 0x1dbc23
cmpl %edx, -0x4(%rsi,%r9)
je 0x1dbc30
addq $0x18, %r9
cmpq %r9, %rdi
jne 0x1dbc13
retq
xorl %eax, %eax
retq
movq %r10, %rax
subq %r8, %rax
cmovgq %r10, %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
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb7681(%rip), %r12     # 0x296318
movq 0x50(%r12), %rax
testq %rax, %rax
je 0x1ded11
movq %rdi, %rbx
movq 0x48(%r12), %rcx
movl $0x8, %r13d
movl $0x18, %ebp
leaq 0x64e86(%rip), %r14     # 0x243b41
xorl %r15d, %r15d
cmpl $0x0, (%rcx,%rbp)
je 0x1decd6
incq %r15
addq $0x10, %r13
addq $0x58, %rbp
cmpq %rax, %r15
jb 0x1decbe
jmp 0x1ded11
movq 0xb6303(%rip), %rax     # 0x294fe0
movq (%rax), %rdi
movq 0x10(%r12), %rax
movl (%rax,%r13), %r9d
movq -0x8(%rax,%r13), %rax
movq %rax, (%rsp)
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x22b0
movq 0x48(%r12), %rcx
movq 0x50(%r12), %rax
jmp 0x1decc4
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: 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 0xb75e0(%rip), %rax     # 0x296318
imulq $0x58, %rsi, %r14
addq 0x48(%rax), %r14
movq 0x20(%rdi), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x1d9dec
cmpl $0x1, %eax
je 0x1dedf6
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 0x1d5a72
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_O3/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:
movq (%rdi), %rax
testq %rax, %rax
je 0x1df68e
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
shlq $0x20, %r14
xorl %r12d, %r12d
movl $0x2, %r13d
movq 0x10(%r15), %rcx
movq (%rcx,%r12,8), %rcx
cmpq $-0x1, %rcx
sete %dl
cmpl $-0x1, %ecx
setne %cl
orb %dl, %cl
jne 0x1df67d
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x1df66b
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r13, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq (%r14,%r12), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movq %rdx, (%rax,%rcx,8)
movq (%r15), %rax
incq %r12
cmpq %rax, %r12
jb 0x1df623
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1df744
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 0x1df738
leaq (%r9,%r11,8), %r11
movl 0x8(%r11), %r11d
xorq $0x1, %r11
movq (%rcx,%r11,8), %rbx
movq %rbx, %r11
andq %rdx, %r11
je 0x1df742
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 0x1df72a
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 0x1df70e
testq %r14, %r14
je 0x1df742
incq %r10
cmpq %r8, %r10
jne 0x1df6d0
jmp 0x1df744
xorl %eax, %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: 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 0x1e0c6f
movl (%rdx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x1, %eax
cmpq %rsi, %rcx
je 0x1e0cbf
movl 0x10(%rdx), %ecx
testq %rcx, %rcx
je 0x1e0cc0
leaq 0xb55b2(%rip), %rax     # 0x296230
movq 0x18(%rax), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %rdi, %r9
jb 0x1e0ca5
movq 0x18(%rdx), %rax
movq (%rax,%r10,8), %rax
shrq $0x21, %rax
movq (%r8,%rax,8), %rax
addq %r9, %rax
cmpq %rsi, %rax
jbe 0x1e0cc3
xorl %eax, %eax
cmpq %rsi, %r9
jae 0x1e0cbf
movq 0x18(%rdx), %r11
movl (%r11,%r10,8), %r11d
addq %r11, %r9
incq %r10
cmpq %r10, %rcx
jne 0x1e0c88
retq
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1e1387
cmpl %edx, 0x8(%rsi)
jb 0x1e1387
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
cmpl %edx, -0x1c(%rsi,%rax,4)
jae 0x1e1388
xorl %eax, %eax
testl %edi, %edi
jle 0x1e1383
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 0x1e137b
movl %r8d, %edi
jmp 0x1e137f
addl %ecx, %eax
incl %eax
cmpl %eax, %edi
jg 0x1e1353
cmpl %edi, %eax
jne 0x1e138b
retq
movl %edi, %eax
retq
pushq %rax
leaq 0x5ef69(%rip), %rdi     # 0x2402fc
leaq 0x5e8c1(%rip), %rsi     # 0x23fc5b
leaq 0x62de4(%rip), %rcx     # 0x244185
movl $0x4d48, %edx           # imm = 0x4D48
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1e1408
leal -0x1(%rdi), %eax
movslq %eax, %rcx
leaq (%rcx,%rcx,8), %rcx
cmpl %edx, 0x8(%rsi,%rcx,4)
jb 0x1e1408
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, 0x8(%rsi)
jae 0x1e1408
xorl %eax, %eax
testl %edi, %edi
jle 0x1e1404
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 0x1e13fc
movl %r8d, %edi
jmp 0x1e1400
addl %ecx, %eax
incl %eax
cmpl %eax, %edi
jg 0x1e13d4
cmpl %edi, %eax
jne 0x1e1409
retq
pushq %rax
leaq 0x5eeeb(%rip), %rdi     # 0x2402fc
leaq 0x5e843(%rip), %rsi     # 0x23fc5b
leaq 0x62daf(%rip), %rcx     # 0x2441ce
movl $0x4d57, %edx           # imm = 0x4D57
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1365ef
movsd %xmm0, (%rsp)
leaq 0xb4937(%rip), %rdi     # 0x296318
leaq 0xb4848(%rip), %rsi     # 0x296230
callq 0x33e0d
cmpl $0x0, 0x8(%r14)
jle 0x1e1a5b
leaq 0x5ddfc(%rip), %r12     # 0x23f7f7
leaq 0x7e(%rip), %r13        # 0x1e1a80
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1e1a6f
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 0x1e1a05
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x299c6
movl $0x1, %eax
jmp 0x1e1a71
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: 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 0x1365ef
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1e1fb0
leaq 0x5d8a7(%rip), %r12     # 0x23f7f7
leaq 0x7e(%rip), %r13        # 0x1e1fd5
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1e1fc4
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 0x1e1f5a
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x29a6f
movl $0x1, %eax
jmp 0x1e1fc6
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: 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 0x1365ef
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1e252a
leaq 0x5d32d(%rip), %r12     # 0x23f7f7
leaq 0x7e(%rip), %r13        # 0x1e254f
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1e253e
movq %rax, %rbp
movq %rax, %rdi
callq 0x1cd6b2
movq %rax, 0x48(%rbx)
movl $0x2, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0x1090f4
movq 0x48(%rbx), %rdi
callq 0x1cdb7d
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1e24d4
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x29af2
movl $0x1, %eax
jmp 0x1e2540
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: print_ul_rs(all_ul_t*)
int print_ul_rs(all_ul_t *U_INF)
{
	uint32_t i;
	UC_Read ur;
	init_UC_Read(&ur);
	for (i = 0; i < U_INF->n; i++) {
		retrieve_ul_t(&ur, NULL, U_INF, i, 0, 0, -1);
		fprintf(stderr, ">%s\n", U_INF->nid.a[i].a);
		fprintf(stderr, "%.*s\n", (int)ur.length, ur.seq);		
	}

	destory_UC_Read(&ur);
	return 1;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x32e2d
cmpq $0x0, 0x50(%rbx)
jne 0x1e2743
movq %rsp, %rdi
callq 0x32d68
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x50(%rbx), %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x29dda
jmp 0x1e2730
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: spec_ovlp_occ(eg_srt_t*, int, int, int, int)
int32_t spec_ovlp_occ(eg_srt_t *a, int32_t a_n, int32_t st, int32_t vv, int32_t c_thres)
{
	int32_t i, dst = a[st].d, occ = 1;
	if(occ >= c_thres) return 1;
	for (i = st + 1; i < a_n; i++) {
		if(a[i].id == a[st].id) continue;
		if(a[i].d - dst <= vv) {
			occ++;
			if(occ >= c_thres) return 1; 
		}
	}

	for (i = st - 1; i >= 0; i--) {
		if(a[i].id == a[st].id) continue;
		if(dst - a[i].d <= vv) {
			occ++;
			if(occ >= c_thres) return 1; 
		}
	}	
	return 0;
}

// Assembly:
movl $0x1, %eax
cmpl $0x2, %r8d
jl 0x1e2a5c
pushq %rbp
pushq %rbx
movslq %edx, %rbx
leaq (%rbx,%rbx,2), %rax
leaq (%rdi,%rax,8), %r11
movl 0x10(%r11), %r9d
incl %ebx
movl $0x1, %r10d
cmpl %esi, %ebx
jge 0x1e2a13
movl 0x14(%r11), %eax
movslq %ebx, %r10
leaq (%r10,%r10,2), %r10
leaq (%rdi,%r10,8), %rbx
addq $0x14, %rbx
movl %edx, %ebp
notl %ebp
addl %esi, %ebp
movl $0x1, %r10d
cmpl %eax, (%rbx)
je 0x1e2a0b
movl -0x4(%rbx), %esi
subl %r9d, %esi
cmpl %ecx, %esi
jg 0x1e2a0b
incl %r10d
cmpl %r8d, %r10d
jge 0x1e2a55
addq $0x18, %rbx
decl %ebp
jne 0x1e29f5
xorl %eax, %eax
testl %edx, %edx
jle 0x1e2a5a
movl 0x14(%r11), %esi
movl %edx, %edx
leaq (%rdx,%rdx,2), %r11
incq %rdx
leaq (%rdi,%r11,8), %rdi
addq $-0x4, %rdi
cmpl %esi, (%rdi)
je 0x1e2a46
movl %r9d, %r11d
subl -0x4(%rdi), %r11d
cmpl %ecx, %r11d
jg 0x1e2a46
incl %r10d
cmpl %r8d, %r10d
jge 0x1e2a55
decq %rdx
addq $-0x18, %rdi
cmpq $0x1, %rdx
ja 0x1e2a2e
jmp 0x1e2a5a
movl $0x1, %eax
popq %rbx
popq %rbp
retq