LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_set_spin(mc_match_t const*, mcgg_svaux_t*, unsigned int, unsigned int, char const*)
static void mcgg_set_spin(const mc_match_t *ma, mcgg_svaux_t *b, uint32_t k, mcg_node_t s, const char* cmd)
{
	uint32_t o, j, n;
	mcg_node_t s0 = b->s[k].s;
	/*******************************for debug************************************/
	// mcg_node_t t = s;
	// o = 0;
	// while (t) {
	// 	o += (t&1); t>>=1;
	// }
	// if(o != b->s[k].h[0] && o != b->s[k].h[1]) fprintf(stderr, "cmd-%s, ERROR-mcgg-1\n", cmd);
	// if(s0 == s) fprintf(stderr, "cmd-%s, ERROR-mcgg-2\n", cmd);
	/*******************************for debug************************************/
	if (s0 == s) return;
	o = ma->idx.a[k] >> 32;
	n = (uint32_t)ma->idx.a[k];
	for (j = 0; j < n; ++j) {
		const mc_edge_t *e = &ma->ma.a[o + j];
		uint32_t t = ma_y(*e);///1->z[0]; (-1)->z[1];
		mcp_de(*(b->z), t, s0) -= e->w; 
		mcp_de(*(b->z), t, s) += e->w; 
	}
	b->s[k].s = s;
}

// Assembly:
movl %ecx, %eax
movq 0x50(%rsi), %r8
movl %edx, %ecx
movq %rcx, %r9
shlq $0x5, %r9
movl (%r8,%r9), %edx
cmpl %eax, %edx
je 0x172781
pushq %r14
pushq %rbx
addq %r9, %r8
movq 0x10(%rdi), %r9
movq (%r9,%rcx,8), %r10
testl %r10d, %r10d
je 0x17277b
movq %r10, %r9
shrq $0x20, %r9
movq 0x28(%rdi), %rdi
movq 0x40(%rsi), %rcx
movq (%rcx), %rsi
movl 0x8(%rcx), %ecx
movl %r10d, %r10d
movl %r9d, %r11d
shlq $0x4, %r11
movl (%rdi,%r11), %ebx
shll %cl, %ebx
leal (%rbx,%rdx), %r14d
movsd (%rsi,%r14,8), %xmm0
subsd 0x8(%rdi,%r11), %xmm0
movsd %xmm0, (%rsi,%r14,8)
movsd 0x8(%rdi,%r11), %xmm0
addl %eax, %ebx
addsd (%rsi,%rbx,8), %xmm0
movsd %xmm0, (%rsi,%rbx,8)
incq %r9
decq %r10
jne 0x17273c
movl %eax, (%r8)
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: iter_rid(buf_t*, unsigned long*, unsigned long*, ma_ug_t*)
uint32_t iter_rid(buf_t *b, uint64_t *ui, uint64_t *ri, ma_ug_t *ug)
{
    ma_utg_t *u = NULL;
    while ((*ui) < b->b.n)
    {
        u =  &(ug->u.a[b->b.a[(*ui)]>>1]);
        while ((*ri) < u->n) return u->a[(*ri)++]>>32;
        (*ui)++; (*ri) = 0;
    }

    return (uint32_t)-1;
}

