LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/inter.cpp
// Function: clear_all_ul_t(all_ul_t*)
void clear_all_ul_t(all_ul_t *x)
{
	uint64_t k, rlen;
	for (k = 0; k < x->n; k++) {
        rlen = x->a[k].rlen;
        free(x->a[k].bb.a); free(x->a[k].N_site.a); free(x->a[k].r_base.a); 
        memset(&(x->a[k]), 0, sizeof(x->a[k])); x->a[k].rlen = rlen;
    }
	free(x->ridx.idx.a); free(x->ridx.occ.a); memset(&(x->ridx), 0, sizeof((x->ridx)));

	// if(x->mm) {
	// 	for (k = 0; k < x->mm->n; k++) {
	// 		free(x->mm->a[k].a); memset(&(x->mm->a[k]), 0, sizeof(x->mm->a[k])); 
	// 	}
	// 	free(x->mm->a); free(x->mm); x->mm = NULL;
	// }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x300dde
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x30(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
imulq $0x58, -0x10(%rbp), %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x2100
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x300d24
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2100
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: trans_base_infer(ma_ug_t*, asg_t*, ug_opt_t*, kv_u_trans_t*, bubble_type*)
void trans_base_infer(ma_ug_t *ug, asg_t *sg, ug_opt_t *uopt, kv_u_trans_t *res, bubble_type *bub)
{
    ug_trans_t sl; 
    init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
    init_ug_trans_t(&sl, uopt, 0, asm_opt.trans_mer_length, asm_opt.trans_win, asm_opt.max_n_chain, 
	1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate_sec, 1.0-asm_opt.trans_base_rate_sec, 
	0.85, asm_opt.thread_num, 512, 3, 1, ug, sg, bub, 1);
	// gen_trans_base_count(&sl, res);
	gen_trans_base_count_comp(&sl, res);
	if(!bub) {
		destory_bubbles(sl.bub); free(sl.bub);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
callq 0x9690
leaq 0xbd0cc(%rip), %rax     # 0x3c47f8
movl 0xd0(%rax), %esi
leaq 0xbd0bf(%rip), %rdi     # 0x3c47f8
callq 0x3b60
movq -0x20(%rbp), %rsi
leaq 0xbd0af(%rip), %rax     # 0x3c47f8
movl 0x8c(%rax), %ecx
leaq 0xbd0a2(%rip), %rax     # 0x3c47f8
movl 0x9c(%rax), %r8d
leaq 0xbd094(%rip), %rax     # 0x3c47f8
movl 0xe8(%rax), %r9d
leaq 0xbd086(%rip), %rax     # 0x3c47f8
movss 0x170(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x7a87a(%rip), %xmm0    # 0x382000
subsd %xmm1, %xmm0
leaq 0xbd067(%rip), %rax     # 0x3c47f8
movss 0x170(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x7a85b(%rip), %xmm1    # 0x382000
subsd %xmm2, %xmm1
leaq 0xbd048(%rip), %rax     # 0x3c47f8
movss 0x174(%rax), %xmm2
cvtss2sd %xmm2, %xmm3
movsd 0x7a83c(%rip), %xmm2    # 0x382000
subsd %xmm3, %xmm2
leaq 0xbd029(%rip), %rax     # 0x3c47f8
movss 0x174(%rax), %xmm3
cvtss2sd %xmm3, %xmm4
movsd 0x7a81d(%rip), %xmm3    # 0x382000
subsd %xmm4, %xmm3
leaq 0xbd00a(%rip), %rax     # 0x3c47f8
movl 0x7c(%rax), %ebx
movq -0x10(%rbp), %r11
movq -0x18(%rbp), %r10
movq -0x30(%rbp), %rax
leaq -0x140(%rbp), %rdi
xorl %edx, %edx
movsd 0x7f05a(%rip), %xmm4    # 0x386868
movl %ebx, (%rsp)
movl $0x200, 0x8(%rsp)       # imm = 0x200
movl $0x3, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl $0x1, 0x38(%rsp)
callq 0x300e20
movq -0x28(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x303410
cmpq $0x0, -0x30(%rbp)
jne 0x307874
movq -0x118(%rbp), %rdi
callq 0x1c4a90
movq -0x118(%rbp), %rdi
callq 0x2210
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: trans_base_mmhap_infer(ma_ug_t*, asg_t*, ug_opt_t*, kv_u_trans_t*)
void trans_base_mmhap_infer(ma_ug_t *ug, asg_t *sg, ug_opt_t *uopt, kv_u_trans_t *res)
{
    ug_trans_t sl; 
    init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
    init_ug_trans_t(&sl, uopt, 0, asm_opt.trans_mer_length, asm_opt.trans_win, asm_opt.max_n_chain, 
	1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate_sec, 1.0-asm_opt.trans_base_rate_sec, 
	0.85, asm_opt.thread_num, 512, 3, 1, ug, sg, NULL, 0);
	// gen_trans_base_count(&sl, res);
	gen_trans_base_count_mmhap_comp(&sl, res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
callq 0x9690
leaq 0xbcf50(%rip), %rax     # 0x3c47f8
movl 0xd0(%rax), %esi
leaq 0xbcf43(%rip), %rdi     # 0x3c47f8
callq 0x3b60
movq -0x20(%rbp), %rsi
leaq 0xbcf33(%rip), %rax     # 0x3c47f8
movl 0x8c(%rax), %ecx
leaq 0xbcf26(%rip), %rax     # 0x3c47f8
movl 0x9c(%rax), %r8d
leaq 0xbcf18(%rip), %rax     # 0x3c47f8
movl 0xe8(%rax), %r9d
leaq 0xbcf0a(%rip), %rax     # 0x3c47f8
movss 0x170(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x7a6fe(%rip), %xmm0    # 0x382000
subsd %xmm1, %xmm0
leaq 0xbceeb(%rip), %rax     # 0x3c47f8
movss 0x170(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x7a6df(%rip), %xmm1    # 0x382000
subsd %xmm2, %xmm1
leaq 0xbcecc(%rip), %rax     # 0x3c47f8
movss 0x174(%rax), %xmm2
cvtss2sd %xmm2, %xmm3
movsd 0x7a6c0(%rip), %xmm2    # 0x382000
subsd %xmm3, %xmm2
leaq 0xbcead(%rip), %rax     # 0x3c47f8
movss 0x174(%rax), %xmm3
cvtss2sd %xmm3, %xmm4
movsd 0x7a6a1(%rip), %xmm3    # 0x382000
subsd %xmm4, %xmm3
leaq 0xbce8e(%rip), %rax     # 0x3c47f8
movl 0x7c(%rax), %r11d
movq -0x10(%rbp), %r10
movq -0x18(%rbp), %rax
leaq -0x138(%rbp), %rdi
xorl %edx, %edx
movsd 0x7eee1(%rip), %xmm4    # 0x386868
xorl %ebx, %ebx
movl %r11d, (%rsp)
movl $0x200, 0x8(%rsp)       # imm = 0x200
movl $0x3, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
callq 0x300e20
movq -0x28(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x306720
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_graph_bin_sysm(void*, long, int)
static void worker_for_graph_bin_sysm(void *data, long i, int tid) // callback for kt_for()
{
    ug_bin_t *s = (ug_bin_t*)data; 
	if(s->ug->g->seq[i].del) return;
	if((s->is_cnt) && (!s->is_ovlp)) detect_sysm_graph_bin(s->mm, i);
	if((!s->is_cnt) && (s->is_ovlp)) srt_kv_emask_t(&(s->mm->a[i]), &(s->mk[tid]), i, s->udb.ug);
	if((s->is_cnt) && (s->is_ovlp)) detect_sysm_graph_bin(s->mm, i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x308e0f
jmp 0x308ecb
movq -0x20(%rbp), %rax
cmpl $0x0, 0xac(%rax)
je 0x308e3f
movq -0x20(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
jne 0x308e3f
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
callq 0x2cdbd0
movq -0x20(%rbp), %rax
cmpl $0x0, 0xac(%rax)
jne 0x308e9b
movq -0x20(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x308e9b
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq (%rax), %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0xf0(%rax), %rsi
movslq -0x14(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rcx
callq 0x2cc100
movq -0x20(%rbp), %rax
cmpl $0x0, 0xac(%rax)
je 0x308ecb
movq -0x20(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x308ecb
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
callq 0x2cdbd0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_log2(float)
static inline float mg_log2(float x) // NB: this doesn't work when x<2
{
	union { float f; uint32_t i; } z = { x };
	float log_2 = ((z.i >> 23) & 255) - 128;
	z.i &= ~(255 << 23);
	z.i += 127 << 23;
	log_2 += (-0.34484843f * z.f + 2.02466578f) * z.f - 0.67487759f;
	return log_2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x17, %eax
movzbl %al, %eax
addl $-0x80, %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x807fffff, %eax       # imm = 0x807FFFFF
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x3f800000, %eax       # imm = 0x3F800000
movl %eax, -0x8(%rbp)
movss -0x8(%rbp), %xmm0
movss 0x860e0(%rip), %xmm1    # 0x39079c
mulss %xmm1, %xmm0
movss 0x860d8(%rip), %xmm1    # 0x3907a0
addss %xmm1, %xmm0
movss -0x8(%rbp), %xmm1
mulss %xmm1, %xmm0
movss 0x860bb(%rip), %xmm1    # 0x390798
addss %xmm1, %xmm0
addss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: normal_sc(unsigned long, int)
inline int32_t normal_sc(uint64_t w, int32_t sc)
{
    if(w < 255){
        int32_t tmp = (int)(0.00392156862745098 * w * sc); // 0.00392... = 1/255
        sc = tmp > 1? tmp : 1;
    }
    return sc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0xff, -0x8(%rbp)
jae 0x30cb46
movaps 0x75524(%rip), %xmm0    # 0x382010
movq -0x8(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x75523(%rip), %xmm0    # 0x382020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x83c14(%rip), %xmm0    # 0x390728
mulsd %xmm1, %xmm0
cvtsi2sdl -0xc(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jle 0x30cb36
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x30cb40
movl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x30cb40
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: cal_gchain_sc(mg_path_dst_t const*, mg_lchain_t const*, mg_lchain_t const*, long*, long, float, float)
inline int32_t cal_gchain_sc(const mg_path_dst_t *dj, const mg_lchain_t *li, const mg_lchain_t *lc, int64_t *f, int64_t b_w, float diff_thre, float chn_pen_gap)
{
	// const mg_lchain_t *lj;
	int32_t gap, sc;
	float lin_pen, log_pen;
	if (dj->n_path == 0) return INT32_MIN;
	gap = dj->dist - dj->target_dist;
	// lj = &lc[dj->meta];
	if (gap < 0) gap = -gap;
	if ((gap > ((dj->target_dist)*diff_thre)) && (gap > b_w)) return INT32_MIN;
	// if (lj->qe <= li->qs) sc = li->score;
	// else sc = (int32_t)((double)(li->qe - lj->qe) / (li->qe - li->qs) * li->score + .499); // dealing with overlap on query
	sc = li->score;
	//sc += dj->mlen; // TODO: is this line the right thing to do?
	// if (dj->is_0) sc += ref_bonus;
	lin_pen = chn_pen_gap * (float)gap;
	log_pen = gap >= 2? mg_log2(gap) : 0.0f;
	sc -= (int32_t)(lin_pen + log_pen);
	sc += f[dj->meta];
	return sc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0x30cb93
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0x30cc65
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x30cbb2
xorl %eax, %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
cvtsi2ssl -0x3c(%rbp), %xmm0
movq -0x10(%rbp), %rax
cvtsi2ssl 0x4(%rax), %xmm1
mulss -0x34(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x30cbe0
movslq -0x3c(%rbp), %rax
cmpq -0x30(%rbp), %rax
jle 0x30cbe0
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0x30cc65
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x40(%rbp)
movss -0x38(%rbp), %xmm0
cvtsi2ssl -0x3c(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
cmpl $0x2, -0x3c(%rbp)
jl 0x30cc14
cvtsi2ssl -0x3c(%rbp), %xmm0
callq 0x30a670
movss %xmm0, -0x4c(%rbp)
jmp 0x30cc1e
xorps %xmm0, %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x30cc1e
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x44(%rbp), %xmm0
addss -0x48(%rbp), %xmm0
cvttss2si %xmm0, %ecx
movl -0x40(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl %ecx, %ecx
movq (%rax,%rcx,8), %rcx
movslq -0x40(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: is_mask_err_full(ul_ov_t*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
inline uint64_t is_mask_err_full(ul_ov_t *sa, uint64_t sn, uint64_t qs, uint64_t qe, uint64_t ts, uint64_t te)
{
	uint64_t k;
	for (k = 0; k < sn; k++) {
		if(sa[k].qs <= qs && sa[k].qe >= qe && sa[k].ts <= ts && sa[k].te >= te) break;
	}
	if(k < sn) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x30d2e4
movq -0x10(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpq -0x20(%rbp), %rax
ja 0x30d2d4
movq -0x10(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x28(%rbp), %rax
jb 0x30d2d4
movq -0x10(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpq -0x30(%rbp), %rax
ja 0x30d2d4
movq -0x10(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
cmpq -0x38(%rbp), %rax
jb 0x30d2d4
jmp 0x30d2e4
jmp 0x30d2d6
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x30d274
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x30d2f8
movq $0x1, -0x8(%rbp)
jmp 0x30d300
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: overlap_region2ul_ov_t(overlap_region*, ul_ov_t*, unsigned long)
inline void overlap_region2ul_ov_t(overlap_region *in, ul_ov_t *ou, uint64_t tl)
{
	ou->qn = in->x_id; ou->tn = in->y_id; ou->el = 1; 
	ou->sec = in->non_homopolymer_errors; 
	ou->rev = in->y_pos_strand;
	ou->qs = in->x_pos_s; ou->qe = in->x_pos_e+1;
	if(ou->rev) {
		ou->ts = tl - (in->y_pos_e+1); 
		ou->te = tl - in->y_pos_s;
	} else {
		ou->ts = in->y_pos_s; 
		ou->te = in->y_pos_e+1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x30d3f1
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x30d410
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: comput_linear_sc(ul_ov_t*, ul_ov_t*, double, long)
inline int64_t comput_linear_sc(ul_ov_t *li, ul_ov_t *lj, double diff_ec_ul, int64_t bw)
{	///li is the suffix of lj
	int64_t dq, dt, dd, mm;
	if(lj->te > li->te) return INT32_MIN;
	dq = li->qe - lj->qs; dt = li->te - lj->ts;
	dd = (dq>dt? dq-dt:dt-dq);
	mm = MAX(dq, dt); mm *= diff_ec_ul; if(mm < bw) mm = bw;
	if(dd > mm) return INT32_MIN;
	return li->qe - li->qs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jbe 0x30d452
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x30d51c
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x30d492
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x30d49e
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jl 0x30d4ba
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x30d4c2
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movsd -0x20(%rbp), %xmm1
cvtsi2sdq -0x48(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x30d4f4
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jle 0x30d508
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x30d51c
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: flat_rovlp_chain_sc(ma_ug_t*, mg_lchain_t*, mg_lchain_t*)
inline int64_t flat_rovlp_chain_sc(ma_ug_t *ug, mg_lchain_t *li, mg_lchain_t *lj)
{
	int64_t iqs, iqe, its, ite, jqs, jqe, jts, jte, ovlp;
	get_r_offset(ug, li, &its, &ite, &iqs, &iqe);
	get_r_offset(ug, lj, &jts, &jte, &jqs, &jqe);
	if(jqs <= iqs && jqe <= iqe && jts <= its && jte <= ite) {
		if(jqs == iqs && jqe == iqe && jts == its && jte == ite) return INT32_MIN;
		ovlp = ((MIN(jqe, iqe) > MAX(jqs, iqs))? (MIN(jqe, iqe) - MAX(jqs, iqs)):0);
		return iqe - iqs - ovlp;
	}
	return INT32_MIN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x28(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0x2984d0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x60(%rbp), %rcx
leaq -0x48(%rbp), %r8
leaq -0x50(%rbp), %r9
callq 0x2984d0
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jg 0x30d6cf
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x30d6cf
movq -0x58(%rbp), %rax
cmpq -0x38(%rbp), %rax
jg 0x30d6cf
movq -0x60(%rbp), %rax
cmpq -0x40(%rbp), %rax
jg 0x30d6cf
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x30d5ee
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x30d5ee
movq -0x58(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x30d5ee
movq -0x60(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x30d5ee
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x30d6d7
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x30d602
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x30d60a
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x30d626
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x30d62e
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
cmpq %rcx, %rax
jle 0x30d6a7
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x30d652
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x30d65d
movq -0x30(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x30d682
movq -0x48(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x30d68d
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xa0(%rbp)
jmp 0x30d6b2
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x30d6b2
movq -0xa0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
subq -0x28(%rbp), %rax
subq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x30d6d7
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: comput_linear_ctg_sc(ul_ov_t*, ul_ov_t*, double, long)
inline int64_t comput_linear_ctg_sc(ul_ov_t *li, ul_ov_t *lj, double diff_ec_ul, int64_t bw)
{	///li is the suffix of lj
	int64_t dq, dt, dd, mm;
	if(lj->te > li->te) return INT32_MIN;
	dq = li->qe - lj->qs; dt = li->te - lj->ts;
	dd = (dq>dt? dq-dt:dt-dq);
	mm = MAX(dq, dt); mm *= diff_ec_ul; if(mm < bw) mm = bw;
	if(dd > mm) return INT32_MIN;
	return li->sec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jbe 0x30d722
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x30d7ea
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x30d762
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x30d76e
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jl 0x30d78a
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x30d792
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movsd -0x20(%rbp), %xmm1
cvtsi2sdq -0x48(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x30d7c4
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jle 0x30d7d8
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x30d7ea
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: chhylp123[P]hifiasm/inter.cpp
// Function: is_rg_connect(asg_t const*, unsigned int, unsigned int)
uint32_t inline is_rg_connect(const asg_t *rg, uint32_t v, uint32_t w)
{
	uint32_t nv = asg_arc_n(rg, v), i; 
	asg_arc_t *av = asg_arc_a(rg, v);
    for (i = 0; i < nv; i++) {
		if((!(av[i].del)) && (av[i].v == w)) return 1;
    }
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x30dd4a
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x30dd3d
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x30dd3d
movl $0x1, -0x4(%rbp)
jmp 0x30dd51
jmp 0x30dd3f
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x30dcfd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: cal_trans_ov_w(ul_ov_t*)
double inline cal_trans_ov_w(ul_ov_t *z)
{
	double nw[2], ml, uml;
	ml = z->qe - z->qs; uml = z->sec; ml -= uml;
    nw[0] = (ml*CHAIN_MATCH) - (uml*CHAIN_UNMATCH);
    ml = z->te - z->ts; uml = z->sec; ml -= uml;
    nw[1] = (ml*CHAIN_MATCH) - (uml*CHAIN_UNMATCH);
    return MIN(nw[0], nw[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movl 0x8(%rax), %eax
subl %ecx, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd 0x787e8(%rip), %xmm2    # 0x386860
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
movl 0x14(%rax), %eax
subl %ecx, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x78788(%rip), %xmm1    # 0x386858
mulsd -0x30(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x20(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x30e111
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x30e11b
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: km_init2
void *km_init2(void *km_par, size_t min_core_size)
{
	kmem_t *km;
	km = (kmem_t*)kcalloc(km_par, 1, sizeof(kmem_t));
	km->par = km_par;
	km->min_core_size = min_core_size > 0? min_core_size : 0x80000;
	return (void*)km;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movl $0x30, %edx
callq 0x30e1a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x10(%rbp)
jbe 0x30e173
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x30e17e
movl $0x80000, %eax          # imm = 0x80000
movq %rax, -0x20(%rbp)
jmp 0x30e17e
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: kcalloc
void *kcalloc(void *_km, size_t count, size_t size)
{
	kmem_t *km = (kmem_t*)_km;
	void *p;
	if (size == 0 || count == 0) return 0;
	if (km == NULL) return calloc(count, size);
	p = kmalloc(km, count * size);
	memset(p, 0, count * size);
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x30e1ca
cmpq $0x0, -0x18(%rbp)
jne 0x30e1d4
movq $0x0, -0x8(%rbp)
jmp 0x30e220
cmpq $0x0, -0x28(%rbp)
jne 0x30e1ee
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2140
movq %rax, -0x8(%rbp)
jmp 0x30e220
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
imulq -0x20(%rbp), %rsi
callq 0x30e4f0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
imulq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0x2100
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: km_destroy
void km_destroy(void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	void *km_par;
	header_t *p, *q;
	if (km == NULL) return;
	km_par = km->par;
	for (p = km->core_head; p != NULL;) {
		q = p->ptr;
		kfree(km_par, p);
		p = q;
	}
	kfree(km_par, km);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x30e26d
jmp 0x30e2bb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x30e2ae
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30e2d0
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x30e284
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x30e2d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: kmalloc
void *kmalloc(void *_km, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units;
	header_t *p, *q;

	if (n_bytes == 0) return 0;
	if (km == NULL) return malloc(n_bytes);
	n_units = (n_bytes + sizeof(size_t) + sizeof(header_t) - 1) / sizeof(header_t); /* header+n_bytes requires at least this number of units */

	if (!(q = km->loop_head)) /* the first time when kmalloc() is called, intialize it */
		q = km->loop_head = km->base.ptr = &km->base;
	for (p = q->ptr;; q = p, p = p->ptr) { /* search for a suitable block */
		if (p->size >= n_units) { /* p->size if the size of current block. This line means the current block is large enough. */
			if (p->size == n_units) q->ptr = p->ptr; /* no need to split the block */
			else { /* split the block. NB: memory is allocated at the end of the block! */
				p->size -= n_units; /* reduce the size of the free block */
				p += p->size; /* p points to the allocated block */
				*(size_t*)p = n_units; /* set the size */
			}
			km->loop_head = q; /* set the end of chain */
			return (size_t*)p + 1;
		}
		if (p == km->loop_head) { /* then ask for more "cores" */
			if ((p = morecore(km, n_units)) == 0) return 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x30e51c
movq $0x0, -0x8(%rbp)
jmp 0x30e648
cmpq $0x0, -0x20(%rbp)
jne 0x30e535
movq -0x18(%rbp), %rdi
callq 0x2270
movq %rax, -0x8(%rbp)
jmp 0x30e648
movq -0x18(%rbp), %rax
addq $0x8, %rax
addq $0x10, %rax
subq $0x1, %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x30e57b
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq -0x20(%rbp), %rcx
movq %rax, 0x18(%rcx)
movq -0x20(%rbp), %rcx
movq %rax, 0x20(%rcx)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jb 0x30e5fc
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x30e5b3
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x30e5e2
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x30e648
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x30e62d
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x30e660
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x30e62b
movq $0x0, -0x8(%rbp)
jmp 0x30e648
jmp 0x30e62d
jmp 0x30e62f
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x30e587
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: morecore(kmem_t*, unsigned long)
static header_t *morecore(kmem_t *km, size_t nu)
{
	header_t *q;
	size_t bytes, *p;
	nu = (nu + 1 + (km->min_core_size - 1)) / km->min_core_size * km->min_core_size; /* the first +1 for core header */
	bytes = nu * sizeof(header_t);
	q = (header_t*)kmalloc(km->par, bytes);
	if (!q) panic("[morecore] insufficient memory");
	q->ptr = km->core_head, q->size = nu, km->core_head = q;
	p = (size_t*)(q + 1);
	*p = nu - 1; /* the size of the free block; -1 because the first unit is used for the core header */
	kfree(km, p + 1); /* initialize the new "core"; NB: the core header is not looped. */
	return km->loop_head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x8(%rcx)
movq -0x8(%rbp), %rcx
imulq 0x8(%rcx), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x30e4f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x30e6d1
leaq 0x879a9(%rip), %rdi     # 0x396075
callq 0x30e4c0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x30e2d0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: krealloc
void *krealloc(void *_km, void *ap, size_t n_bytes) // TODO: this can be made more efficient in principle
{
	kmem_t *km = (kmem_t*)_km;
	size_t cap, *p, *q;

	if (n_bytes == 0) {
		kfree(km, ap); return 0;
	}
	if (km == NULL) return realloc(ap, n_bytes);
	if (ap == NULL) return kmalloc(km, n_bytes);
	p = (size_t*)ap - 1;
	cap = (*p) * sizeof(header_t) - sizeof(size_t);
	if (cap >= n_bytes) return ap; /* TODO: this prevents shrinking */
	q = (size_t*)kmalloc(km, n_bytes);
	memcpy(q, ap, cap);
	kfree(km, ap);
	return q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x30e77d
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30e2d0
movq $0x0, -0x8(%rbp)
jmp 0x30e81e
cmpq $0x0, -0x28(%rbp)
jne 0x30e79a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2360
movq %rax, -0x8(%rbp)
jmp 0x30e81e
cmpq $0x0, -0x18(%rbp)
jne 0x30e7b4
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30e4f0
movq %rax, -0x8(%rbp)
jmp 0x30e81e
movq -0x18(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
subq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x30e7e7
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x30e81e
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30e4f0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2180
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30e2d0
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/kalloc.cpp
// Function: km_stat
void km_stat(const void *_km, km_stat_t *s)
{
	kmem_t *km = (kmem_t*)_km;
	header_t *p;
	memset(s, 0, sizeof(km_stat_t));
	if (km == NULL || km->loop_head == NULL) return;
	for (p = km->loop_head;; p = p->ptr) {
		s->available += p->size * sizeof(header_t);
		if (p->size != 0) ++s->n_blocks; /* &kmem_t::base is always one of the cores. It is zero-sized. */
		if (p->ptr > p && p + p->size > p->ptr)
			panic("[km_stat] The end of a free block enters another free block.");
		if (p->ptr == km->loop_head) break;
	}
	for (p = km->core_head; p != NULL; p = p->ptr) {
		size_t size = p->size * sizeof(header_t);
		++s->n_cores;
		s->capacity += size;
		s->largest = s->largest > size? s->largest : size;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x2100
cmpq $0x0, -0x18(%rbp)
je 0x30e86a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x30e86f
jmp 0x30e987
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
shlq $0x4, %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x30e8ac
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x20(%rbp), %rax
jbe 0x30e8e2
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x30e8e2
leaq 0x8775b(%rip), %rdi     # 0x396038
callq 0x30e4c0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x30e8f6
jmp 0x30e909
jmp 0x30e8f8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x30e87b
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x30e987
movq -0x20(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x28(%rbp), %rax
jbe 0x30e965
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x30e96d
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x30e915
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: stats_chimeric(asg_t*, ma_hit_t_alloc*, asg64_v*)
void stats_chimeric(asg_t *g, ma_hit_t_alloc* src, asg64_v *in)
{
    asg64_v tx = {0,0,0}, *b = NULL;
    uint32_t v, s[2] = {0};
    if(in) b = in;
    else b = &tx;
    b->n = 0;

    for (v = 0; v < g->n_seq; ++v) {
        if (g->seq[v].del) continue;
        s[if_sup_chimeric(&(src[v]), g->seq[v].len, b, 1)]++;
    }

    fprintf(stderr, "[M::%s::] ==> # non-chimeric:%u, # chimeric:%u\n", __func__, s[0], s[1]);
    if(!in) free(tx.a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2100
movq $0x0, -0x38(%rbp)
leaq -0x44(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x2100
cmpq $0x0, -0x18(%rbp)
je 0x31116d
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x311175
leaq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x3111fe
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x3111b3
jmp 0x3111f3
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %esi
movq -0x38(%rbp), %rdx
movl $0x1, %ecx
callq 0x311240
cltq
movl -0x44(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x44(%rbp,%rax,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x311187
movq 0xb2ddb(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movl -0x44(%rbp), %ecx
movl -0x40(%rbp), %r8d
leaq 0x84ecd(%rip), %rsi     # 0x3960e3
leaq 0x84ef6(%rip), %rdx     # 0x396113
movb $0x0, %al
callq 0x22a0
cmpq $0x0, -0x18(%rbp)
jne 0x311234
movq -0x20(%rbp), %rdi
callq 0x2210
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_arcs(asg_t*, unsigned int, unsigned int*, unsigned int)
uint32_t get_arcs(asg_t *g, uint32_t v, uint32_t* idx, uint32_t idx_n)
{
    uint32_t i, kv = 0, an = asg_arc_n(g, v), beg = g->idx[v]>>32;
    for (i = 0, kv = 0; i < an; i++) {
        if(g->arc[beg+i].del) continue;
        if(idx && kv<idx_n) idx[kv] = beg+i;
        kv++;
    }
    return kv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x311c4e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x311c1b
jmp 0x311c43
cmpq $0x0, -0x18(%rbp)
je 0x311c3a
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x311c3a
movl -0x2c(%rbp), %edx
addl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x311bef
movl -0x24(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_flex_arcs(flex_asg_t*, unsigned int, unsigned int*, unsigned int)
uint32_t get_flex_arcs(flex_asg_t *fg, uint32_t v, uint32_t* idx, uint32_t idx_n)
{
    asg_t *g = fg->g; uint32_t i, kv = 0;
    uint32_t an = asg_arc_n(g, v), beg = g->idx[v]>>32;
    for (i = 0, kv = 0; i < an; i++) {
        if(g->arc[beg+i].del) continue;
        if(idx && kv<idx_n) idx[kv] = beg+i;
        kv++;
    }
    for(i = fg->idx[v]; i != ((uint32_t)-1); i = fg->pi.a[i]) {
        if(fg->a[i].del) continue;
        if(idx && kv<idx_n) idx[kv] = (i)|((uint32_t)(0x80000000));
        kv++;
    }
    return kv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x311d1a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x38(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x311ce7
jmp 0x311d0f
cmpq $0x0, -0x18(%rbp)
je 0x311d06
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x311d06
movl -0x38(%rbp), %edx
addl -0x2c(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x311cbb
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl -0xc(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
je 0x311d8e
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x311d50
jmp 0x311d7b
cmpq $0x0, -0x18(%rbp)
je 0x311d72
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x311d72
movl -0x2c(%rbp), %edx
orl $0x80000000, %edx       # imm = 0x80000000
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x2c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
jmp 0x311d2b
movl -0x30(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: recover_contain_g(asg_t*, ma_hit_t_alloc*, R_to_U*, long, long, long)
void recover_contain_g(asg_t *g, ma_hit_t_alloc *src, R_to_U* ruIndex, int64_t max_hang, int64_t min_ovlp, int64_t ul_occ)
{
    sset_aux s; s.g = g; s.src = src; s.ruIndex = ruIndex;
    s.max_hang = max_hang; s.min_ovlp = min_ovlp; s.ul_occ = ul_occ;
    kt_for(asm_opt.thread_num, update_sg_contain, &s, g->n_seq);
    uint32_t k;
    for (k = 0; k < g->n_seq; k++) {
        if(g->seq_vis[k]) g->seq[k].del = 0;
    }
    memset(g->seq_vis, 0, (sizeof(*(g->seq_vis))*(g->n_seq<<1)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0xb1a51(%rip), %rax     # 0x3c47f8
movl 0x7c(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
leaq 0x8f(%rip), %rsi        # 0x312e50
leaq -0x68(%rbp), %rdx
callq 0x16d710
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x312e1d
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x6c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x312e10
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x6c(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
orl $0x0, %edx
movl %edx, (%rax,%rcx,8)
jmp 0x312e12
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x312dd1
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)