LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/tovlp.cpp
// Function: get_insert_pos(unsigned long*, long, long)
int64_t get_insert_pos(uint64_t *a, int64_t n, int64_t target)
{
    int64_t left, right, ans, mid;
    left = 0; right = n - 1; ans = n;
    while (left <= right) {
        mid = ((right - left) >> 1) + left;
        if (target <= (uint32_t)a[mid]) {
            ans = mid;
            right = mid - 1;
        } else {
            left = mid + 1;
        }
    }
    return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jg 0x278224
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
sarq %rax
addq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
jg 0x278216
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x278222
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2781cc
movq -0x30(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/tovlp.cpp
// Function: get_mz_occ(mz_ds_t*, unsigned long, unsigned long, unsigned long)
uint32_t get_mz_occ(mz_ds_t *mz_idx, uint64_t uid, uint64_t s, uint64_t e)
{
    uint64_t *a = mz_idx->pos.a + (mz_idx->idx[uid]>>32), n = (uint32_t)(mz_idx->idx[uid]);
    if(n == 0) return 0;
    int64_t sid, eid;
    sid = get_insert_pos(a, n, s);
    eid = get_insert_pos(a, n, e);
    return eid + 1 - sid;
}

// 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 -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x278293
movl $0x0, -0x4(%rbp)
jmp 0x2782cc
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2781a0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2781a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
subq -0x40(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/tovlp.cpp
// Function: print_u_trans(kv_u_trans_t*)
void print_u_trans(kv_u_trans_t *ta)
{
    uint32_t i;
    u_trans_t *p = NULL;
    for (i = 0; i < ta->n; i++)
    {
        p = &(ta->a[i]);
        fprintf(stderr, "q-utg%.6ul\tqs(%u)\tqe(%u)\tt-utg%.6ul\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
        p->qn+1, p->qs, p->qe, p->tn+1, p->ts, p->te, p->rev, p->nw, p->f);
    }
    fprintf(stderr, "[M::%s::] \n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x279121
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq 0x14af47(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x20(%rbp), %rax
movl 0x14(%rax), %r9d
addl $0x1, %r9d
movq -0x20(%rbp), %rax
movl 0xc(%rax), %ebx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %r11d
movq -0x20(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %r10d
movq -0x20(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x20(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
leaq 0x115207(%rip), %rsi    # 0x38e302
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x27906c
movq 0x14aeb8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1141db(%rip), %rsi    # 0x38d30d
leaq 0x117594(%rip), %rdx    # 0x3906cd
movb $0x0, %al
callq 0x22a0
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/tovlp.cpp
// Function: pt_pdist(ma_ug_t*, asg_t*, ma_sub_t*, ma_hit_t_alloc*, kvec_asg_arc_t_warp*, int, int, unsigned int)
kv_u_trans_t *pt_pdist(ma_ug_t *ug, asg_t *read_g, ma_sub_t *coverage_cut, ma_hit_t_alloc* sources, 
kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp, uint32_t min_chain_cnt)
{
    pt_mz1_v *mz = NULL;
    mz_ds_t mz_idx; memset(&mz_idx, 0, sizeof(mz_idx));
    pt128_v *an = NULL;
    kv_u_trans_t *ma = NULL; CALLOC(ma, 1);
    mz = pt_collect_minimizers(ug, read_g, coverage_cut, sources, edge, max_hang, min_ovlp);
    an = pt_collect_anchors(ug, mz, &mz_idx, asm_opt.polyploidy*10);
    kv_destroy(*mz); free(mz);

    ma = pt_cal_sim(an, &mz_idx, ug, min_chain_cnt, asm_opt.purge_simi_thres);
    kv_destroy(*an); free(an); 
    kv_destroy(mz_idx.pos); free(mz_idx.idx);
    
    kt_u_trans_t_idx(ma, ug->g->n_seq);
    kt_u_trans_t_simple_symm(ma, ug->g->n_seq, 1);
    clean_mz_ovlp(ma, ug);
    // print_u_trans(ma);
    // exit(1);
    return ma;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2100
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2140
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
movl 0x10(%rbp), %eax
movl %eax, (%rsp)
callq 0x2775a0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq 0x14b611(%rip), %rax    # 0x3c47f8
imull $0xa, 0x1bc(%rax), %ecx
leaq -0x58(%rbp), %rdx
callq 0x2776b0
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2210
movq -0x38(%rbp), %rdi
callq 0x2210
movq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl 0x18(%rbp), %ecx
leaq 0x14b5d5(%rip), %rax    # 0x3c47f8
movss 0x16c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq -0x58(%rbp), %rsi
callq 0x2782e0
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2210
movq -0x60(%rbp), %rdi
callq 0x2210
movq -0x40(%rbp), %rdi
callq 0x2210
movq -0x58(%rbp), %rdi
callq 0x2210
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x104540
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0x1, %edx
callq 0x1128e0
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x278a50
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: uidx_build(ma_ug_t*, mg_idxopt_t*)
void uidx_build(ma_ug_t *ug, mg_idxopt_t *opt)
{
    int flag = asm_opt.flag;
    asm_opt.flag |= HA_F_NO_HPC;
    ha_flt_tab = ha_ft_ug_gen(&asm_opt, &(ug->u), opt->is_HPC, opt->k, opt->w, 1, opt->hap_n*5);
    ha_idx = ha_pt_ug_gen(&asm_opt, ha_flt_tab, &(ug->u), opt->is_HPC, opt->k, opt->w, 1);
    asm_opt.flag = flag;
	fprintf(stderr, "[M::%s] Index has been built.\n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1418b1(%rip), %rax    # 0x3c47f8
movl (%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0x1418a5(%rip), %rax    # 0x3c47f8
movl (%rax), %ecx
orl $0x1, %ecx
leaq 0x141899(%rip), %rax    # 0x3c47f8
movl %ecx, (%rax)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
movq -0x10(%rbp), %rax
imull $0x5, 0x14(%rax), %eax
leaq 0x14186f(%rip), %rdi    # 0x3c47f8
movl $0x1, %r9d
movl %eax, (%rsp)
callq 0x189520
movq %rax, %rcx
leaq 0x14252f(%rip), %rax    # 0x3c54d0
movq %rcx, (%rax)
leaq 0x142525(%rip), %rax    # 0x3c54d0
movq (%rax), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x10(%rbp), %rax
movl (%rax), %r9d
leaq 0x141829(%rip), %rdi    # 0x3c47f8
movl $0x1, (%rsp)
callq 0x189d60
movq %rax, %rcx
leaq 0x1424f3(%rip), %rax    # 0x3c54d8
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
leaq 0x141806(%rip), %rax    # 0x3c47f8
movl %ecx, (%rax)
movq 0x140fe5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x10d7e3(%rip), %rsi    # 0x3907e8
leaq 0x10d808(%rip), %rdx    # 0x390814
movb $0x0, %al
callq 0x22a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_gres_a_des(mg_gres_a*)
void mg_gres_a_des(mg_gres_a *p)
{
	uint64_t i = 0;
	for (i = 0; i < p->n; i++){
		free(p->a[i].lc); free(p->a[i].gc);
	}
	free(p->a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2830c9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x2210
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x28307c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: extend_coordinates(mg_lchain_t*, long, long)
void extend_coordinates(mg_lchain_t *ri, int64_t qlen, int64_t rlen)
{
	int64_t qs, qe, rs, re, qtail, rtail;
	qs = ri->qs; qe = ri->qe - 1; rs = ri->rs; re = ri->re - 1;
	if(ri->v&1) {
		rs = rlen - ri->re; re = rlen - ri->rs - 1;
	}
	
	if(qs <= rs) {
        rs -= qs; qs = 0;
    } else {
    	qs -= rs; rs = 0;
    }

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

	ri->qs = qs; ri->qe = qe + 1; ri->rs = rs; ri->re = re + 1;
	if(ri->v&1) {
		ri->rs = rlen - re - 1; ri->re = rlen - rs;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movslq 0xc(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2849b1
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x10(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0xc(%rcx), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x2849d4
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
jmp 0x2849eb
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
subq -0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x284a2f
movq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x284a47
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x284ab8
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
subq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_update_anchors(int, mg128_t*, int, int const*)
void mg_update_anchors(int32_t n_a, mg128_t *a, int32_t n, const int32_t *mini_pos)
{
	int32_t st, j, k;
	if (n_a <= 0) return;
	st = get_mini_idx(&a[0], n, mini_pos);
	assert(st >= 0);
	for (k = 0, j = st; j < n && k < n_a; ++j)
		if ((int32_t)a[k].y == mini_pos[j])
			a[k].x = (uint64_t)j << 32 | (a[k].x & 0xffffffffU), ++k;
	assert(k == n_a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jg 0x284df1
jmp 0x284ef5
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x284f00
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x284e0c
jmp 0x284e2b
leaq 0x10babd(%rip), %rdi    # 0x3908d0
leaq 0x10ba15(%rip), %rsi    # 0x39082f
movl $0x3dc, %edx            # imm = 0x3DC
leaq 0x10bab2(%rip), %rcx    # 0x3908d8
callq 0x2130
movl $0x0, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x2d(%rbp)
jge 0x284e51
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
setl %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x284e5a
jmp 0x284ecc
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x284ebc
movslq -0x28(%rbp), %rcx
shlq $0x20, %rcx
movq -0x10(%rbp), %rdx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq (%rdx), %rax
orq %rax, %rcx
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x284ebe
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x284e38
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x284ed6
jmp 0x284ef5
leaq 0x10ba40(%rip), %rdi    # 0x39091d
leaq 0x10b94b(%rip), %rsi    # 0x39082f
movl $0x3e0, %edx            # imm = 0x3E0
leaq 0x10b9e8(%rip), %rcx    # 0x3908d8
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_mini_idx(mg128_t const*, int, int const*)
static int32_t get_mini_idx(const mg128_t *a, int32_t n, const int32_t *mini_pos)
{
	int32_t x, L = 0, R = n - 1;
	x = (int32_t)a->y;
	while (L <= R) { // binary search
		int32_t m = ((uint64_t)L + R) >> 1;
		int32_t y = mini_pos[m];
		if (y < x) L = m + 1;
		else if (y > x) R = m - 1;
		else return m;
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x284f83
movslq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
shrq %rax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x284f64
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x284f81
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x284f77
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x284f7f
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x284f8a
jmp 0x284f81
jmp 0x284f2a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/./khash.h
// Function: _ac_Wang_hash(unsigned int)
static kh_inline khint_t __ac_Wang_hash(khint_t key)
{
    key += ~(key << 15);
    key ^=  (key >> 10);
    key +=  (key << 3);
    key ^=  (key >> 6);
    key += ~(key << 11);
    key ^=  (key >> 16);
    return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0xf, %eax
xorl $-0x1, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0xa, %eax
xorl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x3, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x6, %eax
xorl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0xb, %eax
xorl $-0x1, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
xorl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_nn_ov(unsigned int, unsigned int, asg_t const*)
int64_t get_nn_ov(const uint32_t v, const uint32_t w, const asg_t *g)
{
	uint32_t i;
	uint32_t nv = asg_arc_n(g, v);
    asg_arc_t *av = asg_arc_a(g, v), *p = NULL;
	for (i = 0; i < nv; i++) {
		if(av[i].del) continue;
		if(av[i].v == w) {
			// o -= av[i].ol;
			p = &(av[i]);
			break;
		}
	}
	return p?p->ol:0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x2878cf
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x287898
jmp 0x2878c4
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x2878c2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x2878cf
jmp 0x2878c4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x287875
cmpq $0x0, -0x28(%rbp)
je 0x2878e7
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x2878ee
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2878ee
movl -0x2c(%rbp), %eax
cltq
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: max_ovlp(asg_t const*, unsigned int)
int64_t max_ovlp(const asg_t *g, uint32_t v)
{
	uint32_t i, nv = asg_arc_n(g, v), o = 0;
	asg_arc_t *av = asg_arc_a(g, v);
	for (i = 0; i < nv; i++) {
		if(av[i].del) continue;
		if(o < av[i].ol) o = av[i].ol;
	}
	return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0xc(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x287dd8
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x287d94
jmp 0x287dcd
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x287dcb
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x18(%rbp)
jmp 0x287dcd
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x287d71
movl -0x18(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: max_ovlp_src(ug_opt_t const*, unsigned int)
int64_t max_ovlp_src(const ug_opt_t *uopt, uint32_t v)
{
	ma_hit_t_alloc* src = uopt->sources;
    int64_t min_ovlp = uopt->min_ovlp, max_hang = uopt->max_hang;
	uint32_t i, qn, tn, o = 0, x = v>>1; asg_arc_t e;

	for (i = 0; i < src[x].length; i++) {
        qn = Get_qn(src[x].buffer[i]); tn = Get_tn(src[x].buffer[i]);
        if(ma_hit2arc(&(src[x].buffer[i]), Get_READ_LENGTH(R_INF, qn), Get_READ_LENGTH(R_INF, tn), 
														max_hang, asm_opt.max_hang_rate, min_ovlp, &e) < 0) {
			continue;
		}
		if((e.ul>>32) != v) continue;
		if(o < e.ol) o = e.ol;
    }

	return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq 0x44(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movl -0xc(%rbp), %eax
shrl %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jae 0x287f35
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movl -0x2c(%rbp), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq 0x13d425(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
leaq 0x13d411(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0x13c91f(%rip), %rax    # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x20(%rbp), %rax
movl %eax, %r8d
leaq -0x58(%rbp), %r9
callq 0x287f40
cmpl $0x0, %eax
jge 0x287ef8
jmp 0x287f27
movq -0x58(%rbp), %rax
shrq $0x20, %rax
movl -0xc(%rbp), %ecx
cmpq %rcx, %rax
je 0x287f0a
jmp 0x287f27
movl -0x38(%rbp), %eax
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x287f25
movl -0x4c(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x38(%rbp)
jmp 0x287f27
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x287e29
movl -0x38(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: compress_lchain(mg_lchain_t*, int, int, ma_ug_t const*, mg128_t const*)
void compress_lchain(mg_lchain_t *lc, int32_t n_lc, int32_t qlen, const ma_ug_t *ug, const mg128_t *a)
{
	int32_t i, k, q_span;
	mg_lchain_t *ri = NULL;
	for (i = 0; i < n_lc; ++i) {
		ri = &lc[i];
		k = ri->off;
		ri->rs = (int32_t)a[k].x + 1 > q_span? (int32_t)a[k].x + 1 - q_span : 0; // for HPC k-mer
        ri->qs = (int32_t)a[k].y + 1 - (a[k].y>>32 & 0xff);
        ri->re = (int32_t)a[k + ri->cnt - 1].x + 1;
        ri->qe = (int32_t)a[k + ri->cnt - 1].y + 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x288686
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addl $0x1, %eax
cmpl -0x2c(%rbp), %eax
jle 0x2885c4
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addl $0x1, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x2885cb
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2885cb
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
addl $0x1, %eax
cltq
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movq -0x38(%rbp), %rdx
movl 0x4(%rdx), %edx
shll %edx
sarl %edx
addl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movq -0x38(%rbp), %rdx
movl 0x4(%rdx), %edx
shll %edx
sarl %edx
addl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x288565
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: print_gchain(gc_frag_t*, long const*, mg_lchain_t*, long, ma_ug_t const*, int)
void print_gchain(gc_frag_t *a, const int64_t *p, mg_lchain_t *lc, const int64_t nlc, const ma_ug_t *ug, int32_t qlen)
{
	int64_t k, i;
	gc_frag_t *ai = NULL;
    mg_lchain_t *li = NULL;
	for (k = 0; k < nlc; k++) {
		fprintf(stderr, "\n");
		for (i = k; i >= 0; i = p[i]) {
			ai = &a[i]; li = &lc[ai->i];
			fprintf(stderr, "*\tXXXXXX\tutg%.6d%c\t%c\tqs:%u\tqe:%u\tql:%d\tts:%u\tte:%u\ttl:%u\n", 
					(li->v>>1)+1, "lc"[ug->u.a[li->v>>1].circ], "+-"[li->v&1], li->qs, li->qe, qlen, li->rs, li->re, ug->u.a[li->v>>1].len);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movl %r9d, -0x3c(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x28881f
movq 0x13b8fd(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0xfe33b(%rip), %rsi     # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jl 0x28880c
movq -0x18(%rbp), %rax
movq -0x50(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq -0x58(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq 0x13b8a8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %edx
shrl %edx
addl $0x1, %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xfcb92(%rip), %rax     # 0x385303
movsbl (%rax,%rcx), %ecx
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0xfa711(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r8d
movq -0x60(%rbp), %rax
movl 0x14(%rax), %r9d
movq -0x60(%rbp), %rax
movl 0x18(%rax), %r14d
movl -0x3c(%rbp), %ebx
movq -0x60(%rbp), %rax
movl 0xc(%rax), %r11d
movq -0x60(%rbp), %rax
movl 0x10(%rax), %r10d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x108230(%rip), %rsi    # 0x390a0a
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x2886fc
jmp 0x28880e
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2886ce
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: find_max(int, gc_frag_t const*, unsigned int)
static int32_t find_max(int32_t n, const gc_frag_t *gf, uint32_t x)
{
	int32_t s = 0, e = n;
	if (n == 0) return -1;
	if (gf[n-1].srt < x) return n - 1;
	if (gf[0].srt >= x) return -1;
	while (e > s) { // TODO: finish this block
		int32_t m = s + (e - s) / 2;
		if (gf[m].srt >= x) e = m;
		else s = m + 1;
	}
	assert(s == e);
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x2897e1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x289892
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jae 0x289804
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x289892
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x289818
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x289892
jmp 0x28981a
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x289863
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jb 0x289858
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x289861
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x28981a
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x28986d
jmp 0x28988c
leaq 0x10765c(%rip), %rdi    # 0x390ed0
leaq 0x106fb4(%rip), %rsi    # 0x39082f
movl $0x3ee, %edx            # imm = 0x3EE
leaq 0x10c19c(%rip), %rcx    # 0x395a23
callq 0x2130
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_gchain_restore_order(void*, mg_gchains_t*)
void mg_gchain_restore_order(void *km, mg_gchains_t *gcs)
{
	int32_t i, n_a, n_lc;
	mg_llchain_t *lc;
	mg128_t *a;
	KMALLOC(km, lc, gcs->n_lc);
	KMALLOC(km, a, gcs->n_a);
	n_a = n_lc = 0;
	for (i = 0; i < gcs->n_gc; ++i) {
		mg_gchain_t *gc = &gcs->gc[i];
		assert(gc->cnt > 0);
		memcpy(&lc[n_lc], &gcs->lc[gc->off], gc->cnt * sizeof(mg_llchain_t));
		memcpy(&a[n_a], &gcs->a[gcs->lc[gc->off].off], gc->n_anchor * sizeof(mg128_t));
		n_lc += gc->cnt, n_a += gc->n_anchor;
	}
	memcpy(gcs->lc, lc, gcs->n_lc * sizeof(mg_llchain_t));
	memcpy(gcs->a, a, gcs->n_a * sizeof(mg128_t));
	kfree(km, lc); kfree(km, a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rsi
shlq $0x4, %rsi
callq 0x30e4f0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rsi
shlq $0x4, %rsi
callq 0x30e4f0
movq %rax, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x28a231
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x28a16a
jmp 0x28a189
leaq 0x106a5c(%rip), %rdi    # 0x390bcd
leaq 0x1066b7(%rip), %rsi    # 0x39082f
movl $0x782, %edx            # imm = 0x782
leaq 0x106a55(%rip), %rcx    # 0x390bd9
callq 0x2130
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x38(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rax
movslq 0xc(%rax), %rdx
shlq $0x4, %rdx
callq 0x2180
movq -0x30(%rbp), %rdi
movslq -0x18(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x38(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rax
movslq 0x10(%rax), %rdx
shlq $0x4, %rdx
callq 0x2180
movq -0x38(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x28a137
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rdx
shlq $0x4, %rdx
callq 0x2180
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rdx
shlq $0x4, %rdx
callq 0x2180
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x30e2d0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x30e2d0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_gchain_sort_by_score(void*, mg_gchains_t*)
void mg_gchain_sort_by_score(void *km, mg_gchains_t *gcs)
{
	mg128_t *z;
	mg_gchain_t *gc;
	int32_t i;
	KMALLOC(km, z, gcs->n_gc);
	KMALLOC(km, gc, gcs->n_gc);
	for (i = 0; i < gcs->n_gc; ++i)
		z[i].x = (uint64_t)gcs->gc[i].score << 32 | gcs->gc[i].hash, z[i].y = i;
	radix_sort_128x(z, z + gcs->n_gc);
	for (i = gcs->n_gc - 1; i >= 0; --i)
		gc[gcs->n_gc - 1 - i] = gcs->gc[z[i].y];
	memcpy(gcs->gc, gc, gcs->n_gc * sizeof(mg_gchain_t));
	kfree(km, z); kfree(km, gc);
	mg_gchain_restore_order(km, gcs); // this put gcs in the proper order
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rsi
shlq $0x4, %rsi
callq 0x30e4f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
imulq $0x48, %rax, %rsi
callq 0x30e4f0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x28a34d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rcx
shlq $0x20, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movl 0x38(%rax), %eax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movslq -0x24(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x28a2d9
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x27ea40
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x28a3ca
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
imulq $0x48, 0x8(%rax), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
subl -0x24(%rbp), %eax
cltq
imulq $0x48, %rax, %rax
addq %rax, %rdi
movl $0x48, %edx
callq 0x2180
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x28a376
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
imulq $0x48, %rax, %rdx
callq 0x2180
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x30e2d0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30e2d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x28a0e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: copy_lchain(mg_llchain_t*, mg_lchain_t const*, int*, mg128_t*, mg128_t const*)
static inline void copy_lchain(mg_llchain_t *q, const mg_lchain_t *p, int32_t *n_a, mg128_t *a_new, const mg128_t *a_old)
{
	q->cnt = p->cnt, q->v = p->v, q->score = p->score;
	memcpy(&a_new[*n_a], &a_old[p->off], q->cnt * sizeof(mg128_t));
	q->off = *n_a;
	(*n_a) += q->cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shll %ecx
sarl %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rdx
shlq $0x4, %rdx
callq 0x2180
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/inter.cpp
// Function: mg_gchain_restore_offset(mg_gchains_t*)
void mg_gchain_restore_offset(mg_gchains_t *gcs)
{
	int32_t i, j, n_a, n_lc;
	for (i = 0, n_a = n_lc = 0; i < gcs->n_gc; ++i) {
		mg_gchain_t *gc = &gcs->gc[i];
		gc->off = n_lc;
		for (j = 0, gc->n_anchor = 0; j < gc->cnt; ++j) {
			mg_llchain_t *lc = &gcs->lc[n_lc + j];
			lc->off = n_a;
			n_a += lc->cnt;
			gc->n_anchor += lc->cnt;
		}
		n_lc += gc->cnt;
	}
	assert(n_lc == gcs->n_lc && n_a == gcs->n_a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x28b749
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x28b72e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x28b6d4
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x28b691
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpl 0xc(%rdx), %ecx
movb %al, -0x29(%rbp)
jne 0x28b76a
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x28b773
jmp 0x28b775
jmp 0x28b794
leaq 0x1055bc(%rip), %rdi    # 0x390d38
leaq 0x1050ac(%rip), %rsi    # 0x39082f
movl $0x875, %edx            # imm = 0x875
leaq 0x1055ce(%rip), %rcx    # 0x390d5d
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: find_ul_ov_max(int, ul_ov_t const*, unsigned int)
int32_t find_ul_ov_max(int32_t n, const ul_ov_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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x28cf31
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x28cff4
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jae 0x28cf5b
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x28cff4
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x28cf73
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x28cff4
jmp 0x28cf75
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x28cfc5
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x28cfba
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x28cfc3
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x28cf75
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x28cfcf
jmp 0x28cfee
leaq 0x103efa(%rip), %rdi    # 0x390ed0
leaq 0x103852(%rip), %rsi    # 0x39082f
movl $0x9c5, %edx            # imm = 0x9C5
leaq 0x103eee(%rip), %rcx    # 0x390ed7
callq 0x2130
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_het_site(haplotype_evdience_alloc*, unsigned int)
uint64_t get_het_site(haplotype_evdience_alloc *hap, uint32_t oid)
{
	uint64_t k, l, i, occ = 0; SnpStats *s = NULL;
	for (k = 1, l = 0; k <= hap->length; ++k) {  
        if (k == hap->length || hap->list[k].overlapID != hap->list[l].overlapID) {
            if(hap->list[l].overlapID != oid) {
                l = k;
                continue;
            }
            for (i = l; i < k; i++) {
                if(hap->list[i].type!=1) continue; 
                s = &(hap->snp_stat.a[hap->list[i].overlapSite]);
                if(s->score == 1 && (!(s->occ_0 < 2 || s->occ_1 < 2))) {
					occ++;
                }
            }
            l = k;
        }
    }

	return (occ&((uint64_t)0x3FFFFFFF));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x1, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
ja 0x28d9a9
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
je 0x28d8d9
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
je 0x28d996
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x28d8fd
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x28d998
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x28d98e
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
cmpl $0x1, %eax
je 0x28d929
jmp 0x28d97d
movq -0x8(%rbp), %rax
movq 0x218(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x18, -0x28(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x28d97b
movq -0x38(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jb 0x28d97b
movq -0x38(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jb 0x28d97b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x28d97d
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x28d905
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x28d998
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x28d88b
movq -0x30(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: check_contain_pair(ug_opt_t const*, unsigned int, unsigned int, unsigned int)
uint32_t check_contain_pair(const ug_opt_t *uopt, uint32_t x, uint32_t y, uint32_t check_el)
{
	ma_hit_t_alloc* src = uopt->sources;
	int64_t min_ovlp = uopt->min_ovlp;
	int64_t max_hang = uopt->max_hang;
	uint64_t z, qn, tn; int32_t r = 1; asg_arc_t e;
	for (z = 0; z < src[x].length; z++) {
		if(check_el && (!src[x].buffer[z].el)) continue;
		qn = Get_qn(src[x].buffer[z]); tn = Get_tn(src[x].buffer[z]);
		if(tn != y) continue;
		r = ma_hit2arc(&(src[x].buffer[z]), Get_READ_LENGTH(R_INF, qn), Get_READ_LENGTH(R_INF, tn), max_hang, asm_opt.max_hang_rate, min_ovlp, &e);
		if(r == MA_HT_QCONT || r == MA_HT_TCONT) break;
	}

	if(z < src[x].length) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq 0x44(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x54(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x28fe50
cmpl $0x0, -0x1c(%rbp)
je 0x28fd70
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
cmpb $0x0, 0x20(%rax)
jne 0x28fd70
jmp 0x28fe3f
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpq %rcx, %rax
je 0x28fdc4
jmp 0x28fe3f
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
imulq $0x28, -0x40(%rbp), %rax
addq %rax, %rdi
leaq 0x1354ec(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
leaq 0x1354d7(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
leaq 0x1349e4(%rip), %rax    # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x30(%rbp), %rax
movl %eax, %r8d
leaq -0x70(%rbp), %r9
callq 0x287f40
movl %eax, -0x54(%rbp)
cmpl $-0x2, -0x54(%rbp)
je 0x28fe3b
cmpl $-0x3, -0x54(%rbp)
jne 0x28fe3d
jmp 0x28fe50
jmp 0x28fe3f
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x28fd28
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x28fe73
movl $0x1, -0x4(%rbp)
jmp 0x28fe7a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)