// Assembly:
movq (%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x38(%rdi), %r8
jae 0x174837
pushq %rbx
movq 0x10(%rcx), %rcx
movq 0x48(%rdi), %r9
movq (%rdx), %r10
movl (%r9,%r8,4), %r11d
shrl %r11d
leaq (%r11,%r11,4), %r11
movl 0x10(%rcx,%r11,8), %ebx
cmpq %rbx, %r10
jb 0x174822
incq %r8
movq %r8, (%rsi)
movq $0x0, (%rdx)
movq (%rsi), %r8
movl $0x0, %r10d
cmpq 0x38(%rdi), %r8
jb 0x1747ef
jmp 0x174836
leaq (%rcx,%r11,8), %rax
movq 0x18(%rax), %rax
leaq 0x1(%r10), %rcx
movq %rcx, (%rdx)
movl 0x4(%rax,%r10,8), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: resolve_hit(unsigned long, unsigned int, unsigned long, unsigned long, unsigned long*, unsigned long*, unsigned long*)
void resolve_hit(uint64_t x, uint32_t rLen, uint64_t uID_bits, uint64_t pos_mode, uint64_t *uid, uint64_t *beg, uint64_t *end)
{
    if(uid) (*uid) = ((x<<1)>>(64 - uID_bits)); 
    uint32_t rev = (x>>63);
    long long ref_p = x & pos_mode;
    long long p_beg, p_end;

    if(rev)
    {
        p_end = ref_p;
        p_beg = p_end + 1 - rLen;
    }
    else
    {
        p_beg = ref_p; 
        p_end = p_beg + rLen - 1;
    }
    if(p_beg < 0) p_beg = 0;
    if(p_end < 0) p_end = 0;
    if(beg) (*beg) = p_beg; 
    if(end) (*end) = p_end + 1;
}

// Assembly:
movq %rcx, %rax
testq %r8, %r8
je 0x1755ac
leaq (%rdi,%rdi), %r10
negb %dl
movl %edx, %ecx
shrq %cl, %r10
movq %r10, (%r8)
movq 0x8(%rsp), %rcx
andq %rdi, %rax
movl %esi, %esi
leaq -0x1(%rsi), %rdx
xorl %r8d, %r8d
testq %rdi, %rdi
cmovsq %r8, %rdx
addq %rax, %rdx
testq %rdx, %rdx
cmovleq %r8, %rdx
testq %r9, %r9
je 0x1755ee
negq %rsi
testq %rdi, %rdi
leaq 0x1(%rax,%rsi), %rsi
cmovnsq %rax, %rsi
xorl %eax, %eax
testq %rsi, %rsi
cmovgq %rsi, %rax
movq %rax, (%r9)
testq %rcx, %rcx
je 0x1755f9
incq %rdx
movq %rdx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: idx_hits(kvec_pe_hit*, unsigned long)
void idx_hits(kvec_pe_hit* hits, uint64_t n)
{
    uint64_t k, l;
    kv_resize(uint64_t, hits->idx, n);
    hits->idx.n = n;
    memset(hits->idx.a, 0, hits->idx.n*sizeof(uint64_t));

    radix_sort_pe_hit_idx_hn1(hits->a.a, hits->a.a + hits->a.n);
    for (k = 1, l = 0; k <= hits->a.n; ++k) {   
        if (k == hits->a.n || (get_hit_suid(*hits, k) != get_hit_suid(*hits, l))) {
            if (k - l > 1) radix_sort_pe_hit_idx_hn2(hits->a.a + l, hits->a.a + k);
            hits->idx.a[get_hit_suid(*hits, l)] = (uint64_t)l << 32 | (k - l);            
            l = k;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x20(%rdi)
jae 0x175666
leaq -0x1(%r14), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x28(%rbx)
jmp 0x17566a
movq 0x28(%rbx), %rdi
movq %r14, 0x18(%rbx)
shlq $0x3, %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x172a07
movq (%rbx), %rax
testq %rax, %rax
je 0x17573d
movq 0x10(%rbx), %rsi
movl $0x1, %r14d
movl $0x20, %r15d
xorl %r12d, %r12d
cmpq %rax, %r14
je 0x1756dc
movq (%rsi,%r15), %rdx
addq %rdx, %rdx
movb 0x48(%rbx), %dil
xorl %ecx, %ecx
subb %dil, %cl
shrq %cl, %rdx
movq %r12, %rdi
shlq $0x5, %rdi
movq (%rsi,%rdi), %rdi
addq %rdi, %rdi
shrq %cl, %rdi
cmpq %rdi, %rdx
je 0x17572d
movq %r14, %r13
subq %r12, %r13
cmpq $0x2, %r13
jb 0x1756fe
movq %r12, %rdi
shlq $0x5, %rdi
addq %rsi, %rdi
addq %r15, %rsi
callq 0x172c90
movq 0x10(%rbx), %rsi
movq %r12, %rax
shlq $0x20, %rax
orq %r13, %rax
shlq $0x5, %r12
movq (%rsi,%r12), %rdx
addq %rdx, %rdx
movb 0x48(%rbx), %dil
xorl %ecx, %ecx
subb %dil, %cl
shrq %cl, %rdx
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%rdx,8)
movq (%rbx), %rax
movq %r14, %r12
incq %r14
addq $0x20, %r15
cmpq %rax, %r14
jbe 0x1756ae
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_trio_unitig_graph(asg_t*, unsigned char, ug_opt_t*)
ma_ug_t* get_trio_unitig_graph(asg_t *sg, uint8_t flag, ug_opt_t *opt)
{
    kvec_asg_arc_t_warp new_rtg_edges;
    kv_init(new_rtg_edges.a);

    ma_ug_t *ug = NULL;
    ug = ma_ug_gen(sg);

    adjust_utg_by_trio(&ug, sg, flag, TRIO_THRES, opt->sources, opt->reverse_sources, 
    opt->coverage_cut, opt->tipsLen, opt->tip_drop_ratio, opt->stops_threshold, 
    opt->ruIndex, opt->chimeric_rate, opt->drop_ratio, opt->max_hang, opt->min_ovlp,
    opt->gap_fuzz, &new_rtg_edges, opt->b_mask_t);

    kv_destroy(new_rtg_edges.a);
    return ug;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
callq 0xb10cd
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq (%rbx), %r9
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movss 0x20(%rbx), %xmm1
movss 0x38(%rbx), %xmm2
movss 0x3c(%rbx), %xmm3
movl 0x40(%rbx), %eax
movl 0x44(%rbx), %r10d
movl 0x50(%rbx), %r11d
movss 0xbf402(%rip), %xmm0    # 0x235db4
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
pushq 0x60(%rbx)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
pushq 0x30(%rbx)
pushq 0x28(%rbx)
pushq 0x18(%rbx)
callq 0xd6ec8
addq $0x40, %rsp
movq 0x10(%r12), %rdi
callq 0x2220
movq (%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_hic_breakpoint(unsigned long*, unsigned long, long, h_covs*, long, long, unsigned long*, unsigned long*)
void get_hic_breakpoint(uint64_t *b, uint64_t b_n, int64_t cutoff, h_covs *res, 
int64_t cov_s_pos, int64_t cov_e_pos, uint64_t *s, uint64_t *e)
{
    uint64_t i;
    (*s) = (*e) = (uint64_t)-1;
    res->n = 0;
    get_hic_cov_interval(b, b_n, cutoff, &cov_s_pos, &cov_e_pos, res);
    if(res->n == 0) return;///res keeps all intervals with >= cutoff coverage
    int64_t max = -1, max_cur = 0;
    int64_t max_s_idx, max_e_idx, cur_s_idx;
    for (i = 0; i < res->n; i++)//all intervals have cov >= cutoff
    {
        if(i > 0 && (res->a[i].s - res->a[i-1].e) > 0)//cov < cutoff
        {
            max_cur += (res->a[i].s - res->a[i-1].e);//at least positive
            if(max < max_cur)
            {
                max_s_idx = (max < 0? res->a[i-1].e:cur_s_idx);
                max_e_idx = res->a[i].s;
                max = max_cur;
                cur_s_idx = max_s_idx;
            }
        }

        //cov >= cutoff
        max_cur -= (res->a[i].e - res->a[i].s);
        if(max_cur < 0)
        {
            max_cur = 0;
            cur_s_idx = res->a[i].e;
        }
    }

    if(max > 0)
    {
        (*s) = max_s_idx;
        (*e) = max_e_idx;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r15
leaq 0x10(%rsp), %rcx
movq %r8, (%rcx)
leaq 0x8(%rsp), %r8
movq %r9, (%r8)
movq $-0x1, %r12
movq %r12, (%r14)
movq %r12, (%r15)
movq $0x0, 0x8(%rbx)
movq %rbx, %r9
callq 0x176f2d
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x177188
movq (%rbx), %rcx
xorl %edx, %edx
movq %rcx, %rsi
xorl %r11d, %r11d
xorl %r10d, %r10d
testq %r10, %r10
je 0x177156
movq -0x10(%rsi), %r13
movq (%rsi), %rbx
movq %rbx, %rbp
subq %r13, %rbp
je 0x177159
addq %rbp, %r11
cmpq %r11, %r12
jge 0x177159
testq %r12, %r12
cmovsq %r13, %rdi
movq %r11, %r12
movq %rdi, %r9
movq %rbx, %r8
jmp 0x177159
movq (%rcx), %rbx
movq 0x8(%rsi), %r13
subq %r13, %rbx
addq %r11, %rbx
testq %rbx, %rbx
cmovleq %rdx, %rbx
cmovsq %r13, %rdi
incq %r10
addq $0x18, %rsi
movq %rbx, %r11
cmpq %r10, %rax
jne 0x177128
testq %r12, %r12
jle 0x177188
movq %r9, (%r15)
movq %r8, (%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: update_r_break(unsigned long, unsigned long, h_covs*)
int64_t update_r_break(uint64_t rs, uint64_t re, h_covs *hits)
{
    uint64_t i, hs, he;
    int64_t dp, old_dp, max_dp = 0;
    for (i = 0, dp = 0; i < hits->n; ++i) 
    {
        if(hits->a[i].s&1)
        {
            hs = hits->a[i].e;
            he = hits->a[i].s>>1;
        }
        else
        {
            hs = hits->a[i].s>>1;
            he = hits->a[i].e;
        }
        if(hs <= rs && he >= re)
        {
            old_dp = dp;
            ///if a[j] is qe
            if (hits->a[i].s&1) --dp;
            else ++dp;
            ///hits->a[i].s is qe
            if (old_dp > dp && max_dp < old_dp)
            {
                 max_dp = old_dp;
            }
        }
    }

    return max_dp;
}

// Assembly:
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x1775d1
movq (%rdx), %rdx
addq $0x8, %rdx
xorl %eax, %eax
xorl %r8d, %r8d
movq -0x8(%rdx), %r9
testb $0x1, %r9b
jne 0x177592
movq %r9, %r10
shrq %r10
movq (%rdx), %r11
jmp 0x17759b
movq (%rdx), %r10
movq %r9, %r11
shrq %r11
cmpq %rdi, %r10
ja 0x1775c7
cmpq %rsi, %r11
jb 0x1775c7
andl $0x1, %r9d
movq %r9, %r10
negq %r10
orq $0x1, %r10
addq %r8, %r10
cmpq %r8, %rax
cmovgq %rax, %r8
testq %r9, %r9
cmovneq %r8, %rax
movq %r10, %r8
addq $0x18, %rdx
decq %rcx
jne 0x17757d
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_utg_len(ma_ug_t*)
uint64_t get_utg_len(ma_ug_t *ug)
{   
    uint64_t i, s;
    for (i = s = 0; i < ug->u.n; ++i) 
    {
        if(!ug->u.a[i].a) continue;
        s += ug->u.a[i].len;
    }

    return s;
}

// Assembly:
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x177cb9
movq 0x10(%rdi), %rdx
xorl %eax, %eax
cmpq $0x0, 0x18(%rdx)
je 0x177caf
movl (%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq %rsi, %rax
addq $0x28, %rdx
decq %rcx
jne 0x177c9d
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: update_nus(ma_utg_t*, ma_ug_t*, h_cov_t*, unsigned long)
void update_nus(ma_utg_t *u, ma_ug_t *ug, h_cov_t *a, uint64_t a_n)
{
    uint64_t i, k, offset;
    for (i = offset = 0; i < u->n; i++)
    {   
        for (k = 0; k < a_n; k++)
        {
            if(a[k].s == i)
            {
                a[k].s = offset; a[k].e += offset;
                if(k + 1 == a_n) return;
            } 
            
        }
        offset += (u->a[i] != (uint64_t)-1? (uint32_t)u->a[i]:GAP_LEN);
    }
}

// Assembly:
movl 0x10(%rdi), %eax
testq %rax, %rax
je 0x1783a2
xorl %esi, %esi
movl $0x64, %r8d
xorl %r9d, %r9d
testq %rcx, %rcx
je 0x178384
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
cmpq %r9, (%rdx,%r11,8)
jne 0x17837c
leaq (%rdx,%r11,8), %r11
movq %rsi, (%r11)
addq %rsi, 0x8(%r11)
incq %r10
cmpq %rcx, %r10
jne 0x17837f
jmp 0x1783a2
incq %r10
cmpq %rcx, %r10
jne 0x17835d
movq 0x18(%rdi), %r10
movq (%r10,%r9,8), %r10
cmpq $-0x1, %r10
movl %r10d, %r10d
cmoveq %r8, %r10
addq %r10, %rsi
incq %r9
cmpq %rax, %r9
jne 0x178355
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_r_edge(asg_t*, unsigned long, unsigned long, unsigned long*)
asg_arc_t *get_r_edge(asg_t *rg, uint64_t v, uint64_t w, uint64_t *id)
{
    asg_arc_t *av = asg_arc_a(rg, v);
    uint64_t nv = asg_arc_n(rg, v), k;
    if(id) (*id) = (uint64_t)-1;
    for (k = 0; k < nv; k++)
    {
        if(av[k].del) continue;
        if(av[k].v == w) 
        {
            if(id) (*id) = (rg->idx[v]>>32) + k;
            return &(av[k]);
        }
    }
    return NULL;
}

// Assembly:
movq 0x28(%rdi), %r8
movq (%r8,%rsi,8), %rax
movl %eax, %r9d
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x8(%rdi), %rax
testq %rcx, %rcx
je 0x178a4f
movq $-0x1, (%rcx)
testq %r9, %r9
je 0x178a74
negq %r9
xorl %edi, %edi
cmpl $0x0, 0xc(%rax)
js 0x178a68
movl 0x8(%rax), %r10d
cmpq %rdx, %r10
je 0x178a77
decq %rdi
addq $0x18, %rax
cmpq %rdi, %r9
jne 0x178a59
xorl %eax, %eax
retq
testq %rcx, %rcx
je 0x178a76
movl 0x4(%r8,%rsi,8), %edx
subq %rdi, %rdx
movq %rdx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: update_unitig_ends(asg_t*, asg_arc_t*, unsigned long, unsigned long, unsigned long)
void update_unitig_ends(asg_t *g, asg_arc_t *arc, uint64_t puid, uint64_t nuid_0, uint64_t nuid_1)
{
    uint64_t nv, k, v, idx, ridx;
    

    v = puid<<1;
    idx = g->idx[v]>>32; nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++)
    {
        arc[idx+k].ul = ((uint32_t)arc[idx+k].ul) + (nuid_0<<32);
        get_r_edge(g, g->arc[idx+k].v^1, v^1, &ridx);
        arc[ridx].v = nuid_0^1;
    }


    v = (puid<<1)+1;
    idx = g->idx[v]>>32; nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++)
    {
        arc[idx+k].ul = ((uint32_t)arc[idx+k].ul) + (nuid_1<<32);
        get_r_edge(g, g->arc[idx+k].v^1, v^1, &ridx);
        arc[ridx].v = nuid_1^1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
leaq (%rdx,%rdx), %rbp
movq 0x28(%rdi), %r9
shlq $0x4, %rdx
movq (%r9,%rdx), %rax
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
andq %rax, %r10
movq %rsi, 0x18(%rsp)
movq %rdi, %r12
movq %rbp, 0x30(%rsp)
je 0x178b5f
movq %r9, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
shrq $0x20, %rax
movq %rcx, %rdx
shlq $0x20, %rdx
movq %rdx, (%rsp)
movq 0x8(%rdi), %rdi
orq $0x1, %rbp
xorl $0x1, %ecx
movq %rcx, 0x8(%rsp)
shlq $0x3, %r10
leaq (%r10,%r10,2), %r13
shlq $0x3, %rax
leaq (%rax,%rax,2), %rbx
leaq (%rdi,%rbx), %r14
addq $0x8, %r14
addq %rsi, %rbx
xorl %r15d, %r15d
movl (%rbx,%r15), %eax
orq (%rsp), %rax
movq %rax, (%rbx,%r15)
movl (%r14,%r15), %esi
xorq $0x1, %rsi
movq %r12, %rdi
movq %rbp, %rdx
leaq 0x10(%rsp), %rcx
callq 0x178a28
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsp), %rcx
movl %ecx, 0x8(%rsi,%rax,8)
addq $0x18, %r15
cmpq %r15, %r13
jne 0x178b0c
movq %r12, %rdi
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r9
jmp 0x178b63
orq $0x1, %rbp
movq (%r9,%rbp,8), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rax, %rcx
movq 0x30(%rsp), %r15
je 0x178bf3
shrq $0x20, %rax
movq %rbx, %r9
shlq $0x20, %r9
movq %r9, 0x8(%rsp)
movq 0x8(%rdi), %rdi
xorl $0x1, %ebx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, (%rsp)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rbp
leaq (%rdi,%rbp), %r13
addq $0x8, %r13
addq %rsi, %rbp
xorl %r14d, %r14d
movl (%rbp,%r14), %eax
orq 0x8(%rsp), %rax
movq %rax, (%rbp,%r14)
movl (%r13,%r14), %esi
xorq $0x1, %rsi
movq %r12, %rdi
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0x178a28
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x18(%rsp), %rcx
movl %ebx, 0x8(%rcx,%rax,8)
addq $0x18, %r14
cmpq %r14, (%rsp)
jne 0x178baf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_Ns(ma_utg_t*, h_covs*)
void get_Ns(ma_utg_t *u, h_covs *Ns)
{
    uint64_t i, offset;
    h_cov_t *p = NULL;
    Ns->n = 0;
    for (i = offset = 0; i < u->n; i++)
    {
        if(u->a[i] == (uint64_t)-1)
        {
            kv_pushp(h_cov_t, *Ns, &p);
            p->s = offset;
            p->e = offset + GAP_LEN;
            p->dp = i;
        }
        offset += (u->a[i] != (uint64_t)-1? (uint32_t)u->a[i]:GAP_LEN);
    }
}

// Assembly:
movq $0x0, 0x8(%rsi)
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
je 0x17a959
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movl $0x2, %r15d
movl $0x64, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%rdx,%rbp,8), %rax
cmpq $-0x1, %rax
jne 0x17a934
movq (%rbx), %rax
cmpq 0x10(%rbx), %rsi
jne 0x17a913
leaq (%rsi,%rsi), %rcx
testq %rsi, %rsi
cmoveq %r15, %rcx
movq %rcx, 0x10(%rbx)
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq 0x18(%r14), %rdx
movl 0x10(%r14), %ecx
leaq (%rsi,%rsi,2), %rdi
incq %rsi
movq %rsi, 0x8(%rbx)
movq %r13, (%rax,%rdi,8)
leaq 0x64(%r13), %r8
movq %r8, 0x8(%rax,%rdi,8)
movq %rbp, 0x10(%rax,%rdi,8)
movq (%rdx,%rbp,8), %rax
cmpq $-0x1, %rax
movl %eax, %eax
cmoveq %r12, %rax
addq %rax, %r13
incq %rbp
movl %ecx, %eax
cmpq %rax, %rbp
jb 0x17a8d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_sub_cov(kvec_pe_hit*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, int)
uint64_t get_sub_cov(kvec_pe_hit *hits, uint64_t sidx, uint64_t eidx, uint64_t ulen, 
uint64_t rs, uint64_t re, uint64_t limit_s, uint64_t limit_e, int unique_only)
{
    uint64_t i, p0s, p0e, p1s, p1e, span_s, span_e, cnt = 0;


    for (i = sidx; i < eidx; i++)///keep all hic hits that contain interval we want
    {
        if(get_hit_suid(*hits, i) != get_hit_euid(*hits, i)) continue;
        if(unique_only && hits->a.a[i].id == 0) continue;
        p0s = get_hit_spos(*hits, i);
        p0e = get_hit_spos_e(*hits, i);
        p1s = get_hit_epos(*hits, i);
        p1e = get_hit_epos_e(*hits, i);

        span_s = MIN(MIN(p0s, p0e), MIN(p1s, p1e));
        span_s = MIN(span_s, ulen-1);
        span_e = MAX(MAX(p0s, p0e), MAX(p1s, p1e));
        span_e = MIN(span_e, ulen-1) + 1;

        //if(span_e - span_s <= ulen*BREAK_CUTOFF)//need it or not?
        if(span_s <= rs && span_e >= re)
        {
            if(span_s >= limit_s && span_e <= limit_e) cnt++;
        } 
    }

    return cnt;
}

// Assembly:
subq %rsi, %rdx
jbe 0x17aaac
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r10
movl 0x48(%rsp), %r11d
movq 0x10(%rdi), %rax
movl $0x40, %ecx
subq 0x48(%rdi), %rcx
decq %r10
shlq $0x5, %rsi
addq %rax, %rsi
addq $0x18, %rsi
xorl %eax, %eax
movq -0x18(%rsi), %rbx
leaq (%rbx,%rbx), %r15
shrq %cl, %r15
movq -0x10(%rsi), %rbp
leaq (,%rbp,2), %r12
shrq %cl, %r12
cmpq %r12, %r15
jne 0x17aa94
testl %r11d, %r11d
je 0x17a9c5
cmpq $0x0, -0x8(%rsi)
je 0x17aa94
movq 0x50(%rdi), %r12
movq %r12, %r15
andq %rbx, %r15
testq %rbx, %rbx
js 0x17a9e7
movq (%rsi), %rbx
movq %rbx, %r14
shrq $0x20, %r14
leaq (%r15,%r14), %r13
decq %r13
jmp 0x17aa02
leaq 0x1(%r15), %r14
movq (%rsi), %rbx
movq %rbx, %r13
shrq $0x20, %r13
subq %r13, %r14
movl $0x0, %r13d
cmovaeq %r14, %r13
andq %rbp, %r12
testq %rbp, %rbp
js 0x17aa15
movl %ebx, %ebx
leaq (%r12,%rbx), %rbp
decq %rbp
jmp 0x17aa28
leaq 0x1(%r12), %r14
movl %ebx, %ebx
subq %rbx, %r14
movl $0x0, %ebp
cmovaeq %r14, %rbp
cmpq %rbp, %r12
movq %rbp, %r14
cmovbq %r12, %r14
cmovaq %r12, %rbp
cmpq %r13, %r15
movq %r13, %rbx
cmovbq %r15, %rbx
cmovaq %r15, %r13
cmpq %r14, %rbx
cmovaeq %r14, %rbx
cmpq %r10, %rbx
jb 0x17aa53
movq %r10, %rbx
cmpq %rbp, %r13
cmovaq %r13, %rbp
cmpq %r10, %rbp
jb 0x17aa62
movq %r10, %rbp
incq %rbp
cmpq %r8, %rbx
setbe %r14b
cmpq %r9, %rbp
setae %r15b
cmpq 0x38(%rsp), %rbx
setae %bl
andb %r14b, %bl
andb %r15b, %bl
cmpq 0x40(%rsp), %rbp
setbe %bpl
andb %bl, %bpl
movzbl %bpl, %ebx
addq %rbx, %rax
addq $0x20, %rsi
decq %rdx
jne 0x17a992
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: generate_haplotypes(horder_t*, ug_opt_t*)
void generate_haplotypes(horder_t *h, ug_opt_t *opt)
{
    uint64_t i;
    ma_ug_t *ug_1 = NULL, *ug_2 = NULL;

    ug_1 = get_trio_unitig_graph(h->r_g, FATHER, opt);
    ug_2 = get_trio_unitig_graph(h->r_g, MOTHER, opt);
    // kv_push(uint64_t, h->occ, ug_1->u.n);
    // kv_push(uint64_t, h->occ, ug_2->u.n);

    h->ug = ug_1; 
    
    ///update unitigs
    ma_utg_t *pu = NULL;
    for (i = 0; i < ug_2->u.n; i++)
    {
        kv_pushp(ma_utg_t, h->ug->u, &pu);
        *pu = ug_2->u.a[i];
        ug_2->u.a[i].a = NULL;
        ug_2->u.a[i].s = NULL;
    }

    ug_1 = NULL;
    ma_ug_destroy(ug_2);
    asg_destroy(h->ug->g);
    h->ug->g = NULL;

    // MALLOC(h->hf.a, h->ug->u.n); h->hf.n = h->hf.m = h->ug->u.n;
    // for (i = 0; i < h->ug->u.n; i++) h->hf.a[i] = (i < h->occ.a[0]? 0 : 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0xd0(%rdi), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x17694e
movq %rax, %r15
movq 0xd0(%rbx), %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x17694e
movq %rax, %r14
movq %r15, 0xc8(%rbx)
cmpq $0x0, (%rax)
je 0x17b708
xorl %r15d, %r15d
movl $0x2, %r12d
xorps %xmm2, %xmm2
xorl %r13d, %r13d
movq 0xc8(%rbx), %rcx
movq (%rcx), %rdx
cmpq 0x8(%rcx), %rdx
jne 0x17b6bd
leaq (%rdx,%rdx), %rax
testq %rdx, %rdx
cmoveq %r12, %rax
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
xorps %xmm2, %xmm2
movq 0xc8(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq (%rcx), %rdx
jmp 0x17b6c1
movq 0x10(%rcx), %rax
leaq 0x1(%rdx), %rsi
movq %rsi, (%rcx)
leaq (%rdx,%rdx,4), %rcx
movq 0x10(%r14), %rdx
movq 0x20(%rdx,%r15), %rsi
movq %rsi, 0x20(%rax,%rcx,8)
movups (%rdx,%r15), %xmm0
movups 0x10(%rdx,%r15), %xmm1
movups %xmm1, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
movq 0x10(%r14), %rax
incq %r13
movups %xmm2, 0x18(%rax,%r15)
addq $0x28, %r15
cmpq (%r14), %r13
jb 0x17b67a
movq %r14, %rdi
callq 0xa0761
movq 0xc8(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0xa0494
movq 0xc8(%rbx), %rax
movq $0x0, 0x18(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: osg_seq_set(osg_t*, int, int)
void osg_seq_set(osg_t *g, int sid, int del)
{
	///just malloc size
	if (sid >= (int)g->m_seq) {
		g->m_seq = sid + 1;
		kv_roundup32(g->m_seq);
		g->seq = (osg_seq_t*)realloc(g->seq, g->m_seq * sizeof(osg_seq_t));
	}

	if (sid >= g->n_seq) g->n_seq = sid + 1;
    g->seq[sid].del = !!del;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x10(%rdi)
jg 0x17b7c3
movl %ebx, %eax
shrl %eax
orl %ebx, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
movl %eax, 0x10(%r14)
movq 0x18(%r14), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, 0x18(%r14)
movl 0x14(%r14), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ebx, %ecx
jg 0x17b7e0
andl $0x80000000, %eax       # imm = 0x80000000
addl %ebx, %eax
incl %eax
movl %eax, 0x14(%r14)
testl %ebp, %ebp
movq 0x18(%r14), %rax
movslq %ebx, %rcx
leaq (%rcx,%rcx,4), %rcx
setne 0x20(%rax,%rcx,8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: osg_arc_rm(osg_t*)
void osg_arc_rm(osg_t *g)
{
	uint32_t e, n;
	///just clean arc requiring: 1. arc it self must be available 2. both the query and target are available
	for (e = n = 0; e < g->n_arc; ++e) {
		//u and v is the read id
		uint32_t u = g->arc[e].u, v = g->arc[e].v;
		if (!g->arc[e].del && !g->seq[u>>1].del && !g->seq[v>>1].del)
			g->arc[n++] = g->arc[e];
	}
	if (n < g->n_arc) { // arc index is out of sync
		if (g->idx) free(g->idx);
		g->idx = 0;
	}
	g->n_arc = n;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x17b899
xorl %ecx, %ecx
xorl %edx, %edx
xorl %ebp, %ebp
movq 0x8(%rbx), %rsi
cmpl $0x0, 0x8(%rsi,%rcx)
js 0x17b866
movl 0x4(%rsi,%rcx), %r8d
movq 0x18(%rbx), %rdi
shrl %r8d
leaq (%r8,%r8,4), %r8
cmpb $0x0, 0x20(%rdi,%r8,8)
jne 0x17b866
movl (%rsi,%rcx), %r8d
shrl %r8d
leaq (%r8,%r8,4), %r8
cmpb $0x0, 0x20(%rdi,%r8,8)
jne 0x17b866
leaq (%rsi,%rcx), %rax
movl %ebp, %edi
incl %ebp
shlq $0x5, %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%rsi,%rdi)
movups %xmm0, (%rsi,%rdi)
movl 0x4(%rbx), %eax
incq %rdx
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq $0x20, %rcx
cmpq %rsi, %rdx
jb 0x17b811
cmpl %esi, %ebp
jae 0x17b89b
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x17b88f
callq 0x2220
movl 0x4(%rbx), %eax
movq $0x0, 0x20(%rbx)
jmp 0x17b89b
xorl %ebp, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ebp, %eax
movl %eax, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: osg_arc_index_core(unsigned long, unsigned long, osg_arc_t const*)
uint64_t *osg_arc_index_core(size_t max_seq, size_t n, const osg_arc_t *a)
{
	size_t i, last;
	uint64_t *idx;
	idx = (uint64_t*)calloc(max_seq * 2, 8);

	for (i = 1, last = 0; i <= n; ++i)
		if (i == n || a[i-1].u != a[i].u)
			idx[a[i-1].u] = (uint64_t)last<<32 | (i - last), last = i;
	return idx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
addq %rdi, %rdi
movl $0x8, %esi
callq 0x2120
testq %r14, %r14
je 0x17b92e
leaq -0x1c(%rbx), %rsi
leaq 0x1(%r14), %rdx
cmpq $0x3, %rdx
movl $0x2, %ecx
cmovaeq %rdx, %rcx
movq %r14, %rdx
shlq $0x5, %rdx
addq %rsi, %rdx
addq $0x24, %rbx
movl $0x1, %esi
xorl %edi, %edi
cmpq %rsi, %r14
jne 0x17b902
movl (%rdx), %r8d
jmp 0x17b90b
movl -0x20(%rbx), %r8d
cmpl (%rbx), %r8d
je 0x17b922
movq %rsi, %r9
subq %rdi, %r9
shlq $0x20, %rdi
orq %r9, %rdi
movl %r8d, %r8d
movq %rdi, (%rax,%r8,8)
movq %rsi, %rdi
incq %rsi
addq $0x20, %rbx
cmpq %rsi, %rcx
jne 0x17b8f8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: osg_cleanup(osg_t*)
void osg_cleanup(osg_t *g)
{
	osg_arc_rm(g);
	if (!g->is_srt) {
        radix_sort_osg(g->arc, g->arc + g->n_arc);
		g->is_srt = 1;
	}

	if (g->idx == 0) osg_arc_index(g);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x17b7f7
movslq 0x4(%rbx), %rsi
testq %rsi, %rsi
js 0x17b98e
movq 0x8(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x1731ac
orb $-0x80, 0x7(%rbx)
cmpq $0x0, 0x20(%rbx)
je 0x17b997
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x17b936
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_max_weight(unsigned int, unsigned int, osg_t*)
double get_max_weight(uint32_t u, uint32_t v, osg_t *g)
{
    double max = 0;
    uint32_t i, nv;
	osg_arc_t *av = NULL;

    nv = asg_arc_n(g, u);
    av = asg_arc_a(g, u);
    for (i = 0; i < nv; i++)
    {
        if(av[i].v == v) continue;
        max = MAX(max, av[i].w);
    }
    
    nv = asg_arc_n(g, v);
    av = asg_arc_a(g, v);
    for (i = 0; i < nv; i++)
    {
        if(av[i].v == u) continue;
        max = MAX(max, av[i].w);
    }

    return max;
}

// Assembly:
movq 0x8(%rdx), %rax
movq 0x20(%rdx), %rcx
movl %edi, %edx
movq (%rcx,%rdx,8), %rdx
testl %edx, %edx
je 0x17ba06
movq %rdx, %r8
shrq $0x20, %r8
movl %edx, %edx
shlq $0x5, %r8
addq %rax, %r8
addq $0x10, %r8
shlq $0x5, %rdx
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
cmpl %esi, -0x10(%r8,%r9)
je 0x17b9fb
movsd (%r8,%r9), %xmm1
movapd %xmm1, %xmm2
cmplesd %xmm0, %xmm2
movapd %xmm2, %xmm3
andnpd %xmm1, %xmm3
andpd %xmm0, %xmm2
orpd %xmm3, %xmm2
movapd %xmm2, %xmm0
addq $0x20, %r9
cmpq %r9, %rdx
jne 0x17b9d1
jmp 0x17ba0a
xorpd %xmm0, %xmm0
movl %esi, %edx
movq (%rcx,%rdx,8), %rcx
testl %ecx, %ecx
je 0x17ba5f
movq %rcx, %rdx
shrq $0x20, %rdx
movl %ecx, %ecx
shlq $0x5, %rdx
addq %rdx, %rax
addq $0x10, %rax
shlq $0x5, %rcx
xorl %edx, %edx
cmpl %edi, -0x10(%rax,%rdx)
je 0x17ba56
movsd (%rax,%rdx), %xmm1
movapd %xmm1, %xmm2
cmplesd %xmm0, %xmm2
movapd %xmm2, %xmm3
andnpd %xmm1, %xmm3
andpd %xmm0, %xmm2
orpd %xmm3, %xmm2
movapd %xmm2, %xmm0
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x17ba2e
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_osg_arc(osg_t*, unsigned int, unsigned int)
osg_arc_t *get_osg_arc(osg_t *g, uint32_t u, uint32_t v)
{
    osg_arc_t *au = asg_arc_a(g, u);
    uint32_t i, nu = asg_arc_n(g, u);
    for (i = 0; i < nu; i++)
    {
        if(au[i].del) continue;
        if(au[i].v == v) return &(au[i]);
    }
    
    return NULL;
}

// Assembly:
movq 0x20(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rcx
testl %ecx, %ecx
je 0x17ca4a
movq %rcx, %rax
shrq $0x1b, %rax
andq $-0x20, %rax
addq 0x8(%rdi), %rax
movl %ecx, %ecx
cmpl $0x0, 0x8(%rax)
js 0x17ca41
cmpl %edx, (%rax)
je 0x17ca4c
addq $0x20, %rax
decq %rcx
jne 0x17ca37
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_vis_occ(unsigned char*, unsigned int)
uint32_t get_vis_occ(uint8_t *vis, uint32_t n)
{
    uint32_t i, occ;
    n <<= 1;
    for (i = occ = 0; i < n; i++)
    {
        if(vis[i]) occ++;
    }
    return occ;
}

// Assembly:
addl %esi, %esi
je 0x17ce46
movl %esi, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpb $0x1, (%rdi,%rdx)
sbbl $-0x1, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x17ce36
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_sl_occ(sc_lay_t*)
uint32_t get_sl_occ(sc_lay_t *sl)
{
    uint32_t i, occ;
    for (i = occ = 0; i < sl->n; i++)
    {
        occ += sl->a[i].n;
    }
    return occ;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x17ce70
movq (%rdi), %rdx
addq $0x8, %rdx
xorl %eax, %eax
movl $0x1, %esi
addl (%rdx), %eax
movl %esi, %edi
addq $0x18, %rdx
incl %esi
cmpq %rdi, %rcx
ja 0x17ce60
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: get_nuid(sc_lay_t*, unsigned long*)
uint64_t get_nuid(sc_lay_t *sl, uint64_t *p)
{
    uint64_t k, ouid[2];
    for (k = 0; k < sl->n; k++)
    {
        ouid[0] = sl->a[k].a[0]; 
        ouid[1] = sl->a[k].a[sl->a[k].n - 1];
        if((*p) == ouid[0])
        {
            (*p) = (k<<1);
            return 1;
        } 

        if((*p) == ouid[1])
        {
            (*p) = (k<<1)+1;
            return 1;
        }
    }

    return 0;
}

// Assembly:
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x17d387
movq (%rdi), %rdi
movq (%rsi), %r8
addq $0x8, %rdi
movl $0x1, %ecx
xorl %eax, %eax
movq -0x8(%rdi), %r9
movl (%r9), %r10d
cmpq %r10, %r8
je 0x17d38a
movq (%rdi), %r10
movl -0x4(%r9,%r10,4), %r9d
cmpq %r9, %r8
je 0x17d38d
addq $0x2, %rcx
addq $0x18, %rdi
decq %rdx
jne 0x17d360
retq
xorl %eax, %eax
retq
decq %rcx
movq %rcx, (%rsi)
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: update_avoids(horder_t*, sc_lay_t*)
void update_avoids(horder_t *h, sc_lay_t *sl)
{
    uint64_t i, m, ps, pe;
    for (i = m = 0; i < h->avoid.n; i++)
    {
        ps = h->avoid.a[i]>>32; 
        pe = (uint32_t)h->avoid.a[i];
        if(get_nuid(sl, &ps) && get_nuid(sl, &pe))
        {
            h->avoid.a[m] = (ps<<32)|pe;
            m++;
        }
    }
    h->avoid.n = m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %r12
testq %r12, %r12
movq %rdi, (%rsp)
je 0x17d41f
movq %rsi, %r14
movq 0x10(%rdi), %rbp
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x17d346
testq %rax, %rax
je 0x17d415
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x17d346
testq %rax, %rax
je 0x17d415
movq 0x10(%rsp), %rax
shlq $0x20, %rax
orq 0x8(%rsp), %rax
movq %rax, (%rbp,%r13,8)
incq %r13
movq (%rsp), %rax
movq (%rax), %r12
incq %rbx
cmpq %r12, %rbx
jb 0x17d3c1
jmp 0x17d422
xorl %r13d, %r13d
movq (%rsp), %rax
movq %r13, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: update_ug_by_layout(horder_t*, sc_lay_t*, ma_ug_t*)
void update_ug_by_layout(horder_t *h, sc_lay_t *sl, ma_ug_t* i_ug)
{
    uint32_t i;
    lay_t *p = NULL;
    ma_utg_t *pu = NULL;
    ma_ug_t *sug = NULL;
    kvec_t_u64_warp n_avoids; kv_init(n_avoids.a);
    sug = (ma_ug_t*)calloc(1, sizeof(ma_ug_t));
    for (i = 0; i < sl->n; i++)
    {
        p = &(sl->a[i]);
        kv_pushp(ma_utg_t, sug->u, &pu);
        generate_scaffold(pu, p, i_ug?i_ug:h->ug, h->r_g);
    }
    ma_ug_destroy(h->ug);
    h->ug = sug;
    kv_destroy(n_avoids.a);
    update_avoids(h, sl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, (%rsp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x2120
movq %rbx, %rcx
movq %rax, %r12
cmpq $0x0, 0x8(%rbx)
je 0x17d52b
movl $0x1, %r14d
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %eax, %eax
movq %rcx, 0x8(%rsp)
leaq (%rax,%rax,2), %rbp
shlq $0x3, %rbp
addq (%rcx), %rbp
cmpq %rbx, %r15
jne 0x17d4d1
leaq (%rbx,%rbx), %r15
testq %rbx, %rbx
movl $0x2, %eax
cmoveq %rax, %r15
movq %r15, 0x8(%r12)
leaq (,%r15,8), %rax
leaq (%rax,%rax,4), %rsi
movq %r13, %rdi
callq 0x2370
movq %rax, %r13
movq %rax, 0x10(%r12)
movq (%r12), %rax
movq %r15, %rbx
jmp 0x17d4d4
movq %r15, %rax
leaq 0x1(%rax), %r15
movq %r15, (%r12)
movq 0x10(%rsp), %rcx
movq %rcx, %rdx
testq %rcx, %rcx
jne 0x17d4f4
movq (%rsp), %rcx
movq 0xc8(%rcx), %rdx
leaq (%rax,%rax,4), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movq (%rsp), %rax
movq 0xd0(%rax), %rcx
movq %rbp, %rsi
callq 0x17cf56
movl %r14d, %eax
incl %r14d
movq 0x8(%rsp), %rcx
cmpq %rax, 0x8(%rcx)
ja 0x17d487
movq (%rsp), %r14
movq 0xc8(%r14), %rdi
movq %rcx, %rbx
callq 0xa0761
movq %r12, 0xc8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17d396
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: output_hic_rtg(ma_ug_t*, asg_t*, ug_opt_t*, char*)
void output_hic_rtg(ma_ug_t *ug, asg_t *rg, ug_opt_t *opt, char* output_file_name)
{
    char* gfa_name = (char*)malloc(strlen(output_file_name)+50);
    sprintf(gfa_name, "%s.all.noseq.gfa", output_file_name);
    FILE* output_file = fopen(gfa_name, "w");
    ma_ug_print_simple(ug, rg, opt->coverage_cut, opt->sources, opt->ruIndex, "utg", output_file);
    fclose(output_file);
    free(gfa_name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rcx, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r14
leaq 0xc0636(%rip), %rsi     # 0x23dc04
movq %rax, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xcb100(%rip), %rsi     # 0x2486e2
movq %r14, %rdi
callq 0x2210
movq %rax, %r13
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq 0x30(%r12), %r8
movq %rax, (%rsp)
leaq 0xbe785(%rip), %r9      # 0x23bd8b
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb8ee0
movq %r13, %rdi
callq 0x2190
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: cpy_u_hits(kvec_pe_hit*, kvec_pe_hit*, unsigned int)
void cpy_u_hits(kvec_pe_hit *u_hits, kvec_pe_hit *i_hits, uint32_t u_n)
{
    uint64_t i;
    memset(u_hits, 0, sizeof(kvec_pe_hit));
    u_hits->pos_mode = i_hits->pos_mode;
    u_hits->uID_bits = i_hits->uID_bits;
    u_hits->a.n = u_hits->a.m = i_hits->a.n;
    MALLOC(u_hits->a.a, u_hits->a.n);
    memcpy(u_hits->a.a, i_hits->a.a, u_hits->a.n*sizeof(pe_hit));
    for (i = 0; i < u_hits->a.n; i++) u_hits->a.a[i].id = 1;
    idx_hits(u_hits, u_n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x50(%rdi)
movdqu 0x48(%rsi), %xmm0
movdqu %xmm0, 0x48(%rdi)
movq (%rsi), %r13
movq %r13, 0x8(%rdi)
movq %r13, (%rdi)
movq %r13, %r12
shlq $0x5, %r12
movq %r12, %rdi
callq 0x2280
movq %rax, %r14
movq %rax, 0x10(%rbx)
movq 0x10(%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x2160
testq %r13, %r13
je 0x17ea6e
leaq 0x1(%r13), %rax
andq $-0x2, %rax
decq %r13
movq %r13, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
addq $0x30, %r14
movdqa 0xb28d6(%rip), %xmm1    # 0x2312d0
movdqa 0xb28de(%rip), %xmm2    # 0x2312e0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xb2aee(%rip), %xmm4    # 0x231500
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %ecx
notl %ecx
testb $0x1, %cl
je 0x17ea4b
movq $0x1, -0x20(%r14)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x17ea60
movq $0x1, (%r14)
paddq %xmm4, %xmm1
addq $0x40, %r14
addq $-0x2, %rax
jne 0x17ea12
movl %ebp, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1755fa
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: scf_g(sc_lay_t*, ma_ug_t*)
spg_t *scf_g(sc_lay_t *sl, ma_ug_t* ug)
{
    spg_t *scg = NULL; CALLOC(scg, 1); scg->ug = ug;    
    uint64_t i, k;
    lay_t *p = NULL;
    for (i = 0; i < sl->n; i++){
        p = &(sl->a[i]);
        kv_push(uint64_t, scg->idx, (uint64_t)scg->dst.n << 32 | (p->n>>1));
        for (k = 0; k < p->n; k+=2) kv_push(uint32_t, scg->dst, p->a[k]);        
    }
    return scg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x2120
movq %rax, %rcx
movq %r15, (%rax)
cmpq $0x0, 0x8(%rbx)
je 0x17eea8
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %eax, %eax
movq %rbx, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rax, 0x10(%rsp)
leaq (%rax,%rax,2), %r12
shlq $0x3, %r12
addq (%rbx), %r12
movq 0x8(%rcx), %r14
movq 0x18(%rcx), %rax
cmpq 0x10(%rcx), %r14
jne 0x17ee02
leaq (%r14,%r14), %rsi
testq %r14, %r14
movl $0x2, %edx
cmoveq %rdx, %rsi
movq %rsi, 0x10(%rcx)
shlq $0x3, %rsi
movq %rax, %rdi
movq %rcx, %rbx
callq 0x2370
movq %rax, 0x18(%rbx)
jmp 0x17ee05
movq %rcx, %rbx
movq %r13, %rcx
shlq $0x20, %rcx
movq 0x8(%r12), %rdx
shrq %rdx
orq %rcx, %rdx
leaq 0x1(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rdx, (%rax,%r14,8)
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x17ee8e
xorl %r14d, %r14d
cmpq %rbp, %r13
jne 0x17ee64
leaq (,%rbp,2), %rbx
testq %rbp, %rbp
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq %r15, %rdi
callq 0x2370
movq %rax, %r15
movq 0x8(%r12), %rax
movq %rbx, %rbp
movq (%r12), %rcx
movl (%rcx,%r14,4), %ecx
movl %ecx, (%r15,%r13,4)
incq %r13
addq $0x2, %r14
cmpq %rax, %r14
jb 0x17ee30
movq (%rsp), %rcx
movq %r13, 0x20(%rcx)
movq %rbp, 0x28(%rcx)
movq %r15, 0x30(%rcx)
jmp 0x17ee91
movq %rbx, %rcx
movq 0x10(%rsp), %rax
incq %rax
movq 0x8(%rsp), %rbx
cmpq 0x8(%rbx), %rax
jb 0x17edbb
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: destory_horder_t(horder_t**)
void destory_horder_t(horder_t **h)
{
    kv_destroy((*h)->r_hits.a);
    kv_destroy((*h)->r_hits.idx);
    kv_destroy((*h)->r_hits.occ);

    kv_destroy((*h)->u_hits.a);
    kv_destroy((*h)->u_hits.idx);
    kv_destroy((*h)->u_hits.occ);

    kv_destroy((*h)->avoid);

    osg_destroy((*h)->sg.g);

    ma_ug_destroy((*h)->ug);
    asg_destroy((*h)->r_g);
    free((*h));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x58(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x80(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x98(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0xd8(%rax), %rdi
callq 0x17b748
movq (%rbx), %rax
movq 0xc8(%rax), %rdi
callq 0xa0761
movq (%rbx), %rax
movq 0xd0(%rax), %rdi
callq 0xa0494
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/ecovlp.cpp
// Function: destroy_cns_gfa(cns_gfa*)
void destroy_cns_gfa(cns_gfa *p)
{
    size_t k;
    for (k = 0; k < p->m; k++) {
        kv_destroy(p->a[k].arc);
    }
    free(p->a); kdq_destroy(uint32_t, p->q);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x17ffff
movl $0x20, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2220
incq %r15
addq $0x28, %r14
cmpq 0x8(%rbx), %r15
jb 0x17ffe5
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x180027
movq 0x18(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/ecovlp.cpp
// Function: destroy_ec_ovec_buf_t(ec_ovec_buf_t*)
void destroy_ec_ovec_buf_t(ec_ovec_buf_t *p)
{
    uint32_t k; ec_ovec_buf_t0 *z = NULL;
    for (k = 0; k < p->n; k++) {
        z = &(p->a[k]); z->rr = 0;
        destory_UC_Read(&z->self_read);
        destory_UC_Read(&z->ovlp_read);
        destory_Candidates_list(&z->clist);
	    destory_overlap_region_alloc(&z->olist);

        // destory_fake_cigar(&(z->tmp.f_cigar));
        // free(z->tmp.w_list.a); free(z->tmp.w_list.c.a);

        // kv_destroy(z->r_buf.a);
        kv_destroy(z->k_flag.a);
        kv_destroy(z->sp);
        kv_destroy(z->pidx);
	    kv_destroy(z->v64);
        kv_destroy(z->v32);
        kv_destroy(z->v16);
        kv_destroy(z->v8q);
        kv_destroy(z->v8t);
        destroy_bit_extz_t(&(z->exz));

        ha_abuf_destroy(z->ab);
        
        destoryHaplotypeEvdience(&z->hap);
        destroy_cns_gfa(&(z->cns));

    }
    free(p->a); free(p->cr); free(p);

    // fprintf(stderr, "[M::%s-chains] #->%lld\n", __func__, asm_opt.num_bases);
    // fprintf(stderr, "[M::%s-passed-chains-0] #->%lld\n", __func__, asm_opt.num_corrected_bases);
    // fprintf(stderr, "[M::%s-cis-chains-1] #->%lld\n", __func__, asm_opt.num_recorrected_bases);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x18015e
movl $0x580, %r12d           # imm = 0x580
xorl %r13d, %r13d
movq (%rbx), %rbp
leaq (%r12,%rbp), %r14
leaq (%r12,%rbp), %rdi
addq $-0x580, %rdi           # imm = 0xFA80
movq $0x0, 0xf0(%rdi)
callq 0x32d68
leaq (%r12,%rbp), %rdi
addq $-0x560, %rdi           # imm = 0xFAA0
callq 0x32d68
leaq (%r12,%rbp), %rdi
addq $-0x540, %rdi           # imm = 0xFAC0
callq 0x3f1c8
leaq (%r12,%rbp), %r15
addq $-0x4e8, %r15           # imm = 0xFB18
movq %r15, %rdi
callq 0x3d066
movq 0x4c0(%r15), %rdi
callq 0x2220
movq 0x4e0(%r15), %rdi
callq 0x2220
movq 0x420(%r15), %rdi
callq 0x2220
movq 0x448(%r15), %rdi
callq 0x2220
movq 0x460(%r15), %rdi
callq 0x2220
movq 0x478(%r15), %rdi
callq 0x2220
movq 0x490(%r15), %rdi
callq 0x2220
movq 0x4a8(%r15), %rdi
callq 0x2220
movq 0x388(%r15), %rdi
callq 0x2220
movq 0x418(%r15), %rdi
callq 0x2220
movq 0x400(%r15), %rdi
callq 0x2220
movq 0x20(%r15), %rdi
callq 0x1288ff
leaq (%r12,%rbp), %rdi
addq $-0x488, %rdi           # imm = 0xFB78
callq 0x3c0c0
movq %r14, %rdi
callq 0x17ffcd
incq %r13
movl 0x8(%rbx), %eax
addq $0x5c0, %r12            # imm = 0x5C0
cmpq %rax, %r13
jb 0x18004e
movq (%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/ecovlp.cpp
// Function: push_cns_c1(cns_gfa*, unsigned long, char*, unsigned long, unsigned int, asg32_v*, unsigned long, unsigned int)
uint32_t push_cns_c1(cns_gfa *cns, uint64_t s0, char *tstr, uint64_t tl, uint32_t plus0, asg32_v* b32, uint64_t max_trace, uint32_t rid)
{
    if(tl <= 0) return s0;
    uint32_t rr = plus0, k, re = s0; 
    k = trace_cns_bp(cns, s0, tstr, tl, b32, plus0, &re, max_trace, 1);
    if(k > 0) rr = 1;

    // if(s0 == 2863) {
    //     fprintf(stderr, "[M::%s] (%.*s)\ts0::%lu\tk::%u\ttl::%lu\tre::%u\n", __func__, tstr?((int)(tl)):0, tstr, s0, k, tl, re);
    // }
    //     fprintf(stderr, "[M::%s] s0::%u, s::%u\n", __func__, k-1, k);
        //     prt_cns_arc(cns, k-1, __func__); prt_cns_arc(cns, k, __func__);

    for (; k < tl; k++) {///the weight of (s0 -> tstr[0]) might be 0
        re = add_cns_arc_bp(cns, re, seq_nt6_table[(uint32_t)(tstr[k])], rr, rid, 1); rr = 1;
    }
    
    return re;
}

// Assembly:
movq %rsi, %rax
testq %rcx, %rcx
je 0x181ac3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x40(%rsp), %r10
leaq 0x4(%rsp), %r12
movl %eax, (%r12)
subq $0x8, %rsp
movq %rax, %rsi
movq %r9, %r8
movl %ebp, %r9d
pushq $0x1
pushq %r10
pushq %r12
callq 0x1815e8
addq $0x20, %rsp
movl %eax, %ecx
movl (%r12), %eax
movl %ecx, %ecx
cmpq %rbx, %rcx
jae 0x181ab5
testq %rcx, %rcx
movl $0x1, %edx
cmovnel %edx, %ebp
leal 0x1(%rcx), %r13d
leaq 0x113bae(%rip), %r12    # 0x295630
movsbq (%r14,%rcx), %rcx
movl %ecx, %ecx
movzbl (%r12,%rcx), %edx
movq %r15, %rdi
movl %eax, %esi
movl %ebp, %ecx
movl 0x48(%rsp), %r8d
movl $0x1, %r9d
callq 0x19609c
movl %r13d, %ecx
incl %r13d
movl $0x1, %ebp
cmpq %rbx, %rcx
jb 0x181a82
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq