LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: load_ps_t(ps_t**, char const*)
int load_ps_t(ps_t **s, const char *fn)
{
    uint64_t flag = 0;
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.pst.bin", fn);
    FILE* fp = NULL; 
    fp = fopen(buf, "r"); 
    if(!fp) return 0;
    CALLOC(*s, 1);
    flag += fread(&((*s)->xs), sizeof((*s)->xs), 1, fp);
    flag += fread(&((*s)->n), sizeof((*s)->n), 1, fp);
    MALLOC((*s)->s, (*s)->n);
    flag += fread((*s)->s, sizeof(int8_t), (*s)->n, fp);

    fclose(fp);
    free(buf);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %rbx
leaq 0xdc0e0(%rip), %rsi     # 0x23c6cb
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xdf1f6(%rip), %rsi     # 0x23f7f7
movq %rbx, %rdi
callq 0x2210
testq %rax, %rax
je 0x160693
movq %rax, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, (%r14)
leaq 0x8(%rax), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %rdi
addq $0x10, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %r12
movq 0x10(%r12), %rdi
callq 0x2280
movq %rax, (%r12)
movq (%r14), %rax
movq (%rax), %rdi
movq 0x10(%rax), %rdx
movl $0x1, %esi
movq %r15, %rcx
callq 0x22f0
movq %r15, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x2220
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: get_MAPQ(u_trans_t*, unsigned int, unsigned int, double)
uint32_t get_MAPQ(u_trans_t *a, uint32_t a_n, uint32_t idx, double secondRate)
{
    uint32_t i;
    u_trans_t *p = &(a[idx]);
    uint64_t ovlp = 0;
    double aw = 0;
    for (i = 0; i < a_n; i++)
    {
        if(i == idx) continue;
        ovlp = ((MIN(a[i].qe, p->qe) > MAX(a[i].qs, p->qs))?
                                        (MIN(a[i].qe, p->qe) - MAX(a[i].qs, p->qs)):0);
        // if(p->qn == 447 && p->tn == 5495)
        // {
        //     fprintf(stderr, "ovlp: %lu, secondRate: %f, len: %u\n", ovlp, secondRate, MIN(a[i].qe - a[i].qs, p->qe - p->qs));
        // }
        if(ovlp == 0) continue;
        if(ovlp <= (secondRate*MIN(a[i].qe - a[i].qs, p->qe - p->qs))) continue;
        
        aw += a[i].nw;
    }
    // if(p->qn == 447 && p->tn == 5495) fprintf(stderr, "aw: %f\n", aw);
    aw = aw/p->nw;
    // if(p->qn == 447 && p->tn == 5495) fprintf(stderr, "aw: %f\n", aw);
    if(aw >= 1) return 16;
    if(aw >= 0.75) return 8;
    if(aw >= 0.5) return 4;
    if(aw >= 0.25) return 2;
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
movl %edx, %ecx
leaq (%rcx,%rcx,2), %rax
shlq $0x4, %rax
addq %rdi, %rax
testl %esi, %esi
je 0x160a24
movl %esi, %edx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorpd %xmm1, %xmm1
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x160a19
movl (%rdi,%rsi), %r10d
movl 0x4(%rdi,%rsi), %r8d
movl (%rax), %r11d
movl 0x4(%rax), %r9d
cmpl %r9d, %r8d
movl %r9d, %ebx
cmovbl %r8d, %ebx
cmpl %r11d, %r10d
movl %r11d, %ebp
cmoval %r10d, %ebp
subl %ebp, %ebx
jbe 0x160a19
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
subl %r10d, %r8d
subl %r11d, %r9d
cmpl %r9d, %r8d
cmovbl %r8d, %r9d
xorps %xmm3, %xmm3
cvtsi2sd %r9, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
jae 0x160a19
addsd 0x20(%rdi,%rsi), %xmm1
addq $0x30, %rsi
cmpq %rsi, %rdx
jne 0x1609bf
jmp 0x160a28
xorpd %xmm1, %xmm1
divsd 0x20(%rax), %xmm1
movl $0x10, %eax
ucomisd 0xd08d6(%rip), %xmm1    # 0x231310
jae 0x160a6a
movl $0x8, %eax
ucomisd 0xd0be7(%rip), %xmm1    # 0x231630
jae 0x160a6a
movl $0x4, %eax
ucomisd 0xd0b98(%rip), %xmm1    # 0x2315f0
jae 0x160a6a
ucomisd 0xd0b6e(%rip), %xmm1    # 0x2315d0
movl $0x2, %eax
sbbl $0x0, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: set_tag_pre_read(unsigned long*, unsigned long, unsigned long, unsigned long, ma_hit_t_alloc*)
void set_tag_pre_read(uint64_t *r_tag, uint64_t id, uint64_t off, uint64_t pos, ma_hit_t_alloc* sources)
{
    uint64_t i, tn;
    ma_hit_t *h = NULL;
    if(r_tag[id] == (uint64_t)-1) r_tag[id] = 0;
    r_tag[id] += off;
    // if(id == 2531247) fprintf(stderr, "***id: %lu, off: %lu, pos: %lu\n", id, off, pos);
    for (i = 0; i < (uint64_t)(sources[id].length); i++)
    {
        h = &(sources[id].buffer[i]);
        if(!h->el) continue;
        tn = Get_tn((*h));
        if(pos >= Get_qs((*h)) && pos < Get_qe((*h)))
        {
            // if(tn == 2531247) fprintf(stderr, "###id: %lu, off: %lu, tn: %lu, pos: %lu\n", id, off, tn, pos);
            if(r_tag[tn] == (uint64_t)-1) r_tag[tn] = 0;
            r_tag[tn] += off;
        }
        
    }
}

// Assembly:
movq (%rdi,%rsi,8), %rax
xorl %r9d, %r9d
cmpq $-0x1, %rax
cmovneq %rax, %r9
addq %rdx, %r9
movq %r9, (%rdi,%rsi,8)
leaq (%rsi,%rsi,2), %rax
movl 0xc(%r8,%rax,8), %esi
testq %rsi, %rsi
je 0x160c3f
leaq (%r8,%rax,8), %rax
movq (%rax), %rax
shlq $0x3, %rsi
leaq (%rsi,%rsi,4), %rsi
xorl %r8d, %r8d
cmpb $0x0, 0x20(%rax,%r8)
je 0x160c36
movl (%rax,%r8), %r9d
cmpq %rcx, %r9
ja 0x160c36
movl 0x8(%rax,%r8), %r9d
cmpq %rcx, %r9
jbe 0x160c36
movl 0xc(%rax,%r8), %r9d
movq (%rdi,%r9,8), %r10
cmpq $-0x1, %r10
movl $0x0, %r11d
cmovneq %r10, %r11
addq %rdx, %r11
movq %r11, (%rdi,%r9,8)
addq $0x28, %r8
cmpq %r8, %rsi
jne 0x160bfd
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: renew_idx_para(ha_ug_index*, ma_ug_t*)
void renew_idx_para(ha_ug_index* idx, ma_ug_t* ug)
{
    for (idx->uID_bits=1; (uint64_t)(1<<idx->uID_bits)<(uint64_t)ug->u.n; idx->uID_bits++);
    idx->pos_bits = 64 - idx->uID_bits - 1;
    idx->uID_mode = (((uint64_t)-1) << (64-idx->uID_bits))>>1;
    idx->pos_mode = ((uint64_t)-1) >> (64-idx->pos_bits);
    idx->rev_mode = ((uint64_t)1) << 63;
}

// Assembly:
movq (%rsi), %rsi
movl $0x1, %eax
xorl %edx, %edx
movl $0x1, %r8d
movl %eax, %ecx
shll %cl, %r8d
movslq %r8d, %rcx
incq %rax
decq %rdx
cmpq %rcx, %rsi
ja 0x160c4a
movq %rdx, %rcx
negq %rcx
movq %rcx, 0x18(%rdi)
leaq 0x3f(%rdx), %rcx
movq %rcx, 0x28(%rdi)
movq $-0x1, %rsi
movq $-0x1, %r8
movl %edx, %ecx
shlq %cl, %r8
shrq %r8
movl %eax, %ecx
shrq %cl, %rsi
movq %r8, 0x20(%rdi)
movq %rsi, 0x30(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x38(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: get_oe_occ(unsigned int, unsigned int, kvec_pe_hit*, ha_ug_index*)
uint32_t get_oe_occ(uint32_t qn, uint32_t tn, kvec_pe_hit* hits, ha_ug_index* idx)
{
    uint64_t shif = 64 - idx->uID_bits, occ = 0;
    pe_hit *h_a = hits->a.a + (hits->idx.a[qn]>>32);
    uint32_t h_occ = (uint32_t)(hits->idx.a[qn]), i;
    for (i = 0; i < h_occ; i++) {
        if(((h_a[i].s<<1)>>shif)==qn && ((h_a[i].e<<1)>>shif)==tn) occ++;
    }
    return occ;
}

// Assembly:
movq %rcx, %rax
movq 0x28(%rdx), %rcx
movl %edi, %edi
movq (%rcx,%rdi,8), %r8
testl %r8d, %r8d
je 0x160d18
movl $0x40, %ecx
subq 0x18(%rax), %rcx
movq 0x10(%rdx), %rax
movq %r8, %r9
shrq $0x20, %r9
movl %esi, %edx
movl %r8d, %esi
shlq $0x5, %r9
leaq (%r9,%rax), %r8
addq $0x8, %r8
shlq $0x5, %rsi
xorl %r9d, %r9d
xorl %eax, %eax
movq -0x8(%r8,%r9), %r10
addq %r10, %r10
shrq %cl, %r10
cmpq %rdi, %r10
jne 0x160d0e
movq (%r8,%r9), %r10
addq %r10, %r10
shrq %cl, %r10
xorl %r11d, %r11d
cmpq %rdx, %r10
sete %r11b
addl %r11d, %eax
addq $0x20, %r9
cmpq %r9, %rsi
jne 0x160ce7
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: debug_round_test(ps_t*, unsigned long, bubble_type*, kv_u_trans_t*, hc_links*, sldat_t*, ha_ug_index*, unsigned long, unsigned long)
void debug_round_test(ps_t *s, uint64_t seed, bubble_type *bub, kv_u_trans_t *k_trans, hc_links *link, sldat_t *sl, 
ha_ug_index* idx, uint64_t step, uint64_t total)
{
    uint64_t i;
    for (i = step; i <= total; i += step) {
        fprintf(stderr, "\n");
        round_test(s, seed, bub, k_trans, link, sl, idx, 0, i);
        round_test(s, seed, bub, k_trans, link, sl, idx, 1, i);
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rbx
cmpq %rax, %rbx
ja 0x1612bc
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rdi, 0x8(%rsp)
movq 0x133db8(%rip), %rax    # 0x294fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2270
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %r13, %rbp
movq %r12, %r13
movq %r15, %r12
movq %r14, %r15
movq 0x18(%rsp), %r14
movq %r14, %r9
pushq %rbx
pushq $0x0
movq 0x68(%rsp), %rax
pushq %rax
callq 0x1afcf
addq $0x18, %rsp
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
movq %r15, %r14
movq %r12, %r15
movq %r13, %r12
movq %rbp, %r13
movq 0x10(%rsp), %rbp
pushq %rbx
pushq $0x1
pushq 0x68(%rsp)
callq 0x1afcf
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rax
addq $0x20, %rsp
addq %rcx, %rbx
cmpq %rax, %rbx
jbe 0x161221
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/hic.cpp
// Function: prt_hits_noid(ha_ug_index*, ma_ug_t*, kvec_pe_hit*, _IO_FILE*)
void prt_hits_noid(ha_ug_index* idx, ma_ug_t* ug, kvec_pe_hit* hits, FILE *fn)
{
    uint64_t k, shif = 64 - idx->uID_bits;
    char dir[2] = {'+', '-'};
    for (k = 0; k < hits->a.n; ++k) { 
        fprintf(fn, "r-%lu-th\t%c\trs-utg%.6d%c\t%lu\t%c\tre-utg%.6d%c\t%lu\n", 
        hits->a.a[k].id,
        dir[hits->a.a[k].s>>63], (int)((hits->a.a[k].s<<1)>>shif)+1, 
        "lc"[ug->u.a[((hits->a.a[k].s<<1)>>shif)].circ], hits->a.a[k].s&idx->pos_mode,
        dir[hits->a.a[k].e>>63], (int)((hits->a.a[k].e<<1)>>shif)+1, 
        "lc"[ug->u.a[((hits->a.a[k].e<<1)>>shif)].circ], hits->a.a[k].e&idx->pos_mode);        
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdi, (%rsp)
cmpq $0x0, (%rdx)
je 0x1613d9
movl $0x40, %ecx
movq (%rsp), %rax
subq 0x18(%rax), %rcx
movq %rcx, 0x10(%rsp)
movl $0x10, %ebp
xorl %r12d, %r12d
movq %rdx, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rdx), %r13
movq -0x10(%r13,%rbp), %r10
movq -0x8(%r13,%rbp), %r14
movq %r10, %rax
leaq (%r10,%r10), %rdi
movq 0x10(%rsp), %r11
movl %r11d, %ecx
shrq %cl, %rdi
movq 0x10(%rsi), %rdx
leaq (%rdi,%rdi,4), %rcx
movl (%rdx,%rcx,8), %r9d
movq (%rsp), %rcx
movq 0x30(%rcx), %r8
leaq (%r14,%r14), %rbx
movl %r11d, %ecx
shrq %cl, %rbx
andq %r8, %r10
leaq (%rbx,%rbx,4), %rcx
movl (%rdx,%rcx,8), %r15d
movq %r14, %r11
andq %r8, %r14
movq (%r13,%rbp), %rdx
shrq $0x3f, %rax
leaq 0xd9f2d(%rip), %rsi     # 0x23b29c
movsbl (%rax,%rsi), %ecx
leal 0x1(%rdi), %r8d
shrl $0x1f, %r9d
leaq 0xd33b9(%rip), %rax     # 0x23473b
movsbl (%r9,%rax), %r9d
shrq $0x3f, %r11
movsbl (%r11,%rsi), %r11d
incl %ebx
shrl $0x1f, %r15d
movsbl (%r15,%rax), %r15d
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
leaq 0xdb4a9(%rip), %rsi     # 0x23c854
xorl %eax, %eax
pushq %r14
pushq %r15
pushq %rbx
pushq %r11
pushq %r10
callq 0x22b0
movq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq $0x30, %rsp
incq %r12
addq $0x20, %rbp
cmpq (%rdx), %r12
jb 0x161310
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: prt_utg_trans(kv_u_trans_t*, ma_ug_t*, _IO_FILE*)
void prt_utg_trans(kv_u_trans_t *ta, ma_ug_t* ug, FILE *fn)
{
    uint32_t i;
    u_trans_t *p = NULL;
    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        fprintf(fn, "utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tw(%f)\tf(%u)\n", 
        p->qn+1, "lc"[ug->u.a[p->qn].circ], ug->u.a[p->qn].len, p->qs, p->qe, "+-"[p->rev],
        p->tn+1, "lc"[ug->u.a[p->tn].circ], ug->u.a[p->tn].len, p->ts, p->te, p->nw, p->f);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x18(%rsp)
cmpq $0x0, (%rdi)
je 0x1614f2
movl $0x1, %ebp
xorl %ecx, %ecx
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x10(%rdi), %rax
leaq (%rcx,%rcx,2), %r10
shlq $0x4, %r10
movl 0x8(%rax,%r10), %ecx
leal 0x1(%rcx), %edx
movq 0x10(%rsi), %rdi
leaq (%rcx,%rcx,4), %rcx
movl (%rdi,%rcx,8), %r8d
movl %r8d, %ecx
shrl $0x1f, %ecx
leaq 0xd32f8(%rip), %rsi     # 0x23473b
movsbl (%rcx,%rsi), %ecx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl %esi, %r8d
movl (%rax,%r10), %r9d
movl 0x4(%rax,%r10), %r11d
movq %r11, 0x20(%rsp)
movzbl 0x28(%rax,%r10), %r14d
btl $0x6, %r14d
leaq 0xd0e64(%rip), %r11     # 0x2322d3
adcq $0x0, %r11
movsbl (%r11), %r11d
movl 0x14(%rax,%r10), %r13d
leal 0x1(%r13), %ebx
leaq (%r13,%r13,4), %r13
movl (%rdi,%r13,8), %r13d
movl 0xc(%rax,%r10), %r12d
movsd 0x20(%rax,%r10), %xmm0
movl 0x10(%rax,%r10), %r15d
movl %r13d, %eax
shrl $0x1f, %eax
leaq 0xd3294(%rip), %rdi     # 0x23473b
movsbl (%rax,%rdi), %r10d
andl %esi, %r13d
andl $0x3f, %r14d
movq 0x18(%rsp), %rdi
leaq 0xd57f8(%rip), %rsi     # 0x236cb7
movb $0x1, %al
pushq %r14
pushq %r15
pushq %r12
pushq %r13
pushq %r10
pushq %rbx
pushq %r11
pushq 0x58(%rsp)
callq 0x22b0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
addq $0x40, %rsp
movl %ebp, %ecx
incl %ebp
cmpq %rcx, (%rdi)
ja 0x161416
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: prt_kv_u_trans(kv_u_trans_t*, hc_links*, signed char*, _IO_FILE*)
void prt_kv_u_trans(kv_u_trans_t *ta, hc_links* lk, int8_t *s, FILE *fn)
{
    uint32_t i;
    u_trans_t *p = NULL;
    hc_edge *e = NULL;

    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        e = get_hc_edge(lk, p->qn, p->tn, 0);
        fprintf(fn, "s-utg%.6ul\tS(%d)\td-utg%.6ul\tS(%d)\trev(%u)\td(%lld)\ttw(%f)\n", 
        p->qn+1, s[p->qn], p->tn+1, s[p->tn], p->rev, 
        (e == NULL || e->dis == (uint64_t)-1)? -1 : (long long)(e->dis>>3), p->nw);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, (%rsp)
cmpq $0x0, (%rdi)
je 0x1615d0
movq %rdi, %r12
movl $0x1, %ebx
xorl %eax, %eax
movq 0x10(%r12), %r15
leaq (%rax,%rax,2), %r14
shlq $0x4, %r14
movl 0x8(%r15,%r14), %r13d
movl 0x14(%r15,%r14), %ebp
movq (%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x144201
testq %rax, %rax
je 0x161573
movq 0x10(%rax), %rax
movq %rax, %r10
shrq $0x3, %r10
cmpq $-0x1, %rax
cmoveq %rax, %r10
jmp 0x16157a
movq $-0x1, %r10
leaq (%r15,%r14), %rax
leal 0x1(%r13), %edx
movq 0x8(%rsp), %rsi
movsbl (%rsi,%r13), %ecx
leal 0x1(%rbp), %r8d
movsbl (%rsi,%rbp), %r9d
movl 0x28(%r15,%r14), %r11d
shrl $0x6, %r11d
andl $0x1, %r11d
movsd 0x20(%rax), %xmm0
movq 0x10(%rsp), %rdi
leaq 0xdafd3(%rip), %rsi     # 0x23c586
movb $0x1, %al
pushq %r10
pushq %r11
callq 0x22b0
addq $0x10, %rsp
movl %ebx, %eax
incl %ebx
cmpq %rax, (%r12)
ja 0x161531
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/hic.cpp
// Function: write_psg_t(psg_t*, char const*)
void write_psg_t(psg_t *sg, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.pst.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&(sg->xs), sizeof(sg->xs), 1, fp);
    fwrite(&(sg->sg.n), sizeof(sg->sg.n), 1, fp);
    fwrite(sg->sg.a, sizeof(mc_gg_status), sg->sg.n, fp);

    fclose(fp);
    free(buf);
}

// Assembly:
pushq %r15
pushq %r14
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 0xda1f7(%rip), %rsi     # 0x23c6cb
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xe61fa(%rip), %rsi     # 0x2486e2
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
leaq 0x18(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2410
leaq 0x8(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movl $0x20, %esi
movq %r15, %rcx
callq 0x2410
movq %r15, %rdi
callq 0x2190
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: init_psg_t(unsigned long, ma_ug_t*, asg_t*, ug_opt_t*)
psg_t* init_psg_t(uint64_t seed, ma_ug_t* ug, asg_t* rg, ug_opt_t *opt)
{
    psg_t *s = NULL; CALLOC(s, 1);
    s->xs = seed;
    
    kv_gg_status *sa = init_mc_gg_status(ug, rg, opt->coverage_cut, opt->sources, opt->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);

    s->sg = *sa;
    free(sa);
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %rbx
movq %r13, 0x18(%rax)
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x1331cc(%rip), %rax    # 0x295758
cmpl $0x0, 0x148(%rax)
cvtsi2sdl 0x144(%rax), %xmm0
jne 0x1625a5
divsd 0xd37bb(%rip), %xmm0    # 0x235d60
cvttsd2si %xmm0, %rsi
movq %rsi, %rdi
subsd 0xced53(%rip), %xmm0    # 0x231308
cvttsd2si %xmm0, %r9
sarq $0x3f, %rdi
andq %rdi, %r9
orq %rsi, %r9
movzwl 0x1bc(%rax), %eax
movl %eax, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e3b6
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, %rdi
callq 0x2220
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: gen_mmhap_bub(ma_ug_t*, unsigned char*, kv_u_trans_t*, mmhap_t*)
bubble_type *gen_mmhap_bub(ma_ug_t* ug, uint8_t *r_het_flag, kv_u_trans_t *ref, mmhap_t *hh)
{
    uint64_t k;
    bubble_type *p; CALLOC(p, 1); p->n_round = asm_opt.n_weight; p->round_id = 0;
    identify_bubbles(ug, p, r_het_flag, ref);
    for (k = 0; k < ug->g->n_seq; k++) {
        if(IF_BUB(k, (*p))) continue;
        if(IF_HOM(k, (*p))) {
            if(hh->h.a[k].n < hh->h.a[k].m) p->index[k] = p->num.n;
        } else if(IF_HET(k, (*p))) {
            if(hh->h.a[k].n >= hh->h.a[k].m) p->index[k] = (uint32_t)-1;
        }
    }
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x1, %ebp
movl $0x1, %edi
movl $0x110, %esi            # imm = 0x110
callq 0x2120
movq %rax, %r14
leaq 0x132e1f(%rip), %rax    # 0x295758
movl 0x1e0(%rax), %eax
movl %eax, 0xc(%r14)
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x13e8a1
movq 0x18(%r13), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0x1629b4
movq (%r14), %rcx
movq 0x80(%r14), %rdx
incq %rdx
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
cmpq %rdi, %rdx
ja 0x16299f
movq 0x10(%rbx), %rdi
movl -0x4(%rdi,%rbp,4), %r8d
movl (%rdi,%rbp,4), %r9d
jae 0x162992
cmpl %r9d, %r8d
jae 0x16299f
movl 0x30(%r14), %edi
jmp 0x16299c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl %r9d, %r8d
jb 0x16299f
movl %edi, (%rcx,%rsi,4)
incq %rsi
movl 0x14(%rax), %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
addq $0x3, %rbp
cmpq %rdi, %rsi
jb 0x162970
movq %r14, %rax
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/hic.cpp
// Function: cal_ave_ovlp(u_trans_t*, unsigned long, double)
uint64_t cal_ave_ovlp(u_trans_t *a, uint64_t an, double top)
{
    if(!an) return 0;
    uint64_t k, len, cut, occ, tot;
    for (k = len = 0; k < an; k++) {
        len += a[k].qe - a[k].qs;
    }
    cut = len - (len*top);
    for (k = occ = tot = 0; k < an; k++) {
        if(a[k].qe - a[k].qs < cut) continue;
        occ++; tot += a[k].qe - a[k].qs;
    }
    if(!occ) {
        occ = an; tot = len;
    }
    return tot/occ;
}

// Assembly:
testq %rsi, %rsi
je 0x162ab1
leaq 0x4(%rdi), %rax
xorl %ecx, %ecx
movq %rsi, %rdx
movl (%rax), %r8d
subl -0x4(%rax), %r8d
addq %r8, %rcx
addq $0x30, %rax
decq %rdx
jne 0x162a15
movq %rcx, %xmm1
punpckldq 0xce84b(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xce853(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %r8
subsd 0xce8a7(%rip), %xmm2    # 0x231308
cvttsd2si %xmm2, %rdx
sarq $0x3f, %r8
andq %r8, %rdx
orq %rax, %rdx
addq $0x4, %rdi
xorl %r8d, %r8d
movq %rsi, %r10
xorl %eax, %eax
xorl %r9d, %r9d
movl (%rdi), %r11d
subl -0x4(%rdi), %r11d
cmpq %rdx, %r11
sbbq $-0x1, %r9
cmpq %rdx, %r11
cmovbq %r8, %r11
addq %r11, %rax
addq $0x30, %rdi
decq %r10
jne 0x162a7f
testq %r9, %r9
cmovneq %r9, %rsi
cmoveq %rcx, %rax
xorl %edx, %edx
divq %rsi
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: hic_analysis(ma_ug_t*, asg_t*, trans_chain*, ug_opt_t*, mmhap_t**, kvec_pe_hit**)
void hic_analysis(ma_ug_t *ug, asg_t* read_g, trans_chain* t_ch, ug_opt_t *opt, mmhap_t **rh, kvec_pe_hit **rhits)
{
    ug_index = NULL;
    int exist = (asm_opt.load_index_from_disk? 
                    load_hc_pt_index(&ug_index, ug, asm_opt.output_file_name) : 0);
    if(exist == 0) ug_index = build_unitig_index(ug, asm_opt.hic_mer_length, asm_opt.hap_occ, 0, asm_opt.thread_num);
    if(exist == 0) write_hc_pt_index(ug_index, asm_opt.output_file_name);
    ug_index->ug = ug;
    ug_index->read_g = read_g;
    ug_index->t_ch = t_ch;
    ///test_unitig_index(ug_index, ug);
    if(!rh) hic_short_align(asm_opt.hic_reads[0], asm_opt.hic_reads[1], ug_index, opt, rhits);
    else hic_short_align_mmhap(asm_opt.hic_reads[0], asm_opt.hic_reads[1], ug_index, opt, rhits, rh);
    // else hic_short_align_poy(asm_opt.hic_reads[0], asm_opt.hic_reads[1], ug_index, opt);
    
    
    destory_hc_pt_index(ug_index);free(ug_index);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq $0x0, 0x132ebc(%rip) # 0x296530
leaq 0x1320dd(%rip), %r14    # 0x295758
cmpl $0x0, 0xf0(%r14)
je 0x1636f3
movq 0x10(%r14), %rdx
leaq 0x132ea0(%rip), %rdi    # 0x296530
movq %rbp, %rsi
callq 0x13ab6a
testl %eax, %eax
je 0x1636f3
movq 0x132e8d(%rip), %rax    # 0x296530
movq %rbp, (%rax)
movq 0x132e83(%rip), %rdx    # 0x296530
movq %r13, 0x8(%rdx)
movq %r12, 0x10(%rdx)
movq 0x50(%r14), %rdi
movq 0x58(%r14), %rsi
testq %rbx, %rbx
je 0x1636fd
movq %r15, %rcx
movq %rbx, %r9
callq 0x16330f
movq 0x132e5c(%rip), %rdi    # 0x296530
callq 0x13aefe
movq 0x132e50(%rip), %rdi    # 0x296530
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
movq %rbp, %rdi
callq 0x1ce0e
jmp 0x16369c
movq (%rsp), %r8
callq 0x1b30d
jmp 0x1636cd
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: ug_occ_hap_w(unsigned long, unsigned long, ma_utg_t*)
uint64_t ug_occ_hap_w(uint64_t is, uint64_t ie, ma_utg_t *u)
{
    uint64_t l, i, us, ue, occ;
    for (i = l = occ = 0; i < u->n; i++) {
        us = l; ue = l + Get_READ_LENGTH(R_INF, (u->a[i]>>33));
        if(is <= us && ie >= ue) {
            if((R_INF.trio_flag[u->a[i]>>33] == FATHER) || (R_INF.trio_flag[u->a[i]>>33] == MOTHER)) {
                occ++;
            }
        }
        if(us >= ie) break;
        l += (uint32_t)u->a[i];
    }
    return occ;
}

// Assembly:
movl 0x10(%rdx), %ecx
testq %rcx, %rcx
je 0x163775
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdx), %rdx
leaq 0x132b0f(%rip), %rax    # 0x296230
movq 0x18(%rax), %r8
movq 0x28(%rax), %r9
xorl %eax, %eax
xorl %r10d, %r10d
xorl %r11d, %r11d
movq (%rdx,%r11,8), %rbx
cmpq %rdi, %r10
jb 0x16375c
movq %rbx, %r14
shrq $0x21, %r14
movq (%r8,%r14,8), %r15
addq %r10, %r15
cmpq %rsi, %r15
ja 0x16375c
movb (%r9,%r14), %bpl
decb %bpl
cmpb $0x2, %bpl
adcq $0x0, %rax
cmpq %rsi, %r10
jae 0x16376e
movl %ebx, %ebx
addq %rbx, %r10
incq %r11
cmpq %r11, %rcx
jne 0x163731
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: set_bench_idx(ma_ug_t*, asg_t*, unsigned long, unsigned long, unsigned long, unsigned long)
uint64_t* set_bench_idx(ma_ug_t *ug, asg_t* read_g, uint64_t uID_start, uint64_t uID_end, uint64_t uID_bits, uint64_t r_n)
{
    uint64_t *idx = (uint64_t*)malloc(sizeof(uint64_t)*r_n), i, k;
    memset(idx, -1, sizeof(uint64_t)*r_n);
    uint64_t rId, ori, start, l;
    ma_utg_t *u = NULL;
    for (i = uID_start; i < uID_end; i++)
    {
        u = &(ug->u.a[i]);
        if(u->n == 0) continue;
        for (k = l = 0; k < u->n; k++)
        {
            rId = u->a[k]>>33;
            ori = u->a[k]>>32&1;
            start = l;
			l += (uint32_t)u->a[k];
            if(idx[rId] != (uint64_t)-1)
            {
                idx[rId] = (uint64_t)-1;
            }
            else
            {
                idx[rId] = (ori<<63) + ((i<<(64-uID_bits))>>1) + start;
                if(ori) idx[rId] = idx[rId] + read_g->seq[rId].len - 1;
            }
        }
    }

    return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbp
leaq (,%r9,8), %r13
movq %r13, %rdi
callq 0x2280
movq %rax, %r12
movq %rax, %rdi
movl $0xff, %esi
movq %r13, %rdx
callq 0x20e0
cmpq %rbx, %r14
jae 0x164ac0
movq 0x10(%rbp), %rax
movl $0x40, %ecx
subq (%rsp), %rcx
leaq (%r14,%r14,4), %rdi
movl 0x10(%rax,%rdi,8), %edx
testq %rdx, %rdx
je 0x164ab4
movq %r14, %rsi
shlq %cl, %rsi
leaq (%rax,%rdi,8), %rdi
movq 0x18(%rdi), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movq (%rdi,%r9,8), %r10
movq %r10, %r11
shrq $0x21, %r11
movq $-0x1, %r13
cmpq $-0x1, (%r12,%r11,8)
jne 0x164aa2
movq %r10, %r13
shrq $0x20, %r13
shldq $0x3f, %rsi, %r13
addq %r8, %r13
movq %r13, (%r12,%r11,8)
btq $0x20, %r10
jae 0x164aa6
movq 0x20(%r15), %rbp
movl (%rbp,%r11,8), %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
addq %rbp, %r13
decq %r13
movq %r13, (%r12,%r11,8)
movl %r10d, %r10d
addq %r10, %r8
incq %r9
cmpq %r9, %rdx
jne 0x164a5a
incq %r14
cmpq %rbx, %r14
jne 0x164a39
movq %r12, %rax
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/hic.cpp
// Function: hap_ID(bench_idx*, unsigned long, unsigned long*, unsigned long*)
void hap_ID(bench_idx* idx, uint64_t ID, uint64_t* hapID, uint64_t* uID)
{
    uint64_t i;
    (*hapID) = (*uID) = (uint64_t)-1;
    for (i = 0; i < idx->ug_idx.n; i++)
    {
        if(ID >= idx->ug_idx.a[i].uID_start && ID < idx->ug_idx.a[i].uID_end)
        {
            (*hapID) = i;
            (*uID) = ID - idx->ug_idx.a[i].uID_start;
            return;
        }
    }
    return;
}

// Assembly:
movq $-0x1, %rax
movq %rax, (%rcx)
movq %rax, (%rdx)
movq (%rdi), %rax
testq %rax, %rax
je 0x164d2d
movq 0x10(%rdi), %rdi
xorl %r8d, %r8d
cmpq %rsi, (%rdi)
ja 0x164d21
cmpq %rsi, 0x8(%rdi)
ja 0x164d2e
incq %r8
addq $0x28, %rdi
cmpq %r8, %rax
jne 0x164d16
retq
movq %r8, (%rdx)
subq (%rdi), %rsi
movq %rsi, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: print_bench_idx(bench_idx*, ma_ug_t*)
void print_bench_idx(bench_idx* idx, ma_ug_t *ug)
{
    uint64_t i, k, s_uID, s_hapID, d_uID, d_hapID;
    long long x[2] = {1, -1};
    for (i = 0; i < idx->link.a.n; i++)
    {
        for (k = 0; k < idx->link.a.a[i].e.n; k++)
        {
            if(idx->link.a.a[i].e.a[k].del) continue;
            hap_ID(idx, i, &s_hapID, &s_uID);
            hap_ID(idx, idx->link.a.a[i].e.a[k].uID, &d_hapID, &d_uID);
            fprintf(stderr, "s-hap%lu-utg%.6d\td-hap%lu-utg%.6d\t%c\t%lld\n", 
            s_hapID, (int)(s_uID+1), d_hapID, (int)(d_uID+1), 
            "+-"[!!(idx->link.a.a[i].e.a[k].dis&(uint64_t)2)], 
            ((long long)(idx->link.a.a[i].e.a[k].dis>>2))*x[idx->link.a.a[i].e.a[k].dis&(uint64_t)1]);
        }
    }
    
    
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x164ea8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rcx
movq 0x130282(%rip), %r12    # 0x294fe0
leaq 0xd7e72(%rip), %r14     # 0x23cbd7
xorl %ebp, %ebp
leaq (,%rbp,2), %r15
addq %rbp, %r15
shlq $0x4, %r15
cmpq $0x0, (%rcx,%r15)
je 0x164e8e
xorl %r13d, %r13d
movq 0x10(%rcx,%r15), %rax
leaq (,%r13,4), %rsi
addq %r13, %rsi
cmpb $0x0, 0x18(%rax,%rsi,8)
jns 0x164da9
incq %r13
cmpq (%rcx,%r15), %r13
jb 0x164d84
jmp 0x164e8a
movq (%rbx), %rdi
xorl %r9d, %r9d
testq %rdi, %rdi
jne 0x164dcb
movq $-0x1, %rdx
movq $-0x1, %rcx
movq $-0x1, %r8
jmp 0x164e3b
movq 0x10(%rbx), %r10
addq $0x8, %r10
movq %r10, %r8
xorl %edx, %edx
movq %rbp, %rcx
subq -0x8(%r8), %rcx
jb 0x164de6
cmpq %rbp, (%r8)
ja 0x164e00
incq %rdx
addq $0x28, %r8
cmpq %rdx, %rdi
jne 0x164dd8
movq $-0x1, %rdx
movq $-0x1, %rcx
movl 0x8(%rax,%rsi,8), %r11d
xorl %r8d, %r8d
movq -0x8(%r10), %r12
cmpq %r11, %r12
ja 0x164e16
cmpq %r11, (%r10)
ja 0x164e2b
incq %r8
addq $0x28, %r10
cmpq %r8, %rdi
jne 0x164e08
movq $-0x1, %r8
jmp 0x164e34
subl %r12d, %r11d
incl %r11d
movl %r11d, %r9d
movq 0x1301a5(%rip), %r12    # 0x294fe0
movq (%r12), %rdi
incl %ecx
movq 0x10(%rax,%rsi,8), %rax
btl $0x1, %eax
leaq 0xcd482(%rip), %rsi     # 0x2322d3
adcq $0x0, %rsi
movsbl (%rsi), %r10d
movq %rax, %r11
shrq $0x2, %r11
andl $0x1, %eax
leaq 0xd63b6(%rip), %rsi     # 0x23b220
imulq (%rsi,%rax,8), %r11
movq %r14, %rsi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x22b0
addq $0x10, %rsp
movq 0x38(%rbx), %rcx
jmp 0x164d9b
movq 0x28(%rbx), %rax
incq %rbp
cmpq %rax, %rbp
jb 0x164d67
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/hic.cpp
// Function: init_bench_idx(bench_idx*, asg_t*, ma_ug_t*)
void init_bench_idx(bench_idx* idx, asg_t* read_g, ma_ug_t *ug)
{
    uint64_t i, occ;
    kv_init(idx->ug_idx);
    kv_init(idx->regions);
    kv_malloc(idx->ug_idx, ug->occ.n); idx->ug_idx.n = ug->occ.n;
    for (idx->uID_bits = 1; (uint64_t)(1<<idx->uID_bits)<(uint64_t)ug->u.n; idx->uID_bits++);
    idx->pos_mode = ((uint64_t)-1)>>(idx->uID_bits+1);
    for (i = occ = 0; i < ug->occ.n; i++)
    {
        idx->ug_idx.a[i].uID_start = occ;
        occ += ug->occ.a[i];
        idx->ug_idx.a[i].uID_end = occ;
        idx->ug_idx.a[i].u_n = ug->occ.a[i];

        idx->ug_idx.a[i].r_n = read_g->n_seq;
        idx->ug_idx.a[i].r_idx 
            = set_bench_idx(ug, read_g, idx->ug_idx.a[i].uID_start, idx->ug_idx.a[i].uID_end, 
                                                idx->uID_bits, idx->ug_idx.a[i].r_n);
    }

    init_hc_links(&(idx->link), ug->u.n, NULL);

    for (i = 0; i < idx->ug_idx.n; i++)
    {
        get_r_utg_bench(i, idx, ug);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movups %xmm0, 0x58(%rdi)
movq %rax, 0x68(%rdi)
movq 0x20(%rdx), %r12
movq %r12, 0x8(%rdi)
leaq (,%r12,8), %rax
leaq (%rax,%rax,4), %rdi
callq 0x2280
movq %rax, 0x10(%r14)
movq %r12, (%r14)
movq (%rbx), %rsi
movl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movslq %edx, %rdx
incq %rcx
cmpq %rdx, %rsi
ja 0x1651ae
movq $-0x1, %rdx
shrq %cl, %rdx
decq %rcx
movq %rcx, 0x18(%r14)
movq %rdx, 0x20(%r14)
testq %r12, %r12
je 0x16523f
xorl %r13d, %r13d
xorl %edx, %edx
xorl %ebp, %ebp
movq %rdx, (%rax,%r13)
movq 0x30(%rbx), %rcx
movq (%rcx,%rbp,8), %r12
addq %rdx, %r12
movq %r12, 0x8(%rax,%r13)
movq (%rcx,%rbp,8), %rcx
movq %rcx, 0x10(%rax,%r13)
movl 0x14(%r15), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq %r9, 0x18(%rax,%r13)
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x1649e5
movq %rax, %rcx
movq 0x10(%r14), %rax
movq %rcx, 0x20(%rax,%r13)
incq %rbp
addq $0x28, %r13
movq %r12, %rdx
cmpq 0x20(%rbx), %rbp
jb 0x1651e1
movq (%rbx), %rsi
leaq 0x28(%r14), %rdi
xorl %edx, %edx
callq 0xbf70f
cmpq $0x0, (%r14)
je 0x165269
xorl %r15d, %r15d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x164ad2
incq %r15
cmpq (%r14), %r15
jb 0x165253
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/hic.cpp
// Function: destory_bench_idx(bench_idx*)
void destory_bench_idx(bench_idx* idx)
{
    uint64_t i;
    for (i = 0; i < idx->ug_idx.n; i++)
    {
        free(idx->ug_idx.a[i].r_idx);
    }
    kv_destroy(idx->ug_idx);
    kv_destroy(idx->regions);
    destory_hc_links(&(idx->link));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x165543
movl $0x20, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2220
incq %r15
addq $0x28, %r14
cmpq (%rbx), %r15
jb 0x16552a
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x68(%rbx), %rdi
callq 0x2220
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xbf835
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_opt_init(mc_opt_t*, int, double, unsigned long)
void mc_opt_init(mc_opt_t *opt, int32_t n_perturb, double f_perturb, uint64_t seed)
{
	memset(opt, 0, sizeof(mc_opt_t));
	opt->n_perturb = n_perturb;
	opt->f_perturb = f_perturb;
	opt->max_iter = 1000;
	opt->seed = seed;
	opt->n_s_perturb = n_perturb;
	opt->n_b_perturb = n_perturb*0.5;
}

// Assembly:
movl %esi, 0x4(%rdi)
movsd %xmm0, 0x10(%rdi)
movl $0x3e8, (%rdi)          # imm = 0x3E8
movq %rdx, 0x18(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
mulsd 0xca4f0(%rip), %xmm0    # 0x2315f0
movl %esi, 0xc(%rdi)
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_merge_dup(mc_g_t*)
void mc_merge_dup(mc_g_t *mg) // MUST BE sorted
{
	uint32_t i, j, k, st;
	w_t w;
	for (st = 0, i = 1, k = 0; i <= mg->e->ma.n; ++i) {
		if (i == mg->e->ma.n || mg->e->ma.a[i].x != mg->e->ma.a[st].x) {
			if (i - st > 1) {
				for (j = st, w = 0; j < i; ++j) {
					w += mg->e->ma.a[j].w;
				}
				mg->e->ma.a[k] = mg->e->ma.a[st];
				mg->e->ma.a[k++].w = w;
			} else mg->e->ma.a[k++] = mg->e->ma.a[st];
			st = i;
		}
	}
	mg->e->ma.n = k;
}

// Assembly:
movq 0x28(%rdi), %rdx
movq 0x18(%rdx), %r8
xorl %esi, %esi
testq %r8, %r8
je 0x1671e4
movl $0x1, %eax
movl $0x1, %r9d
xorl %ecx, %ecx
cmpq %r9, %r8
je 0x16714d
movq 0x28(%rdx), %r8
shlq $0x4, %r9
movq (%r8,%r9), %r9
movl %esi, %r10d
shlq $0x4, %r10
cmpq (%r8,%r10), %r9
je 0x1671d0
movl %eax, %r9d
subl %esi, %r9d
movl %ecx, %r8d
cmpl $0x2, %r9d
jb 0x1671af
movq 0x28(%rdx), %rdx
movl %esi, %r9d
xorpd %xmm0, %xmm0
cmpl %esi, %eax
jbe 0x16718c
movl %eax, %esi
movq %r9, %r10
shlq $0x4, %r10
addq %rdx, %r10
addq $0x8, %r10
subq %r9, %rsi
addsd (%r10), %xmm0
addq $0x10, %r10
decq %rsi
jne 0x16717e
shlq $0x4, %r9
shlq $0x4, %r8
movups (%rdx,%r9), %xmm1
movups %xmm1, (%rdx,%r8)
movq 0x28(%rdi), %rdx
movq 0x28(%rdx), %rsi
movsd %xmm0, 0x8(%rsi,%r8)
jmp 0x1671cc
movq 0x28(%rdx), %rdx
movl %esi, %esi
shlq $0x4, %rsi
shlq $0x4, %r8
movupd (%rdx,%rsi), %xmm0
movupd %xmm0, (%rdx,%r8)
movq 0x28(%rdi), %rdx
incl %ecx
movl %eax, %esi
incl %eax
movq 0x18(%rdx), %r8
movq %rax, %r9
cmpq %rax, %r8
jae 0x16712b
movl %ecx, %esi
movq %rsi, 0x18(%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_merge_dup(mb_g_t*)
void mb_merge_dup(mb_g_t *mbg) // MUST BE sorted
{
	uint32_t i, j, k, st;
	t_w_t w[4];
	for (st = 0, i = 1, k = 0; i <= mbg->e->ma.n; ++i) {
		if (i == mbg->e->ma.n || mbg->e->ma.a[i].x != mbg->e->ma.a[st].x) {
			if (i - st > 1) {
				w[0] = w[1] = w[2] = w[3] = 0;
				for (j = st; j < i; ++j) {
					w[0] += mbg->e->ma.a[j].w[0];
					w[1] += mbg->e->ma.a[j].w[1];
					w[2] += mbg->e->ma.a[j].w[2];
					w[3] += mbg->e->ma.a[j].w[3];
				}
				mbg->e->ma.a[k] = mbg->e->ma.a[st];
				mbg->e->ma.a[k].w[0] = w[0];
				mbg->e->ma.a[k].w[1] = w[1];
				mbg->e->ma.a[k].w[2] = w[2];
				mbg->e->ma.a[k].w[3] = w[3];
				k++;
			} else mbg->e->ma.a[k++] = mbg->e->ma.a[st];
			st = i;
		}
	}
	mbg->e->ma.n = k;
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x18(%rdx), %r8
xorl %esi, %esi
testq %r8, %r8
je 0x16730a
movl $0x1, %eax
movl $0x1, %r9d
xorl %ecx, %ecx
cmpq %r9, %r8
je 0x16722b
movq 0x28(%rdx), %r8
leaq (%r9,%r9,4), %r9
movq (%r8,%r9,8), %r9
movl %esi, %r10d
leaq (%r10,%r10,4), %r10
cmpq (%r8,%r10,8), %r9
je 0x1672f6
movl %eax, %r9d
subl %esi, %r9d
movl %ecx, %r8d
cmpl $0x2, %r9d
jb 0x1672be
movq 0x28(%rdx), %rdx
movl %esi, %r11d
xorpd %xmm0, %xmm0
leaq (%r11,%r11,4), %r9
xorpd %xmm1, %xmm1
cmpl %esi, %eax
jbe 0x16727e
movl %eax, %esi
leaq (%rdx,%r9,8), %r10
addq $0x18, %r10
subq %r11, %rsi
movupd -0x10(%r10), %xmm2
addpd %xmm2, %xmm0
movupd (%r10), %xmm2
addpd %xmm2, %xmm1
addq $0x28, %r10
decq %rsi
jne 0x167262
shlq $0x3, %r8
leaq (%r8,%r8,4), %rsi
movq 0x20(%rdx,%r9,8), %r8
movq %r8, 0x20(%rdx,%rsi)
movupd (%rdx,%r9,8), %xmm2
movups 0x10(%rdx,%r9,8), %xmm3
movups %xmm3, 0x10(%rdx,%rsi)
movupd %xmm2, (%rdx,%rsi)
movq 0x8(%rdi), %rdx
movq 0x28(%rdx), %r8
movupd %xmm0, 0x8(%r8,%rsi)
movupd %xmm1, 0x18(%r8,%rsi)
jmp 0x1672f2
movq 0x28(%rdx), %rdx
movl %esi, %esi
leaq (%rsi,%rsi,4), %rsi
leaq (%r8,%r8,4), %r8
movq 0x20(%rdx,%rsi,8), %r9
movq %r9, 0x20(%rdx,%r8,8)
movupd (%rdx,%rsi,8), %xmm0
movupd 0x10(%rdx,%rsi,8), %xmm1
movupd %xmm1, 0x10(%rdx,%r8,8)
movupd %xmm0, (%rdx,%r8,8)
movq 0x8(%rdi), %rdx
incl %ecx
movl %eax, %esi
incl %eax
movq 0x18(%rdx), %r8
movq %rax, %r9
cmpq %rax, %r8
jae 0x167209
movl %ecx, %esi
movq %rsi, 0x18(%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: init_mc_g_t(ma_ug_t*, asg_t*, signed char*, unsigned int)
mc_g_t *init_mc_g_t(ma_ug_t *ug, asg_t *read_g, int8_t *s, uint32_t renew_s)
{
	mc_g_t *p = NULL; CALLOC(p, 1);
	p->ug = ug;
	p->rg = read_g;
	kv_init(p->s);
	if(s)
	{
		p->s.a = s;
		p->s.n = ug->g->n_seq;
		p->s.m = 0;
		if(renew_s) memset(p->s.a, 0, p->s.n);
	}
	else
	{
		CALLOC(p->s.a, ug->g->n_seq);
		p->s.n = p->s.m = ug->g->n_seq;
	} 
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl $0x1, %edi
movl $0x30, %esi
callq 0x2120
movq %rax, %rbx
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
testq %r14, %r14
je 0x16736d
movq %r14, 0x10(%rbx)
movq 0x18(%r15), %rax
movl 0x14(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %rdx, (%rbx)
movq $0x0, 0x8(%rbx)
testl %ebp, %ebp
je 0x167394
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
jmp 0x167394
movq 0x18(%r15), %rax
movl 0x14(%rax), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl $0x1, %esi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: update_mb_nodes_t(kv_u_trans_t*, mc_match_t*, unsigned int)
mb_nodes_t *update_mb_nodes_t(kv_u_trans_t *ref, mc_match_t* ma, uint32_t occ)
{
	uint32_t i, st;
	uint64_t *cc = NULL;
	mb_nodes_t *x = NULL; CALLOC(x, 1);
	x->bid.n = x->u.n = x->idx.n = 0;
	kv_resize(uint32_t, x->idx, occ);
	x->idx.n = occ;
	memset(x->idx.a, -1, sizeof(uint32_t)*x->idx.n);
	kvec_t_u32_warp stack; kv_init(stack.a);
	uint32_t *flag = NULL; MALLOC(flag, occ);

	cc = mb_nodes_core(ref, ma, occ, flag, &stack);

	for (st = 0, i = 1; i <= occ; ++i) {
        if (i == occ || cc[st]>>32 != cc[i]>>32) {
			assgin_mb_node(x, ref, ma, flag, &stack, cc, st, i - st);
            st = i;
        }
	}
	
	free(cc); free(flag);
	kv_destroy(stack.a);

	/*******************************for debug************************************/
	// debug_mb_nodes(x, ref, ma);
	/*******************************for debug************************************/
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movl $0x1, %edi
movl $0x48, %esi
callq 0x2120
movq %rax, %rbx
movl %ebp, %r12d
testl %ebp, %ebp
je 0x168147
leaq -0x1(%r12), %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)
leaq 0x4(,%rcx,4), %rdi
callq 0x2280
movq %rax, %rdi
movq %rax, 0x28(%rbx)
jmp 0x168149
xorl %edi, %edi
movq %r12, 0x18(%rbx)
shlq $0x2, %r12
movl $0xff, %esi
movq %r12, %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x2280
movq %rax, %r12
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movl %ebp, %edx
movq %rax, %rcx
callq 0x167655
movq %rax, %r13
testl %ebp, %ebp
je 0x1681eb
movl $0x1, %r14d
xorl %eax, %eax
cmpl %r14d, %ebp
je 0x1681b8
movl %eax, %ecx
movl %r14d, %edx
movq (%r13,%rdx,8), %rdx
xorq (%r13,%rcx,8), %rdx
shrq $0x20, %rdx
je 0x1681e3
movl %r14d, %r10d
subl %eax, %r10d
movq %rbx, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
leaq 0x10(%rsp), %r8
movq %r13, %r9
pushq %r10
pushq %rax
callq 0x1678da
addq $0x10, %rsp
movl %r14d, %eax
incl %r14d
cmpl %ebp, %r14d
jbe 0x16819e
movq %r13, %rdi
callq 0x2220
movq %r12, %rdi
callq 0x2220
movq 0x20(%rsp), %rdi
callq 0x2220
movq %rbx, %rax
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/rcut.cpp
// Function: mb_edges_idx(mb_match_t*)
static void mb_edges_idx(mb_match_t *ma)
{
	uint32_t st, i;
	kv_resize(uint64_t, ma->idx, ma->n_seq);
	ma->idx.n = ma->n_seq;
	memset(ma->idx.a, 0, ma->idx.n*sizeof(uint64_t));
	for (st = 0, i = 1; i <= ma->ma.n; ++i)
		if (i == ma->ma.n || (ma->ma.a[i].x>>32) != (ma->ma.a[st].x>>32))
			ma->idx.a[ma->ma.a[st].x>>32] = (uint64_t)st << 32 | (i - st), st = i;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %edx
cmpq %rdx, 0x8(%rdi)
jae 0x168630
decq %rdx
movq %rdx, %rax
shrq %rax
orq %rdx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movl 0x38(%rbx), %edx
jmp 0x168634
movq 0x10(%rbx), %rdi
movq %rdx, (%rbx)
shlq $0x3, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x20e0
movq 0x18(%rbx), %rdx
testq %rdx, %rdx
je 0x1686ac
movq 0x28(%rbx), %rax
movl $0x1, %ecx
movl $0x1, %edi
movl %ebp, %esi
cmpq %rdi, %rdx
jne 0x16866c
leaq (%rsi,%rsi,4), %rdx
movq (%rax,%rdx,8), %rdi
jmp 0x168685
leaq (%rdi,%rdi,4), %r8
leaq (%rsi,%rsi,4), %rdi
movq (%rax,%rdi,8), %rdi
movq (%rax,%r8,8), %r8
xorq %rdi, %r8
shrq $0x20, %r8
je 0x1686a2
shlq $0x20, %rsi
movl %ecx, %edx
subl %ebp, %edx
orq %rsi, %rdx
movq 0x10(%rbx), %rsi
shrq $0x20, %rdi
movq %rdx, (%rsi,%rdi,8)
movq 0x18(%rbx), %rdx
movl %ecx, %ebp
incl %ecx
movq %rcx, %rdi
cmpq %rcx, %rdx
jae 0x16865b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_edges_symm(mb_match_t*)
uint32_t mb_edges_symm(mb_match_t *ma)
{
	uint8_t *del = NULL;
	uint32_t i, k, n = 0;
	mb_edge_t *t = NULL, *m = NULL;
	CALLOC(del, ma->ma.n);

	for (i = 0; i < ma->ma.n; ++i) {
		m = &ma->ma.a[i];
		if (ma_x(*m) == ma_y(*m))
		{
			del[i] = 1, ++n;///self overlap
			continue;
		}
		t = get_mb_edge(ma, ma_y(*m), ma_x(*m));
		if(!t)
		{
			del[i] = 1, ++n;///self overlap
			continue;
		} 
		normalize_mb_edge(m, t);
	}

	if (n > 0) {
		for (i = k = 0; i < ma->ma.n; ++i)
			if (!del[i]) ma->ma.a[k++] = ma->ma.a[i];
		ma->ma.n = k;
		mb_edges_idx(ma);
	}

	free(del);
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %r15
movl $0x1, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, %rbx
testq %r15, %r15
je 0x16882d
movq 0x28(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, (%rsp)
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ebp, %ebp
leaq (%rdx,%rdx,4), %rdi
movq (%rax,%rdi,8), %r8
movl %r8d, %r9d
shrq $0x20, %r8
cmpq %r9, %r8
je 0x16874b
movq 0x10(%r14), %r10
movq (%r10,%r9,8), %r10
movq %r10, %r11
andq %rsi, %r11
je 0x16874b
leaq (%rax,%rdi,8), %r9
shrq $0x20, %r10
leaq (%r10,%r10,4), %r10
leaq (%rax,%r10,8), %rdi
shlq $0x3, %r11
leaq (%r11,%r11,4), %rcx
xorl %r13d, %r13d
xorl %r11d, %r11d
cmpl %r8d, (%rdi,%r13)
je 0x16875d
addq $-0x28, %r11
addq $0x28, %r13
movq %rcx, %r12
addq %r11, %r12
jne 0x168735
movb $0x1, (%rbx,%rdx)
incl %ebp
incq %rdx
movl %edx, %ecx
cmpq %rcx, %r15
ja 0x1686f3
jmp 0x1687cc
movq (%rsp), %rcx
leaq (%rcx,%r10,8), %rcx
subq %r11, %rcx
subq %r11, %rdi
cmpq %rdi, %r9
movq %r9, %r8
cmovbq %rdi, %r8
leaq 0x8(%r9), %r10
cmovbq %r9, %rdi
movq %r10, %r9
cmovbq %rcx, %r9
cmovbq %r10, %rcx
movq (%r8), %r10
movq %r10, %r11
shlq $0x20, %r11
movq %r11, (%rdi)
movq (%r8), %r11
shrdq $0x20, %r10, %r11
movq %r11, (%rdi)
movsd (%r9), %xmm0
movsd %xmm0, (%rcx)
movsd 0x20(%r8), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x18(%r8), %xmm0
movsd %xmm0, 0x10(%rdi)
movsd 0x10(%r8), %xmm0
movsd %xmm0, 0x18(%rdi)
jmp 0x168751
testl %ebp, %ebp
je 0x16882d
xorl %eax, %eax
testq %r15, %r15
je 0x16881f
movl $0x1, %ecx
xorl %edx, %edx
cmpb $0x0, (%rbx,%rdx)
jne 0x168814
movq 0x28(%r14), %rsi
leaq (%rdx,%rdx,4), %rdx
movl %eax, %edi
incl %eax
leaq (%rdi,%rdi,4), %rdi
movq 0x20(%rsi,%rdx,8), %r8
movq %r8, 0x20(%rsi,%rdi,8)
movups (%rsi,%rdx,8), %xmm0
movups 0x10(%rsi,%rdx,8), %xmm1
movups %xmm1, 0x10(%rsi,%rdi,8)
movups %xmm0, (%rsi,%rdi,8)
movq 0x18(%r14), %r15
movl %ecx, %edx
incl %ecx
cmpq %rdx, %r15
ja 0x1687de
movl %eax, %eax
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0x1685c8
jmp 0x16882f
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2220
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: destory_mc_g_t(mc_g_t**)
void destory_mc_g_t(mc_g_t **p)
{
	if(!p || !(*p)) return;
	if((*p)->s.m == 0) (*p)->s.a = NULL;
	kv_destroy((*p)->s);
	if((*p)->e)
	{
		kv_destroy((*p)->e->idx);
		kv_destroy((*p)->e->ma);
		free((*p)->e->cc);
		free((*p)->e);
	}
	free((*p));
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1688be
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x1688be
cmpq $0x0, 0x8(%rax)
jne 0x16886b
movq $0x0, 0x10(%rax)
movq (%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1688b8
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: destory_mb_g_t(mb_g_t**)
void destory_mb_g_t(mb_g_t **p)
{
	if(!p || !(*p)) return;
	kv_destroy((*p)->e->idx);
	kv_destroy((*p)->e->ma);
	free((*p)->e->cc);
	free((*p)->e);

	kv_destroy((*p)->u->bid);
	kv_destroy((*p)->u->idx);
	kv_destroy((*p)->u->u);
	free((*p)->u);

	free((*p));
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x16894f
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x16894f
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
popq %rbx
retq