LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_contig_length(ma_ug_t*, asg_t*, unsigned long*, unsigned long*)
void get_contig_length(ma_ug_t *ug, asg_t *g, uint64_t* primaryLen, uint64_t* alterLen)
{
    uint8_t *del = (uint8_t *)malloc(sizeof(uint8_t)*g->n_seq);
    uint32_t v, k;
    ma_utg_t* u = NULL;
    memset(del, 1, g->n_seq);
    (*primaryLen) = (*alterLen) = 0;

    for (v = 0; v < ug->g->n_seq; ++v) 
    {
        if(ug->g->seq[v].del) continue;
        if(ug->g->seq[v].c == ALTER_LABLE) continue;
        u = &(ug->u.a[v]);
        if(u->m == 0) continue;
        for (k = 0; k < u->n; k++)
        {
            del[u->a[k]>>33] = 0;
        }
    }
    (*primaryLen) = get_specific_contig_length(g, del);


    for (v = 0; v < g->n_seq; ++v) 
    {
        del[v] = 1 - del[v];
    }

    (*alterLen) = get_specific_contig_length(g, del);

    free(del);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movl 0x14(%rsi), %ebp
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %rbp
movq %rbp, %rdi
callq 0x2280
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %rbp, %rdx
callq 0x20e0
andq $0x0, (%r12)
andq $0x0, (%rbx)
movq 0x18(%r13), %rax
movl 0x14(%rax), %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andq %rdx, %rcx
xorl %edx, %edx
cmpq %rcx, %rdx
jae 0xd1236
movq 0x20(%rax), %rsi
cmpl $0x0, (%rsi,%rdx,8)
js 0xd1231
cmpb $0x1, 0x4(%rsi,%rdx,8)
je 0xd1231
movq 0x10(%r13), %rsi
imulq $0x28, %rdx, %rdi
cmpl $0x0, 0xc(%rsi,%rdi)
je 0xd1231
addq %rdi, %rsi
movl 0x10(%rsi), %edi
xorl %r8d, %r8d
cmpq %rdi, %r8
jae 0xd1231
movq 0x18(%rsi), %r9
movq (%r9,%r8,8), %r9
shrq $0x21, %r9
movb $0x0, (%r15,%r9)
incq %r8
jmp 0xd1216
incq %rdx
jmp 0xd11e8
movq %r14, %rdi
movq %r15, %rsi
callq 0xd0ec7
movq %rax, (%rbx)
movl 0x14(%r14), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xd1263
movb $0x1, %dl
subb (%r15,%rcx), %dl
movb %dl, (%r15,%rcx)
incq %rcx
jmp 0xd124f
movq %r14, %rdi
movq %r15, %rsi
callq 0xd0ec7
movq %rax, (%r12)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_p_g_t_interval(p_g_t*, hap_cov_t*)
void print_p_g_t_interval(p_g_t* pg, hap_cov_t *cov)
{
    fprintf(stderr, "----------[M::%s]----------\n", __func__);
    uint32_t i, v, sid, eid;
    p_node_t *t = NULL;
    ma_utg_t *u = NULL;

    for (v = 0; v < pg->pg_het_node.n; v++)
    {
        t = &(pg->pg_het_node.a[v]);
        sid = t->nodeBeg;
        eid = t->nodeEnd;

        u = &(pg->ug->u.a[t->c_ug_id]);
        fprintf(stderr, "\nu->n=%u, sid=%u, eid=%u, h_status=%u\n", 
                                                (uint32_t)u->n, sid, eid, t->h_status);
        for (i = sid; i <= eid; i++)
        {
            fprintf(stderr, "id:i:%u------>utg%.6ul\n", 
                        (uint32_t)(u->a[i]>>33), (get_origin_uid(u->a[i]>>32, cov->t_ch, NULL, NULL)>>1)+1);
        }
    }
    fprintf(stderr, "----------[M::%s]----------\n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18087f(%rip), %r15    # 0x252fe0
movq (%r15), %rdi
leaq 0x11c554(%rip), %rsi    # 0x1eecbf
leaq 0x11928f(%rip), %rdx    # 0x1eba01
xorl %eax, %eax
callq 0x22b0
leaq 0x1192bd(%rip), %r12    # 0x1eba3d
xorl %edx, %edx
movq %r14, 0x8(%rsp)
movl %edx, %edx
cmpq %rdx, 0x8(%r14)
jbe 0xd2831
movq (%r14), %rax
movq 0x18(%r14), %rcx
movq %rdx, 0x10(%rsp)
imulq $0x1c, %rdx, %rsi
movl 0x8(%rcx,%rsi), %ebp
movl 0xc(%rcx,%rsi), %r13d
movq 0x10(%rax), %rax
movl 0x18(%rcx,%rsi), %edx
imulq $0x28, %rdx, %rdx
leaq (%rax,%rdx), %r14
movq (%r15), %rdi
movl 0x10(%rax,%rdx), %edx
movl 0x14(%rcx,%rsi), %r9d
leaq 0x119247(%rip), %rsi    # 0x1eba16
movl %ebp, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x22b0
cmpl %r13d, %ebp
ja 0xd2820
movq 0x18(%r14), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rdx
shrq $0x21, %rdx
movq 0xa8(%rbx), %rax
movq 0x8(%rax), %rsi
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq $-0x1, (%rsi,%rdx,8)
je 0xd280f
movq (%rax), %rax
movl (%rax,%rdx,4), %ecx
shrl %ecx
incl %ecx
movq (%r15), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22b0
incl %ebp
jmp 0xd27db
movq 0x10(%rsp), %rdx
incl %edx
movq 0x8(%rsp), %r14
jmp 0xd2787
movq (%r15), %rdi
leaq 0x11c484(%rip), %rsi    # 0x1eecbf
leaq 0x1191bf(%rip), %rdx    # 0x1eba01
xorl %eax, %eax
addq $0x18, %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/Purge_Dups.cpp
// Function: destory_p_g_t(p_g_t**)
void destory_p_g_t(p_g_t **pg)
{
    if(pg && (*pg))
    {
        kv_destroy((*pg)->pg_het_node);
        kv_destroy((*pg)->pg_h_lev_idx);
        asg_destroy((*pg)->pg_het);
        asg_destroy((*pg)->pg_h_lev);
        free((*pg)); 
        (*pg) = NULL;
    }
}

// Assembly:
testq %rdi, %rdi
je 0xd2b8c
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xd2b8b
movq 0x18(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x68f68
movq (%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x68f68
movq (%rbx), %rdi
callq 0x2220
andq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: collect_purge_trans_cov(ma_ug_t*, hap_overlaps_list*, hap_cov_t*, unsigned long*)
void collect_purge_trans_cov(ma_ug_t *ug, hap_overlaps_list* ha, hap_cov_t *cov, uint64_t* position_index)
{   
    uint32_t v, i;
    hap_overlaps *x = NULL;
    for (v = 0; v < ha->num; v++)
    {
        for (i = 0; i < ha->x[v].a.n; i++)
        {
            x = &(ha->x[v].a.a[i]);
            if(x->yUid < x->xUid) continue;
            chain_origin_trans_uid_by_purge(x, ug, cov, position_index);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ecx, %ecx
movl 0x8(%r15), %eax
cmpq %rax, %rcx
jae 0xd2fcd
xorl %ebp, %ebp
movq %rcx, (%rsp)
imulq $0x18, %rcx, %r13
movl %ebp, %ebp
movq (%r15), %rax
cmpq %rbp, (%rax,%r13)
jbe 0xd2fc4
addq %r13, %rax
movq 0x10(%rax), %rdi
movq %rbp, %rax
shlq $0x6, %rax
movl 0x28(%rdi,%rax), %ecx
cmpl 0x24(%rdi,%rax), %ecx
jb 0xd2fc0
addq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xd2b8d
incl %ebp
jmp 0xd2f8c
movq (%rsp), %rcx
incq %rcx
jmp 0xd2f79
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/Purge_Dups.cpp
// Function: seed_uid(ma_utg_t*, unsigned long*, R_to_U*, ma_ug_t*)
uint32_t seed_uid(ma_utg_t *vu, uint64_t* ps_idx, R_to_U* ruIndex, ma_ug_t *rug)
{
    int64_t v_i, v, w, w_i, wb, we, vb, ve, k;
    uint32_t uid, is_u;
    ma_utg_t *wu = NULL;
    for (v_i = 0; v_i < vu->n; v_i++) {
        v = vu->a[v_i]>>32;
        get_R_to_U(ruIndex, v>>1, &uid, &is_u);
        if(is_u == 0 || uid == (uint32_t)-1 || ps_idx[v>>1] == (uint64_t)-1) continue;
        w_i = (uint32_t)ps_idx[v>>1];
        wu = &(rug->u.a[uid]);
        w = wu->a[w_i]>>32;
        if((v>>1)!=(w>>1)) continue;
        vb = 0; ve = vu->n; ///[vb, ve)
        if(v == w){ ///[wb, we)
            wb = w_i - v_i;
            we = wb + vu->n;
            if(wb < 0 || we > wu->n) continue;
            for (k = 0; k < vu->n; k++){
                if((vu->a[k+vb]>>32) != (wu->a[k+wb]>>32)) break;
            }
            if(k >= vu->n) return uid;
        } else {
            wb = w_i + 1 - (ve - v_i);
            we = wb + vu->n;
            if(wb < 0 || we > wu->n) continue;
            for (k = 0; k < vu->n; k++){
                if((vu->a[k+vb]>>32) != ((wu->a[we-k-1]>>32)^1)) break;
            }
            if(k >= vu->n) return uid;
        }
    }
    return (uint32_t)-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %r13
pushq $0x1
popq %rbp
xorl %ebx, %ebx
xorl %r12d, %r12d
movl 0x10(%r13), %eax
cmpq %rax, %r12
jae 0xd312a
movq 0x18(%r13), %rax
movq (%rax,%r12,8), %r15
movq %r15, %r14
shrq $0x21, %r14
movq 0x20(%rsp), %rdi
movl %r14d, %esi
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x6c2a2
cmpl $0x0, 0x8(%rsp)
sete %cl
movl 0xc(%rsp), %eax
cmpl $-0x1, %eax
sete %dl
orb %cl, %dl
jne 0xd311b
movq 0x18(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
cmpq $-0x1, %rcx
je 0xd311b
movl %eax, %edx
movl %ecx, %esi
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rdi
imulq $0x28, %rdx, %rcx
movq 0x18(%rdi,%rcx), %rdx
movq (%rdx,%rsi,8), %r8
movq %r8, %r9
shrq $0x21, %r9
cmpl %r9d, %r14d
jne 0xd311b
addq %rcx, %rdi
movl 0x10(%r13), %ecx
xorq %r15, %r8
shrq $0x20, %r8
jne 0xd30d9
movq %rsi, %r8
subq %r12, %r8
js 0xd311b
addq %rcx, %r8
movl 0x10(%rdi), %edi
cmpq %rdi, %r8
ja 0xd311b
leaq (%rbx,%rsi,8), %rsi
addq %rsi, %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0xd312d
movq 0x18(%r13), %rdi
movq (%rdx,%rsi,8), %r8
xorq (%rdi,%rsi,8), %r8
shrq $0x20, %r8
incq %rsi
testq %r8, %r8
je 0xd30ba
jmp 0xd311b
leaq (%rsi,%r12), %r8
incq %r8
cmpq %rcx, %r8
jb 0xd311b
movl 0x10(%rdi), %edi
cmpq %rdi, %r8
ja 0xd311b
addq %rbp, %rsi
leaq (%rdx,%rsi,8), %rdx
addq $-0x8, %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0xd312d
movq 0x18(%r13), %rdi
movq (%rdx), %r8
xorq (%rdi,%rsi,8), %r8
shrq $0x20, %r8
incq %rsi
addq $-0x8, %rdx
cmpl $0x1, %r8d
je 0xd30fa
incq %r12
incq %rbp
addq $-0x8, %rbx
jmp 0xd3004
pushq $-0x1
popq %rax
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/Purge_Dups.cpp
// Function: filter_ovlp_vecs(hap_overlaps_list*, unsigned int*, unsigned int)
void filter_ovlp_vecs(hap_overlaps_list* ha, uint32_t *a, uint32_t a_n)
{
    uint32_t st, k, i, m, v, w;
    int idx;
    radix_sort_ru32(a, a + a_n);
    for (st = 0, m = 0, k = 1; k <= a_n; k++){
        if(k == a_n || a[k] != a[st]){
            a[m++] = a[st];
            st = k;
        }
    }
    a_n = m;
    if(a_n < 2) return;
    for (k = 0; k < a_n; k++){
        v = a[k];
        for (i = k+1; i < a_n; i++) {
            w = a[i];
            idx = get_specific_hap_overlap(&(ha->x[v]), v, w);
            if(idx != -1) ha->x[v].a.a[idx].status = DELETE;
            idx = get_specific_hap_overlap(&(ha->x[w]), w, v);
            if(idx != -1) ha->x[w].a.a[idx].status = DELETE;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, 0x20(%rsp)
movl %edx, %r15d
leaq (%rsi,%r15,4), %rsi
movq %rbx, %rdi
callq 0xcbaba
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
movl %eax, %esi
movq %rsi, (%rsp)
cmpq %r15, %rcx
ja 0xd3194
movl %edx, %esi
jne 0xd317c
movl (%rbx,%rsi,4), %esi
jmp 0xd3184
movl (%rbx,%rsi,4), %esi
cmpl %esi, (%rbx,%rcx,4)
je 0xd318f
incl %eax
movq (%rsp), %rdx
movl %esi, (%rbx,%rdx,4)
movl %ecx, %edx
incq %rcx
jmp 0xd3168
cmpl $0x2, %eax
jae 0xd31a8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
xorl %ecx, %ecx
cmpq (%rsp), %rcx
je 0xd3199
movl %eax, 0xc(%rsp)
movl %eax, %ebp
movq %rcx, 0x18(%rsp)
movl (%rbx,%rcx,4), %eax
movq %rax, 0x10(%rsp)
imulq $0x18, %rax, %r15
cmpq (%rsp), %rbp
jae 0xd3237
movq %rbx, %r14
movl (%rbx,%rbp,4), %r12d
movq 0x20(%rsp), %rax
movq (%rax), %rbx
leaq (%rbx,%r15), %rdi
movq 0x10(%rsp), %rsi
movl %r12d, %edx
callq 0xcd675
cmpl $-0x1, %eax
je 0xd3205
movq 0x10(%rbx,%r15), %rcx
cltq
shlq $0x6, %rax
movb $0x2, 0x2(%rcx,%rax)
imulq $0x18, %r12, %r13
leaq (%rbx,%r13), %rdi
movl %r12d, %esi
movq 0x10(%rsp), %rdx
callq 0xcd675
cmpl $-0x1, %eax
je 0xd322f
movq 0x10(%rbx,%r13), %rcx
cltq
shlq $0x6, %rax
movb $0x2, 0x2(%rcx,%rax)
incq %rbp
movq %r14, %rbx
jmp 0xd31ca
movq 0x18(%rsp), %rcx
incq %rcx
movl 0xc(%rsp), %eax
incl %eax
jmp 0xd31ad
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_hap_overlapLen(long long, long long, long long, long long, long long, long long, long long*, long long*, long long*, long long*)
inline long long get_hap_overlapLen(long long x_beg, long long x_end, long long xLen, 
long long y_beg, long long y_end, long long yLen, long long* n_x_beg, long long* n_x_end,
long long* n_y_beg, long long* n_y_end)
{
    if(x_beg <= y_beg)
    {
        y_beg = y_beg - x_beg;
        x_beg = 0;
    }
    else
    {
        x_beg = x_beg - y_beg;
        y_beg = 0;
    }

    long long x_right_length = xLen - x_end - 1;
    long long y_right_length = yLen - y_end - 1;


    if(x_right_length <= y_right_length)
    {
        x_end = xLen - 1;
        y_end = y_end + x_right_length;        
    }
    else
    {
        x_end = x_end + y_right_length;
        y_end = yLen - 1;
    }

    if(n_x_beg) (*n_x_beg) = x_beg;
    if(n_x_end) (*n_x_end) = x_end;
    if(n_y_beg) (*n_y_beg) = y_beg;
    if(n_y_end) (*n_y_end) = y_end;

    return x_end - x_beg + 1;
}

// Assembly:
movq %rsi, %rax
xorl %r11d, %r11d
movq %rdi, %r10
subq %rcx, %r10
movl $0x0, %esi
cmovgq %r10, %rsi
negq %r10
cmpq %rcx, %rdi
movq 0x8(%rsp), %rcx
cmovgq %r11, %r10
movq %rax, %rdi
notq %rdi
addq %rdx, %rdi
leaq (%rdi,%r8), %r11
notq %r8
addq %r9, %r8
decq %rdx
addq %r8, %rax
decq %r9
cmpq %r8, %rdi
cmovleq %r11, %r9
movq 0x10(%rsp), %rdi
cmovleq %rdx, %rax
testq %rcx, %rcx
je 0xd3c1c
movq %rsi, (%rcx)
movq 0x18(%rsp), %rcx
testq %rdi, %rdi
je 0xd3c29
movq %rax, (%rdi)
movq 0x20(%rsp), %rdx
testq %rcx, %rcx
je 0xd3c36
movq %r10, (%rcx)
testq %rdx, %rdx
je 0xd3c3e
movq %r9, (%rdx)
subq %rsi, %rax
incq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: check_hap_match(unsigned int, unsigned int, unsigned int, unsigned int, unsigned long*, ma_hit_t_alloc*, asg_t*, R_to_U*, unsigned int*, unsigned int*)
inline void check_hap_match(uint32_t qn, uint32_t targetBeg, uint32_t targetEnd, uint32_t targetID, 
uint64_t* position_index, ma_hit_t_alloc* reverse_sources, asg_t *read_g, R_to_U* ruIndex, uint32_t* is_found, uint32_t* is_match)
{
    uint32_t j, tn, uId, is_Unitig, offset;
    (*is_found) = (*is_match) = 0;
    if(reverse_sources[qn].length > 0) (*is_found) = 1;
    for (j = 0; j < reverse_sources[qn].length; j++)
    {
        tn = Get_tn(reverse_sources[qn].buffer[j]);
        if(read_g->seq[tn].del == 1)
        {
            get_R_to_U(ruIndex, tn, &tn, &is_Unitig);
            if(tn == (uint32_t)-1 || is_Unitig == 1 || read_g->seq[tn].del == 1) continue;
        }


        get_R_to_U(ruIndex, tn, &uId, &is_Unitig);
        if(uId!=(uint32_t)-1 && is_Unitig == 1 && uId == targetID)
        {
            offset = (uint32_t)(position_index[tn]);
            if(offset >= targetBeg && offset <= targetEnd)
            {
                (*is_match) = 1;
                break;
            }                    
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x20(%rsp)
movl %ecx, %ebp
movl %edx, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x78(%rsp), %rax
andl $0x0, (%rax)
movq 0x70(%rsp), %rax
andl $0x0, (%rax)
movq 0x60(%rsp), %r14
movl %edi, %ecx
imulq $0x18, %rcx, %rcx
xorl %r15d, %r15d
xorl %edx, %edx
cmpl %r15d, 0xc(%r9,%rcx)
leaq (%r9,%rcx), %r13
setne %dl
movl %edx, (%rax)
pushq $0xc
popq %r12
leaq 0x10(%rsp), %rbx
movl 0xc(%r13), %eax
cmpq %rax, %r15
jae 0xd3d4a
movq (%r13), %rax
movl (%rax,%r12), %esi
movl %esi, 0xc(%rsp)
movq 0x20(%r14), %rax
cmpl $0x0, (%rax,%rsi,8)
js 0xd3d02
movq 0x68(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
movq %rbx, %rcx
callq 0x6c2a2
movl 0x1c(%rsp), %eax
cmpl %ebp, %eax
jne 0xd3d33
cmpl $-0x1, %eax
je 0xd3d33
cmpl $0x1, 0x10(%rsp)
jne 0xd3d33
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,8), %eax
cmpl 0x14(%rsp), %eax
setb %cl
cmpl 0x18(%rsp), %eax
seta %al
orb %cl, %al
jne 0xd3d33
jmp 0xd3d3f
movq 0x68(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movq %rbx, %rcx
callq 0x6c2a2
movl 0xc(%rsp), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
je 0xd3d33
cmpl $0x1, 0x10(%rsp)
je 0xd3d33
movq 0x20(%r14), %rax
cmpl $0x0, (%rax,%rsi,8)
jns 0xd3cbc
incq %r15
addq $0x28, %r12
jmp 0xd3c99
movq 0x78(%rsp), %rax
movl $0x1, (%rax)
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/Purge_Dups.cpp
// Function: GetCeilIndex(asg_arc_t_offset*, kvec_t_i32_warp*, int, int, unsigned int)
inline int GetCeilIndex(asg_arc_t_offset* arr, kvec_t_i32_warp* T, int l, int r, uint32_t key) 
{ 
    while (r - l > 1) { 
        int m = l + (r - l) / 2; 
        if (Get_yOff(arr[T->a.a[m]].Off) >= key) 
            r = m; 
        else
            l = m; 
    } 
  
    return r; 
}

// Assembly:
movl %ecx, %eax
movl %r8d, %ecx
movl %eax, %r8d
subl %edx, %r8d
cmpl $0x2, %r8d
jl 0xd3ee9
shrl %r8d
addl %edx, %r8d
movq 0x10(%rsi), %r9
movslq %r8d, %r10
movslq (%r9,%r10,4), %r9
imulq $0x28, %r9, %r9
movl 0x18(%rdi,%r9), %r9d
cmpl %ecx, %r9d
jb 0xd3edc
movl %r8d, %eax
cmpq %rcx, %r9
jb 0xd3ee4
movl %edx, %r8d
movl %r8d, %edx
jmp 0xd3eae
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_chain_details(int*, int*, unsigned char*, long long, long long*, long long*)
inline void get_chain_details(int32_t* Pres, int32_t* Results, uint8_t* Flag, long long max_i,
long long* chainLen, long long* dup)
{
    long long i = max_i;
    (*chainLen) = 0;
    (*dup) = 0;

    while (i >= 0)
    {
        if(Flag[i] == 1) (*dup)++;
        Results[(*chainLen)] = i;
        i = Pres[i];
        (*chainLen)++;
    }
}

// Assembly:
andq $0x0, (%r8)
andq $0x0, (%r9)
testq %rcx, %rcx
js 0xd3f12
cmpb $0x1, (%rdx,%rcx)
jne 0xd3f00
incq (%r9)
movq (%r8), %rax
movl %ecx, (%rsi,%rax,4)
movslq (%rdi,%rcx,4), %rcx
incq %rax
movq %rax, (%r8)
jmp 0xd3ef2
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_max_index(asg_arc_t_offset*, int*, unsigned char*, long long, long long, long long)
inline long long get_max_index(asg_arc_t_offset* x, int32_t* Scores, uint8_t* Flag, long long n,
long long x_readLen, long long y_readLen)
{
    long long i = 0, max_result = -1, max_i = -1, min_xLen = x_readLen * 2 + 2, x_off, y_off, tmp_xLen;
    for (i = 0; i < n; i++)
    {
        if(Flag[i] != 0) continue;
        x_off = (long long)(x[i].Off>>32);
        y_off = (long long)((uint32_t)x[i].Off);
        if(Scores[i] > max_result)
        {
            max_result = Scores[i];
            max_i = i;
            min_xLen = get_hap_overlapLen(x_off, x_off, x_readLen, y_off, y_off, y_readLen, 
            NULL, NULL, NULL, NULL);
        }
        else if(Scores[i] == max_result)
        {
            tmp_xLen = get_hap_overlapLen(x_off, x_off, x_readLen, y_off, y_off, y_readLen, 
            NULL, NULL, NULL, NULL);

            if(tmp_xLen < min_xLen)
            {
                max_result = Scores[i];
                max_i = i;
                min_xLen = tmp_xLen;
            }
        }
    }

    return max_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x30(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x38(%rsp)
movq %rdi, %rbp
movq %r8, 0x28(%rsp)
leaq 0x2(,%r8,2), %rdx
xorl %r14d, %r14d
testq %rcx, %rcx
cmovleq %r14, %r15
addq $0x18, %rbp
pushq $-0x1
popq %rsi
movq %rsi, %r13
cmpq %r14, %r15
je 0xd4194
cmpb $0x0, (%r12,%r14)
jne 0xd4188
movq (%rbp), %rdi
movl %edi, %ecx
shrq $0x20, %rdi
movq 0x38(%rsp), %rax
movslq (%rax,%r14,4), %rbx
cmpq %rbx, %r13
jge 0xd4141
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rdi, %rsi
movq 0x28(%rsp), %rdx
movq %rcx, %r8
movq 0x30(%rsp), %r9
callq 0xd3bc4
movq %rax, %rdx
movq %r14, %rsi
movq %rbx, %r13
jmp 0xd4188
jne 0xd4188
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, %rsi
movq %rdx, %rbx
movq 0x28(%rsp), %rdx
movq %rcx, %r8
movq 0x30(%rsp), %r9
callq 0xd3bc4
movq 0x40(%rsp), %rsi
movq %rbx, %rdx
cmpq %rbx, %rax
jge 0xd4188
movq 0x38(%rsp), %rcx
movslq (%rcx,%r14,4), %r13
movq %rax, %rdx
movq %r14, %rsi
incq %r14
addq $0x28, %rbp
jmp 0xd40e9
movq %rsi, %rax
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/Purge_Dups.cpp
// Function: get_available_cnt(asg_t*, unsigned int, unsigned char*, asg_arc_t*)
inline int get_available_cnt(asg_t *g, uint32_t v, uint8_t* del, asg_arc_t* v_s)
{
    //v has direction
    if(del && del[v>>1]) return 0;
    uint32_t i, kv = 0;
    asg_arc_t *av = asg_arc_a(g, v);
    uint32_t nv = asg_arc_n(g, v);

    for (i = 0, kv = 0; i < nv; i++)
    {
        if(!av[i].del)
        {
            if(del && del[av[i].v>>1]) continue;
            if(v_s) v_s[kv] = av[i];
            kv++;
        }
    }

    return kv;
}

// Assembly:
testq %rdx, %rdx
je 0xd41bb
movl %esi, %r8d
shrl %r8d
xorl %eax, %eax
cmpb $0x0, (%rdx,%r8)
je 0xd41bb
retq
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
movl %esi, %esi
movq (%rdi,%rsi,8), %rsi
movl %esi, %edi
movq %rsi, %r8
shrq $0x20, %r8
imulq $0x18, %rdi, %rsi
imulq $0x18, %r8, %rdi
addq %rax, %rdi
addq $0xc, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
cmpq %r8, %rsi
je 0xd41ba
cmpl $0x0, (%rdi,%r8)
js 0xd422e
testq %rdx, %rdx
je 0xd4206
movl -0x4(%rdi,%r8), %r9d
shrl %r9d
cmpb $0x0, (%rdx,%r9)
jne 0xd422e
testq %rcx, %rcx
je 0xd422c
leaq (%rdi,%r8), %r9
addq $-0xc, %r9
movl %eax, %r10d
imulq $0x18, %r10, %r10
movq 0x10(%r9), %r11
movq %r11, 0x10(%rcx,%r10)
movups (%r9), %xmm0
movups %xmm0, (%rcx,%r10)
incl %eax
addq $0x18, %r8
jmp 0xd41e6
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: yak_bf_init(int, int)
yak_bf_t *yak_bf_init(int n_shift, int n_hashes)
{
	yak_bf_t *b;
	void *ptr = 0;
	if (n_shift + YAK_BLK_SHIFT > 64 || n_shift < YAK_BLK_SHIFT) return 0;
	CALLOC(b, 1);
	b->n_shift = n_shift;
	b->n_hashes = n_hashes;
	posix_memalign(&ptr, 1<<(YAK_BLK_SHIFT-3), 1ULL<<(n_shift-3));
	b->b = (uint8_t*)ptr;
	bzero(b->b, 1ULL<<(n_shift-3));
	return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
andq $0x0, (%rsp)
movl %edi, %r14d
leal -0x38(%r14), %eax
cmpl $-0x2f, %eax
jae 0xd4376
xorl %ebx, %ebx
jmp 0xd43bc
movl %esi, %ebp
pushq $0x1
popq %r15
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %rbx
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
addb $-0x3, %r14b
movl %r14d, %ecx
shlq %cl, %r15
movq %rsp, %r14
pushq $0x40
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x20c0
movq (%r14), %rdi
movq %rdi, 0x8(%rbx)
xorl %esi, %esi
movq %r15, %rdx
callq 0x20e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: yak_bf_insert(yak_bf_t*, unsigned long)
int yak_bf_insert(yak_bf_t *b, uint64_t hash)
{
	int x = b->n_shift - YAK_BLK_SHIFT;
	uint64_t y = hash & ((1ULL<<x) - 1);
	int h1 = hash >> x & YAK_BLK_MASK;
	int h2 = hash >> b->n_shift & YAK_BLK_MASK;
	uint8_t *p = &b->b[y<<(YAK_BLK_SHIFT-3)];
	int i, z = h1, cnt = 0;
	if ((h2&31) == 0) h2 = (h2 + 1) & YAK_BLK_MASK; // otherwise we may repeatedly use a few bits
	for (i = 0; i < b->n_hashes; z = (z + h2) & YAK_BLK_MASK) {
		uint8_t *q = &p[z>>3], u;
		u = 1<<(z&7);
		cnt += !!(*q & u);
		*q |= u;
		++i;
	}
	return cnt;
}

// Assembly:
movb (%rdi), %al
leal -0x9(%rax), %ecx
pushq $-0x1
popq %rdx
shlq %cl, %rdx
notq %rdx
andq %rsi, %rdx
movq %rsi, %r8
shrq %cl, %r8
movl %eax, %ecx
shrq %cl, %rsi
shlq $0x6, %rdx
addq 0x8(%rdi), %rdx
movl %esi, %eax
andl $0x1f, %eax
cmpl $0x1, %eax
adcl $0x0, %esi
xorl %eax, %eax
xorl %ecx, %ecx
cmpl 0x4(%rdi), %ecx
jge 0xd4451
movl %r8d, %r9d
andl $0x1ff, %r9d            # imm = 0x1FF
movl %r9d, %r10d
shrl $0x3, %r10d
andl $0x7, %r8d
movzbl (%rdx,%r10), %r11d
btl %r8d, %r11d
adcl $0x0, %eax
btsl %r8d, %r11d
movb %r11b, (%rdx,%r10)
incl %ecx
addl %esi, %r9d
movl %r9d, %r8d
jmp 0xd4419
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_pt_gen(ha_ct_t*, int, int)
ha_pt_t *ha_pt_gen(ha_ct_t *ct, int n_thread, int is_l)
{
	pt_gen_aux_t a;
	int i;
	ha_pt_t *pt;
	ha_ct_destroy_bf(ct);
	CALLOC(pt, 1);
	pt->k = ct->k, pt->pre = ct->pre, pt->tot = ct->tot;
	CALLOC(pt->h, 1<<pt->pre);
	for (i = 0; i < 1<<pt->pre; ++i) {
		pt->h[i].h = yak_pt_init();
		yak_pt_resize(pt->h[i].h, kh_size(ct->h[i].h));
	}
	a.ct = ct, a.pt = pt, a.is_l = is_l;
	kt_for(n_thread, worker_pt_gen, &a, 1<<pt->pre);
	free(ct->h); free(ct);
	return pt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0x8(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
callq 0xd4712
pushq $0x1
popq %rdi
pushq $0x20
popq %r13
movq %r13, %rsi
callq 0x2120
movq %rax, %r14
movl (%rbx), %eax
movl %eax, (%r14)
movl 0x4(%rbx), %ecx
movl %ecx, 0x4(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
pushq $0x1
popq %rax
shll %cl, %eax
movslq %eax, %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %r13
movq %rax, 0x18(%r14)
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq %r12, %r15
jge 0xd46c9
callq 0xd8148
movq %rax, (%r13,%rbp,2)
movq 0x20(%rbx), %rcx
movq (%rcx,%rbp), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0xd8153
incq %r15
addq $0x10, %rbp
jmp 0xd469e
leaq 0x10(%rsp), %rdx
movq %rbx, (%rdx)
movq %r14, 0x8(%rdx)
movl 0x8(%rsp), %eax
movl %eax, 0x10(%rdx)
leaq 0x80(%rip), %rsi        # 0xd4763
movl 0xc(%rsp), %edi
movq %r12, %rcx
callq 0xc67c0
movq 0x20(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq %r14, %rax
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/htab.cpp
// Function: ha_ct_destroy_bf(ha_ct_t*)
static void ha_ct_destroy_bf(ha_ct_t *h)
{
	int i;
	for (i = 0; i < 1<<h->pre; ++i) {
		if (h->h[i].b)
			yak_bf_destroy(h->h[i].b);
		h->h[i].b = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbp
movb 0x4(%rbx), %cl
movl %ebp, %eax
shll %cl, %eax
cltq
cmpq %rax, %r15
jge 0xd4758
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0xd474a
callq 0xd43ca
movq 0x20(%rbx), %rax
andq $0x0, (%rax,%r14)
incq %r15
addq $0x10, %r14
jmp 0xd4726
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: worker_pt_gen(void*, long, int)
static void worker_pt_gen(void *data, long i, int tid) // callback for kt_for()
{
	pt_gen_aux_t *a = (pt_gen_aux_t*)data;
	ha_pt1_t *b = &a->pt->h[i];
	yak_ct_t *g = a->ct->h[i].h;
	khint_t k;
	for (k = 0, b->n = 0; k != kh_end(g); ++k) {
		if (kh_exist(g, k)) {
			int absent;
			khint_t l;
			l = yak_pt_put(b->h, kh_key(g, k) >> a->ct->pre << YAK_COUNTER_BITS, &absent);
			///this should be the start index of kh_key's corresponding pos at ha_idxpos_t* a
			kh_val(b->h, l) = b->n;
			b->n += kh_key(g, k) & YAK_MAX_COUNT;
		}
	}
	yak_ct_destroy(g);
	a->ct->h[i].h = 0;
	if(a->is_l) CALLOC(b->al, b->n);
	else CALLOC(b->a, b->n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rcx
movq %rsi, %rdx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %r13
movq 0x20(%rax), %rax
shlq $0x4, %rsi
movq %rsi, 0x8(%rsp)
movq (%rax,%rsi), %r15
andq $0x0, 0x8(%rcx,%rdx)
movq 0x10(%r15), %rax
xorl %ebp, %ebp
pushq $0x1
popq %r14
movl $0x0, %edx
testq %rax, %rax
je 0xd47bd
movb (%r15), %cl
movl %r14d, %edx
shll %cl, %edx
cmpl %edx, %ebp
je 0xd4824
movq 0x8(%r15), %rcx
movl %ebp, %edx
shrl $0x5, %edx
movl (%rcx,%rdx,4), %ecx
btl %ebp, %ecx
jae 0xd4820
movq (%r13), %rdi
movl %ebp, %r12d
movq (%rax,%r12,8), %rsi
movq (%rbx), %rax
movb 0x4(%rax), %cl
shrq %cl, %rsi
shlq $0xc, %rsi
leaq 0x14(%rsp), %rdx
callq 0xd835e
movq (%r13), %rcx
movq 0x8(%r13), %rdx
movq 0x10(%rcx), %rcx
movl %eax, %eax
shlq $0x4, %rax
movq %rdx, 0x8(%rcx,%rax)
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rcx
andl $0xfff, %ecx            # imm = 0xFFF
addq %rdx, %rcx
movq %rcx, 0x8(%r13)
incl %ebp
jmp 0xd47ab
movq %r15, %rdi
callq 0xd8459
movq (%rbx), %rax
movq 0x20(%rax), %rax
movq 0x8(%rsp), %rcx
andq $0x0, (%rax,%rcx)
xorl %r14d, %r14d
cmpl $0x0, 0x10(%rbx)
setne %r14b
movq 0x8(%r13), %rdi
shll $0x3, %r14d
leaq 0x8(%r14), %rsi
callq 0x2120
movq %rax, 0x10(%r13,%r14)
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/htab.cpp
// Function: ha_pt_gen_count(ha_ct_t*, int)
ha_pt_t *ha_pt_gen_count(ha_ct_t *ct, int n_thread)
{
	pt_gen_aux_t a;
	int i;
	ha_pt_t *pt;
	ha_ct_destroy_bf(ct);
	CALLOC(pt, 1);
	pt->k = ct->k, pt->pre = ct->pre, pt->tot = ct->tot;
	CALLOC(pt->h, 1<<pt->pre);
	for (i = 0; i < 1<<pt->pre; ++i) {
		pt->h[i].h = yak_pt_init();
		yak_pt_resize(pt->h[i].h, kh_size(ct->h[i].h));
	}
	a.ct = ct, a.pt = pt;
	kt_for(n_thread, worker_pt_gen_count, &a, 1<<pt->pre);
	free(ct->h); free(ct);
	return pt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
callq 0xd4712
pushq $0x1
popq %rdi
pushq $0x20
popq %r12
movq %r12, %rsi
callq 0x2120
movq %rax, %r14
movl (%rbx), %eax
movl %eax, (%r14)
movl 0x4(%rbx), %ecx
movl %ecx, 0x4(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
pushq $0x1
popq %rax
shll %cl, %eax
movslq %eax, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %r12
movq %rax, 0x18(%r14)
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %r15, %rbp
jge 0xd48f6
callq 0xd8148
movq %rax, (%r12,%r13,2)
movq 0x20(%rbx), %rcx
movq (%rcx,%r13), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0xd8153
incq %rbp
addq $0x10, %r13
jmp 0xd48cc
leaq 0x10(%rsp), %rdx
movq %rbx, (%rdx)
movq %r14, 0x8(%rdx)
leaq 0x2f(%rip), %rsi        # 0xd4938
movl 0xc(%rsp), %edi
movq %r15, %rcx
callq 0xc67c0
movq 0x20(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq %r14, %rax
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/htab.cpp
// Function: worker_pt_gen_count(void*, long, int)
static void worker_pt_gen_count(void *data, long i, int tid) // callback for kt_for()
{
	pt_gen_aux_t *a = (pt_gen_aux_t*)data;
	ha_pt1_t *b = &a->pt->h[i];
	yak_ct_t *g = a->ct->h[i].h;
	khint_t k;
	for (k = 0, b->n = 0; k != kh_end(g); ++k) {
		if (kh_exist(g, k)) {
			int absent;
			khint_t l;
			l = yak_pt_put(b->h, kh_key(g, k) >> a->ct->pre << YAK_COUNTER_BITS, &absent);
			kh_val(b->h, l) = 0; kh_key(b->h, l) |= kh_key(g, k) & YAK_MAX_COUNT;
		}
	}
	yak_ct_destroy(g);
	a->ct->h[i].h = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rcx
movq %rsi, %rdx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %r13
movq 0x20(%rax), %rax
shlq $0x4, %rsi
movq %rsi, 0x8(%rsp)
movq (%rax,%rsi), %r15
andq $0x0, 0x8(%rcx,%rdx)
movq 0x10(%r15), %rax
xorl %ebp, %ebp
pushq $0x1
popq %rbx
movl $0x0, %edx
testq %rax, %rax
je 0xd4990
movb (%r15), %cl
movl %ebx, %edx
shll %cl, %edx
cmpl %edx, %ebp
je 0xd49f1
movq 0x8(%r15), %rcx
movl %ebp, %edx
shrl $0x5, %edx
movl (%rcx,%rdx,4), %ecx
btl %ebp, %ecx
jae 0xd49ed
movq (%r13), %rdi
movl %ebp, %r12d
movq (%rax,%r12,8), %rsi
movq (%r14), %rax
movb 0x4(%rax), %cl
shrq %cl, %rsi
shlq $0xc, %rsi
leaq 0x14(%rsp), %rdx
callq 0xd835e
movq (%r13), %rcx
movq 0x10(%rcx), %rcx
movl %eax, %edx
shlq $0x4, %rdx
andq $0x0, 0x8(%rcx,%rdx)
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rsi
andl $0xfff, %esi            # imm = 0xFFF
orq %rsi, (%rcx,%rdx)
incl %ebp
jmp 0xd497f
movq %r15, %rdi
callq 0xd8459
movq (%r14), %rax
movq 0x20(%rax), %rax
movq 0x8(%rsp), %rcx
andq $0x0, (%rax,%rcx)
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/htab.cpp
// Function: ha_pt_cnt_insert_list(ha_pt_s*, int, unsigned long const*)
int ha_pt_cnt_insert_list(ha_pt_t *h, int n, const uint64_t *a)
{
	int j, mask = (1<<h->pre) - 1, n_ins = 0;
	ha_pt1_t *g;
	if (n == 0) return 0;
	g = &h->h[a[0]&mask];
	for (j = 0; j < n; ++j) {
		uint64_t x = a[j] >> h->pre;
		khint_t k;
		assert((a[j]&mask) == (a[0]&mask));
		k = yak_pt_get(g->h, x<<YAK_COUNTER_BITS);
		if (k == kh_end(g->h)) continue; // TODO: understand why we sometimes come here
		++kh_val(g->h, k);
		++n_ins;
	}
	// fprintf(stderr, "n: %d, n_ins: %d\n", n, n_ins);
	return n_ins;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
je 0xd4cfd
movq %rdx, %rbx
movl %esi, %r15d
movl 0x4(%rdi), %ecx
pushq $-0x1
popq %r13
movq %rcx, 0x8(%rsp)
shll %cl, %r13d
notl %r13d
movq %r13, 0x10(%rsp)
andl (%rdx), %r13d
shlq $0x5, %r13
addq 0x18(%rdi), %r13
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %r15d
xorl %ebp, %ebp
cmpq %r14, %r15
je 0xd4cff
movq (%rbx,%r14,8), %rsi
movl (%rbx), %eax
xorl %esi, %eax
testl %eax, 0x10(%rsp)
jne 0xd4d10
movq 0x8(%rsp), %rcx
shrq %cl, %rsi
movq (%r13), %r12
shlq $0xc, %rsi
movq %r12, %rdi
callq 0xd4bf7
movq 0x10(%r12), %rdx
testq %rdx, %rdx
je 0xd4ce5
movb (%r12), %cl
pushq $0x1
popq %rsi
shll %cl, %esi
jmp 0xd4ce7
xorl %esi, %esi
cmpl %esi, %eax
je 0xd4cf8
movl %eax, %eax
shlq $0x4, %rax
incq 0x8(%rdx,%rax)
incl %ebp
incq %r14
jmp 0xd4ca5
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x116f5b(%rip), %rdi    # 0x1ebc72
leaq 0x116f01(%rip), %rsi    # 0x1ebc1f
leaq 0x116f68(%rip), %rcx    # 0x1ebc8d
movl $0x1d8, %edx            # imm = 0x1D8
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_pt_destroy(ha_pt_s*)
void ha_pt_destroy(ha_pt_t *h)
{
	int i;
	if (h == 0) return;
	for (i = 0; i < 1<<h->pre; ++i) {
		yak_pt_destroy(h->h[i].h);
		if(h->h[i].a){
			free(h->h[i].a); h->h[i].a = NULL;
		}
		if(h->h[i].al){
			free(h->h[i].al); h->h[i].al = NULL;
		}	
	}
	free(h->h); free(h);
}

// Assembly:
testq %rdi, %rdi
je 0xd4dbc
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rbp
xorl %r15d, %r15d
movb 0x4(%rbx), %cl
movl %ebp, %eax
shll %cl, %eax
cltq
movq 0x18(%rbx), %rdi
cmpq %rax, %r15
jge 0xd4da5
movq (%rdi,%r14), %rdi
callq 0xd4dbd
movq 0x18(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
testq %rdi, %rdi
je 0xd4d83
callq 0x2220
movq 0x18(%rbx), %rax
andq $0x0, 0x10(%rax,%r14)
movq 0x18(%rax,%r14), %rdi
testq %rdi, %rdi
je 0xd4d9c
callq 0x2220
movq 0x18(%rbx), %rax
andq $0x0, 0x18(%rax,%r14)
incq %r15
addq $0x20, %r14
jmp 0xd4d4b
callq 0x2220
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2220
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_pt_get(ha_pt_s const*, unsigned long, int*)
const ha_idxpos_t *ha_pt_get(const ha_pt_t *h, uint64_t hash, int *n)
{
	khint_t k;
	const ha_pt1_t *g = &h->h[hash & ((1ULL<<h->pre) - 1)];
	*n = 0;
	k = yak_pt_get(g->h, hash >> h->pre << YAK_COUNTER_BITS);
	if (k == kh_end(g->h)) return 0;
	*n = kh_key(g->h, k) & YAK_MAX_COUNT;
	return &g->a[kh_val(g->h, k)];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x18(%rdi), %r15
movb 0x4(%rdi), %cl
pushq $-0x1
popq %r12
shlq %cl, %r12
notq %r12
andq %rsi, %r12
andl $0x0, (%rdx)
shlq $0x5, %r12
movq (%r15,%r12), %r14
movb 0x4(%rdi), %cl
shrq %cl, %rsi
shlq $0xc, %rsi
movq %r14, %rdi
callq 0xd4bf7
movq 0x10(%r14), %rdx
testq %rdx, %rdx
je 0xd4e31
movb (%r14), %cl
pushq $0x1
popq %rsi
shll %cl, %esi
jmp 0xd4e33
xorl %esi, %esi
cmpl %esi, %eax
jne 0xd4e3b
xorl %eax, %eax
jmp 0xd4e5b
addq %r12, %r15
movl %eax, %eax
shlq $0x4, %rax
movl $0xfff, %ecx            # imm = 0xFFF
andl (%rdx,%rax), %ecx
movl %ecx, (%rbx)
movq 0x8(%rdx,%rax), %rax
shlq $0x3, %rax
addq 0x10(%r15), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ptl_get(ha_pt_s const*, unsigned long, int*)
const ha_idxposl_t *ha_ptl_get(const ha_pt_t *h, uint64_t hash, int *n)
{
	khint_t k;
	const ha_pt1_t *g = &h->h[hash & ((1ULL<<h->pre) - 1)];
	*n = 0;
	k = yak_pt_get(g->h, hash >> h->pre << YAK_COUNTER_BITS);
	if (k == kh_end(g->h)) return 0;
	*n = kh_key(g->h, k) & YAK_MAX_COUNT;
	return &g->al[kh_val(g->h, k)];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x18(%rdi), %r15
movb 0x4(%rdi), %cl
pushq $-0x1
popq %r12
shlq %cl, %r12
notq %r12
andq %rsi, %r12
andl $0x0, (%rdx)
shlq $0x5, %r12
movq (%r15,%r12), %r14
movb 0x4(%rdi), %cl
shrq %cl, %rsi
shlq $0xc, %rsi
movq %r14, %rdi
callq 0xd4bf7
movq 0x10(%r14), %rdx
testq %rdx, %rdx
je 0xd4eb6
movb (%r14), %cl
pushq $0x1
popq %rsi
shll %cl, %esi
jmp 0xd4eb8
xorl %esi, %esi
cmpl %esi, %eax
jne 0xd4ec0
xorl %eax, %eax
jmp 0xd4ee0
addq %r12, %r15
movl %eax, %eax
shlq $0x4, %rax
movl $0xfff, %ecx            # imm = 0xFFF
andl (%rdx,%rax), %ecx
movl %ecx, (%rbx)
movq 0x8(%rdx,%rax), %rax
shlq $0x4, %rax
addq 0x18(%r15), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_pt_cnt(ha_pt_s const*, unsigned long)
const int ha_pt_cnt(const ha_pt_t *h, uint64_t hash)
{
	khint_t k;
	const ha_pt1_t *g = &h->h[hash & ((1ULL<<h->pre) - 1)];
	k = yak_pt_get(g->h, hash >> h->pre << YAK_COUNTER_BITS);
	if (k == kh_end(g->h)) return 0;
	return kh_key(g->h, k) & YAK_MAX_COUNT;
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rax
movb 0x4(%rdi), %cl
pushq $-0x1
popq %rdx
shlq %cl, %rdx
notq %rdx
andq %rsi, %rdx
shlq $0x5, %rdx
movq (%rax,%rdx), %rbx
shrq %cl, %rsi
shlq $0xc, %rsi
movq %rbx, %rdi
callq 0xd4bf7
movl %eax, %edx
movq 0x10(%rbx), %rsi
xorl %eax, %eax
movl $0x0, %edi
testq %rsi, %rsi
je 0xd4f30
movb (%rbx), %cl
pushq $0x1
popq %rdi
shll %cl, %edi
cmpl %edi, %edx
je 0xd4f42
movl %edx, %ecx
shlq $0x4, %rcx
movl $0xfff, %eax            # imm = 0xFFF
andl (%rsi,%rcx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: debug_ct_index(void*, void*)
void debug_ct_index(void* q_ct_idx, void* r_ct_idx)
{
	ha_ct_t* ct_idx = (ha_ct_t*)q_ct_idx;
	yak_ct_t *g = NULL;
	uint64_t i;
	khint_t k;
	for (i = 0; (int)i < 1<<ct_idx->pre; i++)
	{
		g = ct_idx->h[i].h;
		for (k = 0; k < kh_end(g); ++k) 
		{
			if (kh_exist(g, k)) 
			{
				int c = kh_key(g, k) & YAK_MAX_COUNT;
				uint64_t hash = ((kh_key(g, k) >> ct_idx->pre)<<ct_idx->pre) | i;
				int q = query_ct_index(r_ct_idx, hash);
				if(q!=c)
				{
					fprintf(stderr, "ERROR:c: %d, q: %d\n", c, q);
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
movb 0x4(%r14), %cl
pushq $0x1
popq %rax
shll %cl, %eax
cmpl %r13d, %eax
jle 0xd5d13
movq 0x20(%r14), %rax
movq %r13, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %r15
xorl %r12d, %r12d
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xd5ca8
movb (%r15), %cl
pushq $0x1
popq %rdx
shlq %cl, %rdx
jmp 0xd5caa
xorl %edx, %edx
cmpq %rdx, %r12
jae 0xd5d0b
movq 0x8(%r15), %rcx
movq %r12, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %r12d, %ecx
jae 0xd5ce8
movq (%rax,%r12,8), %rsi
movl %esi, %ebp
andl $0xfff, %ebp            # imm = 0xFFF
movb 0x4(%r14), %cl
shrq %cl, %rsi
shlq %cl, %rsi
orq %r13, %rsi
movq %rbx, %rdi
callq 0xd5d22
cmpl %ebp, %eax
jne 0xd5ced
incq %r12
jmp 0xd5c94
movq 0x17d2ec(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
leaq 0x11616c(%rip), %rsi    # 0x1ebe6a
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x22b0
jmp 0xd5ce8
incq %r13
jmp 0xd5c70
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/htab.cpp
// Function: query_ct_index(void*, unsigned long)
int query_ct_index(void* ct_idx, uint64_t hash)
{
	ha_ct1_t *g = &(((ha_ct_t*)ct_idx)->h[hash & ((1ULL<<((ha_ct_t*)ct_idx)->pre) - 1)]);
	khint_t k;
	k = yak_ct_get(g->h, hash);
	if (k == kh_end(g->h)) return 0;
	return ((kh_key(g->h, k)&YAK_MAX_COUNT)==YAK_MAX_COUNT)?-1:(kh_key(g->h, k)&YAK_MAX_COUNT);
}

// Assembly:
pushq %rbx
movq 0x20(%rdi), %rax
movb 0x4(%rdi), %cl
pushq $-0x1
popq %rdx
shlq %cl, %rdx
notq %rdx
andq %rsi, %rdx
shlq $0x4, %rdx
movq (%rax,%rdx), %rbx
movq %rbx, %rdi
callq 0xd6dee
movl %eax, %edx
movq 0x10(%rbx), %rsi
xorl %eax, %eax
movl $0x0, %edi
testq %rsi, %rsi
je 0xd5d5f
movb (%rbx), %cl
pushq $0x1
popq %rdi
shll %cl, %edi
cmpl %edi, %edx
je 0xd5d7a
movl %edx, %eax
movl $0xfff, %ecx            # imm = 0xFFF
movq (%rsi,%rax,8), %rdx
andq %rcx, %rdx
cmpq %rcx, %rdx
pushq $-0x1
popq %rax
cmovnel %edx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ft_ul_gen(hifiasm_opt_t const*, ma_utg_v*, int, int, int)
void *ha_ft_ul_gen(const hifiasm_opt_t *asm_opt, ma_utg_v *us, int k, int w, int cutoff)
{
	yak_ft_t *flt_tab;
    ha_ct_t *h;
	///HAF_COUNT_EXACT ---> no bf; HAF_COUNT_ALL ---> no minimizer
	h = ha_count(asm_opt, HAF_COUNT_ALL|HAF_UG_READ, !(asm_opt->flag&HA_F_NO_HPC), k, w, NULL, NULL, NULL, us, 0, NULL, 0);
	
	// cutoff = (int)(asm_opt->hom_cov * asm_opt->high_factor);
    if (cutoff > YAK_MAX_COUNT - 1) cutoff = YAK_MAX_COUNT - 1;
	// fprintf(stderr, "[M::%s::] cutoff->%d\n\n", __func__, cutoff);
	ha_ct_shrink(h, cutoff, YAK_MAX_COUNT, asm_opt->thread_num);
	flt_tab = gen_hh(h, asm_opt->max_kmer_cnt);
	ha_ct_destroy(h);
	fprintf(stderr, "[M::%s::%.3f*%.2f@%.3fGB] ==> filtered out %ld k-mers occurring %d or more times\n", __func__,
            yak_realtime(), yak_cpu_usage(), yak_peakrss_in_gb(), (long)kh_size(flt_tab), cutoff);
	return (void*)flt_tab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebp
movl %ecx, %r8d
movl %edx, %ecx
movq %rdi, %r14
movl (%rdi), %edx
notl %edx
andl $0x1, %edx
movq %rsi, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
andl $0x0, 0x28(%rsp)
andq $0x0, 0x20(%rsp)
andl $0x0, 0x18(%rsp)
movl $0x82, %esi
xorl %r9d, %r9d
callq 0xd5694
movq %rax, %r15
movl $0xffe, %ebx            # imm = 0xFFE
cmpl %ebx, %ebp
cmovll %ebp, %ebx
movl 0x7c(%r14), %ecx
movq %rax, %rdi
movl %ebx, %esi
movl $0xfff, %edx            # imm = 0xFFF
callq 0xd5e5c
movl 0xb0(%r14), %esi
movq %r15, %rdi
callq 0xd5f12
movq %rax, %r14
movq %r15, %rdi
callq 0xd60da
movq 0x17d1de(%rip), %rax    # 0x252fe0
movq (%rax), %r15
callq 0xefea7
movsd %xmm0, 0x40(%rsp)
callq 0xefef4
movsd %xmm0, 0x38(%rsp)
callq 0xefedf
movaps %xmm0, %xmm2
movl 0x4(%r14), %ecx
leaq 0x116050(%rip), %rsi    # 0x1ebe7e
leaq 0x11609b(%rip), %rdx    # 0x1ebed0
movq %r15, %rdi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl %ebx, %r8d
movb $0x3, %al
callq 0x22b0
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ct_shrink(ha_ct_t*, int, int, int)
static void ha_ct_shrink(ha_ct_t *h, int min, int max, int n_thread)
{
	int i;
	shrink_aux_t a;
	a.h = h, a.min = min, a.max = max;
	///still start 4096 threads
	kt_for(n_thread, worker_ct_shrink, &a, 1<<h->pre);
	for (i = 0, h->tot = 0; i < 1<<h->pre; ++i)
		h->tot += kh_size(h->h[i].h);
	fprintf(stderr, "[M::%s::%.3f*%.2f] ==> counted %ld distinct minimizer k-mers\n", __func__,
			yak_realtime(), yak_cpu_usage(), (long)h->tot);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %ecx, %eax
movq %rdi, %rbx
leaq 0x10(%rsp), %r8
movq %rdi, 0x8(%r8)
movl %esi, (%r8)
movl %edx, 0x4(%r8)
movb 0x4(%rdi), %cl
pushq $0x1
popq %rbp
movl %ebp, %edx
shll %cl, %edx
movslq %edx, %rcx
leaq 0x4b54(%rip), %rsi      # 0xda9e1
movl %eax, %edi
movq %r8, %rdx
callq 0xc67c0
andq $0x0, 0x10(%rbx)
movb 0x4(%rbx), %cl
shll %cl, %ebp
movslq %ebp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rax, %rsi
jge 0xd5eca
movq 0x20(%rbx), %rdi
movq (%rdi,%rcx), %rdi
movl 0x4(%rdi), %edi
addq %rdi, %rdx
movq %rdx, 0x10(%rbx)
incq %rsi
addq $0x10, %rcx
jmp 0xd5eaa
movq 0x17d10f(%rip), %rax    # 0x252fe0
movq (%rax), %r14
callq 0xefea7
movsd %xmm0, 0x8(%rsp)
callq 0xefef4
movaps %xmm0, %xmm1
movq 0x10(%rbx), %rcx
leaq 0x116019(%rip), %rsi    # 0x1ebf0b
leaq 0x1165f6(%rip), %rdx    # 0x1ec4ef
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x22b0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ct_destroy(ha_ct_t*)
static void ha_ct_destroy(ha_ct_t *h)
{
	int i;
	if (h == 0) return;
	ha_ct_destroy_bf(h);
	for (i = 0; i < 1<<h->pre; ++i)
		yak_ct_destroy(h->h[i].h);
	free(h->h); free(h);
}

// Assembly:
testq %rdi, %rdi
je 0xd6132
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xd4712
xorl %r14d, %r14d
pushq $0x1
popq %rbp
xorl %r15d, %r15d
movb 0x4(%rbx), %cl
movl %ebp, %eax
shll %cl, %eax
cltq
movq 0x20(%rbx), %rdi
cmpq %rax, %r15
jge 0xd611b
movq (%rdi,%r14), %rdi
callq 0xd8459
incq %r15
addq $0x10, %r14
jmp 0xd60f7
callq 0x2220
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2220
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ft_ug_gen(hifiasm_opt_t const*, ma_utg_v*, int, int, int, int, int)
void *ha_ft_ug_gen(const hifiasm_opt_t *asm_opt, ma_utg_v *us, int is_HPC, int k, int w, int min_freq, int max_freq)
{
	yak_ft_t *flt_tab;
	ha_ct_t *h;
	///HAF_COUNT_EXACT ---> no bf; HAF_COUNT_ALL ---> no minimizer
	h = ha_count(asm_opt, HAF_COUNT_ALL|HAF_UG_READ|HAF_COUNT_EXACT, is_HPC, k, w, NULL, NULL, NULL, us, 0, NULL, 0);
	ha_ct_shrink(h, min_freq, max_freq>YAK_MAX_COUNT-1?YAK_MAX_COUNT-1:max_freq, asm_opt->thread_num);
	flt_tab = gen_hh(h, YAK_MAX_COUNT);
	ha_ct_destroy(h);
	return (void*)flt_tab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movq %rdi, %r14
movl 0x60(%rsp), %ebp
movq %rsi, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
andl $0x0, 0x28(%rsp)
andq $0x0, 0x20(%rsp)
andl $0x0, 0x18(%rsp)
movl $0x83, %esi
xorl %r9d, %r9d
callq 0xd5694
movq %rax, %r15
movl $0xffe, %edx            # imm = 0xFFE
cmpl %edx, %ebp
cmovll %ebp, %edx
movl 0x7c(%r14), %ecx
movq %rax, %rdi
movl %ebx, %esi
callq 0xd5e5c
movq %r15, %rdi
movl $0xfff, %esi            # imm = 0xFFF
callq 0xd5f12
movq %rax, %rbx
movq %r15, %rdi
callq 0xd60da
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_ct_hist(ha_ct_t const*, long*, int)
static void ha_ct_hist(const ha_ct_t *h, int64_t cnt[YAK_N_COUNTS], int n_thread)
{
	hist_aux_t a;
	int i, j;
	a.h = h;
	memset(cnt, 0, YAK_N_COUNTS * sizeof(uint64_t));
	CALLOC(a.cnt, n_thread);
	///start 4096 threads
	kt_for(n_thread, worker_ct_hist, &a, 1<<h->pre);
	for (i = 0; i < YAK_N_COUNTS; ++i) cnt[i] = 0;
	for (j = 0; j < n_thread; ++j)
		for (i = 0; i < YAK_N_COUNTS; ++i)
			cnt[i] += a.cnt[j].c[i];
	free(a.cnt);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x8(%rsp), %r15
movq %rdi, (%r15)
xorl %ebp, %ebp
movl $0x8000, %edx           # imm = 0x8000
movq %rsi, %rdi
xorl %esi, %esi
callq 0x20e0
movslq %ebx, %r13
movl $0x8000, %esi           # imm = 0x8000
movq %r13, %rdi
callq 0x2120
movq %rax, 0x8(%r15)
movb 0x4(%r12), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x46ba(%rip), %rsi      # 0xdaca3
movl %r13d, %edi
movq %r15, %rdx
callq 0xc67c0
cmpq $0x1000, %rbp           # imm = 0x1000
je 0xd6607
andq $0x0, (%r14,%rbp,8)
incq %rbp
jmp 0xd65f4
movq 0x10(%rsp), %rdi
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
movq %rdi, %rcx
cmpq %rbx, %rax
je 0xd663f
xorl %edx, %edx
cmpq $0x1000, %rdx           # imm = 0x1000
je 0xd6633
movq (%rcx,%rdx,8), %rsi
addq %rsi, (%r14,%rdx,8)
incq %rdx
jmp 0xd661d
incq %rax
addq $0x8000, %rcx           # imm = 0x8000
jmp 0xd6616
callq 0x2220
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq