LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq %rdi, %r12
xorl %ebx, %ebx
movl %ebx, %ebx
cmpq %rbx, (%r12)
jbe 0x11b92b
movq 0x10(%r12), %r15
imulq $0x30, %rbx, %r14
movl 0x8(%r15,%r14), %r13d
movl 0x14(%r15,%r14), %ebp
movq (%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0xfcabc
pushq $-0x1
popq %r10
testq %rax, %rax
je 0x11b8de
movq 0x10(%rax), %rax
movq %rax, %r10
shrq $0x3, %r10
cmpq $-0x1, %rax
cmoveq %rax, %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 0xd2b5f(%rip), %rsi     # 0x1ee476
movb $0x1, %al
pushq %r10
pushq %r11
callq 0x22b0
popq %rcx
popq %rdx
incl %ebx
jmp 0x11b892
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: load_psg_t(psg_t**, char const*)
int load_psg_t(psg_t **sg, 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(*sg, 1);
    flag += fread(&((*sg)->xs), sizeof((*sg)->xs), 1, fp);
    flag += fread(&((*sg)->sg.n), sizeof((*sg)->sg.n), 1, fp);
    (*sg)->sg.m = (*sg)->sg.n;
    MALLOC((*sg)->sg.a, (*sg)->sg.n);
    flag += fread((*sg)->sg.a, sizeof(mc_gg_status), (*sg)->sg.n, fp);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, %rbx
leaq 0xd17a2(%rip), %rsi     # 0x1ee5bb
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xd4888(%rip), %rsi     # 0x1f16b7
movq %rbx, %rdi
callq 0x2210
testq %rax, %rax
je 0x11cec3
movq %rax, %r15
pushq $0x1
popq %r13
pushq $0x20
popq %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, (%r14)
leaq 0x18(%rax), %rdi
pushq $0x8
popq %rbp
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %rdi
addq $0x8, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %r13
movq 0x8(%r13), %rdi
movq %rdi, 0x10(%r13)
shlq $0x5, %rdi
callq 0x2280
movq %rax, (%r13)
movq (%r14), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rdx
movq %r12, %rsi
movq %r15, %rcx
callq 0x22f0
movq %r15, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x2220
pushq $0x1
popq %rbp
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_O2/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
callq 0x2120
movq %rax, %r14
leaq 0xd16b6(%rip), %rsi     # 0x1ee5bb
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xdd788(%rip), %rsi     # 0x1fa6a1
movq %r14, %rdi
callq 0x2210
movq %rax, %r12
leaq 0x18(%rbx), %rdi
pushq $0x8
popq %r13
movq %r13, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x2410
leaq 0x8(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2410
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
pushq $0x20
popq %rsi
movq %r12, %rcx
callq 0x2410
movq %r12, %rdi
callq 0x2190
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x2120
movq %rax, %rbx
movq %r13, 0x18(%rax)
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x1367a1(%rip), %rax    # 0x253758
cmpl $0x0, 0x148(%rax)
cvtsi2sdl 0x144(%rax), %xmm0
jne 0x11cfd0
divsd 0xcac90(%rip), %xmm0    # 0x1e7c60
cvttsd2si %xmm0, %rsi
movq %rsi, %rdi
subsd 0xc62b8(%rip), %xmm0    # 0x1e3298
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 0x12bd8d
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_O2/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, %r12
movq %rsi, %r13
movq %rdi, %rbp
pushq $0x1
popq %r14
movl $0x110, %esi            # imm = 0x110
movq %r14, %rdi
callq 0x2120
movq %rax, %r15
leaq 0x13617a(%rip), %rax    # 0x253758
movl 0x1e0(%rax), %eax
movl %eax, 0xc(%r15)
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf7387
movq 0x18(%rbp), %rax
xorl %ecx, %ecx
pushq $-0x1
popq %rdx
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpq %rsi, %rcx
jae 0x11d653
movq (%r15), %rsi
movq 0x80(%r15), %rdi
movl (%rsi,%rcx,4), %r8d
incq %rdi
cmpq %r8, %rdi
ja 0x11d64a
movq 0x10(%rbx), %rdi
movl -0x4(%rdi,%r14,4), %r8d
movl (%rdi,%r14,4), %r9d
jae 0x11d640
cmpl %r9d, %r8d
jae 0x11d64a
movl 0x30(%r15), %edi
jmp 0x11d647
movl %edx, %edi
cmpl %r9d, %r8d
jb 0x11d64a
movl %edi, (%rsi,%rcx,4)
incq %rcx
addq $0x3, %r14
jmp 0x11d602
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: exchange_kv_u_trans_t(kv_u_trans_t*, kv_u_trans_t*)
void exchange_kv_u_trans_t(kv_u_trans_t *a, kv_u_trans_t *b)
{
    uint64_t k, *ua; u_trans_t *u;
    k = a->n; a->n = b->n; b->n = k;
    k = a->m; a->m = b->m; b->m = k;
    u = a->a; a->a = b->a; b->a = u;

    k = a->idx.n; a->idx.n = b->idx.n; b->idx.n = k;
    k = a->idx.m; a->idx.m = b->idx.m; b->idx.m = k;
    ua = a->idx.a; a->idx.a = b->idx.a; b->idx.a = ua;
}

// Assembly:
movups (%rsi), %xmm0
movups (%rdi), %xmm1
movups %xmm0, (%rdi)
movups %xmm1, (%rsi)
movq 0x10(%rdi), %rax
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rdi)
movq %rax, 0x10(%rsi)
movups 0x18(%rsi), %xmm0
movups 0x18(%rdi), %xmm1
movups %xmm0, 0x18(%rdi)
movups %xmm1, 0x18(%rsi)
movq 0x28(%rdi), %rax
movq 0x28(%rsi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x11d991
leaq 0x4(%rdi), %rax
xorl %ecx, %ecx
movq %rsi, %rdx
subq $0x1, %rdx
jb 0x11d905
movl (%rax), %r8d
subl -0x4(%rax), %r8d
addq %r8, %rcx
addq $0x30, %rax
jmp 0x11d8ef
movq %rcx, %xmm1
punpckldq 0xc595e(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xc5966(%rip), %xmm1    # 0x1e3280
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 0xc595a(%rip), %xmm2    # 0x1e3298
cvttsd2si %xmm2, %rdx
sarq $0x3f, %r8
andq %r8, %rdx
orq %rax, %rdx
addq $0x4, %rdi
xorl %r8d, %r8d
movq %rsi, %r10
xorl %r9d, %r9d
xorl %eax, %eax
subq $0x1, %r10
jb 0x11d980
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
jmp 0x11d95c
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_O2/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
andq $0x0, 0x1360e4(%rip)    # 0x254530
movq %rdi, %rbp
leaq 0x135302(%rip), %r14    # 0x253758
cmpl $0x0, 0xf0(%r14)
je 0x11e477
movq 0x10(%r14), %rdx
leaq 0x1360c5(%rip), %rdi    # 0x254530
movq %rbp, %rsi
callq 0xf4174
testl %eax, %eax
jne 0x11e4a6
movl 0x84(%r14), %esi
movslq 0x1b8(%r14), %rdx
movslq 0x7c(%r14), %r8
movq %rbp, %rdi
xorl %ecx, %ecx
callq 0xf4e36
movq %rax, 0x136096(%rip)    # 0x254530
movq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0xf3ea4
movq 0x136083(%rip), %rax    # 0x254530
movq %rbp, (%rax)
movq 0x136079(%rip), %rdx    # 0x254530
movq %r13, 0x8(%rdx)
movq %r12, 0x10(%rdx)
movq 0x50(%r14), %rdi
movq 0x58(%r14), %rsi
testq %rbx, %rbx
je 0x11e4d9
movq %r15, %rcx
movq %rbx, %r9
callq 0x11e114
jmp 0x11e4e2
movq (%rsp), %r8
callq 0x11c26b
movq 0x136047(%rip), %rdi    # 0x254530
callq 0xf450c
movq 0x13603b(%rip), %rdi    # 0x254530
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x10(%rdx), %ecx
leaq 0x135d18(%rip), %rax    # 0x254230
movq 0x18(%rax), %r8
movq 0x28(%rax), %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %eax, %eax
cmpq %r10, %rcx
je 0x11e56b
movq 0x18(%rdx), %rbx
movq (%rbx,%r10,8), %rbx
cmpq %rdi, %r11
jb 0x11e55c
movq %rbx, %r14
shrq $0x21, %r14
movq (%r8,%r14,8), %r15
addq %r11, %r15
cmpq %rsi, %r15
ja 0x11e55c
movb (%r9,%r14), %bpl
decb %bpl
cmpb $0x2, %bpl
adcq $0x0, %rax
cmpq %rsi, %r11
jae 0x11e56b
movl %ebx, %ebx
addq %rbx, %r11
incq %r10
jmp 0x11e528
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: hic_pre_analysis(ma_ug_t*, asg_t*, trans_chain*, ug_opt_t*, kvec_pe_hit**)
spg_t *hic_pre_analysis(ma_ug_t *ug, asg_t* read_g, trans_chain* t_ch, ug_opt_t *opt, 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;
    return hic_short_pre_align(asm_opt.hic_reads[0], asm_opt.hic_reads[1], ug_index, opt, rhits);    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
andq $0x0, 0x1351a7(%rip)    # 0x254530
movq %rdi, %r13
leaq 0x1343c5(%rip), %rbp    # 0x253758
cmpl $0x0, 0xf0(%rbp)
je 0x11f3b3
movq 0x10(%rbp), %rdx
leaq 0x135189(%rip), %rdi    # 0x254530
movq %r13, %rsi
callq 0xf4174
testl %eax, %eax
jne 0x11f3e1
movl 0x84(%rbp), %esi
movslq 0x1b8(%rbp), %rdx
movslq 0x7c(%rbp), %r8
movq %r13, %rdi
xorl %ecx, %ecx
callq 0xf4e36
movq %rax, 0x13515b(%rip)    # 0x254530
movq 0x10(%rbp), %rsi
movq %rax, %rdi
callq 0xf3ea4
movq 0x135148(%rip), %rax    # 0x254530
movq %r13, (%rax)
movq 0x13513e(%rip), %rdx    # 0x254530
movq %r12, 0x8(%rdx)
movq %r15, 0x10(%rdx)
movq 0x50(%rbp), %rdi
movq 0x58(%rbp), %rsi
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11cb83
// File: /workspace/github_cpp_makefile_star2_O2/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, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, (%rsp)
leaq (,%r9,8), %rbp
movq %rbp, %rdi
callq 0x2280
movq %rax, %r13
movq %rax, %rdi
movl $0xff, %esi
movq %rbp, %rdx
callq 0x20e0
pushq $0x40
popq %rcx
subq %r12, %rcx
pushq $-0x1
popq %rax
cmpq %rbx, %r14
jae 0x11f762
movq (%rsp), %rdx
movq 0x10(%rdx), %rdi
imulq $0x28, %r14, %r8
movl 0x10(%rdi,%r8), %edx
testq %rdx, %rdx
je 0x11f75a
movq %r14, %rsi
shlq %cl, %rsi
addq %r8, %rdi
movq 0x18(%rdi), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpq %r8, %rdx
je 0x11f75a
movq (%rdi,%r8,8), %r10
movq %r10, %r11
shrq $0x21, %r11
cmpq $-0x1, (%r13,%r11,8)
movq %rax, %rbp
jne 0x11f74a
movq %r10, %rbp
shrq $0x20, %rbp
shldq $0x3f, %rsi, %rbp
addq %r9, %rbp
movq %rbp, (%r13,%r11,8)
btq $0x20, %r10
jae 0x11f74f
movq 0x20(%r15), %r12
movl (%r12,%r11,8), %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
addq %r12, %rbp
decq %rbp
movq %rbp, (%r13,%r11,8)
movl %r10d, %r10d
addq %r10, %r9
incq %r8
jmp 0x11f6ff
incq %r14
jmp 0x11f6cd
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
orq $-0x1, (%rcx)
orq $-0x1, (%rdx)
movq (%rdi), %r8
xorl %eax, %eax
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x11f9b2
movq 0x10(%rdi), %r10
cmpq %rsi, (%r10,%rax)
ja 0x11f99f
cmpq %rsi, 0x8(%r10,%rax)
ja 0x11f9a8
incq %r9
addq $0x28, %rax
jmp 0x11f989
movq %r9, (%rdx)
subq (%r10,%rax), %rsi
movq %rsi, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq 0x28(%rbx), %r14
jae 0x11fa9f
imulq $0x30, %r14, %r13
pushq $0x18
popq %r15
xorl %r12d, %r12d
movq 0x38(%rbx), %rax
cmpq (%rax,%r13), %r12
jae 0x11fa97
addq %r13, %rax
movq 0x10(%rax), %rbp
cmpb $0x0, (%rbp,%r15)
jns 0x11fa02
incq %r12
addq $0x28, %r15
jmp 0x11f9dc
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x11f979
movl -0x10(%rbp,%r15), %esi
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x11f979
movq 0x1335ab(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
movl 0x20(%rsp), %ecx
incl %ecx
movq 0x8(%rsp), %r8
movl 0x10(%rsp), %r9d
incl %r9d
movq -0x8(%rbp,%r15), %rax
btl $0x1, %eax
leaq 0xc47c3(%rip), %rsi     # 0x1e4223
adcq $0x0, %rsi
movsbl (%rsi), %r10d
movq %rax, %r11
shrq $0x2, %r11
andl $0x1, %eax
leaq 0xcd697(%rip), %rsi     # 0x1ed110
imulq (%rsi,%rax,8), %r11
leaq 0xcf042(%rip), %rsi     # 0x1eeac7
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x11f9f9
incq %r14
jmp 0x11f9c7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, (%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x68(%rdi)
movups %xmm0, 0x58(%rdi)
movq 0x20(%rdx), %r13
movq %r13, 0x8(%rdi)
imulq $0x28, %r13, %rdi
callq 0x2280
movq %rax, 0x10(%r14)
movq %r13, (%r14)
movq (%rbx), %rdx
pushq $0x1
popq %rcx
pushq $0x1
popq %rsi
movl %esi, %edi
shll %cl, %edi
movslq %edi, %rdi
incq %rcx
cmpq %rdi, %rdx
ja 0x11fdb3
leaq -0x1(%rcx), %rdx
movq %rdx, 0x18(%r14)
pushq $-0x1
popq %rdx
shrq %cl, %rdx
movq %rdx, 0x20(%r14)
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %edx, %edx
cmpq %r13, %r15
jae 0x11fe3c
movq %rdx, (%rax,%rbp)
movq 0x30(%rbx), %rcx
movq (%rcx,%r15,8), %r12
addq %rdx, %r12
movq %r12, 0x8(%rax,%rbp)
movq (%rcx,%r15,8), %rcx
movq %rcx, 0x10(%rax,%rbp)
movq (%rsp), %rsi
movl 0x14(%rsi), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq %r9, 0x18(%rax,%rbp)
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r12, %rcx
callq 0x11f686
movq %rax, %rcx
movq 0x10(%r14), %rax
movq %rcx, 0x20(%rax,%rbp)
incq %r15
movq 0x20(%rbx), %r13
addq $0x28, %rbp
movq %r12, %rdx
jmp 0x11fddb
leaq 0x28(%r14), %rdi
movq (%rbx), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x83ca2
cmpq (%r14), %r15
jae 0x11fe65
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11f774
incq %r15
jmp 0x11fe4d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x20
popq %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x12013c
movq (%rdi,%r14), %rdi
callq 0x2220
incq %r15
addq $0x28, %r14
jmp 0x120121
callq 0x2220
movq 0x68(%rbx), %rdi
callq 0x2220
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x83da5
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: hic_short_align_bench(enzyme const*, enzyme const*, char const*, ha_ug_index*)
int hic_short_align_bench(const enzyme *fn1, const enzyme *fn2, const char *output_file_name, ha_ug_index* idx)
{
    double index_time = yak_realtime();
    sldat_t sl;
    sl.idx = idx;
    ///sl.link = NULL;
    sl.chunk_size = 20000000;
    sl.n_thread = asm_opt.thread_num;
    sl.total_base = sl.total_pair = 0;
    idx->hap_cnt = asm_opt.hap_occ;
    kv_init(sl.hits.a);
    fprintf(stderr, "u.n: %d, uID_bits: %lu, pos_bits: %lu\n", (uint32_t)idx->ug->u.n, idx->uID_bits, idx->pos_bits);
    
    if(!load_hc_hits(&sl.hits, idx->ug, output_file_name))
    {
        // kt_pipeline(3, worker_pipeline, &sl, 3);
        // dedup_hits(&sl.hits);
        alignment_worker_pipeline(&sl, fn1, fn2);
        write_hc_hits(&sl.hits, idx->ug, output_file_name);
    }
    bench_idx bench;
    init_bench_idx(&bench, idx->read_g, idx->ug);
    ///print_bench_idx(&bench, idx->ug);
    evaluate_bench_idx(&bench, &sl.hits, idx->ug);

    destory_bench_idx(&bench);
    kv_destroy(sl.hits.a);
    fprintf(stderr, "[M::%s::%.3f] processed %lu pairs; %lu bases\n", __func__, yak_realtime()-index_time, sl.total_pair, sl.total_base);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
callq 0xefea7
leaq 0x48(%rsp), %r14
movq %rbx, -0x38(%r14)
movq $0x1312d00, -0x20(%r14) # imm = 0x1312D00
leaq 0x1335c3(%rip), %rax    # 0x253758
movslq 0x7c(%rax), %rcx
movq %rcx, -0x18(%r14)
xorps %xmm1, %xmm1
movups %xmm1, -0x10(%r14)
movslq 0x1b8(%rax), %rax
movq %rax, 0x48(%rbx)
andq $0x0, 0x10(%r14)
movsd %xmm0, 0x8(%rsp)
movups %xmm1, (%r14)
movq 0x132e1a(%rip), %rbp    # 0x252fe0
movq (%rbp), %rdi
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movl (%rax), %edx
movq 0x28(%rbx), %r8
leaq 0xce91d(%rip), %rsi     # 0x1eeafb
xorl %eax, %eax
callq 0x22b0
movq (%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xff599
testl %eax, %eax
jne 0x120215
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x11718b
movq (%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xfeae5
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
callq 0x11fd69
movq (%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x11ffc3
movq %r15, %rdi
callq 0x120112
movq 0x58(%rsp), %rdi
callq 0x2220
movq (%rbp), %rbx
callq 0xefea7
subsd 0x8(%rsp), %xmm0
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %rcx
leaq 0xce65d(%rip), %rsi     # 0x1ee8c9
leaq 0xce8af(%rip), %rdx     # 0x1eeb22
movq %rbx, %rdi
movb $0x1, %al
callq 0x22b0
pushq $0x1
popq %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: hic_benchmark(ma_ug_t*, asg_t*)
void hic_benchmark(ma_ug_t *ug, asg_t* read_g)
{
    char *output_file_name = (char*)calloc(strlen(asm_opt.output_file_name) + 25, 1);
	sprintf(output_file_name, "%s.bench", asm_opt.output_file_name);
    ug_index = NULL;
    int exist = load_hc_pt_index(&ug_index, ug, output_file_name);
    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, output_file_name);
    ug_index->ug = ug;
    ug_index->read_g = read_g;

    hic_short_align_bench(asm_opt.hic_reads[0], asm_opt.hic_reads[1], output_file_name, ug_index);

    free(output_file_name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1334b0(%rip), %r13    # 0x253758
movq 0x10(%r13), %r12
movq %r12, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, %r15
leaq 0xce86e(%rip), %rsi     # 0x1eeb38
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
andq $0x0, 0x134251(%rip)    # 0x254530
leaq 0x13424a(%rip), %rdi    # 0x254530
movq %r14, %rsi
movq %r15, %rdx
callq 0xf4174
testl %eax, %eax
jne 0x120323
movl 0x84(%r13), %esi
movslq 0x1b8(%r13), %rdx
movslq 0x7c(%r13), %r8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0xf4e36
movq %rax, 0x134218(%rip)    # 0x254530
movq %rax, %rdi
movq %r15, %rsi
callq 0xf3ea4
movq 0x134206(%rip), %rax    # 0x254530
movq %r14, (%rax)
movq 0x1341fc(%rip), %rcx    # 0x254530
movq %rbx, 0x8(%rcx)
movq 0x50(%r13), %rdi
movq 0x58(%r13), %rsi
movq %r15, %rdx
callq 0x12015b
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: hc_hash_long(unsigned long*, unsigned long*, unsigned long)
inline uint64_t hc_hash_long(uint64_t x[4], uint64_t* skip, uint64_t k)
{
	///compare forward k-mer and reverse complementary strand
	(*skip) = get_k_direction(x);
    if((*skip) == (uint64_t)-1) return (*skip);
    if (k <= 32) return ((x[(*skip)<<1|0]<<32)|(x[(*skip)<<1|1]));
	return yak_hash64_64(x[(*skip)<<1|0]) + yak_hash64_64(x[(*skip)<<1|1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x121ae5
movq %rax, (%r12)
cmpq $-0x1, %rax
je 0x120aad
movq %rax, %r14
shlq $0x4, %r14
cmpq $0x20, %r15
ja 0x120ab2
movq (%rbx,%r14), %rax
shlq $0x20, %rax
orq 0x8(%rbx,%r14), %rax
jmp 0x120acb
pushq $-0x1
popq %rax
jmp 0x120acb
movq (%rbx,%r14), %rdi
callq 0x120364
movq %rax, %r15
movq 0x8(%rbx,%r14), %rdi
callq 0x120364
addq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_hc_pt1_count(ha_ug_index*, unsigned long, unsigned long**)
inline uint64_t get_hc_pt1_count(ha_ug_index* index, uint64_t key, uint64_t** pos_list)
{
    uint64_t bucket_mask = (1ULL<<index->pre) - 1;
    hc_pt1_t* h = &(index->idx_buf[key & bucket_mask]);
    uint64_t beg;
    khint_t k;
    k = hc_pt_get(h->h, key);
    if (k == kh_end(h->h))
    {
        return 0;
    }
    beg = kh_val(h->h, k);
    if(pos_list) *pos_list = h->a + beg;
    if((kh_key(h->h, k)&HIC_MAX_COUNT)<HIC_MAX_COUNT) return kh_key(h->h, k)&HIC_MAX_COUNT;
    if(k == h->end) return h->n - beg;
    for (k++; k != kh_end(h->h); ++k)
    {
        if (kh_exist(h->h, k)) 
        {
            return kh_val(h->h, k) - beg;
        }
    }
    return h->n - beg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb 0x50(%rdi), %cl
movabsq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq 0x78(%rdi), %rdi
andq %rsi, %rax
shlq $0x5, %rax
movq (%rdi,%rax), %r9
movq 0x10(%r9), %r8
testq %r8, %r8
je 0x120b75
addq %rax, %rdi
movb (%r9), %cl
movl $0x1, %r10d
movl %r10d, %ebx
shll %cl, %ebx
movq %rsi, %rax
shrq $0xc, %rax
imull $0x9e3779b9, %eax, %ebp # imm = 0x9E3779B9
negb %cl
shrl %cl, %ebp
leal -0x1(%rbx), %r14d
movq 0x8(%r9), %r15
xorl %eax, %eax
movl %ebp, %r11d
movl %r11d, %ecx
shrl $0x5, %ecx
movl (%r15,%rcx,4), %ecx
btl %r11d, %ecx
jae 0x120b77
movl %r11d, %ecx
movq %rcx, %r12
shlq $0x4, %r12
movq (%r8,%r12), %r12
xorq %rsi, %r12
cmpq $0x1000, %r12           # imm = 0x1000
jb 0x120b70
incl %r11d
andl %r14d, %r11d
cmpl %ebp, %r11d
jne 0x120b39
jmp 0x120b77
cmpl %ebx, %r11d
jne 0x120b80
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
shlq $0x4, %rcx
movq 0x8(%r8,%rcx), %rsi
testq %rdx, %rdx
je 0x120ba4
leaq (,%rsi,8), %rax
addq 0x10(%rdi), %rax
movq %rax, (%rdx)
movq (%rdi), %r9
movq 0x10(%r9), %r8
movl $0xfff, %edx            # imm = 0xFFF
movq (%r8,%rcx), %rax
andq %rdx, %rax
cmpq %rdx, %rax
jne 0x120b77
cmpl 0x18(%rdi), %r11d
jne 0x120bc1
movq 0x8(%rdi), %rax
jmp 0x120bf1
movb (%r9), %cl
shll %cl, %r10d
decl %r10d
cmpl %r11d, %r10d
je 0x120bbb
incl %r11d
movq 0x8(%r9), %rax
movl %r11d, %ecx
shrl $0x5, %ecx
movl (%rax,%rcx,4), %eax
btl %r11d, %eax
jae 0x120bca
movl %r11d, %eax
shlq $0x4, %rax
movq 0x8(%r8,%rax), %rax
subq %rsi, %rax
jmp 0x120b77
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: check_exact_match(char*, long long, long long, char*, long long, long long, long long, unsigned long, unsigned long)
inline uint64_t check_exact_match(char* a, long long a_beg, long long a_total, char* b, long long b_beg, 
long long b_total, long long Len, uint64_t rev, uint64_t dir)
{
    long long i = 0;
    if(rev == 0)
    {
        if(dir == 0)
        {
            for (i = 0; i < Len && a_beg < a_total && b_beg < b_total; i++)
            {
                if(a[a_beg++] != b[b_beg++]) return i;
            }
        }
        else
        {
            for (i = 0; i < Len && a_beg >= 0 && b_beg >= 0; i++)
            {
                if(a[a_beg--] != b[b_beg--]) return i;
            }
        }
    }
    else
    {

        if(dir == 0)
        {
            for (i = 0; i < Len && a_beg < a_total && b_beg < b_total; i++)
            {
                if(a[a_beg] != b2rc[seq_nt4_table[(uint8_t)b[b_total - b_beg - 1]]]) return i;
                a_beg++; b_beg++;
            }
        }
        else
        {
            for (i = 0; i < Len && a_beg >= 0 && b_beg >= 0; i++)
            {
                if(a[a_beg] != b2rc[seq_nt4_table[(uint8_t)b[b_total - b_beg - 1]]]) return i;
                a_beg--; b_beg--;
            }
        }
    }

    return i;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %r10
cmpq $0x0, 0x28(%rsp)
je 0x120c72
testq %rax, %rax
je 0x120cb0
movq %r8, %rax
notq %rax
addq %r9, %rcx
addq %rax, %rcx
xorl %eax, %eax
leaq 0xcaed6(%rip), %rdx     # 0x1ebb00
leaq 0xcc55d(%rip), %r9      # 0x1ed18e
cmpq %r10, %rax
jge 0x120d26
testq %rsi, %rsi
js 0x120d26
testq %r8, %r8
js 0x120d26
movsbl (%rdi,%rsi), %r11d
movzbl (%rcx,%rax), %ebx
movzbl (%rdx,%rbx), %ebx
movzbl (%rbx,%r9), %ebx
cmpl %ebx, %r11d
jne 0x120d26
decq %rsi
decq %r8
incq %rax
jmp 0x120c31
testq %rax, %rax
je 0x120d00
xorl %eax, %eax
cmpq %r10, %rax
jge 0x120d26
testq %rsi, %rsi
js 0x120d26
testq %r8, %r8
js 0x120d26
movb (%rdi,%rsi), %dl
cmpb (%rcx,%r8), %dl
jne 0x120d26
decq %r8
decq %rsi
incq %rax
jmp 0x120c7d
movq %r8, %rax
notq %rax
addq %r9, %rcx
addq %rax, %rcx
xorl %eax, %eax
leaq 0xcae3b(%rip), %r11     # 0x1ebb00
leaq 0xcc4c2(%rip), %rbx     # 0x1ed18e
cmpq %r10, %rax
jge 0x120d26
cmpq %rdx, %rsi
jge 0x120d26
cmpq %r9, %r8
jge 0x120d26
movsbl (%rdi,%rsi), %ebp
movzbl (%rcx), %r14d
movzbl (%r11,%r14), %r14d
movzbl (%r14,%rbx), %r14d
cmpl %r14d, %ebp
jne 0x120d26
incq %rsi
incq %r8
incq %rax
decq %rcx
jmp 0x120ccc
xorl %eax, %eax
cmpq %r10, %rax
jge 0x120d26
cmpq %rdx, %rsi
jge 0x120d26
cmpq %r9, %r8
jge 0x120d26
movb (%rdi,%rsi), %r11b
cmpb (%rcx,%r8), %r11b
jne 0x120d26
incq %r8
incq %rsi
incq %rax
jmp 0x120d02
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: interpret_pos(ha_ug_index const*, s_hit*, unsigned long*, unsigned long*, unsigned long*, unsigned long*, unsigned long*, unsigned long*)
inline void interpret_pos(const ha_ug_index* idx, s_hit *p, uint64_t* rev, uint64_t* uID, 
uint64_t* ref_p, uint64_t* self_p, uint64_t* exact_len, uint64_t* total_len)
{
    (*rev) = p->ref>>63;
    (*uID) = (p->ref << 1) >> (64 - idx->uID_bits);
    (*self_p) = (uint32_t)p->off_cnt;
    ///(*exact_len) = p->off_cnt >> 32;
    (*exact_len) = (p->off_cnt>>32) & ((uint64_t)65535);
    if(total_len != NULL)
    {
        ///(*exact_len) = (p->off_cnt>>32) & ((uint64_t)65535);
        (*total_len) = (p->off_cnt>>48) + (*exact_len);
    }
    if((p->ref & idx->pos_mode)>>(idx->pos_bits - 1))
    {
        (*ref_p) = (*self_p) - (p->ref&(idx->pos_mode>>1));
    }
    else
    {
        (*ref_p) = (*self_p) + (p->ref&(idx->pos_mode));
    }
}

// Assembly:
movq %rcx, %rax
movq (%rsi), %rcx
shrq $0x3f, %rcx
movq %rcx, (%rdx)
movq (%rsi), %rdx
addq %rdx, %rdx
xorl %ecx, %ecx
subb 0x18(%rdi), %cl
shrq %cl, %rdx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r10
movq %rdx, (%rax)
movl 0x8(%rsi), %eax
movq %rax, (%r9)
movzwl 0xc(%rsi), %eax
movq %rax, (%r10)
testq %rcx, %rcx
je 0x120d6f
movzwl 0xe(%rsi), %edx
addq %rax, %rdx
movq %rdx, (%rcx)
movq (%rsi), %rax
movq 0x30(%rdi), %rdx
movq %rdx, %rsi
andq %rax, %rsi
movb 0x28(%rdi), %cl
decb %cl
movq %rsi, %rdi
shrq %cl, %rdi
shrq %rdx
andq %rax, %rdx
negq %rdx
testq %rdi, %rdi
cmoveq %rsi, %rdx
addq (%r9), %rdx
movq %rdx, (%r8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: collect_votes(s_hit*, unsigned long)
inline uint64_t collect_votes(s_hit* a, uint64_t n)
{
    if(n == 0) return 0;
    if(n == 1) return (a[0].off_cnt>>32); //seed length, is right
    long long i = 0;
    uint64_t cur_beg, cur_end, beg, end, ovlp = 0, tLen = 0; 
    cur_end = (uint32_t)a[n-1].off_cnt;
    cur_beg = cur_end + 1 - (a[n-1].off_cnt>>32);
    
    if(n >= 2)
    {
        for (i = n - 2; i >= 0; i--)
        {
            end = (uint32_t)a[i].off_cnt;
            beg = end + 1 - (a[i].off_cnt>>32);
            if(MAX(cur_beg, beg) <= MIN(cur_end, end))
            {
                cur_beg = MIN(cur_beg, beg);
                ///cur_end = MAX(cur_end, end);
            }
            else
            {
                ovlp += (cur_end + 1 - cur_beg);
                cur_beg = beg;
                cur_end = end;
            }
        }
    }
    
    ovlp += (cur_end + 1 - cur_beg);
    tLen = (uint32_t)a[n-1].off_cnt + 1 - cur_beg;
    tLen = tLen - ovlp;
    tLen = tLen << 16;
    return ovlp | tLen;
}

// Assembly:
movq %rsi, %rax
testq %rsi, %rsi
je 0x120e54
cmpq $0x1, %rax
jne 0x120db4
movl 0xc(%rdi), %eax
retq
pushq %rbx
movq %rax, %rcx
shlq $0x4, %rcx
addq %rcx, %rdi
addq $-0x18, %rdi
movq 0x10(%rdi), %rdx
movl %edx, %ecx
movq %rdx, %rsi
shrq $0x20, %rsi
negq %rsi
leaq (%rcx,%rsi), %r8
incq %r8
addq $-0x2, %rax
xorl %esi, %esi
testq %rax, %rax
js 0x120e32
movq (%rdi), %r9
movl %r9d, %r10d
shrq $0x20, %r9
negq %r9
addq %r10, %r9
incq %r9
cmpq %r9, %r8
movq %r9, %r11
cmovaq %r8, %r11
cmpq %r10, %rcx
movq %r10, %rbx
cmovbq %rcx, %rbx
cmpq %rbx, %r11
jbe 0x120e1f
subq %r8, %rcx
addq %rcx, %rsi
incq %rsi
movq %r10, %rcx
jmp 0x120e26
cmpq %r9, %r8
cmovbq %r8, %r9
decq %rax
addq $-0x10, %rdi
movq %r9, %r8
jmp 0x120de0
movq %rcx, %rax
subq %r8, %rax
addq %rsi, %rax
incq %rax
incl %edx
notq %rcx
addq %rdx, %rcx
subq %rsi, %rcx
shlq $0x10, %rcx
orq %rax, %rcx
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_phase_status(H_partition*, unsigned int)
inline int get_phase_status(H_partition* hap, uint32_t uID)
{
    int d = -2;
    if(hap->hap[uID] & hap->m[0]) d = 1;
    if(hap->hap[uID] & hap->m[1]) d = -1;
    if(hap->hap[uID] & hap->m[2]) d = 0;
    return d;
}

// Assembly:
movq 0x10(%rdi), %rax
movl %esi, %ecx
movl (%rax,%rcx,4), %ecx
xorl %edx, %edx
testl %ecx, 0x18(%rdi)
setne %dl
movl 0x1c(%rdi), %eax
andl %ecx, %eax
xorl %esi, %esi
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
leal (%rdx,%rdx,2), %edx
addl $-0x2, %edx
orl %edx, %eax
testl %ecx, 0x20(%rdi)
cmovnel %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_phased_block(G_partition*, bubble_type*, unsigned long, unsigned int*, unsigned int*, unsigned int**, unsigned int*, unsigned int**, unsigned int*, unsigned int*, unsigned int*)
inline void get_phased_block(G_partition* x, bubble_type* bub, uint64_t id, 
uint32_t* beg, uint32_t* sink, uint32_t** h0, uint32_t* h0_n, uint32_t** h1, uint32_t* h1_n,
uint32_t* phased, uint32_t* bub_id)
{
    if(bub && beg && sink && bub_id)
    {
        (*bub_id) = (*beg) = (*sink) = (uint32_t)-1;
        if(x->a[id].a.n > 0)
        {
            (*bub_id) = bub->index[x->a[id].a.a[0]];
            if(IF_BUB(x->a[id].a.a[0], *bub))
            {
                (*beg) = bub->list.a[bub->num.a[(*bub_id)]];
                (*sink) = bub->list.a[bub->num.a[(*bub_id)] + 1];
            }
        }
    }
    
    (*h0) = x->a[id].a.a; 
    (*h0_n) = x->a[id].h[0];

    (*h1) = x->a[id].a.a + x->a[id].h[0];
    (*h1_n) = x->a[id].h[1];
    if(phased) (*phased) = x->a[id].full_bub;
    if((*h0_n) == 0) (*h0) = NULL;
    if((*h1_n) == 0) (*h1) = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r11
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rbx
movq %rcx, %xmm0
movq %rsi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r14, %xmm0
movq %r8, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %ebp
testl %ebp, %ebp
je 0x121642
movq 0x10(%rdi), %r15
imulq $0x48, %rdx, %rcx
movq 0x10(%r15,%rcx), %rdx
movq %rdx, (%r9)
movq 0x10(%rdi), %rdx
movl 0x18(%rdx,%rcx), %esi
movl %esi, (%rbx)
shlq $0x2, %rsi
addq 0x10(%rdx,%rcx), %rsi
movq %rsi, (%rax)
movq 0x10(%rdi), %rdx
movl 0x1c(%rdx,%rcx), %esi
movl %esi, (%r10)
testq %r11, %r11
je 0x121624
movzbl 0x20(%rdx,%rcx), %ecx
movl %ecx, (%r11)
cmpl $0x0, (%rbx)
jne 0x12162d
andq $0x0, (%r9)
cmpl $0x0, (%r10)
jne 0x121637
andq $0x0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orl $-0x1, (%r8)
orl $-0x1, (%rcx)
orl $-0x1, (%r14)
movq 0x10(%rdi), %r15
imulq $0x48, %rdx, %r12
cmpq $0x0, (%r15,%r12)
je 0x1215ea
addq %r15, %r12
movq (%rsi), %r13
movq 0x10(%r12), %rbp
movl (%rbp), %r12d
movl (%r13,%r12,4), %r12d
movl %r12d, (%r14)
movl (%rbp), %ebp
movl (%r13,%rbp,4), %r13d
movq 0x80(%rsi), %rbp
incq %rbp
cmpq %r13, %rbp
jbe 0x1215ea
movq 0x28(%rsi), %r13
movq 0x40(%rsi), %rsi
movl (%rsi,%r12,4), %r12d
movl (%r13,%r12,4), %ebp
movl %ebp, (%rcx)
movl (%r14), %ecx
movl (%rsi,%rcx,4), %ecx
incl %ecx
movl (%r13,%rcx,4), %ecx
movl %ecx, (%r8)
jmp 0x1215ea
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: set_bub_idx(bubble_type*, ma_utg_t*, asg_t*, int, int, unsigned int, unsigned int)
inline void set_bub_idx(bubble_type* bub, ma_utg_t *bu, asg_t *untig_sg, int beg_idx, int end_idx, 
uint32_t is_to_hom, uint32_t check_het)
{
    int k;
    uint32_t rId, ori, root;
    uint64_t id0, id1, len0, len1;
    for (k = beg_idx; k <= end_idx; k++)
    {
        rId = bu->a[k]>>33;
        ori = bu->a[k]>>32&1;
        get_bubbles(bub, rId, ori == 1?&root:NULL, ori == 0?&root:NULL, NULL, NULL, NULL);

        if(is_to_hom && IF_HOM(root>>1, *bub)) continue;
        if(!is_to_hom && IF_HET(root>>1, *bub)) continue;

        
        get_bub_id(bub, root>>1, &id0, &id1, check_het);
        if(id0 == (uint64_t)-1 || id1 == (uint64_t)-1) continue;
        get_bubbles(bub, id0, NULL, NULL, NULL, NULL, &len0);
        get_bubbles(bub, id1, NULL, NULL, NULL, NULL, &len1);

        if(is_to_hom)
        {
            if(untig_sg->seq[root>>1].len > (MIN(len0, len1)*3)) continue;
            bub->index[root>>1] = (uint32_t)-1;
        }
        else
        {
            bub->index[root>>1] = bub->f_bub+1;
        }
    
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %r12
movslq %ecx, %r13
movslq %r8d, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %r13
jg 0x12196f
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%r13,8), %rax
movq %rax, %rsi
shrq $0x21, %rsi
movq %rax, %rdx
shlq $0x1f, %rdx
sarq $0x3f, %rdx
leaq 0xc(%rsp), %rdi
andq %rdi, %rdx
btq $0x20, %rax
movl $0x0, %ecx
cmovaeq %rdi, %rcx
andq $0x0, (%rsp)
movq %r12, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf6ab5
movl 0xc(%rsp), %ebp
shrl %ebp
movq (%r12), %r15
movq 0x80(%r12), %r14
leaq 0x1(%r14), %rax
movl (%r15,%rbp,4), %ecx
testl %ebx, %ebx
je 0x1218e7
cmpq %rcx, %rax
jae 0x1218ec
jmp 0x121967
cmpq %rcx, %rax
je 0x121967
movq %r12, %rdi
movl %ebp, %esi
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movl 0x70(%rsp), %r8d
callq 0x102d73
movq 0x30(%rsp), %rcx
cmpq $-0x1, %rcx
sete %al
movq 0x28(%rsp), %rdx
cmpq $-0x1, %rdx
sete %sil
orb %al, %sil
jne 0x121967
movl %ebp, %eax
testl %ebx, %ebx
je 0x121960
movq 0x58(%r12), %rsi
movq (%rsi,%rdx,8), %rdx
movq (%rsi,%rcx,8), %rcx
movq 0x10(%rsp), %rsi
movq 0x20(%rsi), %rsi
movl (%rsi,%rax,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
leaq (%rdx,%rdx,2), %rcx
pushq $-0x1
popq %rdx
movl %edx, %r14d
cmpq %rsi, %rcx
jae 0x121963
jmp 0x121967
incl %r14d
movl %r14d, (%r15,%rax,4)
incq %r13
jmp 0x12186c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_trans_interval_weight(ha_ug_index*, hc_links*, bubble_type*, trans_idx*, pe_hit*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, double*)
inline uint32_t get_trans_interval_weight(ha_ug_index* idx, hc_links* link, bubble_type* bub, 
trans_idx* dis, pe_hit *hit, uint32_t hit_n, uint32_t qn, uint32_t qs, uint32_t qe, uint32_t tn, 
uint32_t ts, uint32_t te, double *w_a) 
{
    uint32_t i, s_uid, s_beg, s_end, e_uid, e_beg, e_end, found, is_cc;
    uint64_t t_d;
    double weight;
    (*w_a) = 0; found = 0;
    for (i = 0; i < hit_n; i++)///all hits already have the same qn and tn
    {
        if(is_hom_hit(hit[i])) continue;
        interpr_hit(idx, hit[i].s, hit[i].len>>32, &s_uid, &s_beg, &s_end);
        if(s_uid != qn) continue;
        if(!(qs <= s_beg && qe >= s_end)) continue;

        interpr_hit(idx, hit[i].e, (uint32_t)hit[i].len, &e_uid, &e_beg, &e_end);
        if(e_uid != tn) continue;
        if(!(ts <= e_beg && te >= e_end)) continue;

        t_d = get_hic_distance(&hit[i], link, idx, &is_cc);
        // if(t_d == (uint64_t)-1) continue;
        // if(t_d == (uint64_t)-1 && is_cc == 0) continue;
        // if(t_d == (uint64_t)-1 && !dis) continue;

        weight = 1;
        if(dis) weight = get_trans_weight_advance(idx, t_d, dis);

        (*w_a) += weight;
        found = 1;
    }

    return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, 0x28(%rsp)
movq %rdi, %r12
movq 0xa0(%rsp), %r15
andq $0x0, (%r15)
movl %r9d, %r13d
movl $0x0, 0x4(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
subq $0x1, %r13
jb 0x121ad2
cmpq $-0x1, 0x10(%rbx)
je 0x121ac9
movq %r14, %rbp
movq (%rbx), %rsi
movq 0x18(%rbx), %r14
movq %r14, %rdx
shrq $0x20, %rdx
movq %r12, %rdi
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x1c(%rsp), %r9
callq 0x117804
movl 0x70(%rsp), %eax
cmpl %eax, 0x24(%rsp)
jne 0x121ac6
movl 0x78(%rsp), %eax
cmpl %eax, 0x20(%rsp)
jb 0x121ac6
movl 0x80(%rsp), %eax
cmpl %eax, 0x1c(%rsp)
ja 0x121ac6
movq 0x8(%rbx), %rsi
movq %r12, %rdi
movl %r14d, %edx
leaq 0x18(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
callq 0x117804
movl 0x88(%rsp), %eax
cmpl %eax, 0x18(%rsp)
jne 0x121ac6
movl 0x90(%rsp), %eax
cmpl %eax, 0x14(%rsp)
movq %rbp, %r14
jb 0x121ac9
movl 0x98(%rsp), %eax
cmpl %eax, 0x10(%rsp)
ja 0x121ac9
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %r12, %rdx
leaq 0x34(%rsp), %rcx
callq 0x102875
movsd 0xc1816(%rip), %xmm0    # 0x1e32a0
testq %r14, %r14
je 0x121aa8
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1216b6
movsd (%r15), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm1, (%r15)
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
jmp 0x121ac9
movq %rbp, %r14
addq $0x20, %rbx
jmp 0x1219bb
movl 0x4(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq