LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: destory_hc_links(hc_links*)
void destory_hc_links(hc_links* link)
{
    uint64_t i;
    for (i = 0; i < link->a.n; i++)
    {
        kv_destroy(link->a.a[i].e);
        kv_destroy(link->a.a[i].f);
    }
    kv_destroy(link->a);
    kv_destroy(link->enzymes);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0xbf871
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2220
movq 0x10(%rbx), %rax
movq 0x28(%rax,%r14), %rdi
callq 0x2220
incq %r15
addq $0x30, %r14
cmpq (%rbx), %r15
jb 0xbf849
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: write_trans_chain(trans_chain*, char const*)
void write_trans_chain(trans_chain* t_ch, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.trans.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&t_ch->r_num, sizeof(t_ch->r_num), 1, fp);
    fwrite(t_ch->ir_het, sizeof(uint8_t), t_ch->r_num, fp);
    
    uint32_t i;
    fwrite(&t_ch->bed.n, sizeof(t_ch->bed.n), 1, fp);
    for (i = 0; i < t_ch->bed.n; i++)
    {
        fwrite(&t_ch->bed.a[i].n, sizeof(t_ch->bed.a[i].n), 1, fp);
        fwrite(t_ch->bed.a[i].a, sizeof(bed_interval), t_ch->bed.a[i].n, fp);
    }

    fwrite(&t_ch->k_trans.n, sizeof(t_ch->k_trans.n), 1, fp);
    fwrite(t_ch->k_trans.a, sizeof(u_trans_t), t_ch->k_trans.n, fp);

    fwrite(&t_ch->k_trans.idx.n, sizeof(t_ch->k_trans.idx.n), 1, fp);
    fwrite(t_ch->k_trans.idx.a, sizeof(uint64_t), t_ch->k_trans.idx.n, fp);


    fclose(fp);
    free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r14
leaq 0x1771d9(%rip), %rsi    # 0x236a8f
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x188e18(%rip), %rsi    # 0x2486e2
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
leaq 0x18(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2410
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %edx
movl $0x1, %esi
movq %r15, %rcx
callq 0x2410
leaq 0x20(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
cmpq $0x0, 0x20(%rbx)
je 0xbf968
movl $0x1, %ebp
xorl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq 0x30(%rbx), %rdi
addq %r12, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
movq 0x30(%rbx), %rax
movq (%rax,%r12), %rdx
movq 0x10(%rax,%r12), %rdi
movl $0x10, %esi
movq %r15, %rcx
callq 0x2410
movl %ebp, %eax
incl %ebp
cmpq %rax, 0x20(%rbx)
ja 0xbf923
leaq 0x138(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
movq 0x138(%rbx), %rdx
movq 0x148(%rbx), %rdi
movl $0x30, %esi
movq %r15, %rcx
callq 0x2410
leaq 0x150(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
movq 0x150(%rbx), %rdx
movq 0x160(%rbx), %rdi
movl $0x8, %esi
movq %r15, %rcx
callq 0x2410
movq %r15, %rdi
callq 0x2190
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: update_dump_trio(unsigned char*, unsigned int, unsigned char*, ma_ug_t*)
void update_dump_trio(uint8_t* trio_flag, uint32_t rn, uint8_t *rf, ma_ug_t *ug)
{
    uint32_t k, i, x;
    ma_utg_t *p = NULL; 
    if(ug) {
        for (i = 0; i < ug->u.n; ++i) { // the Segment lines in GFA
            p = &ug->u.a[i];
            if(p->m == 0) continue;
            for (k = 0; k < p->n; k++) {
                x = p->a[k]>>33;
                if(trio_flag[x] == FATHER || trio_flag[x] == MOTHER) {
                    rf[x] = trio_flag[x];
                } else if(rf[x] != FATHER && rf[x] != MOTHER) {
                    rf[x] = DROP;
                }
            }
        }
    } else {
        for (i = 0; i < rn; i++) {
            if(rf[i]) {
                rf[i] <<= 1; rf[i] += 1;
            } else {
                rf[i] = trio_flag[i]; rf[i] <<= 1;
            }

            if(trio_flag[i] == FATHER || trio_flag[i] == MOTHER) {
                trio_flag[i] = ((rf[i]&1)?MOTHER:FATHER);
            } else {
                trio_flag[i] = ((rf[i]&1)?DROP:AMBIGU);
            }
        }
    }    
}

// Assembly:
testq %rcx, %rcx
je 0xc2e0e
movq (%rcx), %r8
testq %r8, %r8
je 0xc2e66
xorl %eax, %eax
movq 0x10(%rcx), %rsi
leaq (%rax,%rax,4), %r9
cmpl $0x0, 0xc(%rsi,%r9,8)
je 0xc2e05
leaq (%rsi,%r9,8), %rsi
cmpl $0x0, 0x10(%rsi)
je 0xc2e05
xorl %r8d, %r8d
movq 0x18(%rsi), %r9
movq (%r9,%r8,8), %r9
shrq $0x21, %r9
movb (%rdi,%r9), %r10b
leal -0x1(%r10), %r11d
cmpb $0x2, %r11b
jb 0xc2df2
movb (%rdx,%r9), %r11b
decb %r11b
movb $0x5, %r10b
cmpb $0x2, %r11b
jb 0xc2df6
movb %r10b, (%rdx,%r9)
incq %r8
movl 0x10(%rsi), %r9d
cmpq %r9, %r8
jb 0xc2dc8
movq (%rcx), %r8
incl %eax
cmpq %rax, %r8
ja 0xc2dab
jmp 0xc2e66
testl %esi, %esi
je 0xc2e66
movl %esi, %eax
xorl %ecx, %ecx
movb (%rdx,%rcx), %sil
testb %sil, %sil
je 0xc2e27
addb %sil, %sil
incb %sil
jmp 0xc2e2e
movb (%rdi,%rcx), %sil
addb %sil, %sil
movb %sil, (%rdx,%rcx)
movb (%rdi,%rcx), %r8b
decb %r8b
andb $0x1, %sil
movl %esi, %r9d
negb %r9b
andb $0x5, %r9b
incb %sil
cmpb $0x2, %r8b
movzbl %sil, %esi
movzbl %r9b, %r8d
cmovbl %esi, %r8d
movb %r8b, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xc2e16
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: update_poly_trio(unsigned int, unsigned int*, unsigned int)
void update_poly_trio(uint32_t mm, uint32_t *hapS, uint32_t rn)
{
    uint32_t i;
    for (i = 0; i < rn; i++) {
        if(R_INF.trio_flag[i] == DROP) continue;
        R_INF.trio_flag[i] = AMBIGU;
        if(!hapS[i]) continue;
        R_INF.trio_flag[i] = (hapS[i]&mm?FATHER:MOTHER);
    }    
}

// Assembly:
testl %edx, %edx
je 0xc2eb0
movl %edx, %eax
xorl %ecx, %ecx
leaq 0x1d33ba(%rip), %rdx    # 0x296230
movq 0x28(%rdx), %r8
cmpb $0x5, (%r8,%rcx)
je 0xc2ea8
movb $0x0, (%r8,%rcx)
movl (%rsi,%rcx,4), %r8d
testl %r8d, %r8d
je 0xc2ea8
andl %edi, %r8d
cmpl $0x1, %r8d
movl $0x0, %r8d
adcb $0x1, %r8b
movq 0x28(%rdx), %r9
movb %r8b, (%r9,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xc2e76
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: filter_u_trans(kv_u_trans_t*, unsigned char, unsigned char, unsigned char, unsigned char)
void filter_u_trans(kv_u_trans_t *ta, uint8_t keep_bub, uint8_t keep_topo, uint8_t keep_read, uint8_t keep_base)
{
    if(keep_bub && keep_topo && keep_read && keep_base) return;
    uint32_t i, m;
    for (i = m = 0; i < ta->n; i++) {
        if((!keep_bub) && (ta->a[i].f == RC_0)) continue;
        if((!keep_topo) && (ta->a[i].f == RC_1)) continue;
        if((!keep_read) && (ta->a[i].f == RC_2)) continue;
        if((!keep_base) && (ta->a[i].f == RC_3)) continue;
        ta->a[m++] = ta->a[i];
    }
    ta->n = m;
}

// Assembly:
testl %esi, %esi
setne %al
testl %edx, %edx
setne %r9b
andb %al, %r9b
testl %ecx, %ecx
setne %al
andb %r9b, %al
testl %r8d, %r8d
setne %r9b
testb %r9b, %al
jne 0xc3a99
movq (%rdi), %r10
xorl %eax, %eax
testq %r10, %r10
je 0xc3a96
pushq %rbp
pushq %r14
pushq %rbx
movl $0x1, %r9d
xorl %r11d, %r11d
movq 0x10(%rdi), %rbx
testb %sil, %sil
jne 0xc39f5
leaq (%r11,%r11,2), %r14
shlq $0x4, %r14
testb $0x3f, 0x28(%rbx,%r14)
je 0xc3a81
testb %dl, %dl
jne 0xc3a10
leaq (%r11,%r11,2), %r14
shlq $0x4, %r14
movb 0x28(%rbx,%r14), %bpl
andb $0x3f, %bpl
cmpb $0x1, %bpl
je 0xc3a81
testb %cl, %cl
jne 0xc3a2b
leaq (%r11,%r11,2), %r14
shlq $0x4, %r14
movb 0x28(%rbx,%r14), %bpl
andb $0x3f, %bpl
cmpb $0x2, %bpl
je 0xc3a81
testb %r8b, %r8b
jne 0xc3a47
leaq (%r11,%r11,2), %r14
shlq $0x4, %r14
movb 0x28(%rbx,%r14), %bpl
andb $0x3f, %bpl
cmpb $0x3, %bpl
je 0xc3a81
leaq (%r11,%r11,2), %r10
shlq $0x4, %r10
movl %eax, %r11d
incl %eax
leaq (%r11,%r11,2), %r11
shlq $0x4, %r11
movups (%rbx,%r10), %xmm0
movups 0x10(%rbx,%r10), %xmm1
movups 0x20(%rbx,%r10), %xmm2
movups %xmm2, 0x20(%rbx,%r11)
movups %xmm1, 0x10(%rbx,%r11)
movups %xmm0, (%rbx,%r11)
movq (%rdi), %r10
movl %r9d, %r11d
incl %r9d
cmpq %r11, %r10
ja 0xc39d8
movl %eax, %eax
popq %rbx
popq %r14
popq %rbp
movq %rax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: is_connect_arc(u_trans_t*, u_trans_t*, ma_ug_t*, double)
uint32_t is_connect_arc(u_trans_t *li, u_trans_t *lj, ma_ug_t *ug, double diff_ec_ul)
{
    if(li->qs >= lj->qs && li->qe >= lj->qe) {
        int64_t dq = infer_utrans_ovlp_len(li, lj, ug);
        uint32_t v = (li->tn<<1)|li->rev, w = (lj->tn<<1)|lj->rev;
        int64_t dt = -1, dif, mm; uint32_t nv, i; asg_arc_t *av;
        nv = asg_arc_n(ug->g, v); av = asg_arc_a(ug->g, v);
		for (i = 0; i < nv; i++) {
			if(av[i].del || av[i].v != w) continue;
			dt = av[i].ol;
			break;
		}

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
xorl %ebx, %ebx
cmpl (%rsi), %eax
jb 0xc40e6
movq %rsi, %r14
movq %rdi, %r12
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jb 0xc40e6
movq %rdx, %r15
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0xc3e3e
movl 0x14(%r12), %ecx
movl 0x28(%r12), %edx
shrl $0x6, %edx
andl $0x1, %edx
leal (%rdx,%rcx,2), %ecx
movq 0x18(%r15), %rsi
movq 0x28(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
testl %edx, %edx
je 0xc40e6
movl 0x14(%r14), %ecx
movl 0x28(%r14), %edi
shrl $0x6, %edi
andl $0x1, %edi
leal (%rdi,%rcx,2), %ecx
movq 0x8(%rsi), %rsi
movq %rdx, %rdi
shrq $0x20, %rdi
movl %edx, %r8d
leaq (%rdi,%rdi,2), %rdx
leaq (%rsi,%rdx,8), %rdx
addq $0xc, %rdx
shlq $0x3, %r8
leaq (%r8,%r8,2), %rsi
xorl %edi, %edi
movslq (%rdx,%rdi), %r8
testq %r8, %r8
js 0xc40a1
cmpl %ecx, -0x4(%rdx,%rdi)
je 0xc40ae
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0xc4092
xorl %ebx, %ebx
jmp 0xc40e6
movq %rax, %rcx
subq %r8, %rcx
cmovgq %rax, %r8
movq %rcx, %rax
negq %rax
cmovsq %rcx, %rax
cvtsi2sd %r8, %xmm0
mulsd (%rsp), %xmm0
cvttsd2si %xmm0, %rcx
cmpq $0x9, %rcx
movl $0x8, %edx
cmovgeq %rcx, %rdx
xorl %ebx, %ebx
cmpq %rdx, %rax
setbe %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: kt_u_trans_t_idx(kv_u_trans_t*, unsigned int)
void kt_u_trans_t_idx(kv_u_trans_t *ta, uint32_t n)
{
    radix_sort_u_trans(ta->a, ta->a + ta->n);
    kv_resize(uint64_t, ta->idx, n);
    ta->idx.n = n;
    memset(ta->idx.a, 0, ta->idx.n*sizeof(uint64_t));
    uint32_t st, i;
    for (st = 0, i = 1; i <= ta->n; ++i)
    {
        if (i == ta->n || ta->a[i].qn != ta->a[st].qn)
        {
            ta->idx.a[ta->a[st].qn] = (uint64_t)st << 32 | (i - st);
            st = i;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rdi), %rdi
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x9e62f
movl %ebp, %r14d
cmpq %r14, 0x20(%rbx)
jae 0xc4f5d
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 0xc4f61
movq 0x28(%rbx), %rdi
movq %r14, 0x18(%rbx)
shlq $0x3, %r14
xorl %ebp, %ebp
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq (%rbx), %rdx
testq %rdx, %rdx
je 0xc4fdf
movq 0x10(%rbx), %rax
movl $0x1, %ecx
movl $0x1, %edi
movl %ebp, %esi
cmpq %rdi, %rdx
jne 0xc4fa0
leaq (%rsi,%rsi,2), %rdx
shlq $0x4, %rdx
movl 0x8(%rax,%rdx), %edi
jmp 0xc4fbb
leaq (%rdi,%rdi,2), %r8
shlq $0x4, %r8
leaq (%rsi,%rsi,2), %rdi
shlq $0x4, %rdi
movl 0x8(%rax,%rdi), %edi
cmpl %edi, 0x8(%rax,%r8)
je 0xc4fd5
shlq $0x20, %rsi
movl %ecx, %edx
subl %ebp, %edx
orq %rsi, %rdx
movq 0x28(%rbx), %rsi
movl %edi, %edi
movq %rdx, (%rsi,%rdi,8)
movq (%rbx), %rdx
movl %ecx, %ebp
incl %ecx
movq %rcx, %rdi
cmpq %rcx, %rdx
jae 0xc4f8b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: refine_hic_trans(ug_opt_t*, kv_u_trans_t*, asg_t*, ma_ug_t*)
void refine_hic_trans(ug_opt_t *opt, kv_u_trans_t *ta, asg_t *sg, ma_ug_t *ug)
{
    filter_u_trans(ta, asm_opt.is_bub_trans, asm_opt.is_topo_trans, asm_opt.is_read_trans, asm_opt.is_base_trans);
    if(asm_opt.is_base_trans) {
        trans_base_infer(ug, sg, opt, ta, NULL);
    } 
    // dbg_prt_utg_trans(ta, ug, "pre");
    clean_u_trans_t_idx_filter_adv(ta, ug, sg, 0.95, 0);
    // dbg_prt_utg_trans(ta, ug, "after");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1cefb2(%rip), %r13    # 0x295758
movzbl 0x24d(%r13), %esi
movzbl 0x24c(%r13), %edx
movzbl 0x24b(%r13), %ecx
movzbl 0x24a(%r13), %r8d
movq %r15, %rdi
callq 0xc3997
cmpb $0x0, 0x24a(%r13)
je 0xc67ec
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x1eb3ec
movsd 0x16ada4(%rip), %xmm0   # 0x231598
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc559a
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: set_rset(ma_ug_t*, unsigned int, unsigned char*, unsigned char)
void set_rset(ma_ug_t *ug, uint32_t uid, uint8_t *ff, uint8_t s)
{
    if(ug->g->seq[uid].del) return;
    ma_utg_t* u; uint32_t k, v, nv, w, z; 
    asg_arc_t *av = NULL;

    u = &(ug->u.a[uid]);
    for (k = 0; k < u->n; k++) ff[u->a[k]>>33] = s;

    v = uid<<1; 
    nv = asg_arc_n(ug->g, v);
    av = asg_arc_a(ug->g, v);
    for (k = 0; k < nv; k++) {
        w = av[k].v;
        if(av[k].del) continue;
        if(ug->g->seq[w>>1].del) continue;
        u = &(ug->u.a[w>>1]);
        for (z = 0; z < u->n; z++) ff[u->a[z]>>33] = s;
    }
        
    v = (uid<<1)+1; 
    nv = asg_arc_n(ug->g, v);
    av = asg_arc_a(ug->g, v);
    for (k = 0; k < nv; k++) {
        w = av[k].v;
        if(av[k].del) continue;
        if(ug->g->seq[w>>1].del) continue;
        u = &(ug->u.a[w>>1]);
        for (z = 0; z < u->n; z++) ff[u->a[z]>>33] = s;
    }
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %r8
movq 0x20(%r8), %r9
movl %esi, %eax
cmpl $0x0, (%r9,%rax,8)
js 0xc6972
movq 0x10(%rdi), %r9
leaq (%rax,%rax,4), %rax
cmpl $0x0, 0x10(%r9,%rax,8)
je 0xc685a
leaq (%r9,%rax,8), %rax
xorl %r8d, %r8d
movq 0x18(%rax), %r9
movq (%r9,%r8,8), %r9
shrq $0x21, %r9
movb %cl, (%rdx,%r9)
incq %r8
movl 0x10(%rax), %r9d
cmpq %r9, %r8
jb 0xc683a
movq 0x18(%rdi), %r8
addl %esi, %esi
movq 0x8(%r8), %rax
movq 0x28(%r8), %r8
movq (%r8,%rsi,8), %r9
testl %r9d, %r9d
je 0xc68f2
movq %r9, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rax,%r8,8), %rax
movl %r9d, %r8d
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
cmpl $0x0, 0xc(%rax,%r10,8)
js 0xc68de
leaq (%rax,%r10,8), %r10
movl 0x8(%r10), %r10d
movq 0x18(%rdi), %r11
movq 0x20(%r11), %r11
shrl %r10d
cmpl $0x0, (%r11,%r10,8)
js 0xc68de
movq 0x10(%rdi), %r11
leaq (%r10,%r10,4), %r10
cmpl $0x0, 0x10(%r11,%r10,8)
je 0xc68de
leaq (%r11,%r10,8), %r10
xorl %r11d, %r11d
movq 0x18(%r10), %rbx
movq (%rbx,%r11,8), %rbx
shrq $0x21, %rbx
movb %cl, (%rdx,%rbx)
incq %r11
movl 0x10(%r10), %ebx
cmpq %rbx, %r11
jb 0xc68c3
incq %r9
cmpq %r8, %r9
jne 0xc6886
movq 0x18(%rdi), %r8
movq 0x8(%r8), %rax
movq 0x28(%r8), %r8
movl %esi, %esi
movq 0x8(%r8,%rsi,8), %rsi
testl %esi, %esi
je 0xc6972
movq %rsi, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rax,%r8,8), %rax
movl %esi, %esi
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r9
cmpl $0x0, 0xc(%rax,%r9,8)
js 0xc696a
leaq (%rax,%r9,8), %r9
movl 0x8(%r9), %r9d
movq 0x18(%rdi), %r10
movq 0x20(%r10), %r10
shrl %r9d
cmpl $0x0, (%r10,%r9,8)
js 0xc696a
movq 0x10(%rdi), %r10
leaq (%r9,%r9,4), %r9
cmpl $0x0, 0x10(%r10,%r9,8)
je 0xc696a
leaq (%r10,%r9,8), %r9
xorl %r10d, %r10d
movq 0x18(%r9), %r11
movq (%r11,%r10,8), %r11
shrq $0x21, %r11
movb %cl, (%rdx,%r11)
incq %r10
movl 0x10(%r9), %r11d
cmpq %r11, %r10
jb 0xc694e
incq %r8
cmpq %rsi, %r8
jne 0xc6911
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: check_nc_status(asg_t*, ma_hit_t_alloc*, unsigned char*, unsigned int)
uint32_t check_nc_status(asg_t *sg, ma_hit_t_alloc *src, uint8_t *ff, uint32_t id)
{
    uint32_t i, tn; ma_hit_t *h;
    for (i = 0; i < src[id].length; i++) {
        h = &(src[id].buffer[i]); tn = Get_tn((*h));
        if(sg->seq[tn].del) continue;
        if(!ff[tn]) continue;
        if((Get_qs((*h)) == 0) && (Get_qe((*h)) == sg->seq[id].len)) return 1;
    }
    return 0;
}

// Assembly:
movl %ecx, %eax
leaq (%rax,%rax,2), %rcx
movl 0xc(%rsi,%rcx,8), %r8d
testq %r8, %r8
je 0xc69d1
leaq (%rsi,%rcx,8), %rcx
movq (%rcx), %rcx
movq 0x20(%rdi), %rsi
shlq $0x3, %r8
leaq (%r8,%r8,4), %rdi
xorl %r8d, %r8d
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl 0xc(%rcx,%r8), %r10d
cmpl $0x0, (%rsi,%r10,8)
js 0xc69c8
cmpb $0x0, (%rdx,%r10)
je 0xc69c8
cmpl $0x0, (%rcx,%r8)
jne 0xc69c8
movl (%rsi,%rax,8), %r10d
andl %r9d, %r10d
cmpl %r10d, 0x8(%rcx,%r8)
je 0xc69d4
addq $0x28, %r8
cmpq %r8, %rdi
jne 0xc69a0
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: fill_cov_arr(ma_ug_t*, asg_t*, ma_hit_t_alloc*, unsigned char*, unsigned long, unsigned long*)
void fill_cov_arr(ma_ug_t *ug, asg_t *sg, ma_hit_t_alloc *src, uint8_t *ff, uint64_t uid, uint64_t *res)
{
    ma_hit_t *h; ma_utg_t *u;
    uint64_t C_bases, k, j, rid, tn;
    set_rset(ug, uid, ff, 1);

    u = &(ug->u.a[uid]);
    for (k = 0; k < u->n; k++) {
        C_bases = 0; rid = u->a[k]>>33;
        for (j = 0; j < src[rid].length; j++) {
            h = &(src[rid].buffer[j]);
            tn = Get_tn((*h));
            if((!sg->seq[tn].del) && (!ff[tn])) continue;
            if((sg->seq[tn].del) && (!check_nc_status(sg, src, ff, tn))) continue;
            C_bases += (Get_qe((*h)) - Get_qs((*h)));
        }
        res[k] = C_bases;
    }

    set_rset(ug, uid, ff, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x30(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movl %r14d, %esi
movq %rcx, %rdx
movl $0x1, %ecx
callq 0xc680d
movq %r15, %rdx
movq %r12, 0x10(%rsp)
movq 0x10(%r12), %rax
movq %r14, 0x18(%rsp)
leaq (%r14,%r14,4), %rcx
movl 0x10(%rax,%rcx,8), %esi
movq %rsi, 0x28(%rsp)
testq %rsi, %rsi
je 0xc6cac
leaq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
leaq (%rax,%rax,2), %rcx
movl 0xc(%rbx,%rcx,8), %eax
testq %rax, %rax
je 0xc6c8e
leaq (%rbx,%rcx,8), %rcx
movq (%rcx), %r13
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %r12
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %rdi, 0x40(%rsp)
movl 0xc(%r13,%r15), %ecx
cmpl $0x0, (%r12,%rcx,8)
js 0xc6c70
cmpb $0x0, (%rdx,%rcx)
je 0xc6c65
movl 0x8(%r13,%r15), %eax
subl (%r13,%r15), %eax
addq %rax, %rbp
addq $0x28, %r15
cmpq %r15, %rdi
jne 0xc6c46
jmp 0xc6c90
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rdx, %r14
callq 0xc6974
movq 0x40(%rsp), %rdi
movq %r14, %rdx
testl %eax, %eax
jne 0xc6c58
jmp 0xc6c65
xorl %ebp, %ebp
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rbp, (%rax,%rcx,8)
incq %rcx
cmpq 0x28(%rsp), %rcx
jne 0xc6c05
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %ecx, %ecx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc680d
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: gen_ug_rid_cov_t_by_ovlp(kv_u_trans_t*, ug_rid_cov_t*)
void gen_ug_rid_cov_t_by_ovlp(kv_u_trans_t *ta, ug_rid_cov_t *cc)
{
    uint64_t z, k, id, n; u_trans_t *a; 
    for (z = 0; z < cc->ug->g->n_seq; z++) {
        id = z; a = u_trans_a(*ta, id); n = u_trans_n(*ta, id); 
        for (k = 0; k < n; k++) {
            append_cov_line_ug_rid_cov_t(id, cc->cov.a+cc->idx[id], &(a[k]), cc, ((uint64_t)-1), -1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq 0x18(%rax), %rcx
testl $0x7fffffff, 0x14(%rcx) # imm = 0x7FFFFFFF
je 0xc809c
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x28(%r14), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, %rbp
andq %r13, %rbp
je 0xc8087
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %r15
shlq $0x4, %r15
addq 0x10(%r14), %r15
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
shlq $0x3, %rsi
addq 0x28(%rbx), %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq $-0x1, %r8
movsd 0x1695c2(%rip), %xmm0   # 0x231638
callq 0xc74f4
addq $0x30, %r15
decq %rbp
jne 0xc8051
movq (%rbx), %rax
incq %r12
movq 0x18(%rax), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r12
jb 0xc8031
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/Overlaps.cpp
// Function: worker_for_trans_sec_simple_cut(void*, long, int)
static void worker_for_trans_sec_simple_cut(void *data, long i, int tid) // callback for kt_for()
{
    u_trans_clean_t *s = (u_trans_clean_t*)data;
    kv_u_trans_t *ta = s->ta; u_trans_t *a, *za;
    uint32_t id = i, n, k, z, zn; 

    a = u_trans_a(*ta, id); n = u_trans_n(*ta, id);
    for (k = 0; k < n; k++) {
        if((!a[k].del)) continue;
        za = u_trans_a(*ta, a[k].tn); zn = u_trans_n(*ta, a[k].tn);
        for (z = 0; z < zn; z++) {
            if(za[z].tn == id) break;
        }
        assert(z < zn);
        if(za[z].del) { ///both a[k] and za[z] have been deleted
            if(a[k].qn < a[k].tn) a[k].occ = za[z].occ = ((uint32_t)-1);
            continue; 
        }
        ///a[k].del == 1 && za[z].del == 0
        if(za[z].qe-za[z].qs >= 3000000) {
            a[k].occ = za[z].occ = 0;
        } else {
            a[k].occ = za[z].occ = ((uint32_t)-1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %rcx
movq 0x28(%rcx), %rax
movl %esi, %edx
movq (%rax,%rdx,8), %rdi
testl %edi, %edi
je 0xc87b8
movq 0x10(%rcx), %rcx
movq %rdi, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq %rcx, %rdx
movl %edi, %edi
xorl %r8d, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
shlq $0x4, %r11
cmpb $0x0, 0x28(%rdx,%r11)
jns 0xc87ac
addq %rdx, %r11
movl 0x14(%r11), %r14d
movq (%rax,%r14,8), %r15
testl %r15d, %r15d
je 0xc87c1
movq %r15, %rbx
shrq $0x20, %rbx
leaq (%rbx,%rbx,2), %rbx
shlq $0x4, %rbx
addq %rcx, %rbx
movl %r15d, %r15d
shlq $0x4, %r15
leaq (%r15,%r15,2), %r12
xorl %r15d, %r15d
cmpl %esi, 0x14(%rbx,%r15)
je 0xc8779
addq $0x30, %r15
cmpq %r15, %r12
jne 0xc8767
jmp 0xc87c1
cmpb $0x0, 0x28(%rbx,%r15)
js 0xc879d
movl 0x4(%rbx,%r15), %ebp
subl (%rbx,%r15), %ebp
cmpl $0x2dc6c0, %ebp         # imm = 0x2DC6C0
jb 0xc87a3
movl %r8d, 0x18(%rbx,%r15)
movl %r8d, 0x18(%r11)
jmp 0xc87ac
cmpl %r14d, 0x8(%r11)
jae 0xc87ac
movl %r9d, 0x18(%rbx,%r15)
movl %r9d, 0x18(%r11)
incq %r10
cmpq %rdi, %r10
jne 0xc8727
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1709c8(%rip), %rdi    # 0x239190
leaq 0x16d6c2(%rip), %rsi    # 0x235e91
leaq 0x1709c1(%rip), %rcx    # 0x239197
movl $0x3ef4, %edx           # imm = 0x3EF4
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: copy_read_graph(asg_t*)
asg_t* copy_read_graph(asg_t *src)
{
    asg_t *dest = NULL;
    dest = asg_init();

    dest->r_seq = src->r_seq;
    dest->m_seq = dest->n_seq = src->n_seq;
    dest->seq = (asg_seq_t*)malloc(dest->n_seq * sizeof(asg_seq_t));
    memcpy(dest->seq, src->seq, sizeof(asg_seq_t)*dest->n_seq);

    dest->m_arc = dest->n_arc = src->n_arc;
    dest->arc = (asg_arc_t*)malloc(dest->n_arc*sizeof(asg_arc_t));
    memcpy(dest->arc, src->arc, sizeof(asg_arc_t)*dest->n_arc);

    dest->is_srt = src->is_srt;
    dest->is_symm = src->is_symm;
    dest->idx = NULL;
    // dest->idx = (uint64_t*)malloc(dest->n_seq*2*8);
    // memcpy(dest->idx, src->idx, dest->n_seq*2*8); 
    asg_cleanup(dest);

    if(src->seq_vis)
    {
        dest->seq_vis = (uint8_t*)malloc(dest->n_seq*2*sizeof(uint8_t));
        memcpy(dest->seq_vis, src->seq_vis, dest->n_seq*2*sizeof(uint8_t));
    }

    if(src->n_F_seq > 0 && src->F_seq)
    {
        dest->n_F_seq = src->n_F_seq;
        dest->F_seq = (ma_utg_t*)malloc(dest->n_F_seq*sizeof(ma_utg_t));
        memcpy(dest->F_seq, src->F_seq, dest->n_F_seq*sizeof(ma_utg_t));
    }
    return dest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x48, %esi
callq 0x2120
movq %rax, %rbx
movq 0x14(%r14), %r12
movl %r12d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %r15d, 0x10(%rax)
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x20(%rbx)
movq 0x20(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
movl 0x4(%r14), %r13d
movl %r13d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, (%rbx)
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x8(%rbx)
movq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
movl %r13d, 0x4(%rbx)
movq %r12, 0x14(%rbx)
movq %rbx, %rdi
callq 0xa0a7d
movq 0x30(%r14), %r15
testq %r15, %r15
je 0xc8e67
movl 0x14(%rbx), %r12d
addl %r12d, %r12d
movq %r12, %rdi
callq 0x2280
movq %rax, 0x30(%rbx)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2160
movl 0x38(%r14), %eax
testq %rax, %rax
je 0xc8e9e
movq 0x40(%r14), %r14
testq %r14, %r14
je 0xc8e9e
movl %eax, 0x38(%rbx)
shlq $0x3, %rax
leaq (%rax,%rax,4), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x40(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2160
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: destory_hap_cov_t(hap_cov_t**)
void destory_hap_cov_t(hap_cov_t **x)
{
    if(*x)
    {
        free((*x)->cov);
        free((*x)->pos_idx);
        free((*x)->is_r_het);
        kv_destroy((*x)->u_buffer.a);
        kv_destroy((*x)->tailIndex.a);
        kv_destroy((*x)->prevIndex.a);
        if((*x)->t_ch) destory_trans_chain(&((*x)->t_ch));
        free((*x));
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xc9c54
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0xa0(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x70(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x90(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
cmpq $0x0, 0xa8(%rdi)
je 0xc9c4e
addq $0xa8, %rdi
callq 0xbf611
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: dump_trans_ovlp(trans_chain*, char const*, ma_ug_t*)
uint64_t dump_trans_ovlp(trans_chain* t_ch, const char *fn, ma_ug_t *ug)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(fn)+50);
    sprintf(gfa_name, "%s.trans.bin", fn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return 0;
    if(ug) write_dbug(ug, fp);

    fwrite(&t_ch->r_num, sizeof(t_ch->r_num), 1, fp);
    fwrite(t_ch->ir_het, sizeof(uint8_t), t_ch->r_num, fp);
    uint64_t i;
    fwrite(&t_ch->bed.n, sizeof(t_ch->bed.n), 1, fp);
    for (i = 0; i < t_ch->bed.n; i++) {
        fwrite(&t_ch->bed.a[i].n, sizeof(t_ch->bed.a[i].n), 1, fp);
        fwrite(t_ch->bed.a[i].a, sizeof(bed_interval), t_ch->bed.a[i].n, fp);
    }

    fwrite(&t_ch->k_trans.n, sizeof(t_ch->k_trans.n), 1, fp);
    fwrite(t_ch->k_trans.a, sizeof(u_trans_t), t_ch->k_trans.n, fp);

    fwrite(&t_ch->k_trans.idx.n, sizeof(t_ch->k_trans.idx.n), 1, fp);
    fwrite(t_ch->k_trans.idx.a, sizeof(uint64_t), t_ch->k_trans.idx.n, fp);

    fclose(fp);
    fprintf(stderr, "[M::%s] Dump trans overlaps\n", __func__);
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r13
leaq 0x16d290(%rip), %rsi    # 0x236f12
xorl %r15d, %r15d
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x17ea49(%rip), %rsi    # 0x2486e2
movq %r13, %rdi
callq 0x2210
movq %rax, %r12
movq %r13, %rdi
callq 0x2220
testq %r12, %r12
jne 0xc9cbe
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x107c6
movl $0x1, %r15d
jmp 0xc9cb1
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: load_trans_ovlp(char const*, ma_ug_t*)
trans_chain* load_trans_ovlp(const char *fn, ma_ug_t *ug)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(fn)+50);
    sprintf(gfa_name, "%s.trans.bin", fn);
    FILE* fp = fopen(gfa_name, "r"); free(gfa_name);
    if (!fp) return NULL;
    if(ug && (!test_dbug(ug, fp))) {
        fprintf(stderr, "[M::%s] Renew trans overlaps\n", __func__);
        fclose(fp);
        return NULL;
    }

    uint64_t flag = 0;
    trans_chain *t_ch = NULL;
    CALLOC(t_ch, 1);

    flag += fread(&t_ch->r_num, sizeof(t_ch->r_num), 1, fp);
    MALLOC(t_ch->ir_het, t_ch->r_num);
    flag += fread(t_ch->ir_het, sizeof(uint8_t), t_ch->r_num, fp);

    uint64_t i;
    flag += fread(&t_ch->bed.n, sizeof(t_ch->bed.n), 1, fp);
    MALLOC(t_ch->bed.a, t_ch->bed.n); t_ch->bed.m = t_ch->bed.n;
    for (i = 0; i < t_ch->bed.n; i++) {
        flag += fread(&t_ch->bed.a[i].n, sizeof(t_ch->bed.a[i].n), 1, fp);
        MALLOC(t_ch->bed.a[i].a, t_ch->bed.a[i].n); t_ch->bed.a[i].m = t_ch->bed.a[i].n;
        flag += fread(t_ch->bed.a[i].a, sizeof(bed_interval), t_ch->bed.a[i].n, fp);
    }

    flag += fread(&t_ch->k_trans.n, sizeof(t_ch->k_trans.n), 1, fp);
    MALLOC(t_ch->k_trans.a, t_ch->k_trans.n); t_ch->k_trans.m = t_ch->k_trans.n;
    flag += fread(t_ch->k_trans.a, sizeof(u_trans_t), t_ch->k_trans.n, fp);

    flag += fread(&t_ch->k_trans.idx.n, sizeof(t_ch->k_trans.idx.n), 1, fp);
    MALLOC(t_ch->k_trans.idx.a, t_ch->k_trans.idx.n); t_ch->k_trans.idx.m = t_ch->k_trans.idx.n;
    flag += fread(t_ch->k_trans.idx.a, sizeof(uint64_t), t_ch->k_trans.idx.n, fp);

    fclose(fp);
    fprintf(stderr, "[M::%s::] ==> Trans overlaps have been loaded\n", __func__);
    return t_ch;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r12
leaq 0x16d218(%rip), %rsi    # 0x236f12
xorl %r14d, %r14d
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x175ae6(%rip), %rsi    # 0x23f7f7
movq %r12, %rdi
callq 0x2210
movq %rax, %r15
movq %r12, %rdi
callq 0x2220
testq %r15, %r15
jne 0xc9d38
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testq %rbx, %rbx
je 0xc9d59
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc3645
testl %eax, %eax
jne 0xc9d59
movq %r15, %rdi
callq 0x10906
xorl %r14d, %r14d
jmp 0xc9d29
movq %rsp, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10932
movq (%rbx), %r14
jmp 0xc9d29
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: update_trio_mmhap(unsigned int, ma_ug_t*, mmhap_t*, asg_t*, unsigned int)
void update_trio_mmhap(uint32_t hapid, ma_ug_t *mm_ug, mmhap_t *rh, asg_t *sg, uint32_t n_hap)
{
    uint64_t k, z, m, rid; ma_utg_t *u;
    for (k = 0; k < sg->n_seq; k++) {
        if(R_INF.trio_flag[k] == DROP) continue;
        R_INF.trio_flag[k] = AMBIGU;
    }
    
    for (k = 0; k < mm_ug->u.n; k++) { 
        if(rh->h.a[k].m == n_hap || rh->h.a[k].n == 0) {
            m = AMBIGU;
        } else {
            for (z = 0, m = MOTHER; z < rh->h.a[k].n; z++) {
                if(rh->a.a[rh->h.a[k].a+z] == hapid) {m = FATHER; break;}
            }
        }
        
        u = &(mm_ug->u.a[k]);
        for (z = 0; z < u->n; z++) {
            rid = u->a[z]>>33;
            if(R_INF.trio_flag[rid] == DROP) continue;
            R_INF.trio_flag[rid] = m;
        }
        fprintf(stderr, "utg%.6lu%c\tm::%lu\n", k+1, "lc"[mm_ug->u.a[k].circ], m);
    }
}

// Assembly:
pushq %rbx
movl %edi, %eax
movl 0x14(%rcx), %edi
testl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
je 0xc9dab
leaq 0x1cc4af(%rip), %r9     # 0x296230
movq 0x28(%r9), %r10
xorl %r11d, %r11d
cmpb $0x5, (%r10,%r11)
je 0xc9d9b
movb $0x0, (%r10,%r11)
movq 0x28(%r9), %r10
movl 0x14(%rcx), %edi
incq %r11
movl %edi, %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpq %rbx, %r11
jb 0xc9d88
cmpq $0x0, (%rsi)
jne 0xc9db3
popq %rbx
retq
movq %rdx, %rdi
movl %eax, %edx
movl %r8d, %ecx
callq 0x10ada
jmp 0xc9db1
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: output_trio_mmhap(asg_t*, ma_sub_t*, char*, ma_hit_t_alloc*, ma_hit_t_alloc*, long long, float, long long, R_to_U*, float, float, int, int, long long, bub_label_t*, ug_opt_t*, ma_ug_t*, mmhap_t*, unsigned int)
void output_trio_mmhap(asg_t *sg, ma_sub_t* coverage_cut, char* output_file_name, ma_hit_t_alloc* sources, 
ma_hit_t_alloc* reverse_sources, long long tipsLen, float tip_drop_ratio, long long stops_threshold, R_to_U* ruIndex, 
float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp, long long gap_fuzz, bub_label_t* b_mask_t, ug_opt_t *opt, 
ma_ug_t *mm_ug, mmhap_t *rh, uint32_t n_hap)
{
    uint32_t i; char *fp = NULL; MALLOC(fp, 100);
    memset(R_INF.trio_flag, 0, sizeof((*(R_INF.trio_flag)))*sg->n_seq);
    for (i = 0; i < n_hap; i++){
        sprintf(fp, "hap%u", i+1);
        update_trio_mmhap(i, mm_ug, rh, sg, n_hap);
        output_trio_unitig_graph(sg, coverage_cut, output_file_name, FATHER, sources, reverse_sources, tipsLen, tip_drop_ratio, 
        stops_threshold, ruIndex, chimeric_rate, drop_ratio, max_hang, min_ovlp, gap_fuzz, 0, b_mask_t, fp, NULL, NULL);
    }
    free(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movss %xmm2, 0x74(%rsp)
movss %xmm1, 0x70(%rsp)
movss %xmm0, 0x6c(%rsp)
movq %r9, 0xc0(%rsp)
movq %r8, 0xb8(%rsp)
movq %rcx, 0xb0(%rsp)
movq %rdx, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdi, %rbp
movl 0x148(%rsp), %ebx
movq 0x140(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x118(%rsp), %eax
movl %eax, 0x68(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x64(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x100(%rsp), %r15
movl $0x64, %edi
callq 0x2280
movq %rax, %r12
leaq 0x1cc39a(%rip), %rax    # 0x296230
movq 0x28(%rax), %rdi
movl 0x14(%rbp), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x20e0
testl %ebx, %ebx
je 0xc9f8f
xorl %r14d, %r14d
leal 0x1(%r14), %r13d
movq %r12, %rdi
leaq 0x16cc96(%rip), %rsi    # 0x236b59
movl %r13d, %edx
xorl %eax, %eax
callq 0x2050
movl %r14d, %edi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %rbp, %rcx
movl %ebx, %r8d
callq 0xc9d6c
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movq %r12, 0x40(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rax
movl %eax, 0x28(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0x30(%rsp)
movq %rbp, %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x1, %ecx
movq 0xb0(%rsp), %r8
movq 0xb8(%rsp), %r9
movss 0x6c(%rsp), %xmm0
movss 0x70(%rsp), %xmm1
movss 0x74(%rsp), %xmm2
callq 0xc30dd
movl %r13d, %r14d
cmpl %r13d, %ebx
jne 0xc9eb5
movq %r12, %rdi
addq $0xc8, %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/Overlaps.cpp
// Function: print_debug_gfa(ma_ug_t*, asg_t*, ma_sub_t*, char*, ma_hit_t_alloc*, R_to_U*)
void print_debug_gfa(ma_ug_t *ug, asg_t *sg, ma_sub_t* coverage_cut, char* output_file_name, 
ma_hit_t_alloc* sources, R_to_U* ruIndex)
{
    char* gfa_name = (char*)malloc(strlen(output_file_name)+50);
    sprintf(gfa_name, "%s.after.clean_d_utg.gfa", output_file_name);
    FILE* output_file = fopen(gfa_name, "w");
    ma_ug_print(ug, sg, coverage_cut, sources, ruIndex, "utg", output_file);
    fclose(output_file);

    sprintf(gfa_name, "%s.after.clean_d_utg.noseq.gfa", output_file_name);
    output_file = fopen(gfa_name, "w");
    ma_ug_print_simple(ug, sg, coverage_cut, sources, ruIndex, "utg", output_file);
    fclose(output_file);
    
    free(gfa_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, (%rsp)
movq %rcx, %rbx
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r13
movq %rdi, 0x10(%rsp)
movq %rcx, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x16cb21(%rip), %rsi    # 0x237004
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x17e1eb(%rip), %rsi    # 0x2486e2
movq %r15, %rdi
callq 0x2210
movq %rax, %r14
subq $0x8, %rsp
leaq 0x17187e(%rip), %rax    # 0x23bd8b
leaq 0x1cbd1c(%rip), %rsi    # 0x296230
movq %r13, %rdi
movq %r12, %rdx
movq %rbp, %rcx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
pushq %r14
pushq %rax
movq %rax, %r13
pushq $0x1
callq 0xb7823
addq $0x20, %rsp
movq %r14, %rdi
callq 0x2190
leaq 0x16cad6(%rip), %rsi    # 0x23701d
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
movq %r15, %rdi
leaq 0x17e184(%rip), %rsi    # 0x2486e2
callq 0x2210
movq %rax, %rbx
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
leaq 0x1cbcba(%rip), %rsi    # 0x296230
movq %r12, %rdx
movq %rbp, %rcx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
pushq %rax
pushq %r13
pushq $0x0
callq 0xb7823
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x2190
movq %r15, %rdi
addq $0x18, %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/Overlaps.cpp
// Function: get_poly_ug(asg_t*, ma_sub_t*, ma_hit_t_alloc*, ma_hit_t_alloc*, int, int, R_to_U*, bub_label_t*)
ma_ug_t *get_poly_ug(asg_t *sg, ma_sub_t* coverage_cut, ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, 
int max_hang, int min_ovlp, R_to_U* ruIndex, bub_label_t* b_mask_t)
{
    kvec_asg_arc_t_warp new_rtg_edges, d_edges;
    kv_init(new_rtg_edges.a); kv_init(d_edges.a);

    ma_ug_t *ug = ma_ug_gen_primary(sg, PRIMARY_LABLE);

    uint8_t* is_r_het = NULL;
    CALLOC(is_r_het, sg->n_seq);
    set_r_het_flag(ug, sg, coverage_cut, sources, ruIndex, is_r_het);

    adjust_utg_advance(sg, ug, reverse_sources, ruIndex, b_mask_t, is_r_het);
    asg_t* nsg = (*ug).g;
    uint32_t v, n_vtx = nsg->n_seq;
    for (v = 0; v < n_vtx; ++v)
    {
        if(nsg->seq[v].del) continue;
        nsg->seq[v].c = PRIMARY_LABLE;
    }
    delete_useless_nodes(&ug);
    renew_utg(&ug, sg, NULL); 

    ma_ug_seq(ug, sg, coverage_cut, sources, &new_rtg_edges, max_hang, min_ovlp, &d_edges, 1);

    kv_destroy(new_rtg_edges.a);  kv_destroy(d_edges.a);
    horder_clean_sg_by_utg(sg, ug);
    free(is_r_het);
    return ug;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x20(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
xorl %esi, %esi
callq 0xb2a6d
movq %rax, %rbp
movq %rax, 0x28(%rsp)
movl 0x14(%rbx), %edi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r13
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, 0x10(%rsp)
movq %r15, %rdx
movq %r12, 0x18(%rsp)
movq %r12, %rcx
movq 0xb0(%rsp), %r15
movq %r15, %r8
movq %rax, %r9
callq 0xbf230
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0xb8(%rsp), %r8
movq %r13, %r9
callq 0xca960
movq 0x18(%rbp), %rcx
movl 0x14(%rcx), %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andq %rdx, %rax
je 0xca8e1
movq 0x20(%rcx), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,8)
js 0xca8d9
movb $0x0, 0x4(%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0xca8ce
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xca9ea
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xbb7a4
movq (%r14), %r14
subq $0x8, %rsp
leaq 0x38(%rsp), %r15
leaq 0x58(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x14(%rsp), %r9d
pushq $0x1
pushq %r15
pushq 0x38(%rsp)
callq 0xb67c4
addq $0x20, %rsp
movq 0x10(%r15), %rdi
callq 0x2220
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1769f0
movq %r13, %rdi
callq 0x2220
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: adjust_utg_advance(asg_t*, ma_ug_t*, ma_hit_t_alloc*, R_to_U*, bub_label_t*, unsigned char*)
void adjust_utg_advance(asg_t *sg, ma_ug_t *ug, ma_hit_t_alloc* reverse_sources, R_to_U* ruIndex, bub_label_t* b_mask_t, uint8_t* is_r_het)
{
    double startTime = Get_T();
    asg_t* nsg = ug->g;
    unroll_simple_case_advance(ug, sg, reverse_sources, ruIndex, b_mask_t, is_r_het, 2.5);
    drop_semi_circle(ug, ug->g, sg, reverse_sources, ruIndex, is_r_het);
    asg_cleanup(nsg);
    asg_symm(nsg);
    // fprintf(stderr, "[M::%s]-4-\n", __func__); dbg_spec_edge(ug->g, 7536, 28129);
    ///debug_utg_graph(ug, sg, 0, 0);
    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] takes %0.2f s\n", __func__, Get_T()-startTime);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, (%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
callq 0x2f3fc
movq 0x18(%rbp), %rbx
movsd 0x16b3f9(%rip), %xmm0   # 0x235d88
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq (%rsp), %r8
movq %r14, %r9
callq 0xf1466
movq 0x18(%rbp), %rsi
movq %rbp, %rdi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0xd4320
movq %rbx, %rdi
callq 0xa0a7d
movq %rbx, %rdi
callq 0xa0ab6
movq %rbx, %rdi
callq 0xa0b79
orb $-0x80, 0x17(%rbx)
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/Overlaps.cpp
// Function: delete_useless_nodes(ma_ug_t**)
void delete_useless_nodes(ma_ug_t **ug)
{
    asg_t* nsg = (*ug)->g;
    uint32_t v, n_vtx = nsg->n_seq;
    for (v = 0; v < n_vtx; ++v) 
    {
        if(nsg->seq[v].del) continue;
        if(nsg->seq[v].c == ALTER_LABLE)
        {
            asg_seq_del(nsg, v);
            if((*ug)->u.a[v].m!=0)
            {
                (*ug)->u.a[v].m = (*ug)->u.a[v].n = 0;
                free((*ug)->u.a[v].a);
                (*ug)->u.a[v].a = NULL;
            }

            continue;
        }

        //note: after cleaning, some cirle might be gone, or we have some new circles
        //so need to renew .circ
        /**
        if(get_unitig(nsg, NULL, (v<<1), &convex, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, NULL)==LOOP)
        {
            (*ug)->u.a[v].circ = 1;
            (*ug)->u.a[v].start = (*ug)->u.a[v].end = UINT32_MAX;
        }
        else
        {
            (*ug)->u.a[v].circ = 0;

            (*ug)->u.a[v].start = (*ug)->u.a[v].a[0]>>32;
            (*ug)->u.a[v].end = ((*ug)->u.a[v].a[(*ug)->u.a[v].n-1]>>32)^1;
        }
        **/        
    }

    asg_cleanup(nsg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x18(%rax), %r14
movl 0x14(%r14), %r15d
andq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
je 0xcab40
movq %rdi, %rbx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
movq 0x20(%r14), %rax
movl (%rax,%rbp,8), %ecx
testl %ecx, %ecx
js 0xcab34
cmpb $0x1, 0x4(%rax,%rbp,8)
jne 0xcab34
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%rax,%rbp,8)
leaq (,%rbp,2), %rax
movb $0x1, %cl
xorl %edx, %edx
orq %rax, %rdx
movq 0x28(%r14), %rsi
movq (%rsi,%rdx,8), %rdi
movq %rdi, %rsi
andq %r13, %rsi
je 0xcaad4
shrq $0x20, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x3, %rdi
addq 0x8(%r14), %rdi
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r9
orb $-0x80, 0xf(%rdi,%r9,8)
movl 0x8(%rdi,%r9,8), %r9d
xorq $0x1, %r9
movq 0x28(%r14), %r10
movq (%r10,%r9,8), %r10
movq %r10, %r9
andq %r13, %r9
je 0xcaacc
movq 0x8(%r14), %r11
shrq $0x20, %r10
shlq $0x3, %r9
leaq (%r9,%r9,2), %r9
leaq (%r10,%r10,2), %r10
leaq (%r11,%r10,8), %r10
addq $0xc, %r10
xorl %r11d, %r11d
movl -0x4(%r10,%r11), %r12d
xorl %edx, %r12d
cmpl $0x1, %r12d
jne 0xcaac3
orb $-0x80, 0x3(%r10,%r11)
addq $0x18, %r11
cmpq %r11, %r9
jne 0xcaaaf
incq %r8
cmpq %rsi, %r8
jne 0xcaa6d
movl $0x1, %edx
testb $0x1, %cl
movl $0x0, %ecx
jne 0xcaa47
movq (%rbx), %rax
movq 0x10(%rax), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
cmpl $0x0, 0xc(%rax,%rcx,8)
je 0xcab34
leaq (%rax,%rcx,8), %rcx
xorl %edx, %edx
movl %edx, 0x10(%rcx)
leaq (,%rbp,8), %rcx
leaq (%rcx,%rcx,4), %r12
movl %edx, 0xc(%rax,%r12)
movq 0x18(%rax,%r12), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x18(%rax,%r12)
incq %rbp
cmpq %r15, %rbp
jne 0xcaa18
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa0a7d
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_utg_ovlp(ma_ug_t**, asg_t*, ma_hit_t_alloc*, ma_hit_t_alloc*, ma_sub_t*, R_to_U*, int, int, kvec_asg_arc_t_warp*, bub_label_t*, unsigned char*)
kv_u_trans_t *get_utg_ovlp(ma_ug_t **ug, asg_t* read_g, ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, ma_sub_t* coverage_cut, 
R_to_U* ruIndex, int max_hang, int min_ovlp, kvec_asg_arc_t_warp* new_rtg_edges, bub_label_t* b_mask_t, uint8_t* r_het)
{
    ///print_debug_gfa(read_g, *ug, coverage_cut, "init", sources, ruIndex, asm_opt.max_hang_Len, asm_opt.min_overlap_Len);
    kv_u_trans_t *ta = pt_pdist(*ug, read_g,coverage_cut, sources, new_rtg_edges, max_hang, min_ovlp, 5);
    kv_gg_status *sa = init_mc_gg_status(*ug, read_g, coverage_cut, sources, ruIndex, 
    asm_opt.hom_global_coverage_set?asm_opt.hom_global_coverage:((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE), 
    asm_opt.polyploidy);
    mc_solve_general(ta, (*ug)->u.n, sa, asm_opt.polyploidy, 1, 1);
    if(r_het) set_r_het_status(r_het, sa, *ug, asm_opt.polyploidy);
    free(sa->a); free(sa);
    return ta;
    // ma_ug_seq(*ug, read_g, coverage_cut, sources, new_rtg_edges, max_hang, min_ovlp, 0, 0);
    // ug_idx_build(*ug, asm_opt.polyploidy);
    // topo_ovlp_collect(*ug, read_g, sources, reverse_sources, coverage_cut, tipsLen, tip_drop_ratio, 
    // stops_threshold, ruIndex, chimeric_rate, drop_ratio, max_hang, min_ovlp, cov);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %rbp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq 0x50(%rsp), %r8
movl 0x40(%rsp), %r9d
movl 0x48(%rsp), %eax
movq (%rdi), %rdi
movq %rbp, %rdx
movq %r13, %rcx
pushq $0x5
pushq %rax
callq 0x19cf89
addq $0x10, %rsp
movq %rax, %r15
movq (%r14), %rdi
leaq 0x1caaaf(%rip), %r12    # 0x295758
cmpl $0x0, 0x148(%r12)
cvtsi2sdl 0x144(%r12), %xmm0
jne 0xcacc6
divsd 0x16b09a(%rip), %xmm0   # 0x235d60
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x166632(%rip), %xmm0   # 0x231308
cvttsd2si %xmm0, %r9
sarq $0x3f, %rcx
andq %rcx, %r9
orq %rax, %r9
movzwl 0x1bc(%r12), %eax
subq $0x8, %rsp
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq 0x8(%rsp), %r8
pushq %rax
callq 0x1e3b6
addq $0x10, %rsp
movq %rax, %rbx
movq (%r14), %rax
movl (%rax), %esi
movzwl 0x1bc(%r12), %ecx
movq %r15, %rdi
movq %rbx, %rdx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x171850
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xcad4f
movq (%r14), %rdx
movl 0x1bc(%r12), %ecx
movq %rbx, %rsi
callq 0xf390d
movq (%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq