LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: worker_for_sort(void*, long, int)
static void worker_for_sort(void *data, long i, int tid) // callback for kt_for()
{
    pldat_t *pl = (pldat_t*)data;
    hc_pt1_t *h = &(pl->h->idx_buf[i]);
    khint_t k;
    uint64_t beg, cnt = 0;
    uint64_t* pos_list;
    for (k = 0; k != kh_end(h->h); ++k) {
        if (kh_exist(h->h, k)) {
            beg = kh_val(h->h, k);
            pos_list = h->a + beg;
            if((kh_key(h->h, k)&HIC_MAX_COUNT)<HIC_MAX_COUNT)
            {
                cnt = kh_key(h->h, k)&HIC_MAX_COUNT;
            }
            else if(k == h->end)
            {
                cnt = h->n - beg;
            }
            else
            {
                for (k++; k != kh_end(h->h); ++k)
                {
                    if (kh_exist(h->h, k)) 
                    {
                        cnt = kh_val(h->h, k) - beg;
                        break;
                    }
                }
            }
            if(cnt > 0) radix_sort_hc_pos(pos_list, pos_list+cnt);
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %rax
shlq $0x5, %rbx
addq 0x78(%rax), %rbx
xorl %r15d, %r15d
movl $0xfff, %r14d           # imm = 0xFFF
xorl %ebp, %ebp
movq (%rbx), %rdx
movq 0x10(%rdx), %rax
movl $0x0, %esi
testq %rax, %rax
je 0x134f09
movb (%rdx), %cl
movl $0x1, %esi
shll %cl, %esi
cmpl %esi, %ebp
je 0x134fa2
movq 0x8(%rdx), %rsi
movl %ebp, %ecx
shrl $0x5, %ecx
movl (%rsi,%rcx,4), %ecx
btl %ebp, %ecx
jae 0x134f9b
movl %ebp, %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdi
movq (%rax,%rcx), %rcx
andq %r14, %rcx
cmpq %r14, %rcx
jne 0x134f7d
cmpl 0x18(%rbx), %ebp
jne 0x134f44
movq 0x8(%rbx), %r15
jmp 0x134f78
testq %rax, %rax
je 0x134f56
movb (%rdx), %cl
movl $0x1, %r8d
shll %cl, %r8d
jmp 0x134f59
xorl %r8d, %r8d
incl %ebp
cmpl %r8d, %ebp
je 0x134f80
movl %ebp, %ecx
shrl $0x5, %ecx
movl (%rsi,%rcx,4), %ecx
btl %ebp, %ecx
jae 0x134f44
movl %ebp, %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %r15
subq %rdi, %r15
jmp 0x134f80
movq %rcx, %r15
testq %r15, %r15
je 0x134f98
shlq $0x3, %rdi
addq 0x10(%rbx), %rdi
leaq (%rdi,%r15,8), %rsi
callq 0x133355
jmp 0x134f9b
xorl %r15d, %r15d
incl %ebp
jmp 0x134eef
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: debug_hash_value(char*, unsigned long, unsigned long)
uint64_t debug_hash_value(char *r, uint64_t end, uint64_t k_mer)
{
    uint64_t i;
    uint64_t x[4], mask = (1ULL<<k_mer) - 1, shift = k_mer - 1, skip;
    for (i = end + 1 - k_mer, x[0] = x[1] = x[2] = x[3] = 0; i <= end; i++)
    {
        int c = seq_nt4_table[(uint8_t)r[i]];
        ///c = 00, 01, 10, 11
        if (c < 4) { // not an "N" base
            ///x[0] & x[1] are the forward k-mer
            ///x[2] & x[3] are the reverse complementary k-mer
            x[0] = (x[0] << 1 | (c&1))  & mask;
            x[1] = (x[1] << 1 | (c>>1)) & mask;
            x[2] = x[2] >> 1 | (uint64_t)(1 - (c&1))  << shift;
            x[3] = x[3] >> 1 | (uint64_t)(1 - (c>>1)) << shift;
        }
    }

    return hc_hash_long(x, &skip, k_mer);
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq $-0x1, %rax
movl %edx, %ecx
shlq %cl, %rax
movq %rsi, %r8
subq %rdx, %r8
incq %r8
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%rsp)
movaps %xmm0, -0x20(%rsp)
cmpq %rsi, %r8
jbe 0x135c0d
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r10d, %r10d
jmp 0x135c7e
notq %rax
leaq -0x1(%rdx), %rcx
xorl %r10d, %r10d
leaq 0xf7df2(%rip), %rbx     # 0x22da10
xorl %r14d, %r14d
xorl %r11d, %r11d
xorl %r9d, %r9d
movzbl (%rdi,%r8), %r15d
movzbl (%rbx,%r15), %r15d
cmpq $0x3, %r15
ja 0x135c76
movl %r15d, %r12d
andl $0x1, %r12d
leaq (%r12,%r10,2), %r10
andq %rax, %r10
addq %r14, %r14
shrl %r15d
movq %r15, %r13
orq %r14, %r13
xorl $0x1, %r12d
shlq %cl, %r12
andq %rax, %r13
shrq %r11
movl $0x1, %r14d
subl %r15d, %r14d
shlq %cl, %r14
orq %r12, %r11
shrq %r9
orq %r14, %r9
movq %r13, %r14
incq %r8
cmpq %rsi, %r8
jbe 0x135c27
movq %r10, -0x20(%rsp)
movq %r14, -0x18(%rsp)
movq %r11, -0x10(%rsp)
movq %r9, -0x8(%rsp)
cmpq %r9, %r14
jne 0x135caa
movq -0x10(%rsp), %rax
movq $-0x1, %rcx
cmpq %rax, -0x20(%rsp)
je 0x135cb0
setae %al
movzbl %al, %ecx
cmpq $-0x1, %rcx
je 0x135cd3
shlq $0x4, %rcx
cmpq $0x20, %rdx
ja 0x135cdf
movq -0x20(%rsp,%rcx), %rax
shlq $0x20, %rax
orq -0x18(%rsp,%rcx), %rax
jmp 0x135d6a
movq $-0x1, %rax
jmp 0x135d6a
movq -0x20(%rsp,%rcx), %rdx
movq -0x18(%rsp,%rcx), %rax
movq %rdx, %rcx
notq %rcx
shlq $0x15, %rdx
addq %rcx, %rdx
movq %rdx, %rcx
shrq $0x18, %rcx
xorq %rdx, %rcx
imulq $0x109, %rcx, %rcx      # imm = 0x109
movq %rcx, %rdx
shrq $0xe, %rdx
xorq %rcx, %rdx
leaq (%rdx,%rdx,4), %rcx
leaq (%rdx,%rcx,4), %rcx
movq %rcx, %rdx
shrq $0x1c, %rdx
xorq %rcx, %rdx
movq %rax, %rcx
notq %rcx
shlq $0x15, %rax
addq %rcx, %rax
movq %rax, %rcx
shrq $0x18, %rcx
xorq %rax, %rcx
imulq $0x109, %rcx, %rax      # imm = 0x109
movq %rax, %rcx
shrq $0xe, %rcx
xorq %rax, %rcx
leaq (%rcx,%rcx,4), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, %rcx
shrq $0x1c, %rcx
xorq %rax, %rcx
addq %rdx, %rcx
movq %rcx, %rax
shlq $0x1f, %rax
addq %rcx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_5_3_list(ha_ug_index*, s_hit*, unsigned long, s_hit**, unsigned long*, s_hit**, unsigned long*)
void get_5_3_list(ha_ug_index* idx, s_hit* p, uint64_t cnt, s_hit** l5, uint64_t* l5_occ, 
s_hit** l3, uint64_t* l3_occ)
{
    (*l5) = (*l3) = NULL;
    (*l5_occ) = (*l3_occ) = 0;
    uint64_t i, j, rev, uID, ref_p, self_p, eLen, tLen, cur_beg, num;
    uint64_t beg_5 = (uint64_t)-1;
    for (j = 1, i = 0, num = 0; j <= cnt; ++j)
    {
        if(j == cnt || p[j].off_cnt != p[i].off_cnt)
        {
            interpret_pos((ha_ug_index*)idx, &p[i], &rev, &uID, &ref_p, &self_p, &eLen, &tLen);
            ///cur_end = self_p;
            cur_beg = self_p + 1 - tLen;
            num++;
            if(cur_beg <= beg_5)
            {
                (*l3_occ) = (*l5_occ); (*l3) = (*l5);
                beg_5 = cur_beg; (*l5_occ) = j - i; (*l5) = p + i;
            }
            else
            {
                (*l3_occ) = j - i; (*l3) = p + i;
            }
            i = j;///must
        }
    }

    ///if(num > 2) fprintf(stderr, "ERROR: get_5_3_list\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
xorl %edi, %edi
movq %rdi, (%r9)
movq %rdi, (%rcx)
movq %rdi, (%rax)
movq %rdi, (%r8)
testq %rdx, %rdx
je 0x13776d
leaq 0x1(%rdx), %r10
cmpq $0x3, %r10
movl $0x2, %edi
cmovaeq %r10, %rdi
leaq 0x18(%rsi), %r10
movl $0x1, %r11d
movq $-0x1, %r14
xorl %ebx, %ebx
cmpq %r11, %rdx
je 0x137707
movq (%r10), %r15
movq %rbx, %r12
shlq $0x4, %r12
cmpq 0x8(%rsi,%r12), %r15
je 0x137761
movq %rbx, %r15
shlq $0x4, %r15
movq 0x8(%rsi,%r15), %r13
movl %r13d, %r12d
movq %r13, %rbp
shrq $0x20, %rbp
movzwl %bp, %ebp
shrq $0x30, %r13
addq %rbp, %r13
subq %r13, %r12
incq %r12
movq %rax, %r13
movq %r9, %rbp
cmpq %r14, %r12
ja 0x13774d
movq (%r8), %r14
movq %r14, (%rax)
movq (%rcx), %r14
movq %r14, (%r9)
movq %r8, %r13
movq %rcx, %rbp
movq %r12, %r14
addq %rsi, %r15
movq %r11, %r12
subq %rbx, %r12
movq %r12, (%r13)
movq %r15, (%rbp)
movq %r11, %rbx
incq %r11
addq $0x10, %r10
cmpq %r11, %rdi
jne 0x1376f1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: test_reads(reads_t*, char const*)
void test_reads(reads_t* x, const char *fn)
{
    gzFile fp;
    kseq_t *ks;
    int ret, i = 0;

    if ((fp = gzopen(fn, "r")) == 0) return;
    ks = kseq_init(fp);
    while (((ret = kseq_read(ks)) >= 0))
    {
        if(memcmp(ks->name.s, x->name.a + x->name_Len.a[i], ks->name.l) != 0)
        {
            fprintf(stderr, "ERROR222: i: %d, len: %lu\n", i, x->name_Len.a[i]);
        }
        i++;
    }

    kseq_destroy(ks);
    gzclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xfb6c5(%rip), %rsi     # 0x2335a7
movq %rax, %rdi
callq 0x22d0
testq %rax, %rax
je 0x137f81
movq %rax, %r14
movq %rax, %rdi
callq 0x137aa0
movq %rax, %r15
movq %rax, %rdi
callq 0x137aea
testl %eax, %eax
js 0x137f63
leaq 0xf72b0(%rip), %r12     # 0x22f1c4
xorl %r13d, %r13d
movq (%r15), %rdx
movq 0x10(%r15), %rdi
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %rbp
movq 0x10(%rbx), %rsi
addq %rbp, %rsi
callq 0x21a0
testl %eax, %eax
jne 0x137f47
incq %r13
movq %r15, %rdi
callq 0x137aea
testl %eax, %eax
jns 0x137f17
jmp 0x137f63
movq 0x152092(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movq %r12, %rsi
movl %r13d, %edx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0x137f36
movq %r15, %rdi
callq 0x137e71
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2390
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: destory_reads(reads_t*)
void destory_reads(reads_t* x)
{
    kv_destroy(x->name);
    kv_destroy(x->name_Len);
    kv_destroy(x->r);
    kv_destroy(x->r_Len);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
movq 0x58(%rbx), %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: print_hits(ha_ug_index*, kvec_pe_hit*, enzyme const*, enzyme const*)
void print_hits(ha_ug_index* idx, kvec_pe_hit* hits, const enzyme *fn1, const enzyme *fn2)
{
    uint64_t k, shif = 64 - idx->uID_bits;
    reads_t r1;
    load_reads(&r1, fn1, fn2);
    char dir[2] = {'+', '-'};
    for (k = 0; k < hits->a.n; ++k) 
    { 
        fprintf(stderr, "%.*s\t%c\ts-utg%.6dl\t%lu\t%c\te-utg%.6dl\t%lu\ti:%lu\n", 
        (int)(r1.name_Len.a[hits->a.a[k].id + 1] - r1.name_Len.a[hits->a.a[k].id]), 
        r1.name.a + r1.name_Len.a[hits->a.a[k].id],
        dir[hits->a.a[k].s>>63], (int)((hits->a.a[k].s<<1)>>shif)+1, hits->a.a[k].s&idx->pos_mode,
        dir[hits->a.a[k].e>>63], (int)((hits->a.a[k].e<<1)>>shif)+1, hits->a.a[k].e&idx->pos_mode,
        hits->a.a[k].id);        
    }
    destory_reads(&r1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0x40, %ebx
subq 0x18(%rdi), %rbx
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x13779b
cmpq $0x0, (%r15)
jne 0x137ffb
leaq 0x8(%rsp), %rdi
callq 0x137f90
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1c97a
jmp 0x137fe7
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: print_hits_simp(ha_ug_index*, kvec_pe_hit*)
void print_hits_simp(ha_ug_index* idx, kvec_pe_hit* hits)
{
    uint64_t k, shif = 64 - idx->uID_bits;
    char dir[2] = {'+', '-'};
    for (k = 0; k < hits->a.n; ++k) 
    { 
        if(((hits->a.a[k].s<<1)>>shif) == ((hits->a.a[k].e<<1)>>shif)) continue;
        fprintf(stderr, "r-%lu-th\t%c\trs-utg%.6dl\t%lu\t%c\tre-utg%.6dl\t%lu\n", 
        hits->a.a[k].id,
        dir[hits->a.a[k].s>>63], (int)((hits->a.a[k].s<<1)>>shif)+1, hits->a.a[k].s&idx->pos_mode,
        dir[hits->a.a[k].e>>63], (int)((hits->a.a[k].e<<1)>>shif)+1, hits->a.a[k].e&idx->pos_mode);        
    }
}

// Assembly:
cmpq $0x0, (%rsi)
je 0x1380d3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x40, %r15d
subq 0x18(%rdi), %r15
movl $0x10, %r13d
xorl %r12d, %r12d
movq 0x10(%rbx), %rdx
movq -0x10(%rdx,%r13), %r9
leaq (%r9,%r9), %r8
movl %r15d, %ecx
shrq %cl, %r8
movq -0x8(%rdx,%r13), %rax
leaq (%rax,%rax), %r10
shrq %cl, %r10
cmpq %r10, %r8
jne 0x138070
incq %r12
addq $0x20, %r13
cmpq (%rbx), %r12
jb 0x13803e
jmp 0x1380c5
movq 0x151f69(%rip), %rcx    # 0x289fe0
movq (%rcx), %rdi
movq (%rdx,%r13), %rdx
movq %r9, %rcx
shrq $0x3f, %rcx
leaq 0xf6fc0(%rip), %rsi     # 0x22f04c
movsbl (%rcx,%rsi), %ecx
incl %r8d
movq 0x30(%r14), %r11
andq %r11, %r9
andq %rax, %r11
shrq $0x3f, %rax
movsbl (%rax,%rsi), %ebp
incl %r10d
subq $0x8, %rsp
leaq 0xf715c(%rip), %rsi     # 0x22f20f
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rbp
callq 0x22b0
addq $0x20, %rsp
jmp 0x138062
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: destory_bubbles(bubble_type*)
void destory_bubbles(bubble_type* bub)
{
    if(bub->index) free(bub->index);
    kv_destroy(bub->list);
    kv_destroy(bub->num);
    kv_destroy(bub->pathLen);
    kv_destroy(bub->b_s_idx);
    kv_destroy(bub->chain_weight);
    asg_destroy(bub->b_g);
    ma_ug_destroy(bub->b_ug);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1380e5
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
movq 0x58(%rbx), %rdi
callq 0x2220
movq 0x70(%rbx), %rdi
callq 0x2220
movq 0xd8(%rbx), %rdi
callq 0x2220
movq 0xb8(%rbx), %rdi
callq 0x9fcdb
movq 0xc0(%rbx), %rdi
popq %rbx
jmp 0xa0004
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_bubbles(bubble_type*, unsigned long, unsigned int*, unsigned int*, unsigned int**, unsigned int*, unsigned long*)
void get_bubbles(bubble_type* bub, uint64_t id, uint32_t* beg, uint32_t* sink, uint32_t** a, uint32_t* n, uint64_t* pathBase)
{
    if(a) (*a) = bub->list.a + bub->num.a[id] + 2;
    if(n) (*n) = bub->num.a[id+1] - bub->num.a[id] - 2;
    if(beg) (*beg) = bub->list.a[bub->num.a[id]];
    if(sink) (*sink) = bub->list.a[bub->num.a[id] + 1];
    if(pathBase) (*pathBase) = bub->pathLen.a[id];
}

// Assembly:
testq %r8, %r8
je 0x13814a
movq 0x28(%rdi), %rax
movq 0x40(%rdi), %r10
movl (%r10,%rsi,4), %r10d
leaq (%rax,%r10,4), %rax
addq $0x8, %rax
movq %rax, (%r8)
testq %r9, %r9
je 0x138163
movq 0x40(%rdi), %rax
movl 0x4(%rax,%rsi,4), %r8d
subl (%rax,%rsi,4), %r8d
addl $-0x2, %r8d
movl %r8d, (%r9)
testq %rdx, %rdx
je 0x13817a
movq 0x28(%rdi), %rax
movq 0x40(%rdi), %r8
movl (%r8,%rsi,4), %r8d
movl (%rax,%r8,4), %eax
movl %eax, (%rdx)
movq 0x8(%rsp), %rax
testq %rcx, %rcx
je 0x138199
movq 0x28(%rdi), %rdx
movq 0x40(%rdi), %r8
movl (%r8,%rsi,4), %r8d
incl %r8d
movl (%rdx,%r8,4), %edx
movl %edx, (%rcx)
testq %rax, %rax
je 0x1381a9
movq 0x58(%rdi), %rcx
movq (%rcx,%rsi,8), %rcx
movq %rcx, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_unitig_het_arb(ma_ug_t*, unsigned int, unsigned char*, kv_u_trans_t*, unsigned int, unsigned int, unsigned int, unsigned int)
uint32_t get_unitig_het_arb(ma_ug_t* ug, uint32_t uid, uint8_t *r_het_flag, kv_u_trans_t *ref, uint32_t m_het_occ,
uint32_t m_het_label, uint32_t p_het_label, uint32_t n_het_label)
{
    if(ref && ref->idx.n > 0 && u_trans_n(*ref, uid) > 0) return m_het_label;
    ma_utg_t *u = &(ug->u.a[uid]);
    uint32_t k, rId;
    uint32_t het_occ, hom_occ;
    for (k = 0, het_occ = hom_occ = 0; k < u->n; k++)
    {
        rId = u->a[k]>>33;
        if((r_het_flag[rId] & P_HET)) return m_het_label;
        if((r_het_flag[rId] & C_HET) || (r_het_flag[rId] & P_HET))
        {
            het_occ++;
        }
        else
        {
            hom_occ++;
        }
    }

    if((het_occ+hom_occ) == 0) return n_het_label; ///hom
    if((het_occ > ((het_occ+hom_occ)*0.8)) && ((het_occ+hom_occ) > m_het_occ)) return m_het_label; ///must het
    if(het_occ >= hom_occ) return p_het_label; ///potential het
    return n_het_label; ///hom
}

// Assembly:
movl %r9d, %eax
movl %esi, %esi
testq %rcx, %rcx
je 0x138a2e
cmpq $0x0, 0x18(%rcx)
je 0x138a2e
movq 0x28(%rcx), %rcx
cmpl $0x0, (%rcx,%rsi,8)
je 0x138a2e
retq
movq 0x10(%rdi), %rcx
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rcx,%rsi,8), %edi
testq %rdi, %rdi
je 0x138a79
leaq (%rcx,%rsi,8), %rcx
movq 0x18(%rcx), %r9
xorl %r10d, %r10d
xorl %esi, %esi
xorl %ecx, %ecx
movq (%r9,%r10,8), %r11
shrq $0x21, %r11
movzbl (%rdx,%r11), %r11d
testb $0x2, %r11b
jne 0x138a2d
andl $0x1, %r11d
addl %r11d, %ecx
xorl $0x1, %r11d
addl %r11d, %esi
incq %r10
cmpl %r10d, %edi
jne 0x138a4e
jmp 0x138a7d
xorl %ecx, %ecx
xorl %esi, %esi
movl 0x10(%rsp), %edx
movl %esi, %edi
addl %ecx, %edi
je 0x138ab0
cmpl %r8d, %edi
jbe 0x138aa9
movl %ecx, %r8d
cvtsi2sd %r8, %xmm0
movl %edi, %edi
cvtsi2sd %rdi, %xmm1
mulsd 0xeca0d(%rip), %xmm1    # 0x2254b0
ucomisd %xmm1, %xmm0
ja 0x138a2d
cmpl %esi, %ecx
cmovael 0x8(%rsp), %edx
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: update_bub_b_s_idx(bubble_type*)
void update_bub_b_s_idx(bubble_type* bub) 
{
    memset(bub->b_s_idx.a, -1, bub->b_s_idx.n * sizeof(uint64_t));
    uint32_t i, v, beg, sink, n_bub = bub->num.n - 1;
    for (i = 0; i < n_bub; i++)
    {
        get_bubbles(bub, i, &beg, &sink, NULL, NULL, NULL);

        if(beg != (uint32_t)-1)
        {
            v = beg>>1;
            if(bub->b_s_idx.a[v] == (uint64_t)-1)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
            else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
        }

        

        if(sink != (uint32_t)-1)
        {
            v = sink>>1;
            if(bub->b_s_idx.a[v] == (uint64_t)-1)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
            else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %rdx
movq 0x70(%rdi), %rdi
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x20e0
movl 0x30(%rbx), %esi
decl %esi
je 0x139576
movabsq $-0x100000001, %rax     # imm = 0xFFFFFFFEFFFFFFFF
movq 0x28(%rbx), %rcx
movq 0x40(%rbx), %rdx
movl %esi, %esi
xorl %edi, %edi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl (%rdx,%rdi,4), %r9d
movl (%rcx,%r9,4), %r10d
incl %r9d
movl (%rcx,%r9,4), %r9d
cmpq %r8, %r10
je 0x13953e
shrl %r10d
movq 0x70(%rbx), %r11
movq (%r11,%r10,8), %r14
cmpq $-0x1, %r14
je 0x139533
cmpq %rax, %r14
jbe 0x13953e
shlq $0x20, %r14
orq %rdi, %r14
jmp 0x13953a
leaq (%rax,%rdi), %r14
incq %r14
movq %r14, (%r11,%r10,8)
cmpl $-0x1, %r9d
je 0x13956e
shrl %r9d
movq 0x70(%rbx), %r10
movq (%r10,%r9,8), %r11
cmpq $-0x1, %r11
je 0x139563
cmpq %rax, %r11
jbe 0x13956e
shlq $0x20, %r11
orq %rdi, %r11
jmp 0x13956a
leaq (%rax,%rdi), %r11
incq %r11
movq %r11, (%r10,%r9,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x139500
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: push_hc_edge(hc_linkeage*, unsigned long, double, int, unsigned long*)
hc_edge* push_hc_edge(hc_linkeage* x, uint64_t uID, double weight, int dir, uint64_t* d)
{
    uint64_t k, n;
    hc_edge* a = NULL;
    hc_edge* p = NULL;
    if(dir == 0)
    {
        a = x->e.a;
        n = x->e.n;
    }
    else
    {
        a = x->f.a;
        n = x->f.n;
    }
    
    for (k = 0; k < n; k++)
    {
        if(a[k].del) continue;
        if(a[k].uID == uID)
        {
            a[k].weight += weight;
            if(d) a[k].dis = (*d);
            return &(a[k]);
        }
    }

    if(dir == 0)
    {
        kv_pushp(hc_edge, x->e, &p);
    }
    else
    {
        kv_pushp(hc_edge, x->f, &p);
    }
    
    ///p->del = p->enzyme = 0;
    p->del = 0;
    p->uID = uID;
    p->weight = weight;
    if(d) p->dis = (*d);
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r14
leaq 0x10(%rdi), %r13
leaq 0x18(%rdi), %r15
leaq 0x28(%rdi), %r12
testl %edx, %edx
movq %r12, %rax
cmoveq %r13, %rax
movq %r15, %rcx
cmoveq %rdi, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x13b90c
movq (%rax), %rax
cmpb $0x0, 0x18(%rax)
js 0x13b903
movl 0x8(%rax), %esi
cmpq %r14, %rsi
je 0x13b975
addq $0x28, %rax
decq %rcx
jne 0x13b8f5
testl %edx, %edx
je 0x13b92c
movq 0x20(%rdi), %rax
cmpq %rax, 0x18(%rdi)
jne 0x13b981
movsd %xmm0, 0x8(%rsp)
addq $0x20, %rdi
movq %rdi, %rcx
movq %r12, %r13
jmp 0x13b945
movq 0x8(%rdi), %rax
cmpq %rax, (%rdi)
jne 0x13b97b
movsd %xmm0, 0x8(%rsp)
leaq 0x8(%rdi), %rcx
movq %r13, %r12
movq %rdi, %r15
leaq (%rax,%rax), %rdx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rdx, %rax
movq %rax, (%rcx)
movq (%r13), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, (%r13)
movsd 0x8(%rsp), %xmm0
jmp 0x13b981
addsd (%rax), %xmm0
jmp 0x13b99f
movq %r13, %r12
movq %rdi, %r15
movq (%r12), %rax
movq (%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r15)
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rax
andb $0x7f, 0x18(%rax)
movl %r14d, 0x8(%rax)
movsd %xmm0, (%rax)
testq %rbx, %rbx
je 0x13b9af
movq (%rbx), %rcx
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_enzyme_occ_debug(char*, long long, char*, long long)
long long get_enzyme_occ_debug(char* t, long long tlen, char* p, long long plen)
{
    long long s = 0, j, occ = 0;
    while(s <= (tlen - plen)) 
    { 
        j = plen-1; 

        while(j >= 0)
        {
            if(seq_nt4_table[(uint8_t)t[s+j]] >= 4) break;
            if((p[j] != t[s+j]) && seq_nt4_table[(uint8_t)p[j]] < 4) break;
            j--; 
        } 
        
        if (j < 0) occ++;
        s++;
    } 

    return occ;
}

// Assembly:
subq %rcx, %rsi
jge 0x13b9c5
xorl %eax, %eax
retq
pushq %rbx
incq %rsi
decq %rdi
xorl %eax, %eax
leaq 0xf203b(%rip), %r8      # 0x22da10
xorl %r9d, %r9d
testq %rcx, %rcx
jle 0x13ba1a
movq %rcx, %r10
movzbl (%rdi,%r10), %r11d
cmpb $0x3, (%r8,%r11)
ja 0x13ba0e
movzbl -0x1(%rdx,%r10), %ebx
cmpb %r11b, %bl
je 0x13b9fe
cmpb $0x4, (%r8,%rbx)
jb 0x13ba0e
decq %r10
leaq 0x1(%r10), %r11
cmpq $0x1, %r11
jg 0x13b9e0
xorl %r10d, %r10d
xorl %r11d, %r11d
testq %r10, %r10
setle %r11b
jmp 0x13ba20
movl $0x1, %r11d
addq %r11, %rax
incq %r9
incq %rdi
cmpq %rsi, %r9
jne 0x13b9d8
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: check_exact_match(char*, long long, char*, long long)
int check_exact_match(char* x, long long xlen, char* y, long long ylen)
{
    long long i;
    if(xlen != ylen) return 0;
    for (i = 0; i < xlen; i++)
    {
        if(seq_nt4_table[(uint8_t)x[i]] >= 4) return 0;
        if((x[i] != y[i]) && seq_nt4_table[(uint8_t)y[i]] < 4) return 0;
    } 

    return 1;
}

// Assembly:
xorl %eax, %eax
cmpq %rcx, %rsi
jne 0x13ba6f
movl $0x1, %eax
testq %rsi, %rsi
jle 0x13ba6f
xorl %ecx, %ecx
leaq 0xf1fc6(%rip), %r8      # 0x22da10
movzbl (%rdi,%rcx), %r9d
cmpb $0x3, (%r8,%r9)
ja 0x13ba70
movzbl (%rdx,%rcx), %r10d
cmpb %r10b, %r9b
je 0x13ba67
cmpb $0x4, (%r8,%r10)
jb 0x13ba70
incq %rcx
cmpq %rcx, %rsi
jne 0x13ba4a
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: push_pdq(pdq*, unsigned long, unsigned long)
void push_pdq(pdq* q, uint64_t v, uint64_t dis)
{
    kv_push(uint64_t, q->x, set_dv_adv(v, dis, q->uID_mode, q->uID_shift));
    pdq_cnt(*q)++;
    int c_i = pdq_cnt(*q), p_i = c_i>>1;

    while ((p_i > 0) && (weight(*q, c_i) < weight(*q, p_i)))
    {
        swap_pdq(&(q->x.a[c_i]), &(q->x.a[p_i]));
        c_i  = p_i;
        p_i = c_i >> 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq %rax, 0x18(%rdi)
jne 0x13bcc6
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x20(%rbx)
movq 0x28(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
movb 0x50(%rbx), %cl
shlq %cl, %r15
andq 0x48(%rbx), %r14
orq %r15, %r14
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rbx)
movq %r14, (%rax,%rcx,8)
movq (%rax), %rdx
incq %rdx
movq %rdx, (%rax)
movl %edx, %ecx
sarl %ecx
testl %ecx, %ecx
jle 0x13bd4b
movslq %edx, %rsi
movl %ecx, %edx
movq (%rax,%rsi,8), %r8
movq 0x48(%rbx), %r9
movb 0x50(%rbx), %cl
movq %r9, %rdi
andq %r8, %rdi
movq %rdi, 0x58(%rbx)
shrq %cl, %r8
movq %r8, 0x60(%rbx)
movl %edx, %edi
movq (%rax,%rdi,8), %r10
andq %r10, %r9
shrq %cl, %r10
movq %r9, 0x58(%rbx)
movq %r10, 0x60(%rbx)
cmpq %r10, %r8
jae 0x13bd4b
movq (%rax,%rsi,8), %rcx
movq (%rax,%rdi,8), %r8
movq %r8, (%rax,%rsi,8)
movq %rcx, (%rax,%rdi,8)
movl %edi, %ecx
shrl %ecx
cmpl $0x1, %edi
ja 0x13bcf8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: pop_pdq(pdq*, unsigned long*, unsigned long*)
void pop_pdq(pdq* q, uint64_t* min_v, uint64_t* min_dis)
{
    (*min_v) = (*min_dis) = (uint64_t)-1;
    if(pdq_cnt(*q) == 0) return;
    get_dv_adv((*q).x.a[1], (*q).uID_mode, (*q).uID_shift, min_v, min_dis);
    /*******************************for debug************************************/
    // uint64_t i;
    // for (i = 1; i < q->x.n; i++)
    // {
    //     if(weight(*q, i) < (*min_dis)) fprintf(stderr, "ERROR\n");
    // }
    /*******************************for debug************************************/
    ///min = q->x.a[1];
    swap_pdq(&(q->x.a[1]), &(q->x.a[pdq_cnt(*q)]));
    pdq_cnt(*q)--;
    q->x.n--;

    int c_i = 1, left_i, right_i, min_i, flag = 1;
    while(flag == 1) 
    {
        flag = 0;
        left_i = c_i << 1;
        right_i = left_i + 1;
        if(left_i > (int)(pdq_cnt(*q)))
        {
            break; // both children are null
        } 
        else if(right_i > (int)(pdq_cnt(*q)))
        {
            min_i = left_i; // right children is null
        }
        else
        {
            min_i = (weight(*q, left_i) < weight(*q, right_i))? left_i : right_i;
        }

        if(weight(*q, c_i) > weight(*q, min_i))
        {
            swap_pdq(&(q->x.a[c_i]), &(q->x.a[min_i]));
            c_i = min_i;
            flag = 1;
        }
    }
}

// Assembly:
pushq %rbx
movq $-0x1, %rax
movq %rax, (%rdx)
movq %rax, (%rsi)
movq 0x28(%rdi), %rax
cmpq $0x0, (%rax)
je 0x13be48
movq 0x8(%rax), %r8
movb 0x50(%rdi), %cl
movq 0x48(%rdi), %r9
andq %r8, %r9
movq %r9, (%rsi)
shrq %cl, %r8
movq %r8, (%rdx)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movq (%rax,%rcx,8), %rsi
movq %rsi, 0x8(%rax)
movq %rdx, (%rax,%rcx,8)
decq (%rax)
decq 0x18(%rdi)
movl $0x1, %edx
leal (%rdx,%rdx), %esi
cmpl (%rax), %esi
jg 0x13be48
jge 0x13bdf4
leal 0x1(,%rdx,2), %r8d
movslq %esi, %rcx
movq (%rax,%rcx,8), %r9
movq 0x48(%rdi), %r10
movb 0x50(%rdi), %cl
movq %r10, %r11
andq %r9, %r11
movq %r11, 0x58(%rdi)
shrq %cl, %r9
movq %r9, 0x60(%rdi)
movslq %r8d, %r11
movq (%rax,%r11,8), %r11
andq %r11, %r10
shrq %cl, %r11
movq %r10, 0x58(%rdi)
movq %r11, 0x60(%rdi)
cmpq %r11, %r9
jb 0x13bdf4
movl %r8d, %esi
movslq %edx, %r9
movq (%rax,%r9,8), %r8
movq 0x48(%rdi), %rbx
movb 0x50(%rdi), %cl
movq %rbx, %r10
andq %r8, %r10
movq %r10, 0x58(%rdi)
shrq %cl, %r8
movq %r8, 0x60(%rdi)
movslq %esi, %r11
movq (%rax,%r11,8), %r10
andq %r10, %rbx
shrq %cl, %r10
movq %rbx, 0x58(%rdi)
movq %r10, 0x60(%rdi)
cmpq %r10, %r8
jbe 0x13be3f
movq (%rax,%r9,8), %rcx
movq (%rax,%r11,8), %rdx
movq %rdx, (%rax,%r9,8)
movq %rcx, (%rax,%r11,8)
movl %esi, %edx
cmpq %r10, %r8
ja 0x13bda3
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_shortest_path(unsigned int, pdq*, asg_t*, unsigned int*)
void get_shortest_path(uint32_t src, pdq* pq, asg_t *sg, uint32_t* pre)
{
    uint64_t v, u, i, nv, w;
    asg_arc_t *av = NULL;
    reset_pdq(pq);
    pq->dis.a[src] = 0;
    if(pre) pre[src] = (uint32_t)-1;
    push_pdq(pq, src, 0);
    while (pdq_cnt(*pq) > 0)
    {
        pop_pdq(pq, &v, &w);
        pq->vis.a[v] = 1;

        av = asg_arc_a(sg, v);
        nv = asg_arc_n(sg, v);

        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            u = av[i].v;
            w = (uint32_t)av[i].ul;

            if(pq->vis.a[u] == 0 && pq->dis.a[u] > pq->dis.a[v] + w)
            {
                pq->dis.a[u] = pq->dis.a[v] + w;
                push_pdq(pq, u, pq->dis.a[u]);
                if(pre) pre[u] = v;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movl %edi, %ebp
movq $0x1, 0x18(%rsi)
movq 0x28(%rsi), %rax
xorl %ebx, %ebx
movq %rbx, (%rax)
movq 0x30(%rsi), %rdx
movq 0x40(%rsi), %rdi
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x20e0
movq (%r15), %rdx
movq 0x10(%r15), %rdi
xorl %esi, %esi
callq 0x20e0
movq 0x40(%r15), %rax
movl %ebp, %esi
movq %rbx, (%rax,%rsi,8)
testq %r14, %r14
je 0x13beaf
movl $0xffffffff, (%r14,%rsi,4) # imm = 0xFFFFFFFF
movq %r14, 0x18(%rsp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x13bc89
movq 0x28(%r15), %rax
cmpq $0x0, (%rax)
je 0x13bfa2
movq %r12, 0x10(%rsp)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x13bd51
movq 0x10(%r15), %rax
movq 0x20(%rsp), %rsi
movb $0x1, (%rax,%rsi)
movq 0x28(%r12), %rax
movq (%rax,%rsi,8), %rax
movq %rax, %rcx
movq 0x8(%rsp), %r13
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
je 0x13bf8a
movq 0x8(%r12), %rdx
shrq $0x20, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %r14
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rbx
addq $0xc, %rbx
xorl %r12d, %r12d
movq %rsi, (%rsp)
cmpl $0x0, (%rbx,%r12)
js 0x13bf81
movl -0xc(%rbx,%r12), %r13d
movl -0x4(%rbx,%r12), %ebp
movq 0x10(%r15), %rax
cmpb $0x0, (%rax,%rbp)
jne 0x13bf81
movq 0x40(%r15), %rax
movq (%rax,%rsi,8), %rdx
addq %r13, %rdx
cmpq %rdx, (%rax,%rbp,8)
jbe 0x13bf81
movq %rdx, (%rax,%rbp,8)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x13bc89
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x13bf7d
movq (%rsp), %rsi
movl %esi, (%rax,%rbp,4)
jmp 0x13bf81
movq (%rsp), %rsi
addq $0x18, %r12
cmpq %r12, %r14
jne 0x13bf2f
movq %r13, 0x8(%rsp)
movq 0x28(%r15), %rax
cmpq $0x0, (%rax)
movq 0x10(%rsp), %r12
jne 0x13bed1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: all_pair_shortest_path(asg_t*, hc_links*, MT*)
void all_pair_shortest_path(asg_t *sg, hc_links* link, MT* M)
{
    hc_linkeage* t = NULL;
    pdq pq;
    init_pdq(&pq, sg->n_seq<<1);
    uint32_t n_vtx = sg->n_seq<<1, v;
    uint64_t k, *p = NULL;

    for (v = 0; v < n_vtx; ++v)
    {
        if (sg->seq[v>>1].del) continue;
        t = &(link->a.a[v>>1]);
        if (t->e.n == 0) continue;
        get_shortest_path(v, &pq, sg, NULL);
        for (k = 0; k < pq.dis.n; k++)
        {
            if(pq.dis.a[k] == (uint64_t)-1) continue;
            kv_pushp(uint64_t, M->matrix.a[v].a, &p);
            (*p) = k << M->uID_shift;
            (*p) = (*p) | pq.dis.a[k];
        }
    }
    
    destory_pdq(&pq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
movl 0x14(%rdi), %eax
addl %eax, %eax
movslq %eax, %rsi
leaq 0x20(%rsp), %rdi
callq 0x13bb82
movq %r14, 0x8(%rsp)
movl 0x14(%r14), %eax
addl %eax, %eax
je 0x13c0ea
movl %eax, %eax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rcx
movl %r13d, %eax
shrl %eax
cmpl $0x0, (%rcx,%rax,8)
js 0x13c0dc
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
cmpq $0x0, (%rcx,%rax)
je 0x13c0dc
movl %r13d, %edi
leaq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x13be4a
movq 0x50(%rsp), %r14
testq %r14, %r14
je 0x13c0dc
movq 0x60(%rsp), %rbp
movq %r13, %r12
shlq $0x5, %r12
xorl %r15d, %r15d
cmpq $-0x1, (%rbp,%r15,8)
je 0x13c0d4
movq 0x10(%rbx), %rax
movq 0x8(%rax,%r12), %rcx
cmpq %rcx, (%rax,%r12)
jne 0x13c0a9
leaq (%rax,%r12), %rdx
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rax,%r12)
movq 0x8(%rdx), %rsi
movq 0x10(%rdx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x10(%rbx), %rcx
movq %rax, 0x10(%rcx,%r12)
movq 0x10(%rbx), %rax
movq (%rax,%r12), %rdx
movq 0x10(%rax,%r12), %rsi
leaq 0x1(%rdx), %rcx
movq %rcx, (%rax,%r12)
movb 0x18(%rbx), %cl
movq %r15, %rax
shlq %cl, %rax
movq %rax, (%rsi,%rdx,8)
orq (%rbp,%r15,8), %rax
movq %rax, (%rsi,%rdx,8)
incq %r15
cmpq %r15, %r14
jne 0x13c05f
incq %r13
cmpq 0x18(%rsp), %r13
jne 0x13bffa
movq 0x48(%rsp), %rdi
callq 0x2220
movq 0x60(%rsp), %rdi
callq 0x2220
movq 0x30(%rsp), %rdi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_utg_path(unsigned long, unsigned long, unsigned int*, buf_t*)
void get_utg_path(uint64_t s, uint64_t e, uint32_t *path, buf_t *res)
{
    uint64_t p = path[e], i;
    res->b.n = 0;
    kv_push(uint32_t, res->b, e);
    while (p != s)
    {
        kv_push(uint32_t, res->b, p);
        p = path[p];
    }
    kv_push(uint32_t, res->b, s);
    for (i = 0; i < (res->b.n>>1); i++)
    {
        p = res->b.a[i]; 
        res->b.a[i] = res->b.a[res->b.n-i-1];
        res->b.a[res->b.n-i-1] = p;
    }
    res->b.n--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl (%rdx,%rsi,4), %r13d
movq $0x0, 0x38(%rcx)
cmpq $0x0, 0x40(%rcx)
jne 0x13c2ff
movq $0x2, 0x40(%rbx)
movq 0x48(%rbx), %rdi
movl $0x8, %esi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rax
movq 0x48(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x38(%rbx)
movl %r12d, (%rcx,%rax,4)
cmpq %r14, %r13
je 0x13c365
movl $0x2, %r12d
movq 0x40(%rbx), %rax
cmpq %rax, 0x38(%rbx)
jne 0x13c348
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x40(%rbx)
movq 0x48(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rax
movq 0x48(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x38(%rbx)
movl %r13d, (%rcx,%rax,4)
movl (%r15,%r13,4), %r13d
cmpq %r14, %r13
jne 0x13c31e
movq 0x40(%rbx), %rax
cmpq %rax, 0x38(%rbx)
jne 0x13c394
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x40(%rbx)
movq 0x48(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rax
movq 0x48(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x38(%rbx)
movl %r14d, (%rcx,%rax,4)
cmpq $0x2, %rdx
jb 0x13c3d4
shrq %rdx
negq %rdx
leaq (%rcx,%rax,4), %rsi
xorl %edi, %edi
movl (%rcx), %r8d
movl (%rsi,%rdi,4), %r9d
movl %r9d, (%rcx)
movl %r8d, (%rsi,%rdi,4)
decq %rdi
addq $0x4, %rcx
cmpq %rdi, %rdx
jne 0x13c3ba
movq %rax, 0x38(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: set_utg_by_dis(unsigned int, pdq*, asg_t*, kvec_t_u32_warp*, unsigned int)
void set_utg_by_dis(uint32_t v, pdq* pq, asg_t *g, kvec_t_u32_warp *res, uint32_t dis)
{
    uint64_t r;
    pdq_spec a;
    a.v = (uint64_t)-1; a.src = v; a.pq = pq; a.sg = g; a.df_occ = (uint64_t)-1;
    a.occ = 0; a.flag = (uint8_t)-1; a.dest = NULL; a.pre = NULL;
    reset_pdq(a.pq);
    while (1)
    {
        r = get_specific_shortest_path(&a);
        if(!r) return;
        if(a.pq->dis.a[a.v] <= dis) kv_push(uint32_t, res->a, a.v);
        else return;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebp
movq %rcx, %rbx
movq %rsi, %r15
movq $-0x1, %rax
movq %rsp, %r14
movq %rax, 0x38(%r14)
movl %edi, 0x8(%r14)
movq %rsi, (%r14)
movq %rdx, 0x10(%r14)
movq %rax, 0x30(%r14)
xorl %eax, %eax
movq %rax, 0x28(%r14)
movb $-0x1, 0x20(%r14)
movq %rax, 0x18(%r14)
movq %rax, 0x40(%r14)
movq $0x1, 0x18(%rsi)
movq 0x28(%rsi), %rcx
movq %rax, (%rcx)
movq 0x30(%rsi), %rdx
movq 0x40(%rsi), %rdi
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x20e0
movq (%r15), %rdx
movq 0x10(%r15), %rdi
xorl %esi, %esi
callq 0x20e0
movq %r14, %rdi
callq 0x13c119
testl %eax, %eax
je 0x13c876
movl %ebp, %r15d
movl $0x2, %r12d
movq %rsp, %r14
movq (%rsp), %rax
movq 0x38(%rsp), %r13
movq 0x40(%rax), %rax
cmpq %r15, (%rax,%r13,8)
ja 0x13c876
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x13c858
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movl %r13d, (%rcx,%rax,4)
movq %r14, %rdi
callq 0x13c119
testl %eax, %eax
jne 0x13c81c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: fill_utg_distance_multi(asg_t*, hc_links*, MT*, bubble_type*)
void fill_utg_distance_multi(asg_t *sg, hc_links* link, MT* M, bubble_type* bub)
{
    // double index_time = yak_realtime();
    uint32_t i;
    utg_d_t s;
    s.sg = sg; s.link = link; s.M = M; s.bub = bub;
    s.dis_buf = (uint8_t**)malloc(sizeof(uint8_t*)*asm_opt.thread_num);
    for (i = 0; i < (uint32_t)asm_opt.thread_num; i++)
    {
        s.dis_buf[i] = (uint8_t*)malloc(sizeof(uint8_t)*(s.sg->n_seq<<1));
    }
    
    kt_for(asm_opt.thread_num, worker_for_dis, &s, s.sg->n_seq);


    for (i = 0; i < (uint32_t)asm_opt.thread_num; i++)
    {
        free(s.dis_buf[i]);
    }
    free(s.dis_buf);
    // fprintf(stderr, "[M::%s::%.3f]\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
leaq 0x14d8a5(%rip), %r14    # 0x28a758
movslq 0x7c(%r14), %r15
leaq (,%r15,8), %rdi
callq 0x2280
movl %r15d, %ebx
movq %rax, 0x28(%rsp)
testq %r15, %r15
je 0x13cef7
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
addl %eax, %eax
movslq %eax, %rdi
callq 0x2280
movq 0x28(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x13ced4
leaq 0x8(%rsp), %rdx
movq (%rdx), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x3e(%rip), %rsi        # 0x13cf4d
movl %ebx, %edi
callq 0x1047b4
cmpl $0x0, 0x7c(%r14)
je 0x13cf39
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x2220
incq %rbx
movl 0x7c(%r14), %eax
cmpq %rax, %rbx
jb 0x13cf1f
movq 0x28(%rsp), %rdi
callq 0x2220
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: init_MT(MT*, unsigned int)
void init_MT(MT* M, uint32_t n_vtx)
{
    uint32_t v;
    kv_init(M->matrix); kv_malloc(M->matrix, n_vtx); M->matrix.n = n_vtx;
    for (v = 0; v < n_vtx; ++v) kv_init(M->matrix.a[v].a);
    for (v = 1; (uint64_t)(1<<v) < n_vtx; v++);
    M->uID_shift = 64 - v; M->dis_mode = ((uint64_t)-1) >> v; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r15d
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %r15, 0x8(%rdi)
movq %r15, %r14
shlq $0x5, %r14
movq %r14, %rdi
callq 0x2280
xorps %xmm0, %xmm0
movq %rax, 0x10(%rbx)
movq %r15, (%rbx)
testl %ebp, %ebp
je 0x13d3b4
xorl %ecx, %ecx
movups %xmm0, (%rax,%rcx)
movq $0x0, 0x10(%rax,%rcx)
addq $0x20, %rcx
cmpq %rcx, %r14
jne 0x13d39e
xorl %ecx, %ecx
incl %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
cmpq %r15, %rax
jb 0x13d3b6
movl $0x40, %eax
subl %ecx, %eax
movq %rax, 0x18(%rbx)
movq $-0x1, %rax
shrq %cl, %rax
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_trans_ug_arch(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, asg_arc_t*)
int get_trans_ug_arch(uint32_t qn, uint32_t qs, uint32_t qe, uint32_t qLen, 
uint32_t tn, uint32_t ts, uint32_t te, uint32_t tLen, uint32_t rev, asg_arc_t* t)
{
    ma_hit_t h;
    h.qns = qn;
    h.qns = h.qns << 32;
    h.qns = h.qns | qs;
    h.qe = qe;
    h.tn = tn;
    h.ts = ts;
    h.te = te;
    h.rev = rev;
    h.del = 0;
    h.bl = h.el = h.ml = h.no_l_indel = 0;
    return ma_hit2arc(&h, qLen, tLen, MAX(qLen, tLen) + 1, 0, 0, t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x40(%rsp), %r11d
movl 0x48(%rsp), %r14d
movl 0x38(%rsp), %r10d
cmpl %r11d, %ecx
movl %r11d, %eax
cmoval %ecx, %eax
incl %eax
subl %r10d, %r11d
testb $0x1, %r14b
movl %r9d, %r15d
cmovel %r11d, %r15d
cmovel %r9d, %r11d
cmpl %esi, %r11d
movl %esi, %ebp
cmovll %r11d, %ebp
movl %ecx, %r12d
subl %edx, %r12d
cmpl %r15d, %r12d
movl %r15d, %ebx
cmovll %r12d, %ebx
cmpl %eax, %ebp
setg %r13b
cmpl %eax, %ebx
setg %al
orb %r13b, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x13d541
cmpl %r11d, %esi
setg %al
cmpl %r15d, %r12d
setg %r13b
orb %al, %r13b
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpb $0x1, %r13b
jne 0x13d541
cmpl %r15d, %r12d
setl %al
cmpl %r11d, %esi
setl %r12b
orb %al, %r12b
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpb $0x1, %r12b
jne 0x13d541
testb $0x1, %r14b
sete %r12b
addl %edx, %r15d
movl %ecx, %eax
subl %r15d, %eax
xorl %r14d, %r14d
subl %esi, %edx
subl %r11d, %esi
setg %r11b
cmovlel %eax, %esi
setle %r15b
addl %ebp, %ebx
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addl %ebx, %edx
js 0x13d541
subl %r9d, %r10d
addl %ebx, %r10d
js 0x13d541
movq 0x50(%rsp), %rax
movl %edi, %edx
addq %rdx, %rdx
movb %r15b, %r14b
xorb %r11b, %r12b
movzbl %r12b, %edi
andl $-0x2, %edx
orl %edx, %r14d
leal (%rdi,%r8,2), %edx
shlq $0x20, %r14
movl %esi, %edi
orq %r14, %rdi
movq %rdi, (%rax)
movl %edx, 0x8(%rax)
subl %esi, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, 0xc(%rax)
movb $0x0, 0x12(%rax)
andb $0x3f, 0x11(%rax)
movl %esi, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_hc_edge(hc_links*, unsigned long, unsigned long, unsigned long)
hc_edge* get_hc_edge(hc_links* link, uint64_t src, uint64_t dest, uint64_t dir)
{
    if(src >= link->a.n) return NULL;
    uint64_t i, n;
    hc_edge* a = NULL;
    if(dir == 0)
    {
        n = link->a.a[src].e.n;
        a = link->a.a[src].e.a;
    }
    else
    {
        n = link->a.a[src].f.n;
        a = link->a.a[src].f.a;
    }
    
    for (i = 0; i < n; i++)
    {
        if(a[i].del) continue;
        if(a[i].uID == dest) return &(a[i]);
    }

    return NULL;
}

// Assembly:
cmpq %rsi, (%rdi)
jbe 0x13e641
movq 0x10(%rdi), %rax
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
leaq (%rax,%rsi), %rdi
testq %rcx, %rcx
leaq 0x18(%rax,%rsi), %rax
cmoveq %rdi, %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x13e641
movq 0x10(%rax), %rax
cmpb $0x0, 0x18(%rax)
js 0x13e638
movl 0x8(%rax), %esi
cmpq %rdx, %rsi
je 0x13e643
addq $0x28, %rax
decq %rcx
jne 0x13e62a
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: set_reverse_links(unsigned int*, unsigned int, kvec_t_u32_warp*, unsigned int, hc_links*)
void set_reverse_links(uint32_t* bub, uint32_t n, kvec_t_u32_warp* reach, uint32_t root, hc_links* link)
{
    uint64_t i, k, d = RC_0;
    uint32_t v;
    for (i = 0; i < n; i++)
    {
        v = bub[i]>>1;
        if(v == root) continue;
        for (k = 0; k < reach->a.n; k++)
        {
            if(v == reach->a.a[k]) break;
        }

        ///if(k == reach->a.n && reach->a.n > 0)
        if(k == reach->a.n)
        {
            push_hc_edge(&(link->a.a[root]), v, 1, 1, &d);
            push_hc_edge(&(link->a.a[v]), root, 1, 1, &d);
        }
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x20(%rsp)
movq $0x0, (%rsp)
testl %esi, %esi
je 0x13fe75
movl %ecx, %r12d
movq %rdx, %r15
movl %esi, %ebp
movl %ecx, %eax
xorl %ebx, %ebx
movq %rax, 0x10(%rsp)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x20(%rsp), %r14
movl (%rdi,%rbx,4), %r13d
shrl %r13d
cmpl %r12d, %r13d
je 0x13fe69
movq (%r15), %rax
testq %rax, %rax
je 0x13fe0f
movq 0x10(%r15), %rdx
xorl %ecx, %ecx
cmpl (%rdx,%rcx,4), %r13d
je 0x13fe11
incq %rcx
cmpq %rcx, %rax
jne 0x13fdfc
movq %rax, %rcx
jmp 0x13fe11
xorl %ecx, %ecx
cmpq %rax, %rcx
jne 0x13fe69
movq 0x10(%r14), %rdi
addq 0x8(%rsp), %rdi
movq %r13, %rsi
movsd 0xe5446(%rip), %xmm0    # 0x225270
movl $0x1, %edx
movq %rsp, %rcx
callq 0x13b8bb
leaq (,%r13,2), %rdi
addq %r13, %rdi
shlq $0x4, %rdi
addq 0x10(%r14), %rdi
movq 0x10(%rsp), %rsi
movsd 0xe5419(%rip), %xmm0    # 0x225270
movl $0x1, %edx
movq %rsp, %rcx
callq 0x13b8bb
movq 0x18(%rsp), %rdi
incq %rbx
cmpq %rbp, %rbx
jne 0x13fde2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: load_hc_links(hc_links*, char const*)
int load_hc_links(hc_links* link, const char *fn)
{
    uint64_t k, flag = 0;
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
	sprintf(buf, "%s.hic.link.bin", fn);

    FILE* fp = NULL; 
    fp = fopen(buf, "r"); 
    if(!fp)
    {
        free(buf);
        return 0;
    } 
    

    kv_init(link->a);
    flag += fread(&link->a.n, sizeof(link->a.n), 1, fp);
    link->a.m = link->a.n; CALLOC(link->a.a, link->a.n);
    for (k = 0; k < link->a.n; k++)
    {
        flag += fread(&link->a.a[k].e.n, sizeof(link->a.a[k].e.n), 1, fp);
        link->a.a[k].e.m = link->a.a[k].e.n; MALLOC(link->a.a[k].e.a, link->a.a[k].e.n);
        flag += fread(link->a.a[k].e.a, sizeof(hc_edge), link->a.a[k].e.n, fp);

        flag += fread(&link->a.a[k].f.n, sizeof(link->a.a[k].f.n), 1, fp);
        link->a.a[k].f.m = link->a.a[k].f.n; MALLOC(link->a.a[k].f.a, link->a.a[k].f.n);
        flag += fread(link->a.a[k].f.a, sizeof(hc_edge), link->a.a[k].f.n, fp);
    }

    kv_init(link->enzymes);
    flag += fread(&link->enzymes.n, sizeof(link->enzymes.n), 1, fp);
    link->enzymes.m = link->enzymes.n; MALLOC(link->enzymes.a, link->enzymes.n);
    flag += fread(link->enzymes.a, sizeof(uint64_t), link->enzymes.n, fp);

    fclose(fp);
    free(buf);
    fprintf(stderr, "[M::%s::] ==> Hi-C linkages have been loaded\n", __func__);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r14
leaq 0xef09a(%rip), %rsi     # 0x22f559
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xf30d2(%rip), %rsi     # 0x2335a7
movq %r14, %rdi
callq 0x2210
testq %rax, %rax
jne 0x1404f7
movq %r14, %rdi
callq 0x2220
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1cb6c
movl $0x1, %ebp
jmp 0x1404ea
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: write_hc_hits(kvec_pe_hit*, ma_ug_t*, char const*)
void write_hc_hits(kvec_pe_hit* hits, ma_ug_t* ug, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.lk.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&hits->a.n, sizeof(hits->a.n), 1, fp);
    fwrite(hits->a.a, sizeof(pe_hit), hits->a.n, fp);
    write_dbug(ug, fp);

    fclose(fp);
    free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r14
leaq 0xef0a6(%rip), %rsi     # 0x22f5e3
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xfbead(%rip), %rsi     # 0x23c3fe
movq %r14, %rdi
callq 0x2210
movq %rax, %r12
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2410
movq (%r15), %rdx
movq 0x10(%r15), %rdi
movl $0x20, %esi
movq %r12, %rcx
callq 0x2410
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc293c
movq %r12, %rdi
callq 0x2190
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220