LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0xfb0f8(%rip), %rsi     # 0x1f16b7
movq %rax, %rdi
callq 0x22d0
testq %rax, %rax
je 0xf6652
movq %rax, %r14
movq %rax, %rdi
callq 0xf6315
movq %rax, %r15
leaq 0xf6d1f(%rip), %r12     # 0x1ed304
xorl %r13d, %r13d
movq %r15, %rdi
callq 0xf635b
testl %eax, %eax
js 0xf6634
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 0xf6618
incq %r13
jmp 0xf65e8
movq 0x15c9c1(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq %r12, %rsi
movl %r13d, %edx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0xf6613
movq %r15, %rdi
callq 0xf654e
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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r15
pushq $0x40
popq %rax
movq %rdi, 0x20(%rsp)
subq 0x18(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xf6040
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%r12), %rax
movq %rax, 0x8(%rsp)
pushq $0x10
popq %r12
xorl %eax, %eax
cmpq (%r15), %rax
jae 0xf6793
movq %rax, 0x28(%rsp)
movq 0x15c8ef(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq 0x10(%r15), %rax
movq (%rax,%r12), %r11
movq 0x8(%rsp), %r8
movl 0x8(%r8,%r11,8), %edx
movq -0x10(%rax,%r12), %r10
movq -0x8(%rax,%r12), %r14
movq %r10, %rcx
leaq (%r10,%r10), %r9
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
andq %rax, %r10
movq %r14, %rsi
leaq (%r14,%r14), %rbp
andq %rax, %r14
movq (%r8,%r11,8), %rax
subl %eax, %edx
addq 0x10(%rsp), %rax
shrq $0x3f, %rcx
leaq 0xf6a49(%rip), %r13     # 0x1ed18c
movsbl (%rcx,%r13), %r8d
movq 0x18(%rsp), %rcx
shrq %cl, %r9
incl %r9d
shrq $0x3f, %rsi
movsbl (%rsi,%r13), %ebx
shrq %cl, %rbp
incl %ebp
subq $0x8, %rsp
leaq 0xf6bb3(%rip), %rsi     # 0x1ed31f
movq %rax, %rcx
xorl %eax, %eax
pushq %r11
pushq %r14
pushq %rbp
pushq %rbx
pushq %r10
callq 0x22b0
movq 0x58(%rsp), %rax
addq $0x30, %rsp
incq %rax
addq $0x20, %r12
jmp 0xf66dc
leaq 0x30(%rsp), %rdi
callq 0xf6661
addq $0x98, %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: 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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x40
popq %r15
subq 0x18(%rdi), %r15
pushq $0x10
popq %r13
xorl %r12d, %r12d
cmpq (%rbx), %r12
jae 0xf685a
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 0xf6805
incq %r12
addq $0x20, %r13
jmp 0xf67cf
movq 0x15c7d4(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movq (%rdx,%r13), %rdx
movq %r9, %rcx
shrq $0x3f, %rcx
leaq 0xf696b(%rip), %rsi     # 0x1ed18c
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 0xf6b07(%rip), %rsi     # 0x1ed34f
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rbp
callq 0x22b0
addq $0x20, %rsp
jmp 0xf67fc
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: dedup_hits(kvec_pe_hit*, unsigned long)
void dedup_hits(kvec_pe_hit* hits, uint64_t is_dup)
{
    double index_time = yak_realtime();
    uint64_t k, l, m = 0, cur;
    radix_sort_pe_hit_an1(hits->a.a, hits->a.a + hits->a.n);
    for (k = 1, l = 0; k <= hits->a.n; ++k) 
    {   
        if (k == hits->a.n || hits->a.a[k].s != hits->a.a[l].s) 
        {
            if (k - l > 1) radix_sort_pe_hit_an2(hits->a.a + l, hits->a.a + k);
            if(is_dup)
            {
                cur = (uint64_t)-1;
                while (l < k)
                {
                    if(hits->a.a[l].e != cur)
                    {
                        cur = hits->a.a[l].e;
                        hits->a.a[m++] = hits->a.a[l];
                    }
                    l++;
                }
            }
            l = k;
        }
    }
    if(is_dup) hits->a.n = m;
    fprintf(stderr, "[M::%s::%.3f] ==> Dedup\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xefea7
movsd %xmm0, (%rsp)
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0xf07fa
pushq $0x1
popq %r15
xorl %ebp, %ebp
pushq $-0x1
popq %r13
xorl %r12d, %r12d
cmpq (%rbx), %r15
ja 0xf695c
je 0xf68cf
movq 0x10(%rbx), %rax
movq %r15, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rcx
movq %rbp, %rdx
shlq $0x5, %rdx
cmpq (%rax,%rdx), %rcx
je 0xf6954
movq %r15, %rax
subq %rbp, %rax
cmpq $0x2, %rax
jb 0xf68f8
movq 0x10(%rbx), %rax
movq %rbp, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movq %r15, %rsi
shlq $0x5, %rsi
addq %rax, %rsi
callq 0xf0a66
testq %r14, %r14
je 0xf6951
movq %rbp, %rax
shlq $0x5, %rax
orq $0x8, %rax
movq %r13, %rcx
cmpq %r15, %rbp
jae 0xf6951
movq 0x10(%rbx), %rsi
movq (%rsi,%rax), %rdx
cmpq %rcx, %rdx
je 0xf6948
leaq (%rsi,%rax), %rcx
addq $-0x8, %rcx
leaq 0x1(%r12), %rdi
shlq $0x5, %r12
movupd (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsi,%r12)
movupd %xmm0, (%rsi,%r12)
movq %rdi, %r12
movq %rdx, %rcx
incq %rbp
addq $0x20, %rax
jmp 0xf690b
movq %r15, %rbp
incq %r15
jmp 0xf68a4
testq %r14, %r14
je 0xf6964
movq %r12, (%rbx)
movq 0x15c675(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd (%rsp), %xmm0
leaq 0xf6a00(%rip), %rsi     # 0x1ed37f
leaq 0xf6a12(%rip), %rdx     # 0x1ed398
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: sort_hits(kvec_pe_hit*)
void sort_hits(kvec_pe_hit* hits)
{
    double index_time = yak_realtime();
    uint64_t k, l;
    radix_sort_pe_hit_an1(hits->a.a, hits->a.a + hits->a.n);
    for (k = 1, l = 0; k <= hits->a.n; ++k) 
    {   
        if (k == hits->a.n || (hits->a.a[k].s<<1) != (hits->a.a[l].s<<1)) 
        {
            if (k - l > 1) radix_sort_pe_hit_an2(hits->a.a + l, hits->a.a + k);
            l = k;
        }
    }
    fprintf(stderr, "[M::%s::%.3f] ==> Sort\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0xefea7
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0xf07fa
pushq $0x1
popq %r14
pushq $0x20
popq %r15
xorl %edi, %edi
cmpq (%rbx), %r14
ja 0xf6a2a
je 0xf69f4
movq 0x10(%rbx), %rax
movq %rdi, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rcx
xorq (%rax,%r15), %rcx
shlq %rcx
testq %rcx, %rcx
je 0xf6a1b
movq %r14, %rcx
subq %rdi, %rcx
movq %r14, %rax
cmpq $0x2, %rcx
jb 0xf6a1e
movq 0x10(%rbx), %rsi
shlq $0x5, %rdi
addq %rsi, %rdi
addq %r15, %rsi
callq 0xf0a66
movq %r14, %rax
jmp 0xf6a1e
movq %rdi, %rax
incq %r14
addq $0x20, %r15
movq %rax, %rdi
jmp 0xf69d2
movq 0x15c5af(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd 0x8(%rsp), %xmm0
leaq 0xf695d(%rip), %rsi     # 0x1ed3a3
leaq 0xf696e(%rip), %rdx     # 0x1ed3bb
movq %rbx, %rdi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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
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 0x68f68
movq 0xc0(%rbx), %rdi
popq %rbx
jmp 0x6921d
// File: /workspace/github_cpp_makefile_star2_O2/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 0xf6ad1
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 0xf6aea
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 0xf6b01
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 0xf6b20
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 0xf6b30
movq 0x58(%rdi), %rcx
movq (%rcx,%rsi,8), %rcx
movq %rcx, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %r9d, %eax
movl %esi, %r9d
testq %rcx, %rcx
je 0xf7301
cmpq $0x0, 0x18(%rcx)
je 0xf7301
movq 0x28(%rcx), %rcx
cmpl $0x0, (%rcx,%r9,8)
jne 0xf7382
movl 0x28(%rsp), %ecx
movl 0x20(%rsp), %esi
movq 0x10(%rdi), %rdi
imulq $0x28, %r9, %r9
leaq (%rdi,%r9), %r10
movl 0x10(%rdi,%r9), %r11d
xorl %ebx, %ebx
xorl %edi, %edi
xorl %r9d, %r9d
cmpq %rbx, %r11
je 0xf734d
movq 0x18(%r10), %r14
movq (%r14,%rbx,8), %r14
shrq $0x21, %r14
movzbl (%rdx,%r14), %ebp
testb $0x2, %bpl
jne 0xf7382
andl $0x1, %ebp
addl %ebp, %edi
xorl $0x1, %ebp
addl %ebp, %r9d
incq %rbx
jmp 0xf7321
movl %r9d, %edx
addl %edi, %edx
je 0xf7380
cmpl %r8d, %edx
jbe 0xf7376
movl %edi, %r8d
cvtsi2sd %r8, %xmm0
movl %edx, %edx
cvtsi2sd %rdx, %xmm1
mulsd 0xec190(%rip), %xmm1    # 0x1e3500
ucomisd %xmm1, %xmm0
ja 0xf7382
cmpl %r9d, %edi
cmovbl %ecx, %esi
movl %esi, %eax
jmp 0xf7382
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movabsq $-0x100000001, %r14     # imm = 0xFFFFFFFEFFFFFFFF
movq 0x60(%rdi), %rdx
movq 0x70(%rdi), %rdi
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x20e0
movl 0x30(%rbx), %eax
decl %eax
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0xf7d5b
movq 0x28(%rbx), %rsi
movq 0x40(%rbx), %rdi
movl (%rdi,%rcx,4), %r8d
movl (%rsi,%r8,4), %edi
incl %r8d
movl (%rsi,%r8,4), %esi
cmpq %rdx, %rdi
je 0xf7d28
shrl %edi
movq 0x70(%rbx), %r8
movq (%r8,%rdi,8), %r9
cmpq $-0x1, %r9
je 0xf7d1d
cmpq %r14, %r9
jbe 0xf7d28
shlq $0x20, %r9
orq %rcx, %r9
jmp 0xf7d24
leaq (%r14,%rcx), %r9
incq %r9
movq %r9, (%r8,%rdi,8)
cmpl $-0x1, %esi
je 0xf7d56
shrl %esi
movq 0x70(%rbx), %rdi
movq (%rdi,%rsi,8), %r8
cmpq $-0x1, %r8
je 0xf7d4b
cmpq %r14, %r8
jbe 0xf7d56
shlq $0x20, %r8
orq %rcx, %r8
jmp 0xf7d52
leaq (%r14,%rcx), %r8
incq %r8
movq %r8, (%rdi,%rsi,8)
incq %rcx
jmp 0xf7cde
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rdi), %rax
leaq 0x10(%rdi), %rcx
leaq 0x18(%rdi), %rsi
testl %edx, %edx
cmoveq %rcx, %rax
movq (%rax), %rax
cmoveq %rdi, %rsi
movq (%rsi), %rcx
subq $0x1, %rcx
jb 0xfa343
cmpb $0x0, 0x18(%rax)
js 0xfa33d
movl 0x8(%rax), %esi
cmpq %r14, %rsi
je 0xfa391
addq $0x28, %rax
jmp 0xfa329
testl %edx, %edx
je 0xfa397
movq 0x18(%r15), %rax
movq 0x28(%r15), %rdi
cmpq 0x20(%r15), %rax
jne 0xfa387
leaq (%rax,%rax), %rcx
testq %rax, %rax
pushq $0x2
popq %rax
cmovneq %rcx, %rax
movq %rax, 0x20(%r15)
imulq $0x28, %rax, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x2370
movsd 0x8(%rsp), %xmm0
movq %rax, %rdi
movq %rax, 0x28(%r15)
movq 0x18(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%r15)
jmp 0xfa3dc
addsd (%rax), %xmm0
jmp 0xfa3eb
movq (%r15), %rax
movq 0x10(%r15), %rdi
cmpq 0x8(%r15), %rax
jne 0xfa3d5
leaq (%rax,%rax), %rcx
testq %rax, %rax
pushq $0x2
popq %rax
cmovneq %rcx, %rax
movq %rax, 0x8(%r15)
imulq $0x28, %rax, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x2370
movsd 0x8(%rsp), %xmm0
movq %rax, %rdi
movq %rax, 0x10(%r15)
movq (%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r15)
imulq $0x28, %rax, %rax
addq %rdi, %rax
andb $0x7f, 0x18(%rax)
movl %r14d, 0x8(%rax)
movsd %xmm0, (%rax)
testq %rbx, %rbx
je 0xfa3fb
movq (%rbx), %rcx
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
subq %rcx, %rsi
movq %rcx, %r8
sarq $0x3f, %r8
andq %rcx, %r8
decq %rdi
xorl %r9d, %r9d
leaq 0xf16de(%rip), %r10     # 0x1ebb00
xorl %eax, %eax
cmpq %rsi, %r9
jg 0xfa46a
movq %rcx, %r11
testq %r11, %r11
jle 0xfa454
movzbl (%rdi,%r11), %ebx
cmpb $0x3, (%r10,%rbx)
ja 0xfa457
movzbl -0x1(%rdx,%r11), %r14d
cmpb %bl, %r14b
je 0xfa44f
cmpb $0x4, (%r10,%r14)
jb 0xfa457
decq %r11
jmp 0xfa42c
movq %r8, %r11
xorl %ebx, %ebx
testq %r11, %r11
setle %bl
addq %rbx, %rax
incq %r9
incq %rdi
jmp 0xfa424
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xfa4b5
xorl %ecx, %ecx
testq %rsi, %rsi
cmovleq %rcx, %rsi
pushq $0x1
popq %r8
leaq 0xf1677(%rip), %r9      # 0x1ebb00
xorl %eax, %eax
cmpq %rcx, %rsi
je 0xfa4b2
movzbl (%rdi,%rcx), %r10d
cmpb $0x3, (%r9,%r10)
ja 0xfa4b5
movzbl (%rdx,%rcx), %r11d
cmpb %r11b, %r10b
je 0xfa4ad
cmpb $0x4, (%r9,%r11)
jb 0xfa4b5
incq %rcx
jmp 0xfa48b
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_enzyme_occ(char*, long long, char*, long long)
long long get_enzyme_occ(char* t, long long tlen, char* p, long long plen)
{
    long long i, c, s = 0, j, occ = 0;
    int badchar[5]; badchar[0] = badchar[1] = badchar[2] = badchar[3] = badchar[4] = -1;
    for (i = 0; i < plen; i++)
    {
        c = seq_nt4_table[(uint8_t)p[i]];
        badchar[c] = i; 
        if(c == 4) badchar[0] = badchar[1] = badchar[2] = badchar[3] = i; 
    } 
    badchar[4] = -1;

    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 += (s+m < n)? m-badchar[txt[s+m]] : 1; 
            s++;
        } 
        else
        {
            /*******************************for debug************************************/
            // long long f, end = s + MAX(1, j - badchar[seq_nt4_table[(uint8_t)t[s+j]]]);
            // for (f = s+1; f < end; f++)
            // {
            //     if(check_exact_match(t+f, plen, p, plen))
            //     {
            //         fprintf(stderr, "s: %lld, end: %lld, s+j: %lld, t[s+j]: %c, badchar: %d, j: %lld\n", 
            //                     s, end, s+j, t[s+j], badchar[seq_nt4_table[(uint8_t)t[s+j]]], j);
            //     }
            // }            
            /*******************************for debug************************************/
            
            s += MAX(1, j - badchar[seq_nt4_table[(uint8_t)t[s+j]]]); 
        }
    } 

    return occ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %eax, %eax
testq %rcx, %rcx
movl $0x0, %r9d
cmovgq %rcx, %r9
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, -0x18(%rsp)
leaq 0xf1623(%rip), %r8      # 0x1ebb00
cmpq %rax, %r9
je 0xfa50b
movzbl (%rdx,%rax), %r10d
movzbl (%r8,%r10), %r10d
movl %eax, -0x18(%rsp,%r10,4)
cmpl $0x4, %r10d
jne 0xfa506
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, -0x18(%rsp)
incq %rax
jmp 0xfa4dd
orl $-0x1, -0x8(%rsp)
subq %rcx, %rsi
decq %rcx
xorl %r9d, %r9d
movabsq $0x1, %r10
xorl %eax, %eax
cmpq %rsi, %r9
jg 0xfa57d
leaq (%rdi,%r9), %rbx
movq %rcx, %r11
leaq 0x1(%r11), %r14
testq %r14, %r14
jle 0xfa575
movzbl (%rbx,%r11), %r15d
movzbl (%r8,%r15), %r14d
cmpq $0x3, %r14
ja 0xfa560
movzbl (%rdx,%r11), %r12d
cmpb %r15b, %r12b
je 0xfa55b
cmpb $0x4, (%r8,%r12)
jb 0xfa560
decq %r11
jmp 0xfa531
movslq -0x18(%rsp,%r14,4), %rbx
subq %rbx, %r11
cmpq $0x2, %r11
cmovlq %r10, %r11
addq %r11, %r9
jmp 0xfa525
incq %rax
incq %r9
jmp 0xfa525
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x18(%rdi), %rdx
cmpq 0x20(%rdi), %rdx
jne 0xfa6b2
leaq (%rdx,%rdx), %rax
testq %rdx, %rdx
pushq $0x2
popq %rsi
cmovneq %rax, %rsi
movq %rsi, 0x20(%rbx)
movq 0x28(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rdx
jmp 0xfa6b6
movq 0x28(%rbx), %rax
movb 0x50(%rbx), %cl
shlq %cl, %r15
andq 0x48(%rbx), %r14
orq %r15, %r14
leaq 0x1(%rdx), %rcx
movq %rcx, 0x18(%rbx)
movq %r14, (%rax,%rdx,8)
movq (%rax), %rcx
incq %rcx
movq %rcx, (%rax)
movl %ecx, %edx
sarl %edx
testl %edx, %edx
jle 0xfa72e
movslq %ecx, %rsi
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 0xfa72e
movq (%rax,%rsi,8), %rcx
movq (%rax,%rdi,8), %r8
movq %r8, (%rax,%rsi,8)
movq %rcx, (%rax,%rdi,8)
movl %edx, %ecx
shrl %edx
jmp 0xfa6dc
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
orq $-0x1, (%rdx)
orq $-0x1, (%rsi)
movq 0x28(%rdi), %rax
cmpq $0x0, (%rax)
je 0xfa822
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, %r8d
leal (%r8,%r8), %edx
cmpl (%rax), %edx
jg 0xfa822
movq 0x48(%rdi), %rsi
movq 0x50(%rdi), %rcx
jge 0xfa7d8
leal 0x1(,%r8,2), %r9d
movslq %edx, %r10
movq (%rax,%r10,8), %r10
movq %rsi, %r11
andq %r10, %r11
movq %r11, 0x58(%rdi)
shrq %cl, %r10
movq %r10, 0x60(%rdi)
movslq %r9d, %r11
movq (%rax,%r11,8), %r11
movq %r11, %rbx
shrq %cl, %r11
andq %rsi, %rbx
movq %rbx, 0x58(%rdi)
movq %r11, 0x60(%rdi)
cmpq %r11, %r10
jb 0xfa7d8
movl %r9d, %edx
movslq %r8d, %r8
movq (%rax,%r8,8), %r10
movq %rsi, %r9
andq %r10, %r9
movq %r9, 0x58(%rdi)
shrq %cl, %r10
movq %r10, 0x60(%rdi)
movslq %edx, %r9
movq (%rax,%r9,8), %r11
andq %r11, %rsi
shrq %cl, %r11
movq %rsi, 0x58(%rdi)
movq %r11, 0x60(%rdi)
cmpq %r11, %r10
jbe 0xfa822
movq (%rax,%r8,8), %rcx
movq (%rax,%r9,8), %rsi
movq %rsi, (%rax,%r8,8)
movq %rcx, (%rax,%r9,8)
movl %edx, %r8d
jmp 0xfa782
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movl %edi, %ebp
movq %rsi, %rdi
callq 0xfa62b
movq 0x40(%r15), %rax
movl %ebp, %esi
andq $0x0, (%rax,%rsi,8)
testq %rbx, %rbx
je 0xfa85b
orl $-0x1, (%rbx,%rsi,4)
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, 0x18(%rsp)
callq 0xfa671
movq 0x28(%r15), %rax
cmpq $0x0, (%rax)
je 0xfa931
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xfa734
movq 0x10(%r15), %rax
movq 0x20(%rsp), %rsi
movb $0x1, (%rax,%rsi)
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq (%rcx,%rsi,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
movq 0x8(%rsp), %r13
imulq $0x18, %rdx, %r14
imulq $0x18, %rcx, %rcx
leaq (%rax,%rcx), %rbx
addq $0xc, %rbx
xorl %r12d, %r12d
movq %rsi, (%rsp)
cmpq %r12, %r14
je 0xfa927
cmpl $0x0, (%rbx,%r12)
js 0xfa921
movl -0xc(%rbx,%r12), %r13d
movl -0x4(%rbx,%r12), %ebp
movq 0x10(%r15), %rax
cmpb $0x0, (%rax,%rbp)
jne 0xfa921
movq 0x40(%r15), %rax
movq (%rax,%rsi,8), %rdx
addq %r13, %rdx
cmpq %rdx, (%rax,%rbp,8)
jbe 0xfa921
movq %rdx, (%rax,%rbp,8)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xfa671
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xfa91d
movq (%rsp), %rsi
movl %esi, (%rax,%rbp,4)
jmp 0xfa921
movq (%rsp), %rsi
addq $0x18, %r12
jmp 0xfa8ca
movq %r13, 0x8(%rsp)
jmp 0xfa86a
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: 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 0xfa585
movq %r14, 0x8(%rsp)
movl 0x14(%r14), %eax
addl %eax, %eax
movq %rax, 0x18(%rsp)
xorl %r15d, %r15d
cmpq 0x18(%rsp), %r15
je 0xfaa61
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rcx
movl %r15d, %eax
shrl %eax
cmpl $0x0, (%rcx,%rax,8)
js 0xfaa59
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, %rax, %rax
cmpq $0x0, (%rcx,%rax)
je 0xfaa59
movl %r15d, %edi
leaq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xfa824
movq 0x50(%rsp), %r14
movq 0x60(%rsp), %rbp
movq %r15, %r13
shlq $0x5, %r13
xorl %r12d, %r12d
cmpq %r12, %r14
je 0xfaa59
cmpq $-0x1, (%rbp,%r12,8)
je 0xfaa54
movq 0x10(%rbx), %rcx
movq (%rcx,%r13), %rax
cmpq 0x8(%rcx,%r13), %rax
jne 0xfaa31
leaq (%rax,%rax), %rsi
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rsi
leaq (%rcx,%r13), %rax
movq %rsi, 0x8(%rcx,%r13)
movq 0x10(%rax), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x10(%rbx), %rcx
movq %rax, 0x10(%rcx,%r13)
movq (%rcx,%r13), %rax
movq 0x10(%rcx,%r13), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, (%rcx,%r13)
movb 0x18(%rbx), %cl
movq %r12, %rsi
shlq %cl, %rsi
movq %rsi, (%rdx,%rax,8)
orq (%rbp,%r12,8), %rsi
movq %rsi, (%rdx,%rax,8)
incq %r12
jmp 0xfa9e4
incq %r15
jmp 0xfa981
leaq 0x20(%rsp), %rdi
callq 0xfa60b
addq $0x88, %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_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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movl (%rdx,%rsi,4), %ebp
andq $0x0, 0x38(%rcx)
movq %rdi, %r14
cmpq $0x0, 0x40(%rcx)
je 0xfac36
movq 0x48(%rbx), %rax
xorl %edx, %edx
jmp 0xfac52
movq $0x2, 0x40(%rbx)
movq 0x48(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x38(%rbx)
movl %r12d, (%rax,%rdx,4)
pushq $0x2
popq %r12
movl %ebp, %r13d
movq 0x40(%rbx), %rdx
cmpq %r14, %r13
je 0xfacaa
cmpq %rdx, %rcx
jne 0xfac96
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r12, %rsi
movq %rsi, 0x40(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movl %ebp, (%rax,%rcx,4)
movl (%r15,%r13,4), %ebp
movq %rdx, %rcx
jmp 0xfac62
cmpq %rdx, %rcx
jne 0xfacd2
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r12, %rsi
movq %rsi, 0x40(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
leaq (%rax,%rcx,4), %rsi
movl %r14d, (%rsi)
shrq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
je 0xfacfe
movl (%rax,%rdi,4), %r8d
movl (%rsi), %r9d
movl %r9d, (%rax,%rdi,4)
movl %r8d, (%rsi)
incq %rdi
addq $-0x4, %rsi
jmp 0xface2
movq %rcx, 0x38(%rbx)
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: 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
movq %rsp, %rbx
orq $-0x1, 0x38(%rbx)
movl %edi, 0x8(%rbx)
movq %rsi, (%rbx)
movq %rdx, 0x10(%rbx)
orq $-0x1, 0x30(%rbx)
movl %r8d, %ebp
andq $0x0, 0x28(%rbx)
movb $-0x1, 0x20(%rbx)
andq $0x0, 0x18(%rbx)
movq %rcx, %r14
andq $0x0, 0x40(%rbx)
movq %rsi, %rdi
callq 0xfa62b
movl %ebp, %r15d
pushq $0x2
popq %r12
movq %rbx, %rdi
callq 0xfaa7d
testl %eax, %eax
je 0xfb0e7
movq (%rsp), %rax
movq 0x38(%rsp), %r13
movq 0x40(%rax), %rax
cmpq %r15, (%rax,%r13,8)
ja 0xfb0e7
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0xfb0da
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r12, %rsi
movq %rsi, 0x8(%r14)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
movl %r13d, (%rax,%rcx,4)
jmp 0xfb08c
addq $0x48, %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: 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 %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
leaq 0x15802a(%rip), %r12    # 0x253758
movl 0x7c(%r12), %ebx
movslq %ebx, %rdi
shlq $0x3, %rdi
callq 0x2280
movq %rax, %r15
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0xfb766
movl 0x14(%r14), %eax
addl %eax, %eax
movslq %eax, %rdi
callq 0x2280
movq %rax, (%r15,%r13,8)
incq %r13
jmp 0xfb74a
movl 0x14(%r14), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x3e(%rip), %rsi        # 0xfb7b5
leaq 0x8(%rsp), %rdx
movl %ebx, %edi
callq 0xc67c0
xorl %ebx, %ebx
movl 0x7c(%r12), %eax
movq 0x28(%rsp), %rdi
cmpq %rax, %rbx
jae 0xfb7a2
movq (%rdi,%rbx,8), %rdi
callq 0x2220
incq %rbx
jmp 0xfb785
callq 0x2220
addq $0x30, %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: 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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r15d
movq %r15, 0x8(%rdi)
movq %r15, %r14
shlq $0x5, %r14
movq %r14, %rdi
callq 0x2280
movq %rax, 0x10(%rbx)
movq %r15, (%rbx)
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpq %rcx, %r14
je 0xfbb96
movups %xmm0, (%rax,%rcx)
andq $0x0, 0x10(%rax,%rcx)
addq $0x20, %rcx
jmp 0xfbb81
xorl %ecx, %ecx
pushq $0x1
popq %rax
incl %ecx
movl %eax, %edx
shll %cl, %edx
movslq %edx, %rdx
cmpq %r15, %rdx
jb 0xfbb9b
pushq $0x40
popq %rax
subl %ecx, %eax
movq %rax, 0x18(%rbx)
pushq $-0x1
popq %rax
shrq %cl, %rax
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %eax
movl 0x48(%rsp), %ebp
movl 0x38(%rsp), %r10d
cmpl %eax, %ecx
movl %eax, %r12d
cmoval %ecx, %r12d
incl %r12d
subl %r10d, %eax
testb $0x1, %bpl
movl %r9d, %r14d
cmovel %eax, %r14d
cmovel %r9d, %eax
cmpl %esi, %eax
movl %esi, %ebx
cmovll %eax, %ebx
movl %ecx, %r15d
subl %edx, %r15d
cmpl %r14d, %r15d
movl %r14d, %r11d
cmovll %r15d, %r11d
cmpl %r12d, %ebx
setg %r13b
cmpl %r12d, %r11d
setg %r12b
orb %r13b, %r12b
je 0xfbc63
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xfbd20
cmpl %eax, %esi
setg %r12b
cmpl %r14d, %r15d
setg %r13b
orb %r12b, %r13b
cmpb $0x1, %r13b
jne 0xfbd14
cmpl %r14d, %r15d
setl %r15b
cmpl %eax, %esi
setl %r12b
orb %r15b, %r12b
cmpb $0x1, %r12b
jne 0xfbd1b
testb $0x1, %bpl
sete %bpl
addl %edx, %r14d
movl %ecx, %r12d
subl %r14d, %r12d
xorl %r14d, %r14d
subl %esi, %edx
subl %eax, %esi
setg %r15b
cmovlel %r12d, %esi
setle %r12b
addl %ebx, %r11d
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addl %r11d, %edx
js 0xfbd20
subl %r9d, %r10d
addl %r11d, %r10d
js 0xfbd20
movq 0x50(%rsp), %rax
movl %edi, %edx
addq %rdx, %rdx
movb %r12b, %r14b
xorb %r15b, %bpl
movzbl %bpl, %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
jmp 0xfbd20
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0xfbd20
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
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: 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 $0x38, %rsp
movq %r8, 0x28(%rsp)
movl %ecx, %r12d
movq %rdx, %r14
leaq 0x30(%rsp), %rax
andq $0x0, (%rax)
movl %esi, %esi
movl %ecx, %eax
xorl %ebx, %ebx
movq %rax, 0x10(%rsp)
imulq $0x30, %rax, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x28(%rsp), %rbp
cmpq %rsi, %rbx
je 0xfe288
movl (%rdi,%rbx,4), %r15d
shrl %r15d
cmpl %r12d, %r15d
je 0xfe280
movq (%r14), %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xfe232
movq 0x10(%r14), %rdx
cmpl (%rdx,%rcx,4), %r15d
je 0xfe22d
incq %rcx
jmp 0xfe219
cmpq %rcx, %rax
jne 0xfe280
movq 0x10(%rbp), %rdi
addq 0x8(%rsp), %rdi
movq %r15, %rsi
movsd 0xe505a(%rip), %xmm0    # 0x1e32a0
pushq $0x1
popq %rdx
leaq 0x30(%rsp), %r13
movq %r13, %rcx
callq 0xfa2fb
imulq $0x30, %r15, %rdi
addq 0x10(%rbp), %rdi
movq 0x10(%rsp), %rsi
movsd 0xe5035(%rip), %xmm0    # 0x1e32a0
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0xfa2fb
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
incq %rbx
jmp 0xfe1ff
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: write_hc_links(hc_links*, char const*)
void write_hc_links(hc_links* link, const char *fn)
{
    uint64_t k;
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
	sprintf(buf, "%s.hic.link.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&link->a.n, sizeof(link->a.n), 1, fp);
    for (k = 0; k < link->a.n; k++)
    {
        fwrite(&link->a.a[k].e.n, sizeof(link->a.a[k].e.n), 1, fp);
        fwrite(link->a.a[k].e.a, sizeof(hc_edge), link->a.a[k].e.n, fp);

        fwrite(&link->a.a[k].f.n, sizeof(link->a.a[k].f.n), 1, fp);
        fwrite(link->a.a[k].f.a, sizeof(hc_edge), link->a.a[k].f.n, fp);
    }
    
    fwrite(&link->enzymes.n, sizeof(link->enzymes.n), 1, fp);
    fwrite(link->enzymes.a, sizeof(uint64_t), link->enzymes.n, fp);
    
    fclose(fp);
    free(buf);
    fprintf(stderr, "[M::%s::] ==> Hi-C linkages have been written\n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %r13
movq %r13, %rsi
callq 0x2120
movq %rax, %r15
leaq 0xeeeb7(%rip), %rsi     # 0x1ed699
xorl %ebx, %ebx
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xfbea9(%rip), %rsi     # 0x1fa6a1
movq %r15, (%rsp)
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
pushq $0x8
popq %rsi
movq %r14, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0x2410
xorl %r15d, %r15d
pushq $0x8
popq %rbp
pushq $0x1
popq %r13
cmpq (%r14), %r15
jae 0xfe890
movq 0x10(%r14), %rdi
addq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2410
movq 0x10(%r14), %rax
movq (%rax,%rbx), %rdx
movq 0x10(%rax,%rbx), %rdi
pushq $0x28
popq %rsi
movq %r12, %rcx
callq 0x2410
movq 0x10(%r14), %rax
leaq (%rax,%rbx), %rdi
addq $0x18, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2410
movq 0x10(%r14), %rax
movq 0x18(%rax,%rbx), %rdx
movq 0x28(%rax,%rbx), %rdi
pushq $0x28
popq %rsi
movq %r12, %rcx
callq 0x2410
incq %r15
addq $0x30, %rbx
jmp 0xfe822
leaq 0x18(%r14), %rdi
pushq $0x8
popq %r15
pushq $0x1
popq %rdx
movq %r15, %rsi
movq %r12, %rcx
callq 0x2410
movq 0x18(%r14), %rdx
movq 0x28(%r14), %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x2410
movq %r12, %rdi
callq 0x2190
movq (%rsp), %rdi
callq 0x2220
movq 0x15470f(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xeedce(%rip), %rsi     # 0x1ed6a9
leaq 0xeedf6(%rip), %rdx     # 0x1ed6d8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %r13
movq %r13, %rsi
callq 0x2120
movq %rax, %r14
leaq 0xeec0a(%rip), %rsi     # 0x1ed723
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xfbb74(%rip), %rsi     # 0x1fa6a1
movq %r14, %rdi
callq 0x2210
movq %rax, %r12
pushq $0x8
popq %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0x2410
movq (%r15), %rdx
movq 0x10(%r15), %rdi
pushq $0x20
popq %rsi
movq %r12, %rcx
callq 0x2410
movq %rbx, %rdi
movq %r12, %rsi
callq 0x873f8
movq %r12, %rdi
callq 0x2190
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2220