LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: write_hc_hits_v14(kvec_pe_hit_hap*, char const*)
void write_hc_hits_v14(kvec_pe_hit_hap* i_hits, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
	sprintf(buf, "%s.v14.hic.lk.bin", fn);
    FILE* fp = fopen(buf, "w");
    kvec_pe_hit hits; 
    kv_init(hits.a);
    uint64_t i, m_u = (uint64_t)-1, m_m = (uint64_t)-1;
    pe_hit* p = NULL;
    for (i = 0; i < i_hits->n; i++)
    {
        if(i_hits->a[i].occ1 == 1 && i_hits->a[i].occ2 == 1) 
        {
            kv_pushp(pe_hit, hits.a, &p);
            p->id = i_hits->a[i].id;
            p->s = i_hits->a[i].a[0];
            p->e = i_hits->a[i].a[1];
            m_u = i;
        }
        else
        {
            if(m_m == (uint64_t)-1) m_m = i;
        }
    }
    fprintf(stderr, "m_u: %lu, m_m: %lu, n_u: %lu\n", m_u, m_m, i_hits->n_u);

    fwrite(&hits.a.n, sizeof(hits.a.n), 1, fp);
    fwrite(hits.a.a, sizeof(pe_hit), hits.a.n, fp);

    kv_destroy(hits.a);
    fclose(fp);
    free(buf);
    exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, %rbx
leaq 0xeeb80(%rip), %rsi     # 0x1ed731
xorl %r13d, %r13d
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xfbad9(%rip), %rsi     # 0x1fa6a1
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2210
movq %rax, (%rsp)
pushq $-0x1
popq %rdx
xorl %eax, %eax
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %rdx, %r12
cmpq 0x8(%r15), %r14
jae 0xfec6d
movq (%r15), %rsi
cmpw $0x1, 0x10(%rsi,%r13)
jne 0xfec59
cmpw $0x1, 0x12(%rsi,%r13)
jne 0xfec59
cmpq %rcx, %rbx
jne 0xfec2b
leaq (%rcx,%rcx), %rbp
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rbp
movq %rbp, %rsi
shlq $0x5, %rsi
movq %rax, %rdi
callq 0x2370
movq (%r15), %rsi
movq %rbp, %rcx
leaq 0x1(%rbx), %rdx
shlq $0x5, %rbx
movq 0x8(%rsi,%r13), %rdi
movq %rdi, 0x10(%rax,%rbx)
movq (%rsi,%r13), %rsi
movq (%rsi), %rdi
movq %rdi, (%rax,%rbx)
movq 0x8(%rsi), %rsi
movq %rsi, 0x8(%rax,%rbx)
movq %rdx, %rbx
movq %r14, %rdx
jmp 0xfec61
cmpq $-0x1, %r12
cmoveq %r14, %r12
incq %r14
addq $0x18, %r13
jmp 0xfebe8
leaq 0x10(%rsp), %r13
movq %rbx, (%r13)
movq %rcx, 0x8(%r13)
movq %rax, 0x10(%r13)
movq 0x15435b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq 0x18(%r15), %r8
leaq 0xeeab0(%rip), %rsi     # 0x1ed743
movq %r12, %rcx
xorl %eax, %eax
callq 0x22b0
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rdi
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0x2410
movq (%r13), %rdx
movq 0x10(%r13), %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
movq %r15, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2190
movq 0x8(%rsp), %rdi
callq 0x2220
pushq $0x1
popq %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: load_hc_hits(kvec_pe_hit*, ma_ug_t*, char const*)
int load_hc_hits(kvec_pe_hit* hits, ma_ug_t* ug, const char *fn)
{
    uint64_t flag = 0;
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.lk.bin", fn);

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

    kv_init(hits->a);
    flag += fread(&hits->a.n, sizeof(hits->a.n), 1, fp);
    hits->a.m = hits->a.n; MALLOC(hits->a.a, hits->a.n);
    flag += fread(hits->a.a, sizeof(pe_hit), hits->a.n, fp);
    free(buf);

    if(!test_dbug(ug, fp))
    {
        free(hits->a.a);
        kv_init(hits->a);
        fclose(fp);
        fprintf(stderr, "[M::%s::] ==> Renew Hi-C linkages\n", __func__);
        return 0;
    }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, %r12
leaq 0xee158(%rip), %rsi     # 0x1ed723
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xf20d6(%rip), %rsi     # 0x1f16b7
movq %r12, %rdi
callq 0x2210
testq %rax, %rax
jne 0xff607
movq %r12, %rdi
callq 0x2220
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x22f0
movq (%rbx), %r13
movq %r13, 0x8(%rbx)
movq %r13, %rdi
shlq $0x5, %rdi
callq 0x2280
movq %rax, 0x10(%rbx)
pushq $0x20
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x22f0
movq %r12, %rdi
callq 0x2220
movq %r14, %rdi
movq %r15, %rsi
callq 0x871ea
testl %eax, %eax
jne 0xff6a7
movq 0x10(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r15, %rdi
callq 0x2190
movq 0x153958(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xee1be(%rip), %rsi     # 0x1ed850
leaq 0xee1da(%rip), %rdx     # 0x1ed873
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x22b0
jmp 0xff5f6
movq %r15, %rdi
callq 0x2190
movq 0x15392a(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xee027(%rip), %rsi     # 0x1ed6e7
leaq 0xee1ac(%rip), %rdx     # 0x1ed873
xorl %eax, %eax
callq 0x22b0
pushq $0x1
popq %rbp
jmp 0xff5f6
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: normalize_hc_links(hc_links*)
void normalize_hc_links(hc_links* link)
{
    uint64_t i, k;
    for (i = 0; i < link->a.n; ++i) 
    { 
        for (k = 0; k < link->a.a[i].e.n; k++)
        {
            if(link->a.a[i].e.a[k].del) continue;
            link->a.a[i].e.a[k].weight *= 100;
            link->a.a[i].e.a[k].weight /= (double)(MIN(link->enzymes.a[i], link->enzymes.a[link->a.a[i].e.a[k].uID])); 
            ///link->a.a[i].e.a[k].weight /= (double)(link->enzymes.a[i] + link->enzymes.a[link->a.a[i].e.a[k].uID]); 
        }
    }
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
xorl %ecx, %ecx
movsd 0xebc84(%rip), %xmm0    # 0x1eb590
movq 0xe395c(%rip), %xmm1    # 0x1e3270
movapd 0xe3964(%rip), %xmm2    # 0x1e3280
cmpq %rax, %rcx
je 0xff996
movq 0x10(%rdi), %rsi
imulq $0x30, %rcx, %r8
leaq (%rsi,%r8), %rdx
movq (%rsi,%r8), %rsi
xorl %r8d, %r8d
subq $0x1, %rsi
jb 0xff991
movq 0x10(%rdx), %r9
cmpb $0x0, 0x18(%r9,%r8)
js 0xff98b
movsd (%r9,%r8), %xmm3
mulsd %xmm0, %xmm3
movq 0x28(%rdi), %r10
movq (%r10,%rcx,8), %r11
movl 0x8(%r9,%r8), %ebx
movq (%r10,%rbx,8), %r10
cmpq %r10, %r11
cmovbq %r11, %r10
movq %r10, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
subpd %xmm2, %xmm4
movapd %xmm4, %xmm5
unpckhpd %xmm4, %xmm5            # xmm5 = xmm5[1],xmm4[1]
addsd %xmm4, %xmm5
divsd %xmm5, %xmm3
movsd %xmm3, (%r9,%r8)
addq $0x28, %r8
jmp 0xff934
incq %rcx
jmp 0xff91c
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_rGraph_edge(min_cut_t*, unsigned long, unsigned long)
hc_edge* get_rGraph_edge(min_cut_t* x, uint64_t src, uint64_t dest)
{
    if(src >= x->rGraph.n) return NULL;
    uint64_t i;
    for (i = 0; i < x->rGraph.a[src].n; i++)
    {
        if(x->rGraph.a[src].a[i].del) continue;
        if(x->rGraph.a[src].a[i].uID == dest) return &(x->rGraph.a[src].a[i]);
    }
    return NULL;
}

// Assembly:
cmpq %rsi, (%rdi)
jbe 0xff9d3
movq 0x10(%rdi), %rax
imulq $0x18, %rsi, %rsi
leaq (%rax,%rsi), %rcx
movq (%rax,%rsi), %rsi
xorl %eax, %eax
xorl %edi, %edi
subq $0x1, %rsi
jb 0xff9d5
movq 0x10(%rcx), %r8
cmpb $0x0, 0x18(%r8,%rdi)
js 0xff9cd
movl 0x8(%r8,%rdi), %r9d
cmpq %rdx, %r9
je 0xff9d6
addq $0x28, %rdi
jmp 0xff9b1
xorl %eax, %eax
retq
addq %rdi, %r8
movq %r8, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: destory_min_cut_t(min_cut_t*)
void destory_min_cut_t(min_cut_t* x)
{
    kv_destroy(x->order);
    kv_destroy(x->parent);
    kv_destroy(x->p_weight);
    kv_destroy(x->rGraphSet);
    kv_destroy(x->rGraphVis);
    kv_destroy(x->utgVis);
    kv_destroy(x->bmerVis);
    destory_pdq(&(x->pq));
    uint64_t i;
    for (i = 0; i < x->rGraph.m; i++)
    {
        kv_destroy(x->rGraph.a[i]);
    }
    kv_destroy(x->rGraph);
    kdq_destroy(uint64_t, x->q);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x2220
movq 0x110(%rbx), %rdi
callq 0x2220
movq 0x128(%rbx), %rdi
callq 0x2220
movq 0xa8(%rbx), %rdi
callq 0x2220
movq 0xc0(%rbx), %rdi
callq 0x2220
movq 0xd8(%rbx), %rdi
callq 0x2220
movq 0xf0(%rbx), %rdi
callq 0x2220
leaq 0x30(%rbx), %rdi
callq 0xfa60b
pushq $0x10
popq %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq 0x8(%rbx), %r15
jae 0xffe39
movq (%rdi,%r14), %rdi
callq 0x2220
incq %r15
addq $0x18, %r14
jmp 0xffe1d
callq 0x2220
movq 0xf8(%rbx), %rbx
testq %rbx, %rbx
je 0xffe60
movq 0x18(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: reset_min_cut_t(min_cut_t*, hc_links*)
void reset_min_cut_t(min_cut_t* x, hc_links* link)
{
    ///no need to reset parent[] and q
    uint64_t i, j;
    ///important to have this line
    x->bmerVis.n = x->parent.n = x->p_weight.n = x->order.n = x->rGraph.n = x->rGraphVis.n = x->rGraphSet.n = link->a.n;
    kdq_clear(x->q);

    for (i = 0; i < x->rGraphSet.n; i++)
    {
        x->rGraphVis.a[i] = 0;
        ///x->bmerVis.a[i] = 0;
        ///important to have this line
        x->rGraph.a[i].n = link->a.a[i].e.n;

        if(x->rGraphSet.a[i] == 0) continue;
        for (j = 0; j < x->rGraph.a[i].n; j++)
        {
            x->rGraph.a[i].a[j].weight = link->a.a[i].e.a[j].weight;
        }
        x->rGraphSet.a[i] = 0;
    }
}

// Assembly:
movq (%rsi), %rax
movq %rax, 0x98(%rdi)
movq %rax, 0xb0(%rdi)
movq %rax, (%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x118(%rdi)
movq %rax, 0x100(%rdi)
movq %rax, 0xe0(%rdi)
movq 0xf8(%rdi), %rax
movabsq $-0x400000000000000, %rcx # imm = 0xFC00000000000000
andq %rcx, (%rax)
movq 0xf8(%rdi), %rax
andq $0x0, 0x8(%rax)
xorl %eax, %eax
cmpq 0x98(%rdi), %rax
jae 0xfff25
movq 0xc0(%rdi), %rcx
movb $0x0, (%rcx,%rax)
movq 0x10(%rsi), %r9
imulq $0x30, %rax, %r10
movq (%r9,%r10), %rcx
movq 0x10(%rdi), %rdx
imulq $0x18, %rax, %r11
movq %rcx, (%rdx,%r11)
movq 0xa8(%rdi), %r8
cmpb $0x0, (%r8,%rax)
je 0xfff20
addq %r11, %rdx
addq %r10, %r9
addq $0x10, %r9
xorl %r10d, %r10d
subq $0x1, %rcx
jb 0xfff1b
movq (%r9), %r11
movsd (%r11,%r10), %xmm0
movq 0x10(%rdx), %r11
movsd %xmm0, (%r11,%r10)
addq $0x28, %r10
jmp 0xffefc
movb $0x0, (%r8,%rax)
incq %rax
jmp 0xffeb5
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: update_link_by_min_cut_t(min_cut_t*, hc_links*)
void update_link_by_min_cut_t(min_cut_t* x, hc_links* link)
{
    uint64_t i, j;

    for (i = 0; i < link->a.n; i++)
    {
        for (j = 0; j < link->a.a[i].e.n; j++)
        {
            link->a.a[i].e.a[j].del = x->rGraph.a[i].a[j].del;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
xorl %eax, %eax
movabsq $0x18, %rcx
cmpq (%rsi), %rax
jae 0xfff85
imulq $0x30, %rax, %rdx
imulq $0x18, %rax, %r8
movq %rcx, %r9
xorl %r10d, %r10d
movq 0x10(%rsi), %r11
cmpq (%r11,%rdx), %r10
jae 0xfff80
addq %rdx, %r11
movq 0x10(%rdi), %rbx
movq 0x10(%rbx,%r8), %rbx
movb (%rbx,%r9), %bl
andb $-0x80, %bl
movq 0x10(%r11), %r11
movb (%r11,%r9), %bpl
andb $0x7f, %bpl
orb %bl, %bpl
movb %bpl, (%r11,%r9)
incq %r10
addq $0x28, %r9
jmp 0xfff47
incq %rax
jmp 0xfff34
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: maxFlow(unsigned long, unsigned long, min_cut_t*)
uint64_t maxFlow(uint64_t src, uint64_t dest, min_cut_t* x)
{
    double flow = 0, max_flow = 0;
    uint64_t v, u;
    hc_edge *p;

    while (bfs_flow(src, dest, x, NULL))
    {
        kdq_clear(x->q);
        flow = DBL_MAX;
        for (v = dest; v != src; v = x->parent.a[v])
        {
            flow = MIN(flow, x->p_weight.a[v]);
        }

        /*******************************for debug************************************/
        // if(src == 26818) fprintf(stderr, "***********flow: %f*********\n", flow);
        /*******************************for debug************************************/

        for (v = dest; v != src; v = x->parent.a[v])
        {
            u = x->parent.a[v];
            p = get_rGraph_edge(x, u, v);

            /*******************************for debug************************************/
            // if(src == 26818) fprintf(stderr, "utg%.6lul (%f)\n", u+1, p->weight);
            /*******************************for debug************************************/

            p->weight -= flow;
            p = get_rGraph_edge(x, v, u);
            p->weight += flow;
            x->rGraphSet.a[u] = x->rGraphSet.a[v] = 1;
        }

        max_flow += flow;
    }
    
    return (max_flow != 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movb $0x1, %bpl
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x100412
testq %rax, %rax
je 0x1008bf
movq 0xf8(%rbx), %rax
movabsq $-0x400000000000000, %rcx # imm = 0xFC00000000000000
andq %rcx, (%rax)
movq 0xf8(%rbx), %rax
andq $0x0, 0x8(%rax)
movq %r14, %rax
movsd 0xe2d6d(%rip), %xmm0    # 0x1e3560
movaps %xmm0, 0x10(%rsp)
cmpq %r15, %rax
je 0x10083a
movq 0x110(%rbx), %rcx
movq 0x128(%rbx), %rdx
movsd (%rdx,%rax,8), %xmm0
movapd 0x10(%rsp), %xmm3
movapd %xmm3, %xmm1
cmplesd %xmm0, %xmm1
movapd %xmm1, %xmm2
andnpd %xmm0, %xmm2
andpd %xmm3, %xmm1
orpd %xmm2, %xmm1
movl (%rcx,%rax,4), %eax
movapd %xmm1, 0x10(%rsp)
jmp 0x1007f8
movq %r14, %r12
cmpq %r15, %r12
je 0x1008a8
movq 0x110(%rbx), %rax
movl (%rax,%r12,4), %r13d
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xff998
movsd (%rax), %xmm0
subsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xff998
movsd (%rax), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xa8(%rbx), %rax
movb %bpl, (%rax,%r12)
movq 0xa8(%rbx), %rax
movb %bpl, (%rax,%r13)
movq 0x110(%rbx), %rax
movl (%rax,%r12,4), %r12d
jmp 0x10083d
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x1007af
xorpd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
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: print_path(unsigned long, unsigned long, min_cut_t*)
uint64_t print_path(uint64_t src, uint64_t dest, min_cut_t* x)
{
    double flow = 0, max_flow = 0;
    uint64_t v, u;
    hc_edge *p;

    if(bfs_flow(src, dest, x, NULL))
    {
        kdq_clear(x->q);
        flow = DBL_MAX;
        for (v = dest; v != src; v = x->parent.a[v])
        {
            flow = MIN(flow, x->p_weight.a[v]);
        }

        /*******************************for debug************************************/
        fprintf(stderr, "***********flow: %f*********\n", flow);
        /*******************************for debug************************************/

        for (v = dest; v != src; v = x->parent.a[v])
        {
            u = x->parent.a[v];
            p = get_rGraph_edge(x, u, v);

            /*******************************for debug************************************/
            fprintf(stderr, "utg%.6lul (%f)\n", u+1, p->weight);
            /*******************************for debug************************************/
        }

        max_flow += flow;
    }
    
    return (max_flow != 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ecx, %ecx
callq 0x100412
testq %rax, %rax
jne 0x10091d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf8(%rbx), %rax
movabsq $-0x400000000000000, %rcx # imm = 0xFC00000000000000
andq %rcx, (%rax)
movq 0xf8(%rbx), %rax
andq $0x0, 0x8(%rax)
movsd 0xe2c1b(%rip), %xmm0    # 0x1e3560
movq %r14, %rax
cmpq %r15, %rax
je 0x100982
movq 0x110(%rbx), %rcx
movq 0x128(%rbx), %rdx
movsd (%rdx,%rax,8), %xmm3
movapd %xmm0, %xmm1
cmplesd %xmm3, %xmm1
movapd %xmm1, %xmm2
andnpd %xmm3, %xmm2
andpd %xmm0, %xmm1
orpd %xmm2, %xmm1
movl (%rcx,%rax,4), %eax
movapd %xmm1, %xmm0
jmp 0x100948
movq 0x152657(%rip), %rbp    # 0x252fe0
movq (%rbp), %rdi
leaq 0xecf4c(%rip), %rsi     # 0x1ed8e0
movapd %xmm0, (%rsp)
movb $0x1, %al
callq 0x22b0
leaq 0xecf57(%rip), %r12     # 0x1ed8fe
cmpq %r15, %r14
je 0x1009ea
movq 0x110(%rbx), %rax
movl (%rax,%r14,4), %r13d
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xff998
movq (%rbp), %rdi
incq %r13
movsd (%rax), %xmm0
movq %r12, %rsi
movq %r13, %rdx
movb $0x1, %al
callq 0x22b0
movq 0x110(%rbx), %rax
movl (%rax,%r14,4), %r14d
jmp 0x1009a7
xorpd %xmm0, %xmm0
movapd (%rsp), %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %r12
andl $0x1, %r12d
jmp 0x10090b
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: print_src_dest(unsigned long, min_cut_t*, char const*)
void print_src_dest(uint64_t src, min_cut_t* x, const char* command)
{
    uint64_t i;
    fprintf(stderr, "********************\n%s\n", command);
    if(src >= x->n)
    {
        for (i = 0; i < x->rGraph.a[src].n; i++)
        {
            if(x->rGraph.a[src].a[i].del) continue;
            fprintf(stderr, "utg%.6ul\n", x->rGraph.a[src].a[i].uID + 1);
        }
        
    }
    else
    {
        fprintf(stderr, "utg%.6lul\n", src+1);
    }
    fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!\n");
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1525c2(%rip), %r15    # 0x252fe0
movq (%r15), %rdi
leaq 0xecee6(%rip), %rsi     # 0x1ed90e
xorl %eax, %eax
callq 0x22b0
cmpq %r14, 0x148(%rbx)
jbe 0x100a72
movq (%r15), %rdi
incq %r14
leaq 0xecee2(%rip), %rsi     # 0x1ed927
movq %r14, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%r15), %rcx
leaq 0xeced9(%rip), %rdi     # 0x1ed932
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
pushq $0x18
popq %r12
imulq $0x18, %r14, %r13
leaq 0xed039(%rip), %r14     # 0x1edaba
xorl %ebp, %ebp
movq 0x10(%rbx), %rax
cmpq (%rax,%r13), %rbp
jae 0x100a4f
addq %r13, %rax
movq 0x10(%rax), %rax
cmpb $0x0, (%rax,%r12)
jns 0x100aa4
incq %rbp
addq $0x28, %r12
jmp 0x100a83
movq (%r15), %rdi
movl -0x10(%rax,%r12), %edx
incl %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
jmp 0x100a9b
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: print_debug_rGraph(min_cut_t*)
void print_debug_rGraph(min_cut_t* x)
{
    fprintf(stderr, "******rGraph******\n");
    uint64_t i, j, u;
    for (i = 0; i < x->rGraphVis.n; i++)
    {
        if(!x->bmerVis.a[i]) continue;
        for (j = 0; j < x->rGraph.a[i].n; j++)
        {
            if(x->rGraph.a[i].a[j].del) continue;
            u = x->rGraph.a[i].a[j].uID;
            if(!x->bmerVis.a[u]) continue;
            fprintf(stderr, "***utg%.6lul\tutg%.6lul\t%f\n", i+1, u+1, x->rGraph.a[i].a[j].weight);    
        }
    }
    fprintf(stderr, "******rGraph******\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x152511(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xece6f(%rip), %rdi     # 0x1ed948
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %r15d, %r15d
leaq 0xece6e(%rip), %r14     # 0x1ed95c
cmpq 0xb0(%rbx), %r15
jae 0x100b67
movq %r15, %rax
movq 0xf0(%rbx), %rcx
incq %r15
cmpb $0x0, (%rcx,%rax)
je 0x100aee
imulq $0x18, %rax, %r13
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
leaq (%rcx,%r13), %rax
cmpq (%rcx,%r13), %r12
jae 0x100aee
movq 0x10(%rax), %rax
cmpb $0x0, 0x18(%rax,%rbp)
js 0x100b3d
movl 0x8(%rax,%rbp), %ecx
movq 0xf0(%rbx), %rdx
cmpb $0x0, (%rdx,%rcx)
jne 0x100b46
incq %r12
addq $0x28, %rbp
jmp 0x100b13
movq 0x152493(%rip), %rdx    # 0x252fe0
movq (%rdx), %rdi
incq %rcx
movsd (%rax,%rbp), %xmm0
movq %r14, %rsi
movq %r15, %rdx
movb $0x1, %al
callq 0x22b0
jmp 0x100b3d
movq 0x152472(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xecdd0(%rip), %rdi     # 0x1ed948
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: check_connective(min_cut_t*, hc_links*)
void check_connective(min_cut_t* x, hc_links* link)
{
    double index_time = yak_realtime();
    kvec_t_u64_warp buff;
    kv_init(buff.a);
    uint64_t i, k, uID;
    for (i = 0; i < x->n; i++)
    {
        uID = x->order.a[i] & x->uID_mode;
        if(link->a.a[uID].f.n == 0) continue;
        for (k = 0; k < link->a.a[uID].f.n; k++)
        {
            if(link->a.a[uID].f.a[k].del) continue;
            if(x->utgVis.a[link->a.a[uID].f.a[k].uID] == 0) break;
        }
        if(k == link->a.a[uID].f.n) continue;
        reset_min_cut_t(x, link);
        get_s_t(x, link, uID, &(x->src), &(x->dest), &buff);

        bfs_flow(x->src, x->dest, x, NULL);

        x->utgVis.a[uID] = 1;
    }

    //reset x.utgVis
    memset(x->utgVis.a, 0, x->utgVis.n);
    kv_destroy(buff.a);
    fprintf(stderr, "[M::%s::%.3f] \n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xefea7
movsd %xmm0, 0x8(%rsp)
leaq 0x150(%rbx), %r15
leaq 0x158(%rbx), %r12
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movapd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
cmpq 0x148(%rbx), %r13
jae 0x100de8
movq 0x28(%rbx), %rax
movq 0x138(%rbx), %rbp
andq (%rax,%r13,8), %rbp
movq 0x10(%r14), %rcx
imulq $0x30, %rbp, %rdx
movq 0x18(%rcx,%rdx), %rax
testq %rax, %rax
je 0x100de0
addq %rdx, %rcx
addq $0x18, %rcx
movq 0x10(%rcx), %rcx
addq $0x18, %rcx
movq %rax, %rdx
subq $0x1, %rdx
jb 0x100de0
cmpb $0x0, (%rcx)
js 0x100d8b
movq 0xd8(%rbx), %rsi
movl -0x10(%rcx), %edi
cmpb $0x0, (%rsi,%rdi)
je 0x100d94
addq $0x28, %rcx
movq %rdx, %rax
jmp 0x100d70
testq %rax, %rax
je 0x100de0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xffe66
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq %r12, %r8
leaq 0x10(%rsp), %r9
callq 0x100328
movq 0x150(%rbx), %rdi
movq 0x158(%rbx), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x100412
movq 0xd8(%rbx), %rax
movb $0x1, (%rax,%rbp)
incq %r13
jmp 0x100d2c
movq 0xc8(%rbx), %rdx
movq 0xd8(%rbx), %rdi
xorl %esi, %esi
callq 0x20e0
movq 0x20(%rsp), %rdi
callq 0x2220
movq 0x1521d2(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd 0x8(%rsp), %xmm0
leaq 0xecb67(%rip), %rsi     # 0x1ed98a
leaq 0xecb70(%rip), %rdx     # 0x1ed99a
movq %rbx, %rdi
movb $0x1, %al
addq $0x38, %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: get_Connected_Components(min_cut_t*)
void get_Connected_Components(min_cut_t* x)
{
    double index_time = yak_realtime();
    uint64_t i, j, k = 0, uID, e;
    kvec_t_u64_warp buff;
    kv_init(buff.a);
    while (1)
    {
        for (i = 0; i < x->n; i++)
        {
            uID = x->order.a[i] & x->uID_mode;
            if(x->rGraphVis.a[uID] == 0) break;
        }
        if(i < x->n)
        {
            e = buff.a.n = 0;
            bfs_flow(uID, (uint64_t)-1, x, &buff);
            for (i = 0; i < buff.a.n; i++)
            {
                for (j = 0; j < x->rGraph.a[buff.a.a[i]].n; j++)
                {
                    if(x->rGraph.a[buff.a.a[i]].a[j].del == 0) e++;
                }
            }
            e >>= 1;
            if(buff.a.n > 1)
            {
                fprintf(stderr, "(%lu) Component: # nodes: %lu, # edges: %lu\n", 
                                                                k, (uint64_t)buff.a.n, e);
            }
            k++;
        }
        else
        {
            break;
        }
    }

    kv_destroy(buff.a);
    fprintf(stderr, "[M::%s::%.3f] # Connected Components: %lu\n", 
    __func__, yak_realtime()-index_time, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
callq 0xefea7
movsd %xmm0, 0x8(%rsp)
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movapd %xmm0, (%r15)
andq $0x0, 0x10(%r15)
pushq $-0x1
popq %r12
movq 0x152164(%rip), %rbp    # 0x252fe0
pushq $0x18
popq %r13
xorl %ebx, %ebx
movq 0x148(%r14), %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x100f3b
movq 0x138(%r14), %rdi
movq 0x28(%r14), %rdx
andq (%rdx,%rcx,8), %rdi
movq 0xc0(%r14), %rdx
incq %rcx
cmpb $0x0, (%rdx,%rdi)
jne 0x100e8b
andq $0x0, 0x10(%rsp)
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x100412
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq %rcx, %rdx
je 0x100f13
imulq $0x18, (%rax,%rdx,8), %rdi
movq 0x10(%r14), %r9
leaq (%r9,%rdi), %rsi
movq (%r9,%rdi), %rdi
movq %r13, %r9
subq $0x1, %rdi
jb 0x100f0e
movq 0x10(%rsi), %r10
xorl %r11d, %r11d
cmpb $0x0, (%r10,%r9)
setns %r11b
addq %r11, %r8
addq $0x28, %r9
jmp 0x100eef
incq %rdx
jmp 0x100ed6
cmpq $0x2, %rcx
jae 0x100f21
incq %rbx
jmp 0x100e82
shrq %r8
movq (%rbp), %rdi
leaq 0xeca7c(%rip), %rsi     # 0x1ed9ab
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0x100f19
movq 0x20(%rsp), %rdi
callq 0x2220
movq (%rbp), %r14
callq 0xefea7
subsd 0x8(%rsp), %xmm0
leaq 0xeca7d(%rip), %rsi     # 0x1ed9d8
leaq 0xecaa1(%rip), %rdx     # 0x1eda03
movq %r14, %rdi
movq %rbx, %rcx
movb $0x1, %al
callq 0x22b0
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: print_rGraph(min_cut_t*)
void print_rGraph(min_cut_t* x)
{
    uint64_t i, k;
    for (i = 0; i < x->rGraph.n; ++i) 
    { 
        for (k = 0; k < x->rGraph.a[i].n; k++)
        {
            if(x->rGraph.a[i].a[k].del) continue;
            fprintf(stderr, "src(utg%.6dl, enz:%lu)\tdes(utg%.6dl, enz:%lu)\t%f\n", 
            (int)(i+1), x->enzymes[i], 
            (int)(x->rGraph.a[i].a[k].uID+1), x->enzymes[x->rGraph.a[i].a[k].uID], 
            x->rGraph.a[i].a[k].weight);    
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
cmpq (%rbx), %r15
jae 0x101003
leal 0x1(%r15), %ebp
imulq $0x18, %r15, %r13
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
cmpq (%rax,%r13), %r14
jae 0x100ffe
addq %r13, %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x18(%rax,%r12)
jns 0x100fc4
incq %r14
addq $0x28, %r12
jmp 0x100fa2
movq 0x152015(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movq 0x130(%rbx), %rdx
movq (%rdx,%r15,8), %rcx
movl 0x8(%rax,%r12), %esi
leal 0x1(%rsi), %r8d
movq (%rdx,%rsi,8), %r9
movsd (%rax,%r12), %xmm0
leaq 0xeca29(%rip), %rsi     # 0x1eda1c
movl %ebp, %edx
movb $0x1, %al
callq 0x22b0
jmp 0x100fbb
incq %r15
jmp 0x100f8f
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: select_large_node(ma_ug_t const*, min_cut_t*, unsigned long, unsigned long, unsigned long, int)
int select_large_node(const ma_ug_t *ug, min_cut_t* x, 
uint64_t src, uint64_t dest, uint64_t utg_thres, int weight_thres)
{
    if(src >= ug->u.n || dest >= ug->u.n) return 0;
    if(ug->u.a[src].n < utg_thres || ug->u.a[dest].n < utg_thres) return 0;

    uint64_t k;
    for (k = 0; k < x->rGraph.a[src].n; k++)
    {
        if(x->rGraph.a[src].a[k].del) continue;
        if(x->rGraph.a[src].a[k].weight >= weight_thres) break;
    }
    if(k == x->rGraph.a[src].n) return 0;

    src = dest;
    for (k = 0; k < x->rGraph.a[src].n; k++)
    {
        if(x->rGraph.a[src].a[k].del) continue;
        if(x->rGraph.a[src].a[k].weight >= weight_thres) break;
    }
    if(k == x->rGraph.a[src].n) return 0;

    return 1;
}

// Assembly:
movq (%rdi), %rax
cmpq %rdx, %rax
setbe %r10b
cmpq %rcx, %rax
setbe %r11b
xorl %eax, %eax
orb %r10b, %r11b
jne 0x10104a
movq 0x10(%rdi), %rdi
imulq $0x28, %rdx, %r10
movl 0x10(%rdi,%r10), %r10d
cmpq %r8, %r10
jb 0x10104a
imulq $0x28, %rcx, %r10
movl 0x10(%rdi,%r10), %edi
cmpq %r8, %rdi
jae 0x10104b
retq
movq 0x10(%rsi), %rsi
imulq $0x18, %rdx, %rax
leaq (%rsi,%rax), %rdx
cvtsi2sd %r9d, %xmm0
movq (%rsi,%rax), %rdi
xorl %eax, %eax
xorl %r8d, %r8d
movq %rdi, %r9
subq $0x1, %r9
jb 0x10104a
movq 0x10(%rdx), %r10
cmpb $0x0, 0x18(%r10,%r8)
js 0x101086
movsd (%r10,%r8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x10108f
addq $0x28, %r8
movq %r9, %rdi
jmp 0x101068
testq %rdi, %rdi
je 0x10104a
imulq $0x18, %rcx, %rcx
leaq (%rsi,%rcx), %rax
movq (%rsi,%rcx), %rcx
xorl %esi, %esi
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x1010c8
movq 0x10(%rax), %rdi
cmpb $0x0, 0x18(%rdi,%rsi)
js 0x1010bf
movsd (%rdi,%rsi), %xmm1
ucomisd %xmm0, %xmm1
jae 0x1010cb
incq %rdx
addq $0x28, %rsi
jmp 0x1010a4
movq %rcx, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_bmer_unitgs(min_cut_t*, bubble_type const*, unsigned long, unsigned long)
void get_bmer_unitgs(min_cut_t* x, const bubble_type* bub, uint64_t k, uint64_t src)
{
    uint32_t beg, sink, n, *a;
    if(!IF_BUB(src, *bub)) return;
    get_bubbles((bubble_type*)bub, bub->index[src], &beg, &sink, &a, &n, NULL);
    memset(x->bmerVis.a, 0, x->bmerVis.n);
    ///select_bmer(src, k, bub, x, 1);
    select_bmer_distance(beg^1, k, bub, x, 1, 1);
    select_bmer_distance(sink^1, k, bub, x, 1, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq (%rsi), %rax
movq 0x80(%rsi), %rdx
movl (%rax,%rcx,4), %esi
incq %rdx
cmpq %rsi, %rdx
jbe 0x1016e8
movq %rdi, %rbx
andq $0x0, (%rsp)
leaq 0x1c(%rsp), %r13
leaq 0x18(%rsp), %r12
leaq 0x20(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %r14, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf6ab5
movq 0xe0(%rbx), %rdx
movq 0xf0(%rbx), %rdi
xorl %esi, %esi
callq 0x20e0
movl (%r13), %edi
xorl $0x1, %edi
pushq $0x1
popq %rbp
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x101435
movl (%r12), %edi
xorl $0x1, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x101435
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: init_G_partition(G_partition*, unsigned long)
void init_G_partition(G_partition* x, uint64_t n_utg)
{
    uint64_t i;
    kv_init(*x);
    MALLOC(x->index, n_utg);
    for (i = 0; i < n_utg; i++)
    {
        x->index[i] = (uint32_t)-1;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,4), %rdi
callq 0x2280
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rax, 0x18(%r14)
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x1018fc
orl $-0x1, (%rax,%rcx,4)
incq %rcx
jmp 0x1018ee
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: reset_G_partition(G_partition*, unsigned long)
void reset_G_partition(G_partition* x, uint64_t n_utg)
{
    uint64_t i;
    x->n = 0;
    for (i = 0; i < n_utg; i++)
    {
        x->index[i] = (uint32_t)-1;
    }
}

// Assembly:
andq $0x0, (%rdi)
xorl %eax, %eax
cmpq %rax, %rsi
je 0x10191c
movq 0x18(%rdi), %rcx
orl $-0x1, (%rcx,%rax,4)
incq %rax
jmp 0x10190a
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: destory_G_partition(G_partition*)
void destory_G_partition(G_partition* x)
{
    uint64_t i;
    for (i = 0; i < x->n; i++)
    {
        kv_destroy(x->a[i].a);
    }
    kv_destroy(*x);
    free(x->index);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x10
popq %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x101947
movq (%rdi,%r14), %rdi
callq 0x2220
incq %r15
addq $0x48, %r14
jmp 0x10192c
callq 0x2220
movq 0x18(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_hc_weight(unsigned int, unsigned int, unsigned int, bub_p_t_warp*, min_cut_t*)
double get_hc_weight(uint32_t query, uint32_t v0, uint32_t root, bub_p_t_warp *b, min_cut_t* x)
{
    if(v0 == root) return 0;
    uint32_t v, u;
    hc_edge *p = NULL;
    double weight = 0;
    v = v0;
    do {
		u = b->a[v].p; // u->v
        p = get_rGraph_edge(x, query>>1, v>>1);
        if(p) weight += p->weight;
		v = u;
	} while (v != root);

    return weight;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl %edx, %esi
je 0x1019c0
movq %r8, %rbx
movl %edx, %ebp
movl %esi, %r15d
movl %edi, %r14d
movq (%rcx), %r12
shrl %r14d
movsd %xmm0, 0x8(%rsp)
movl %r15d, %edx
movl %r15d, %eax
imulq $0x38, %rax, %rax
movl (%r12,%rax), %r15d
shrl %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xff998
testq %rax, %rax
je 0x1019bb
movsd 0x8(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl %ebp, %r15d
jne 0x10198b
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: set_path(bub_p_t_warp*, unsigned int, unsigned char*, unsigned char)
void set_path(bub_p_t_warp *b, uint32_t root, uint8_t* flag, uint8_t label)
{
    uint32_t v, u;
    ///v is the sink of this bubble
	v = b->S.a[0];
    do {
		u = b->a[v].p; // u->v
        flag[v>>1] |= label;
		v = u;
	} while (v != root);
    flag[b->S.a[0]>>1] = 0;
}

// Assembly:
movq 0x18(%rdi), %rax
movl (%rax), %eax
movq (%rdi), %r8
movl %eax, %r9d
imulq $0x38, %r9, %r9
movl (%r8,%r9), %r8d
shrl %eax
orb %cl, (%rdx,%rax)
movl %r8d, %eax
cmpl %esi, %r8d
jne 0x1019d9
movq 0x18(%rdi), %rax
movl (%rax), %eax
shrl %eax
movb $0x0, (%rdx,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: get_co_weight(unsigned int*, unsigned int, unsigned int*, unsigned int, min_cut_t*)
double get_co_weight(uint32_t *query, uint32_t query_n, uint32_t *target, uint32_t target_n, min_cut_t* m)
{
    double weight = 0;
    hc_edge *p = NULL;
    uint32_t i, k;
    for (i = 0; i < query_n; i++)
    {
        for (k = 0; k < target_n; k++)
        {
            p = get_rGraph_edge(m, query[i], target[k]);
            if(p) weight += p->weight;
        }
    }

    return weight;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %eax
movq %rax, 0x10(%rsp)
movl %ecx, %r13d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
cmpq 0x10(%rsp), %rbp
je 0x102064
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x10205f
movl (%r15,%rbp,4), %esi
movl (%r14,%r12,4), %edx
movq %rbx, %rdi
callq 0xff998
testq %rax, %rax
je 0x10205a
movsd 0x8(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
incq %r12
jmp 0x102030
incq %rbp
jmp 0x102026
movsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: clean_bubbles(hc_links*, bubble_type*, min_cut_t*, ma_ug_t const*)
G_partition* clean_bubbles(hc_links* link, bubble_type* bub, min_cut_t* m, const ma_ug_t *ug)
{
    double index_time = yak_realtime();
    uint64_t i;
    bub_p_t_warp b; 
    memset(&b, 0, sizeof(bub_p_t_warp));
    CALLOC(b.a, ug->g->n_seq*2); 
    uint8_t* flag = NULL;
    CALLOC(flag, ug->g->n_seq);
    G_partition* x; CALLOC(x, 1);
    init_G_partition(x, ug->g->n_seq);

    for (i = 0; i < bub->f_bub; i++)
    {
        phase_bubble(i, &b, bub, flag, ug, m, link, x);
    }

    free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a);
    free(flag);
    fprintf(stderr, "[M::%s::%.3f]\n", __func__, yak_realtime()-index_time);
    ///print_phased_bubble(x, bub, ug->g->n_seq);

    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r13
callq 0xefea7
movsd %xmm0, 0x8(%rsp)
xorpd %xmm0, %xmm0
leaq 0x18(%rsp), %r15
movupd %xmm0, 0x58(%r15)
movupd %xmm0, 0x48(%r15)
movupd %xmm0, 0x38(%r15)
movupd %xmm0, 0x28(%r15)
movupd %xmm0, 0x18(%r15)
andq $0x0, 0x68(%r15)
movupd %xmm0, 0x8(%r15)
movq %rbx, %r14
movq 0x18(%rbx), %rax
movl 0x14(%rax), %ebx
leal (%rbx,%rbx), %edi
pushq $0x38
popq %rsi
callq 0x2120
movq %rax, (%r15)
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
pushq $0x1
popq %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
movq %rax, %rbp
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1018c5
xorl %ebx, %ebx
cmpq 0x80(%r12), %rbx
jae 0x1027f9
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %r14, %r8
movq 0x10(%rsp), %r9
pushq %r15
pushq %r13
callq 0x102079
popq %rax
popq %rcx
incq %rbx
jmp 0x1027c9
movq 0x18(%rsp), %rdi
callq 0x2220
movq 0x30(%rsp), %rdi
callq 0x2220
movq 0x48(%rsp), %rdi
callq 0x2220
movq 0x60(%rsp), %rdi
callq 0x2220
movq 0x78(%rsp), %rdi
callq 0x2220
movq %rbp, %rdi
callq 0x2220
movq 0x1507a6(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd 0x8(%rsp), %xmm0
leaq 0xeb28c(%rip), %rsi     # 0x1edadb
leaq 0xeb294(%rip), %rdx     # 0x1edaea
movq %rbx, %rdi
movb $0x1, %al
callq 0x22b0
movq %r15, %rax
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_hic_distance(pe_hit*, hc_links*, ha_ug_index const*, unsigned int*)
uint64_t get_hic_distance(pe_hit* hit, hc_links* link, const ha_ug_index* idx, uint32_t *is_cc)
{
    uint64_t s_uid, s_dir, e_uid, e_dir, u_dis, k;
    long long s_pos, e_pos;
    s_uid = ((hit->s<<1)>>(64 - idx->uID_bits)); s_pos = hit->s & idx->pos_mode;
    e_uid = ((hit->e<<1)>>(64 - idx->uID_bits)); e_pos = hit->e & idx->pos_mode;
    if(s_uid == e_uid)
    {
        if(is_cc) (*is_cc) = 1;
        return MAX(s_pos, e_pos) - MIN(s_pos, e_pos);
    } 
    hc_linkeage* t = &(link->a.a[s_uid]);
    for (k = 0; k < t->e.n; k++)
    {
        if(t->e.a[k].del || t->e.a[k].uID != e_uid) continue;
        if(is_cc) (*is_cc) = t->e.a[k].is_cc;
        s_dir = (!!(t->e.a[k].dis&(uint64_t)2));
        e_dir = (!!(t->e.a[k].dis&(uint64_t)1));
        u_dis = (t->e.a[k].dis ==(uint64_t)-1? (uint64_t)-1 : t->e.a[k].dis>>3);
        // if(s_uid == 24684 && s_pos == 124953 && e_uid == 16950 && e_pos == 93039)
        // {
        //     fprintf(stderr, "*****************s_dir: %lu, e_dir: %lu, u_dis: %lu\n", s_dir, e_dir, u_dis);
        // }
        if(u_dis == (uint64_t)-1) return (uint64_t)-1;
        if(s_dir == 1) s_pos = (long long)idx->ug->g->seq[s_uid].len - s_pos - 1;
        if(e_dir == 1) e_pos = (long long)idx->ug->g->seq[e_uid].len - e_pos - 1;
        e_pos = e_pos + u_dis - (long long)idx->ug->g->seq[e_uid].len;
        return MAX(s_pos, e_pos) - MIN(s_pos, e_pos);
    }

    return (uint64_t)-1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rax
movq (%rdi), %r8
movq 0x8(%rdi), %rdi
leaq (%r8,%r8), %r10
xorl %ecx, %ecx
subb 0x18(%rdx), %cl
shrq %cl, %r10
leaq (%rdi,%rdi), %r9
shrq %cl, %r9
movq 0x30(%rdx), %rcx
andq %rcx, %r8
andq %rcx, %rdi
cmpq %r9, %r10
jne 0x1028c2
testq %rax, %rax
je 0x1028b0
movl $0x1, (%rax)
subq %rdi, %r8
movq %r8, %rax
negq %rax
cmovsq %r8, %rax
jmp 0x102975
movq 0x10(%rsi), %rcx
imulq $0x30, %r10, %r11
leaq (%rcx,%r11), %rsi
movq (%rcx,%r11), %r11
movabsq $0x18, %rcx
subq $0x1, %r11
jb 0x10296b
movq 0x10(%rsi), %rbx
movsbl (%rbx,%rcx), %ebp
testl %ebp, %ebp
js 0x1028fc
movl -0x10(%rbx,%rcx), %r14d
cmpq %r14, %r9
je 0x102902
addq $0x28, %rcx
jmp 0x1028dc
testq %rax, %rax
je 0x102909
movl %ebp, (%rax)
movq -0x8(%rbx,%rcx), %rcx
cmpq $-0x1, %rcx
je 0x10296b
movq %rcx, %rax
shrq $0x3, %rax
movq (%rdx), %rdx
testb $0x2, %cl
je 0x10293b
movq 0x18(%rdx), %rsi
movq 0x20(%rsi), %rsi
movl (%rsi,%r10,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
notq %r8
addq %rsi, %r8
movq 0x18(%rdx), %rdx
movq 0x20(%rdx), %rdx
movl (%rdx,%r9,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %rdi, %rsi
notq %rsi
addq %rdx, %rsi
testb $0x1, %cl
cmoveq %rdi, %rsi
addq %rsi, %rax
subq %rax, %r8
addq %rdx, %r8
jmp 0x1028b3
movabsq $-0x1, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: weight_edges_advance(ha_ug_index*, kvec_pe_hit*, hc_links*, bubble_type*, trans_idx*)
void weight_edges_advance(ha_ug_index* idx, kvec_pe_hit* hits, hc_links* link, bubble_type* bub, trans_idx* dis)
{
    uint64_t k, i, shif = 64 - idx->uID_bits, beg, end, t_d;
    hc_edge *e1 = NULL, *e2 = NULL;
    long double weight;

    for (i = 0; i < link->a.n; i++)
    {
        for (k = 0; k < link->a.a[i].e.n; k++)
        {
            if(link->a.a[i].e.a[k].del) continue;
            link->a.a[i].e.a[k].weight = 0;
        }
    }

    for (k = 0; k < hits->a.n; ++k) 
    {
        beg = ((hits->a.a[k].s<<1)>>shif);
        end = ((hits->a.a[k].e<<1)>>shif);

        if(beg == end) continue;
        if(IF_HOM(beg, *bub)) continue;
        if(IF_HOM(end, *bub)) continue;
        
        t_d = get_hic_distance(&(hits->a.a[k]), link, idx, NULL);
        if(t_d == (uint64_t)-1) continue;

        e1 = get_hc_edge(link, beg, end, 0);
        e2 = get_hc_edge(link, end, beg, 0);
        if(e1 == NULL || e2 == NULL) continue;
        weight = 1;
        if(dis)
        {
            weight = get_trans_weight_advance(idx, t_d, dis);
        }
        
        e1->weight += weight; e1->occ++;
        e2->weight += weight; e2->occ++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r11
movq %rsi, %r12
movq %rdi, 0x18(%rsp)
movq 0x18(%rdi), %rax
movq (%rdx), %rcx
xorl %ebx, %ebx
cmpq %rcx, %rbx
je 0x102c49
movq 0x10(%rdx), %rdi
imulq $0x30, %rbx, %r9
leaq (%rdi,%r9), %rsi
movq (%rdi,%r9), %rdi
xorl %r10d, %r10d
subq $0x1, %rdi
jb 0x102c44
movq 0x10(%rsi), %r9
cmpb $0x0, 0x18(%r9,%r10)
js 0x102c3e
andq $0x0, (%r9,%r10)
addq $0x28, %r10
jmp 0x102c27
incq %rbx
jmp 0x102c0f
movq %rdx, 0x10(%rsp)
movq %r8, 0x20(%rsp)
pushq $0x40
popq %rbp
subq %rax, %rbp
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r11, 0x8(%rsp)
cmpq (%r12), %r15
jae 0x102d64
movq 0x10(%r12), %rdi
movq (%rdi,%r14), %rbx
addq %rbx, %rbx
movl %ebp, %ecx
shrq %cl, %rbx
movq 0x8(%rdi,%r14), %r13
addq %r13, %r13
shrq %cl, %r13
cmpq %r13, %rbx
je 0x102d58
movq (%r11), %rcx
movq 0x80(%r11), %rax
movl (%rcx,%rbx,4), %edx
incq %rax
cmpq %rdx, %rax
jb 0x102d58
movl (%rcx,%r13,4), %ecx
cmpq %rcx, %rax
jb 0x102d58
addq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x102875
movq 0x8(%rsp), %r11
movq %rax, 0x28(%rsp)
cmpq $-0x1, %rax
je 0x102d58
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0xfcabc
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %rax, %r13
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xfcabc
movq 0x8(%rsp), %r11
testq %r13, %r13
je 0x102d58
movq %rax, %rbx
testq %rax, %rax
je 0x102d58
fld1
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
je 0x102d42
fstp %st(0)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1216b6
movq 0x8(%rsp), %r11
movsd %xmm0, 0x30(%rsp)
fldl 0x30(%rsp)
fld %st(0)
faddl (%r13)
fstpl (%r13)
incq 0x20(%r13)
faddl (%rbx)
fstpl (%rbx)
incq 0x20(%rbx)
incq %r15
addq $0x20, %r14
jmp 0x102c64
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: connect_bub_occ(bubble_type*, unsigned int, unsigned int)
uint32_t connect_bub_occ(bubble_type* bub, uint32_t root_id, uint32_t check_het)
{
    uint64_t id0, id1, occ = 2;  
    get_bub_id(bub, root_id, &id0, &id1, check_het);
    if(id0 == (uint64_t)-1) occ--;
    if(id1 == (uint64_t)-1) occ--;
    return occ;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r8d
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0x102d73
xorl %eax, %eax
cmpq $-0x1, (%rbx)
sete %al
xorl %ecx, %ecx
cmpq $-0x1, (%r14)
sete %cl
addl %eax, %ecx
pushq $0x2
popq %rax
subl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: determine_bub_idx(bubble_type*, ma_utg_t*, asg_t*, unsigned long, unsigned long, unsigned long, int, int, unsigned int)
void determine_bub_idx(bubble_type* bub, ma_utg_t *bu, asg_t *untig_sg, uint64_t pLen, 
uint64_t rLEN, uint64_t r_hetLen, int beg_idx, int end_idx, uint32_t check_het)
{
    if(beg_idx > end_idx) return;

    uint64_t r_homLen = rLEN - r_hetLen;
    ///pLen: total length, rLEN: beg/sink length
    if(pLen > 0 && rLEN > 0 && r_hetLen > 0 && rLEN < pLen*0.5 && r_hetLen < rLEN * 0.2) ///set het to hom
    {
        set_bub_idx(bub, bu, untig_sg, beg_idx, end_idx, 1, bub->check_het);
    }
    else if(pLen > 0 && rLEN > 0 && r_homLen > 0 && rLEN > pLen*0.9 && r_homLen < rLEN * 0.1) ///set hom to het
    {
        set_bub_idx(bub, bu, untig_sg, beg_idx, end_idx, 0, bub->check_het);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rax
movq %rcx, %r10
movl 0x28(%rsp), %r8d
movl 0x20(%rsp), %ecx
cmpl %r8d, %ecx
jg 0x10377f
testq %r10, %r10
setne %bl
testq %rax, %rax
setne %r11b
andb %bl, %r11b
xorb $0x1, %r11b
testq %r9, %r9
sete %bl
orb %r11b, %bl
movq %rax, %xmm1
movq %r10, %xmm0
jne 0x1036e6
movq 0xdfc08(%rip), %xmm3    # 0x1e3270
movdqa %xmm1, %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
movapd 0xdfc08(%rip), %xmm5    # 0x1e3280
subpd %xmm5, %xmm4
movapd %xmm4, %xmm2
unpckhpd %xmm4, %xmm2            # xmm2 = xmm2[1],xmm4[1]
addsd %xmm4, %xmm2
movdqa %xmm0, %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
subpd %xmm5, %xmm4
movapd %xmm4, %xmm3
unpckhpd %xmm4, %xmm3            # xmm3 = xmm3[1],xmm4[1]
addsd %xmm4, %xmm3
mulsd 0xdfea0(%rip), %xmm3    # 0x1e3548
ucomisd %xmm2, %xmm3
jbe 0x1036e6
movq %r9, %xmm3
punpckldq 0xdfbb5(%rip), %xmm3 # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0xdfbbd(%rip), %xmm3    # 0x1e3280
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
mulsd 0xdfdf9(%rip), %xmm2    # 0x1e34d0
ucomisd %xmm4, %xmm2
jbe 0x1036e6
pushq $0x1
popq %r9
jmp 0x103771
cmpq %r9, %rax
sete %r10b
orb %r10b, %r11b
jne 0x10377f
movq 0xdfb72(%rip), %xmm3    # 0x1e3270
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0xdfb76(%rip), %xmm4    # 0x1e3280
subpd %xmm4, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0xdfe0a(%rip), %xmm1    # 0x1e3540
ucomisd %xmm1, %xmm2
jbe 0x10377f
subq %r9, %rax
movq %rax, %xmm0
punpckldq 0xdfb24(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xdfb2c(%rip), %xmm0    # 0x1e3280
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
mulsd 0xdf48c(%rip), %xmm2    # 0x1e2bf0
addsd %xmm0, %xmm1
xorl %r9d, %r9d
ucomisd %xmm1, %xmm2
jbe 0x10377f
movl 0xb0(%rdi), %eax
movl %eax, (%rsp)
callq 0x121843
addq $0x10, %rsp
popq %rbx
retq