LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: check_weak_ma_hit(ma_hit_t_alloc*, ma_hit_t_alloc*, long long, unsigned int, unsigned int)
inline int check_weak_ma_hit(ma_hit_t_alloc* aim_paf, ma_hit_t_alloc* reverse_paf_list, 
long long weakID, uint32_t w_qs, uint32_t w_qe)
{
    long long i = 0;
    long long strongID, index;
    for (i = 0; i < aim_paf->length; i++)
    {
        ///if this is a strong overlap
        if (
        aim_paf->buffer[i].del == 0
        &&
        aim_paf->buffer[i].ml == 1
        && 
        Get_qs(aim_paf->buffer[i]) <= w_qs
        && 
        Get_qe(aim_paf->buffer[i]) >= w_qe)
        {
            strongID = Get_tn(aim_paf->buffer[i]);
            index = get_specific_overlap(&(reverse_paf_list[strongID]), strongID, weakID);
            if(index != -1) {
                // if((Get_qn(aim_paf->buffer[i]) == 27087 && weakID == 27128) || (Get_qn(aim_paf->buffer[i]) == 27128 && weakID == 27087)) {
                //     ma_hit_t *h = &(aim_paf->buffer[i]);
                //     fprintf(stderr, "[M::%s]\t%.*s(qn::%u)\t%u\t%u\t%u\t%c\t%.*s(tn::%u)\t%u\t%u\t%u\t%u\t%u\t255\n", __func__, (int)Get_NAME_LENGTH(R_INF, Get_qn(*h)), Get_NAME((R_INF), Get_qn(*h)), Get_qn(*h), (uint32_t)Get_READ_LENGTH(R_INF, Get_qn(*h)), Get_qs(*h), Get_qe(*h), "+-"[h->rev], 
                //         (int)Get_NAME_LENGTH(R_INF, Get_tn(*h)), Get_NAME((R_INF), Get_tn(*h)), Get_tn(*h), (uint32_t)Get_READ_LENGTH(R_INF, Get_tn(*h)), Get_ts(*h), Get_te(*h), h->ml, h->bl);
                // }
                return 0;
            }
        }
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jge 0x167279
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
jne 0x167266
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x1e, %rax
andq $0x1, %rax
cmpl $0x1, %eax
jne 0x167266
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpl -0x24(%rbp), %eax
ja 0x167266
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x28(%rbp), %eax
jb 0x167266
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
imulq $0x18, -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0xce1b0
movq %rax, -0x40(%rbp)
cmpq $-0x1, -0x40(%rbp)
je 0x167264
movl $0x0, -0x4(%rbp)
jmp 0x167280
jmp 0x167266
jmp 0x167268
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x16719b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/./Overlaps.h
// Function: get_origin_uid(unsigned int, trans_chain*, unsigned int*, unsigned int*)
inline uint32_t get_origin_uid(uint32_t v, trans_chain* t_ch, uint32_t *off, uint32_t *idx)
{
	if(off) (*off) = (t_ch->rUpos[v>>1]>>32);
	if(idx) (*idx) = (uint32_t)(t_ch->rUpos[v>>1]);
    if(t_ch->rUpos[v>>1] == (uint64_t)-1) return (uint32_t)-1;
    return (uint32_t)(((t_ch->rUidx[v>>1]>>1)<<1) + ((t_ch->rUidx[v>>1]^v)&1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1672c9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x1672eb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x16730a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16733b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl %eax
shll %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x8(%rbp), %edx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,4), %ecx
xorl -0x8(%rbp), %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: chhylp123[P]hifiasm/./Overlaps.h
// Function: check_tip(asg_t*, unsigned int, unsigned int*, buf_t*, unsigned int)
inline uint32_t check_tip(asg_t *sg, uint32_t begNode, uint32_t* endNode, buf_t* b, uint32_t max_ext)
{
    ///cut tip of length <= max_ext
    uint32_t v = begNode, w;
    uint32_t kv;
    uint32_t eLen = 0;
    (*endNode) = (uint32_t)-1;
    b->b.n = 0;
    while (1)
    {
        kv = get_real_length(sg, v, NULL);
        (*endNode) = v;
        eLen++;
        if(b) kv_push(uint32_t, b->b, v);
        if(kv == 0) return END_TIPS;
        if(kv > 1) return MUL_OUTPUT;
        ///if(eLen > max_ext) return LONG_TIPS;
        ///kv must be 1 here
        kv = get_real_length(sg, v, &w);
        ///here this value must be >= 1
        if(get_real_length(sg, w^1, NULL)!=1) return MUL_INPUT;
        v = w;
        if(v == begNode) return LOOP;
        if(eLen >= max_ext) return LONG_TIPS;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x16743c
jmp 0x1673b0
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jne 0x167419
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x1673de
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
shlq %rax
movq %rax, -0x48(%rbp)
jmp 0x1673e9
movl $0x2, %eax
movq %rax, -0x48(%rbp)
jmp 0x1673e9
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x30(%rbp), %edx
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x38(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x38(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x16743c
cmpl $0x0, -0x38(%rbp)
jne 0x16744b
movl $0x5, -0x4(%rbp)
jmp 0x1674bb
cmpl $0x1, -0x38(%rbp)
jbe 0x16745a
movl $0x4, -0x4(%rbp)
jmp 0x1674bb
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x34(%rbp), %rdx
callq 0x166b50
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x16748e
movl $0x3, -0x4(%rbp)
jmp 0x1674bb
movl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x1674a5
movl $0x7, -0x4(%rbp)
jmp 0x1674bb
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jb 0x1674b6
movl $0x0, -0x4(%rbp)
jmp 0x1674bb
jmp 0x16737e
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: is_useful_node(unsigned int, unsigned int, unsigned int, unsigned int, float, float, unsigned int)
inline uint32_t is_useful_node(uint32_t flag_occ, uint32_t non_flag_occ, uint32_t drop_occ, uint32_t tot_occ,
float flag_rate, float used_rate, uint32_t min_occ)
{
    if((flag_occ > 0) && (flag_occ >= min_occ) && (flag_occ >= ((non_flag_occ+flag_occ+drop_occ)*flag_rate)) 
                                                && (drop_occ <= (tot_occ*used_rate))) {
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movss %xmm1, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpl $0x0, -0x8(%rbp)
jbe 0x167fb2
movl -0x8(%rbp), %eax
cmpl -0x20(%rbp), %eax
jb 0x167fb2
movl -0x8(%rbp), %eax
movl %eax, %ecx
cvtsi2ss %rax, %xmm0
movl -0xc(%rbp), %eax
addl %ecx, %eax
movl -0x10(%rbp), %ecx
addl %ecx, %eax
cvtsi2ss %rax, %xmm1
mulss -0x18(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jb 0x167fb2
movl -0x10(%rbp), %eax
cvtsi2ss %rax, %xmm1
movl -0x14(%rbp), %eax
cvtsi2ss %rax, %xmm0
mulss -0x1c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x167fb2
movl $0x1, -0x4(%rbp)
jmp 0x167fb9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_scp_len(sec_t*, ma_ug_t*)
inline uint64_t get_scp_len(sec_t *scp, ma_ug_t *mg)
{
    uint64_t k, len; ma_utg_t *z = NULL;
    for (k = len = 0; k < scp->n; k++) {
        z = &(mg->u.a[((uint32_t)scp->a[k])>>1]); len += z->len; len += (scp->a[k]>>32);
    }

    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x168058
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x167fe4
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: reset_visit_flag(unsigned char*, asg_t*, R_to_U*, unsigned int, ma_hit_t_alloc*)
inline void reset_visit_flag(uint8_t* visit, asg_t *read_g, R_to_U* ruIndex, uint32_t contigNum, 
ma_hit_t_alloc* x)
{
    uint32_t k, rId, is_Unitig, Hap_cId;

    if(x->length*2 > contigNum)
    {
        memset(visit, 0, contigNum);
    }
    else
    {
        for (k = 0; k < x->length; k++)
        {
            rId = Get_tn(x->buffer[k]);
        
            if(read_g->seq[rId].del == 1)
            {
                ///get the id of read that contains it 
                get_R_to_U(ruIndex, rId, &rId, &is_Unitig);
                if(rId == (uint32_t)-1 || is_Unitig == 1 || read_g->seq[rId].del == 1) continue;
            }

            ///there are two cases: 
            ///1. read at primary contigs, get_R_to_U() return its corresponding contig Id  
            ///2. read at alternative contigs, get_R_to_U() return (uint32_t)-1
            get_R_to_U(ruIndex, rId, &Hap_cId, &is_Unitig);
            if(is_Unitig == 0 || Hap_cId == (uint32_t)-1) continue;
            ///here rId is the id of the read coming from the different haplotype
            ///Hap_cId is the id of the corresponding contig (note here is the contig, instead of untig)
            visit[Hap_cId] = 0;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
shll %eax
cmpl -0x1c(%rbp), %eax
jbe 0x1685ae
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2100
jmp 0x168669
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x168667
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x16862c
movq -0x18(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x30(%rbp), %rdx
leaq -0x34(%rbp), %rcx
callq 0xd3d50
cmpl $-0x1, -0x30(%rbp)
je 0x168628
cmpl $0x1, -0x34(%rbp)
je 0x168628
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x16862a
jmp 0x168659
jmp 0x16862c
movq -0x18(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x38(%rbp), %rdx
leaq -0x34(%rbp), %rcx
callq 0xd3d50
cmpl $0x0, -0x34(%rbp)
je 0x16864c
cmpl $-0x1, -0x38(%rbp)
jne 0x16864e
jmp 0x168659
movq -0x8(%rbp), %rax
movl -0x38(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1685b5
jmp 0x168669
addq $0x40, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: retrieve_skip_overlaps(ma_hit_t_alloc*, unsigned int)
uint32_t inline retrieve_skip_overlaps(ma_hit_t_alloc* x, uint32_t target)
{
    if(x == NULL) return (uint32_t)-1;

    uint32_t i;
    for (i = 0; i < x->length; i++)
    {
        if(Get_tn(x->buffer[i]) == target)
        {
            return i;
        }
    }

    return (uint32_t)-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x16868b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1686d3
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x1686cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x1686bf
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1686d3
jmp 0x1686c1
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x168692
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: check_duplicate(Hap_Align_warp*, unsigned int, unsigned int)
inline uint32_t check_duplicate(Hap_Align_warp* u_buffer, uint32_t x_pos, uint32_t y_pos)
{
    if(u_buffer->x.n == 0) return 0;

    int i = u_buffer->x.n;
    for (i--; i >= 0; i--)
    {
        if(x_pos != (uint32_t)-1 && u_buffer->x.a[i].q_pos != x_pos) return 0;
        if(y_pos != (uint32_t)-1 && u_buffer->x.a[i].t_pos == y_pos)
        {
            u_buffer->x.a[i].is_color++;
            return 1;
        } 
    }

    if(x_pos == (uint32_t)-1) fprintf(stderr, "ERROR: cannot found y\n");
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x168708
movl $0x0, -0x4(%rbp)
jmp 0x1687c5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x1687a0
cmpl $-0x1, -0x14(%rbp)
je 0x16874a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x16874a
movl $0x0, -0x4(%rbp)
jmp 0x1687c5
cmpl $-0x1, -0x18(%rbp)
je 0x168790
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x168790
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1687c5
jmp 0x168792
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16871b
cmpl $-0x1, -0x14(%rbp)
jne 0x1687be
movq 0x25b833(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x221800(%rip), %rsi    # 0x389fb7
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: generate_edge(asg_t*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, asg_arc_t*)
inline void generate_edge(asg_t *r_g, uint32_t v, uint32_t w, uint32_t ol, uint32_t del,
uint32_t strong, uint32_t el, uint32_t no_l_indel, asg_arc_t* t)
{
    uint64_t l = r_g->seq[v>>1].len - ol;
    t->ul = v; t->ul = t->ul << 32; t->ul = t->ul|l;
    t->v = w;
    t->ol = ol;
    t->del = del;
    t->strong = strong;
    t->el = el;
    t->no_l_indel = no_l_indel;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subl -0x14(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x20(%rbp), %rax
movq (%rax), %rcx
shlq $0x20, %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x20(%rbp), %rax
movq (%rax), %rcx
orq -0x28(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %ecx
movq 0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x14(%rbp), %edx
movq 0x20(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movl -0x18(%rbp), %edx
movq 0x20(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %eax
movw %ax, %dx
movq 0x20(%rbp), %rax
movw 0x10(%rax), %cx
andw $0x1, %dx
shlw $0xe, %dx
andw $0xbfff, %cx            # imm = 0xBFFF
orw %dx, %cx
movw %cx, 0x10(%rax)
movl 0x10(%rbp), %eax
movb %al, %cl
movq 0x20(%rbp), %rax
movb %cl, 0x12(%rax)
movl 0x18(%rbp), %eax
movw %ax, %dx
movq 0x20(%rbp), %rax
movw 0x10(%rax), %cx
andw $0x1, %dx
shlw $0xf, %dx
andw $0x7fff, %cx            # imm = 0x7FFF
orw %dx, %cx
movw %cx, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: test_yak_binning(char*, char*)
uint32_t test_yak_binning(char* fn, char *cmd)
{
    gzFile fp; kstream_t *ks; kstring_t str = {0,0,0};
	int dret, eq = 0; fp = gzopen(fn, "r");
	if (fp == 0) return eq;
	ks = ks_init(fp);
	if(ks_getuntil(ks, KS_SEP_LINE, &str, &dret) >= 0) {
		uint64_t sl = strlen(str.s), z;
		for (z = 0; (z < sl) && (str.s[z]!='\t'); z++);
		if(((z+1)<sl) && (str.s[z]=='\t')) {
			if((strlen(str.s+z+1)==strlen(cmd)) && (!memcmp(str.s+z+1, cmd, strlen(cmd)))) {
				eq = 1;
			}
		}		
	}
	free(str.s);
	ks_destroy(ks);
	gzclose(fp);
	return eq;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2100
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2263a1(%rip), %rsi    # 0x3903d6
callq 0x22c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x16a050
movl -0x48(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16a179
movq -0x20(%rbp), %rdi
callq 0x16a190
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2, %esi
leaq -0x40(%rbp), %rdx
leaq -0x44(%rbp), %rcx
callq 0x16a1e0
cmpl $0x0, %eax
jl 0x16a158
movq -0x30(%rbp), %rdi
callq 0x20a0
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rcx
xorl %eax, %eax
cmpq -0x50(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x16a0b5
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x16a0be
jmp 0x16a0ce
jmp 0x16a0c0
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x16a091
movq -0x58(%rbp), %rax
addq $0x1, %rax
cmpq -0x50(%rbp), %rax
jae 0x16a156
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
jne 0x16a156
movq -0x30(%rbp), %rdi
addq -0x58(%rbp), %rdi
addq $0x1, %rdi
callq 0x20a0
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20a0
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jne 0x16a154
movq -0x30(%rbp), %rax
addq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20a0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x20b0
cmpl $0x0, %eax
jne 0x16a154
movl $0x1, -0x48(%rbp)
jmp 0x16a156
jmp 0x16a158
movq -0x30(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rdi
callq 0x16a220
movq -0x20(%rbp), %rdi
callq 0x2380
movl -0x48(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: ha_triobin(hifiasm_opt_t const*)
void ha_triobin(const hifiasm_opt_t *opt)
{
	memset(R_INF.trio_flag, AMBIGU, R_INF.total_reads * sizeof(uint8_t));
	if (opt->fn_bin_list[0] && opt->fn_bin_list[1])
		ha_triobin_list(opt);
	if (opt->fn_bin_yak[0] && opt->fn_bin_yak[1])
		ha_triobin_yak(opt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x25aacd(%rip), %rax    # 0x3c52d0
movq 0x28(%rax), %rdi
leaq 0x25aac2(%rip), %rax    # 0x3c52d0
movq 0x50(%rax), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x16a83c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x16a83c
movq -0x8(%rbp), %rdi
callq 0x16a870
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x16a85b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x16a85b
movq -0x8(%rbp), %rdi
callq 0x16aae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: yak_ch_destroy(yak_ch_t*)
static void yak_ch_destroy(yak_ch_t *h)
{
	int i;
	if (h == 0) return;
	for (i = 0; i < 1<<h->pre; ++i)
		yak_ht_destroy(h->h[i].h);
	free(h->h); free(h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x16c825
jmp 0x16c879
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x16c863
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x16d5b0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16c82c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: yak_ch_init(int, int)
static yak_ch_t *yak_ch_init(int k, int pre)
{
	yak_ch_t *h;
	int i;
	if (pre < YAK_COUNTER_BITS) return 0;
	CALLOC(h, 1);
	h->k = k, h->pre = pre;
	CALLOC(h->h, 1<<h->pre);
	for (i = 0; i < 1<<h->pre; ++i)
		h->h[i].h = yak_ht_init();
	return h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpl $0xa, -0x10(%rbp)
jge 0x16c8a1
movq $0x0, -0x8(%rbp)
jmp 0x16c936
movl $0x1, %edi
movl $0x20, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x16c92e
callq 0x16c9b0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16c8f4
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: yak_ch_get(yak_ch_t const*, unsigned long)
static int yak_ch_get(const yak_ch_t *h, uint64_t x)
{
	int mask = (1<<h->pre) - 1;
	yak_ht_t *g = h->h[x&mask].h;
	khint_t k;
	k = yak_ht_get(g, x >> h->pre << YAK_COUNTER_BITS);
	return k == kh_end(g)? -1 : kh_key(g, k)&YAK_MAX_COUNT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
andq %rdx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
shrq %cl, %rsi
shlq $0xa, %rsi
callq 0x16d440
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x16d162
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x2c(%rbp)
jmp 0x16d169
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x16d169
movl -0x28(%rbp), %eax
movl -0x2c(%rbp), %ecx
cmpl %ecx, %eax
jne 0x16d180
movq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x16d199
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
andq $0x3ff, %rax            # imm = 0x3FF
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Trio.cpp
// Function: phrase_hstatus(char*, char**, unsigned int*)
inline void phrase_hstatus(char *s, char **rname, uint32_t *hid)
{
	char *p = NULL, *id = NULL; *rname = NULL; *hid = (uint32_t)-1;
	uint32_t tot; 
	for (p = s, tot = 0; *p; ++p){
		if (*p == '\t' || *p == ' '){
			*p = 0;
			if(!tot) *rname = p+1;
			else break;
			tot++;
		}
	}
	for (p = s, tot = 0; *p; ++p){
		if (*p == '_') id = p + 1;
	}
	*hid = atoi(id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16d6b2
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x16d679
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x16d6a2
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x0, -0x2c(%rbp)
jne 0x16d697
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x16d699
jmp 0x16d6b2
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x16d6a4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16d658
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16d6f2
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5f, %eax
jne 0x16d6e2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x16d6e4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16d6c1
movq -0x28(%rbp), %rdi
callq 0x2320
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/kthread.cpp
// Function: kt_for
void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n)
{
	if (n_threads > 1) {
		int i;
		kt_for_t t;
		pthread_t *tid;
		t.func = func, t.data = data, t.n_threads = n_threads, t.n = n;
		t.w = (ktf_worker_t*)calloc(n_threads, sizeof(ktf_worker_t));
		tid = (pthread_t*)calloc(n_threads, sizeof(pthread_t));
		for (i = 0; i < n_threads; ++i)
			t.w[i].t = &t, t.w[i].i = i;
		for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktf_worker, &t.w[i]);
		for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
		free(tid); free(t.w);
	} else {
		long j;
		for (j = 0; j < n; ++j) func(data, j, 0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x1, -0x4(%rbp)
jle 0x16d845
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x4(%rbp), %rdi
movl $0x10, %esi
callq 0x2140
movq %rax, -0x40(%rbp)
movslq -0x4(%rbp), %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, -0x58(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16d7ba
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
leaq -0x50(%rbp), %rcx
movq %rcx, (%rax)
movslq -0x24(%rbp), %rcx
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16d77a
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16d802
movq -0x58(%rbp), %rdi
movslq -0x24(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x40(%rbp), %rcx
movslq -0x24(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x8e(%rip), %rdx        # 0x16d880
callq 0x23b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16d7c1
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16d831
movq -0x58(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2190
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16d809
movq -0x58(%rbp), %rdi
callq 0x2210
movq -0x40(%rbp), %rdi
callq 0x2210
jmp 0x16d877
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x16d875
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x60(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x16d84d
jmp 0x16d877
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/kthread.cpp
// Function: ktf_worker(void*)
static void *ktf_worker(void *data)
{
	ktf_worker_t *w = (ktf_worker_t*)data;
	long i;
	for (;;) {
		i = __sync_fetch_and_add(&w->i, w->t->n_threads);
		if (i >= w->t->n) break;
		w->t->func(w->t->data, i, w - w->t->w);
	}
	while ((i = steal_work(w->t)) >= 0)
		w->t->func(w->t->data, i, w - w->t->w);
	pthread_exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movslq (%rax), %rax
lock
xaddq %rax, 0x8(%rcx)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
jl 0x16d8bb
jmp 0x16d8f1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x4, %rcx
movl %ecx, %edx
callq *%rax
jmp 0x16d894
jmp 0x16d8f3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x16dd70
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jl 0x16d93f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x4, %rcx
movl %ecx, %edx
callq *%rax
jmp 0x16d8f3
xorl %eax, %eax
movl %eax, %edi
callq 0x23a0
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/kthread.cpp
// Function: kt_pipeline
void kt_pipeline(int n_threads, void *(*func)(void*, int, void*), void *shared_data, int n_steps)
{
	ktp_t aux;
	pthread_t *tid;
	int i;

	if (n_threads < 1) n_threads = 1;
	aux.n_workers = n_threads;
	aux.n_steps = n_steps;
	aux.func = func;
	aux.shared = shared_data;
	aux.index = 0;
	pthread_mutex_init(&aux.mutex, 0);
	pthread_cond_init(&aux.cv, 0);

	aux.workers = (ktp_worker_t*)calloc(n_threads, sizeof(ktp_worker_t));
	for (i = 0; i < n_threads; ++i) {
		ktp_worker_t *w = &aux.workers[i];
		w->step = 0; w->pl = &aux; w->data = 0;
		w->index = aux.index++;
	}

	tid = (pthread_t*)calloc(n_threads, sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktp_worker, &aux.workers[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
	free(tid); free(aux.workers);

	pthread_mutex_destroy(&aux.mutex);
	pthread_cond_destroy(&aux.cv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x1, -0x4(%rbp)
jge 0x16d976
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq $0x0, -0x90(%rbp)
leaq -0xa0(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22d0
leaq -0xa0(%rbp), %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2230
movslq -0x4(%rbp), %rdi
movl $0x20, %esi
callq 0x2140
movq %rax, -0x80(%rbp)
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16da73
movq -0x80(%rbp), %rax
movslq -0xac(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0xb8(%rbp), %rax
leaq -0xa0(%rbp), %rcx
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x90(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0xb8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x16d9ed
movslq -0x4(%rbp), %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16dae5
movq -0xa8(%rbp), %rdi
movslq -0xac(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x80(%rbp), %rcx
movslq -0xac(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0xa1(%rip), %rdx        # 0x16db70
callq 0x23b0
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x16da92
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16db26
movq -0xa8(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2190
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x16daef
movq -0xa8(%rbp), %rdi
callq 0x2210
movq -0x80(%rbp), %rdi
callq 0x2210
leaq -0xa0(%rbp), %rdi
addq $0x28, %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
addq $0x50, %rdi
callq 0x23f0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/kthread.cpp
// Function: steal_work(kt_for_t*)
static inline long steal_work(kt_for_t *t)
{
	int i, min_i = -1;
	long k, min = LONG_MAX;
	for (i = 0; i < t->n_threads; ++i)
		if (min > t->w[i].i) min = t->w[i].i, min_i = i;
	k = __sync_fetch_and_add(&t->w[min_i].i, t->n_threads);
	return k >= t->n? -1 : k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x16ddea
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jle 0x16dddd
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x16dddf
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16dd94
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
movslq (%rax), %rax
lock
xaddq %rax, 0x8(%rcx,%rdx)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jl 0x16de23
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x16de2b
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_peak_line(int, int, int, long)
void print_peak_line(int c, int x, int exceed, int64_t cnt)
{
	int j;
	if (c >= 0) fprintf(stderr, "[M::%s] %5d: ", __func__, c);
	else fprintf(stderr, "[M::%s] %5s: ", __func__, "rest");
	for (j = 0; j < x; ++j) fputc('*', stderr);
	if (exceed) fputc('>', stderr);
	fprintf(stderr, " %lld\n", (long long)cnt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x16e6cf
movq 0x25592e(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x4(%rbp), %ecx
leaq 0x21bc01(%rip), %rsi    # 0x38a2c0
leaq 0x21bc08(%rip), %rdx    # 0x38a2ce
movb $0x0, %al
callq 0x22a0
jmp 0x16e6f5
movq 0x25590a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x21bbfe(%rip), %rsi    # 0x38a2de
leaq 0x21bbe7(%rip), %rdx    # 0x38a2ce
leaq 0x21bbfe(%rip), %rcx    # 0x38a2ec
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x16e723
movq 0x2558d5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rsi
movl $0x2a, %edi
callq 0x2260
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16e6fc
cmpl $0x0, -0xc(%rbp)
je 0x16e73d
movq 0x2558b0(%rip), %rax    # 0x3c3fe0
movq (%rax), %rsi
movl $0x3e, %edi
callq 0x2260
movq 0x25589c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x21b19b(%rip), %rsi    # 0x3898ed
movb $0x0, %al
callq 0x22a0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_peak(long long*, long long, long long)
void print_peak(long long* cov_buf, long long cov_buf_length, long long max_i)
{
    long long i;
    const long long hist_max = 100;
    // print histogram
	for (i = 0; i < cov_buf_length; ++i) 
    {
		long long x, exceed = 0;
		x = (int)((double)hist_max * cov_buf[i] / cov_buf[max_i] + .499);
		if (x > hist_max) exceed = 1, x = hist_max; // may happen if cnt[2] is higher
		if (i > max_i && x == 0) break;
		print_peak_line(i, x, exceed, cov_buf[i]);
	}
	{
		long long x, exceed = 0;
		long long rest = 0;
		for (; i < cov_buf_length; ++i) rest += cov_buf[i];
		x = (int)((double)hist_max * rest / cov_buf[max_i] + .499);
		if (x > hist_max) exceed = 1, x = hist_max;
		print_peak_line(-1, x, exceed, rest);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x64, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x16e83a
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
cvtsi2sdq (%rax,%rcx,8), %xmm1
movsd 0x21baf0(%rip), %xmm0   # 0x38a2a0
mulsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
cvtsi2sdq (%rax,%rcx,8), %xmm1
divsd %xmm1, %xmm0
movsd 0x210872(%rip), %xmm1   # 0x37f040
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cltq
movq %rax, -0x30(%rbp)
cmpq $0x64, -0x30(%rbp)
jle 0x16e7f3
movq $0x1, -0x38(%rbp)
movq $0x64, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jle 0x16e806
cmpq $0x0, -0x30(%rbp)
jne 0x16e806
jmp 0x16e83a
movq -0x20(%rbp), %rax
movl %eax, %edi
movq -0x30(%rbp), %rax
movl %eax, %esi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
callq 0x16e690
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16e784
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x16e876
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16e84a
cvtsi2sdq -0x50(%rbp), %xmm1
movsd 0x21ba1c(%rip), %xmm0   # 0x38a2a0
mulsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
cvtsi2sdq (%rax,%rcx,8), %xmm1
divsd %xmm1, %xmm0
movsd 0x21079e(%rip), %xmm1   # 0x37f040
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cltq
movq %rax, -0x40(%rbp)
cmpq $0x64, -0x40(%rbp)
jle 0x16e8c7
movq $0x1, -0x48(%rbp)
movq $0x64, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, %esi
movq -0x48(%rbp), %rax
movl %eax, %edx
movq -0x50(%rbp), %rcx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x16e690
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: init_hap_alignment_struct(hap_alignment_struct*, unsigned int)
void init_hap_alignment_struct(hap_alignment_struct* x, uint32_t size)
{
    x->vote_counting = (uint64_t*)malloc(sizeof(uint64_t)*size);
    memset(x->vote_counting, 0, sizeof(uint64_t)*size);

    x->visit = (uint8_t*)malloc(sizeof(uint8_t)*size);
    memset(x->visit, 0, size);

    kv_init(x->u_vecs.a);
    kv_init(x->u_buffer.a);
    kv_init(x->u_buffer_tailIndex.a);
    kv_init(x->u_buffer_prevIndex.a);
    kv_init(x->u_buffer_beg.a);
    kv_init(x->u_buffer_flag.a);
    kv_init(x->u_can.a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %eax
movl %eax, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2100
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x0, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2100
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xd8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xe0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: destory_hap_alignment_struct(hap_alignment_struct*)
void destory_hap_alignment_struct(hap_alignment_struct* x)
{
    free(x->vote_counting);
    free(x->visit);
    kv_destroy(x->u_vecs.a);
    kv_destroy(x->u_buffer.a);
    kv_destroy(x->u_buffer_tailIndex.a);
    kv_destroy(x->u_buffer_prevIndex.a);
    kv_destroy(x->u_buffer_beg.a);
    kv_destroy(x->u_buffer_flag.a);
    kv_destroy(x->u_can.a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: init_pip_hh(asg_t*, ma_hit_t_alloc*, ma_sub_t*, long long)
uint8_t *init_pip_hh(asg_t *rg, ma_hit_t_alloc* reverse_sources, ma_sub_t *coverage_cut, long long sc)
{
    uint8_t *c = NULL; CALLOC(c, rg->n_seq);
    ma_hit_t *h = NULL;
    uint32_t i, k;
    long long R_Base, C_Base;
    for (i = 0; i < rg->n_seq; i++) {
        if(sc <= 0){
            c[i] = 1;
            continue;
        }
        R_Base = (coverage_cut[i].e - coverage_cut[i].s);
        for (k = 0, C_Base = 0; k < reverse_sources[i].length; k++){
            h = &(reverse_sources[i].buffer[k]);
            C_Base += (Get_qe((*h)) - Get_qs((*h)));
        }
        C_Base = (R_Base!=0?(C_Base/R_Base):0);
        C_Base /= sc;
        c[i] = 1;
        if(C_Base < REV_W) c[i] = REV_W -  C_Base;
    }
    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x16fcf3
cmpq $0x0, -0x20(%rbp)
jg 0x16fbec
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x16fce5
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movl -0x38(%rbp), %eax
movq -0x10(%rbp), %rcx
movl -0x34(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jae 0x16fc84
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subl %ecx, %eax
movl %eax, %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x16fc2a
cmpq $0x0, -0x40(%rbp)
je 0x16fc9b
movq -0x48(%rbp), %rax
cqto
idivq -0x40(%rbp)
movq %rax, -0x50(%rbp)
jmp 0x16fca3
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x16fca3
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rax
cqto
idivq %rcx
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0x1, (%rax,%rcx)
cmpq $0x8, -0x48(%rbp)
jge 0x16fce3
movl $0x8, %eax
subq -0x48(%rbp), %rax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x16fce5
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x16fbbd
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: destory_hap_alignment_struct_pip(hap_alignment_struct_pip*)
void destory_hap_alignment_struct_pip(hap_alignment_struct_pip* x)
{
    uint32_t i;
    for (i = 0; i < x->num_threads; i++)
    {
        destory_hap_alignment_struct(&(x->buf[i]));
    }

    free(x->buf);
    free(x->hh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x16ff43
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %eax
imulq $0xf0, %rax, %rax
addq %rax, %rdi
callq 0x16fad0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16ff13
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)