LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: init_hap_overlaps_list(hap_overlaps_list*, unsigned int)
void init_hap_overlaps_list(hap_overlaps_list* x, uint32_t num)
{
    uint32_t i = 0;
    x->num = num;
    x->x = (kvec_hap_overlaps*)malloc(sizeof(kvec_hap_overlaps)*x->num);
    for (i = 0; i < x->num; i++)
    {
        kv_init(x->x[i].a);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
imulq $0x18, %rax, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x170012
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x16ffb1
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: destory_hap_overlaps_list(hap_overlaps_list*)
void destory_hap_overlaps_list(hap_overlaps_list* x)
{
    uint32_t i = 0;
    for (i = 0; i < x->num; i++)
    {
        kv_destroy(x->x[i].a);
    }
    free(x->x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x17008b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17005a
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: prefilter(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned int)
uint32_t prefilter(uint32_t x_pos, uint32_t y_pos, uint32_t xLen, uint32_t yLen, uint32_t dir, 
float Hap_rate, uint32_t seedOcc)
{
    uint32_t max_count = 0, min_count = 0;
    uint32_t /**xLeftBeg, **/xLeftLen, yLeftBeg, yLeftLen;
    uint32_t xRightBeg, xRightLen, yRightBeg, yRightLen;
    if(dir == 0)
    {
        /**xLeftBeg = 0;**/ xLeftLen = x_pos; xRightBeg = x_pos; xRightLen = xLen - xRightBeg;
        yLeftBeg = 0; yLeftLen = y_pos; yRightBeg = y_pos; yRightLen = yLen - yRightBeg;
    }
    else
    {
        /**xLeftBeg = 0;**/ xLeftLen = x_pos; xRightBeg = x_pos; xRightLen = xLen - xRightBeg;

        yLeftBeg = y_pos + 1; yLeftLen = yLen - yLeftBeg;
        yRightBeg = 0; yRightLen = y_pos + 1;
    }



    max_count = seedOcc;
    min_count = MIN(xLeftLen, yLeftLen) + MIN(xRightLen, yRightLen);
    if(min_count == 0) return NON_PLOID;
    if(max_count <= min_count*Hap_rate) return NON_PLOID;
    return PLOID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x170104
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x10(%rbp), %eax
subl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x14(%rbp), %eax
subl -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x17013b
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x10(%rbp), %eax
subl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x14(%rbp), %eax
subl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x40(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
ja 0x170151
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x170157
movl -0x34(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
ja 0x17016d
movl -0x3c(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x170173
movl -0x44(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
movl -0x50(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x17018d
movl $0x1, -0x4(%rbp)
jmp 0x1701b7
movl -0x24(%rbp), %eax
cvtsi2ss %rax, %xmm1
movl -0x28(%rbp), %eax
cvtsi2ss %rax, %xmm0
mulss -0x1c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x1701b0
movl $0x1, -0x4(%rbp)
jmp 0x1701b7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_debug_unitig(ma_utg_t*, unsigned long*, char const*)
void print_debug_unitig(ma_utg_t *xReads, uint64_t* position_index, const char* infor)
{
    uint32_t k;
    fprintf(stderr, "\n%s: n = %u\n", infor, xReads->n);
    for (k = 0; k < xReads->n; k++)
    {
        fprintf(stderr, "(%u)v: %u, len: %u, index: %u, pos: %u\n", 
        k, (uint32_t)(xReads->a[k]>>32), (uint32_t)xReads->a[k], (uint32_t)(position_index[xReads->a[k]>>33]),
        (uint32_t)(position_index[xReads->a[k]>>33]>>32));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x253e05(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x21a101(%rip), %rsi    # 0x38a2f1
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x1702a0
movq 0x253dcb(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r8d
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rsi
movq 0x18(%rsi), %rsi
movl -0x1c(%rbp), %r9d
movq (%rsi,%r9,8), %rsi
shrq $0x21, %rsi
movq (%rax,%rsi,8), %rax
movl %eax, %r9d
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rsi
movq 0x18(%rsi), %rsi
movl -0x1c(%rbp), %r10d
movq (%rsi,%r10,8), %rsi
shrq $0x21, %rsi
movq (%rax,%rsi,8), %rax
shrq $0x20, %rax
leaq 0x21a076(%rip), %rsi    # 0x38a2fe
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1701fe
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: cmp_hap_alignment(void const*, void const*)
int cmp_hap_alignment(const void * a, const void * b)
{
    if((*(asg_arc_t_offset*)a).x.el > (*(asg_arc_t_offset*)b).x.el) return 1;
    if((*(asg_arc_t_offset*)a).x.el < (*(asg_arc_t_offset*)b).x.el) return -1;

    long long aOff = Cal_Off((*(asg_arc_t_offset*)a).Off);
    long long bOff = Cal_Off((*(asg_arc_t_offset*)b).Off);

    if(aOff > bOff) return 1;
    if(aOff < bOff) return -1;

    if(((*(asg_arc_t_offset*)a).Off>>32) > ((*(asg_arc_t_offset*)b).Off>>32)) return 1;
    if(((*(asg_arc_t_offset*)a).Off>>32) < ((*(asg_arc_t_offset*)b).Off>>32)) return -1;

    if((uint32_t)((*(asg_arc_t_offset*)a).Off) > (uint32_t)((*(asg_arc_t_offset*)b).Off)) return 1;
    if((uint32_t)((*(asg_arc_t_offset*)a).Off) < (uint32_t)((*(asg_arc_t_offset*)b).Off)) return -1;

    if((*(asg_arc_t_offset*)a).weight < (*(asg_arc_t_offset*)b).weight) return 1;
    if((*(asg_arc_t_offset*)a).weight > (*(asg_arc_t_offset*)b).weight) return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jle 0x17053c
movl $0x1, -0x4(%rbp)
jmp 0x17068c
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0x17055c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movl %eax, %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x1705b0
movl $0x1, -0x4(%rbp)
jmp 0x17068c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x1705c6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jbe 0x1705ef
movl $0x1, -0x4(%rbp)
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jae 0x170615
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl %ecx, %eax
jbe 0x170632
movl $0x1, -0x4(%rbp)
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl %ecx, %eax
jae 0x17064f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x17066a
movl $0x1, -0x4(%rbp)
jmp 0x17068c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jbe 0x170685
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17068c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: cmp_hap_alignment_chaining(void const*, void const*)
int cmp_hap_alignment_chaining(const void * a, const void * b)
{
    if((*(asg_arc_t_offset*)a).x.el > (*(asg_arc_t_offset*)b).x.el) return 1;
    if((*(asg_arc_t_offset*)a).x.el < (*(asg_arc_t_offset*)b).x.el) return -1;

    if(((*(asg_arc_t_offset*)a).Off>>32) > ((*(asg_arc_t_offset*)b).Off>>32)) return 1;
    if(((*(asg_arc_t_offset*)a).Off>>32) < ((*(asg_arc_t_offset*)b).Off>>32)) return -1;

    if((uint32_t)((*(asg_arc_t_offset*)a).Off) > (uint32_t)((*(asg_arc_t_offset*)b).Off)) return 1;
    if((uint32_t)((*(asg_arc_t_offset*)a).Off) < (uint32_t)((*(asg_arc_t_offset*)b).Off)) return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jle 0x1706cc
movl $0x1, -0x4(%rbp)
jmp 0x170779
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1706ec
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x170779
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jbe 0x170712
movl $0x1, -0x4(%rbp)
jmp 0x170779
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jae 0x170738
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x170779
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl %ecx, %eax
jbe 0x170755
movl $0x1, -0x4(%rbp)
jmp 0x170779
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl %ecx, %eax
jae 0x170772
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x170779
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: cmp_hap_candidates(void const*, void const*)
int cmp_hap_candidates(const void * a, const void * b)
{
    if((*(hap_candidates*)a).weight < (*(hap_candidates*)b).weight) return 1;
    if((*(hap_candidates*)a).weight > (*(hap_candidates*)b).weight) return -1;

    if((*(hap_candidates*)a).index_beg > (*(hap_candidates*)b).index_beg) return 1;
    if((*(hap_candidates*)a).index_beg < (*(hap_candidates*)b).index_beg) return -1;
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1707a5
movl $0x1, -0x4(%rbp)
jmp 0x1707f7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x1707be
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1707f7
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jbe 0x1707d7
movl $0x1, -0x4(%rbp)
jmp 0x1707f7
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x1707f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1707f7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: classify_hap_overlap(long long, long long, long long, long long, long long, long long, long long*, long long*, long long*, long long*)
uint32_t classify_hap_overlap(long long xBeg, long long xEnd, long long xLen,
long long yBeg, long long yEnd, long long yLen, long long* r_xBeg, long long* r_xEnd, 
long long* r_yBeg, long long* r_yEnd)
{
    long long n_x_beg, n_x_end, n_y_beg, n_y_end;
    get_hap_overlapLen(xBeg, xEnd, xLen, yBeg, yEnd, yLen, &n_x_beg, &n_x_end, &n_y_beg, &n_y_end);
    if(r_xBeg) (*r_xBeg) = n_x_beg;
    if(r_xEnd) (*r_xEnd) = n_x_end;
    if(r_yBeg) (*r_yBeg) = n_y_beg;
    if(r_yEnd) (*r_yEnd) = n_y_end;
    if(n_x_beg == 0 && n_x_end == xLen - 1) return YCX;
    if(n_y_beg == 0 && n_y_end == yLen - 1) return XCY;
    if(n_y_beg == 0 && n_x_end == xLen - 1) return X2Y;
    if(n_x_beg == 0 && n_y_end == yLen - 1) return Y2X;
    return XCY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
leaq -0x48(%rbp), %rbx
leaq -0x50(%rbp), %r11
leaq -0x58(%rbp), %r10
leaq -0x60(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x185700
cmpq $0x0, 0x10(%rbp)
je 0x170883
movq -0x48(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x18(%rbp)
je 0x170895
movq -0x50(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x20(%rbp)
je 0x1708a7
movq -0x58(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x28(%rbp)
je 0x1708b9
movq -0x60(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x48(%rbp)
jne 0x1708da
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1708da
movl $0x3, -0xc(%rbp)
jmp 0x170944
cmpq $0x0, -0x58(%rbp)
jne 0x1708fb
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1708fb
movl $0x2, -0xc(%rbp)
jmp 0x170944
cmpq $0x0, -0x58(%rbp)
jne 0x17091c
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x17091c
movl $0x0, -0xc(%rbp)
jmp 0x170944
cmpq $0x0, -0x48(%rbp)
jne 0x17093d
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x17093d
movl $0x1, -0xc(%rbp)
jmp 0x170944
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_pair_hap_coverage(unsigned long*, unsigned int, ma_hit_t_alloc*, ma_sub_t*)
uint64_t get_pair_hap_coverage(uint64_t* readIDs, uint32_t Len, ma_hit_t_alloc* sources, ma_sub_t* coverage_cut)
{
    uint32_t m, n, qn;
    ma_hit_t *h;
    uint64_t R_bases = 0, C_bases = 0;

    for (m = 0; m < Len; m++)
    {
        qn = readIDs[m]>>33;
        R_bases += coverage_cut[qn].e - coverage_cut[qn].s;
        for (n = 0; n < (uint64_t)(sources[qn].length); n++)
        {
            h = &(sources[qn].buffer[n]);
            C_bases += Get_qe((*h)) - Get_qs((*h));
        }
    }

    return C_bases/R_bases;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x170a3f
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movl -0x2c(%rbp), %edx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, %eax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x170a2f
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
subl %ecx, %eax
movl %eax, %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1709d2
jmp 0x170a31
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x17097a
movq -0x48(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x40(%rbp)
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: vote_overlap_type(kvec_asg_arc_t_offset*, hap_candidates*, unsigned long*, ma_utg_t*, ma_utg_t*)
uint32_t vote_overlap_type(kvec_asg_arc_t_offset* u_buffer, hap_candidates* hap_can, 
uint64_t* position_index, ma_utg_t* xReads, ma_utg_t* yReads)
{
    uint32_t i, xBasePos, yBasePos;
    asg_arc_t_offset* arch = NULL;
    uint32_t flag[4];
    flag[X2Y] = flag[Y2X] = flag[XCY] = flag[YCX] = 0;


    for (i = hap_can->index_beg; i <= hap_can->index_end; i++)
    {
        arch = &(u_buffer->a.a[i]);
        xBasePos = (uint32_t)(arch->Off>>32);
        yBasePos = (uint32_t)(arch->Off);
        flag[classify_hap_overlap(xBasePos, xBasePos, xReads->len, yBasePos, yBasePos, yReads->len,
        NULL, NULL, NULL, NULL)]++;
    }
    
    uint32_t max_flag_i = 0;
    for (i = 0; i < 4; i++)
    {
        if(i == max_flag_i) continue;
        if(flag[i] > flag[max_flag_i])
        {
            max_flag_i = i;
        }
    }
    
    return max_flag_i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
ja 0x1725b6
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movl %eax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %edi
movl -0x30(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movl -0x34(%rbp), %eax
movl %eax, %ecx
movl -0x34(%rbp), %eax
movl %eax, %r8d
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x170800
movl %eax, %eax
movl -0x50(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1724fd
movl $0x0, -0x54(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jae 0x1725f7
movl -0x2c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jne 0x1725d4
jmp 0x1725ec
movl -0x2c(%rbp), %eax
movl -0x50(%rbp,%rax,4), %eax
movl -0x54(%rbp), %ecx
cmpl -0x50(%rbp,%rcx,4), %eax
jbe 0x1725ea
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x1725ec
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1725c4
movl -0x54(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_asg_arc_t_offset(asg_arc_t_offset*, long long, char const*)
void print_asg_arc_t_offset(asg_arc_t_offset* x, long long n, const char* info)
{
    fprintf(stderr,"\n\n(%s)n: %lld\n", info, n);
    long long i, x_off, y_off;
    for (i = 0; i < n; i++)
    {
        x_off = (long long)(x[i].Off>>32);
        y_off = (long long)((uint32_t)x[i].Off);
        fprintf(stderr, "i: %lld, x_off: %lld, y_off: %lld, weight: %lu, rev: %u, ol: %u\n", 
        i, x_off, y_off, (unsigned long)x[i].weight, x[i].x.el, x[i].x.ol);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x250e05(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x217139(%rip), %rsi    # 0x38a326
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x1732aa
movq -0x8(%rbp), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq 0x250da1(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x8(%rbp), %rax
imulq $0x28, -0x20(%rbp), %rsi
addq %rsi, %rax
movq 0x20(%rax), %r9
movq -0x8(%rbp), %rax
imulq $0x28, -0x20(%rbp), %rsi
addq %rsi, %rax
movzbl 0x12(%rax), %r10d
movq -0x8(%rbp), %rax
imulq $0x28, -0x20(%rbp), %rsi
addq %rsi, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x2170ab(%rip), %rsi    # 0x38a335
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1731fc
addq $0x40, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_idx_by_base(ma_utg_t*, asg_t*, long long, long long, long long*, long long*)
void get_idx_by_base(ma_utg_t *x, asg_t *read_g, long long beg_base, long long end_base, 
                                            long long* beg_idx, long long* end_idx)
{
    long long offset, r_beg, r_end;
    uint64_t i, rId;
    (*beg_idx) = (*end_idx) = -1;
    for (i = 0, offset = 0; i < x->n; i++)
    {
        rId = x->a[i]>>33;
        r_beg = offset; r_end = offset + (long long)(read_g->seq[rId].len) - 1;
        offset += (uint32_t)x->a[i];
        if(beg_base > r_end || r_beg > end_base)
        {
            if((*beg_idx) != -1 && (*end_idx) != -1) break;
            continue;
        } 
        if((*beg_idx) == -1) (*beg_idx) = i;
        (*end_idx) = i;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $-0x1, (%rax)
movq -0x28(%rbp), %rax
movq $-0x1, (%rax)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x50(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jae 0x175733
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x58(%rbp), %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
addq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x1756ea
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jle 0x175702
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x175700
movq -0x30(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x175700
jmp 0x175733
jmp 0x175722
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
jne 0x175717
movq -0x50(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x175662
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_chain_data(int*, int*, int*, long long)
void print_chain_data(int32_t* Scores, int32_t* Pres, int32_t* Begs, long long n)
{
    fprintf(stderr,"*****\nn_chain: %lld\n", n);
    long long i;
    for (i = 0; i < n; i++)
    {
        fprintf(stderr, "i: %lld, Scores: %d, Pres: %d, Begs: %d\n", 
        i, Scores[i], Pres[i], Begs[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq 0x24b3a1(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x2117b7(%rip), %rsi    # 0x38a404
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x178cb3
movq 0x24b373(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rsi
movl (%rax,%rsi,4), %r8d
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rsi
movl (%rax,%rsi,4), %r9d
leaq 0x21177b(%rip), %rsi    # 0x38a419
movb $0x0, %al
callq 0x22a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x178c5c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: filter_secondary_chain(long long, long long, double)
int filter_secondary_chain(long long max_score, long long cur_score, double rate)
{
    if(cur_score >= max_score) return 1;
    long long diff = max_score - cur_score;
    if(max_score < 0) max_score *= -1;
    if(diff >= max_score*(1-rate)) return 0;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jl 0x179954
movl $0x1, -0x4(%rbp)
jmp 0x1799a3
movq -0x10(%rbp), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jge 0x179970
imulq $-0x1, -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cvtsi2sdq -0x28(%rbp), %xmm0
cvtsi2sdq -0x10(%rbp), %xmm1
movsd 0x20867c(%rip), %xmm2   # 0x382000
subsd -0x20(%rbp), %xmm2
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x17999c
movl $0x0, -0x4(%rbp)
jmp 0x1799a3
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: get_specific_hap_overlap(kvec_hap_overlaps*, unsigned int, unsigned int)
int get_specific_hap_overlap(kvec_hap_overlaps* x, uint32_t qn, uint32_t tn)
{
    uint32_t i;
    for (i = 0; i < x->a.n; i++)
    {
        if(x->a.a[i].xUid == qn && x->a.a[i].yUid == tn)
        {
            return i;
        }        
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x17a1ba
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x17a1ad
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x17a1ad
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x17a1c1
jmp 0x17a1af
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17a165
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: set_reverse_hap_overlap(hap_overlaps*, hap_overlaps*, unsigned int*)
void set_reverse_hap_overlap(hap_overlaps* dest, hap_overlaps* source, uint32_t* types)
{
    dest->status = REVE_EXIST;
    dest->rev = source->rev;
    dest->type = types[source->type];
    dest->weight = source->weight;
    dest->xUid = source->yUid;
    dest->yUid = source->xUid;
    dest->x_beg_pos = source->y_beg_pos;
    dest->x_end_pos = source->y_end_pos;
    dest->y_beg_pos = source->x_beg_pos;
    dest->y_end_pos = source->x_end_pos;
    dest->x_beg_id = source->y_beg_id;
    dest->x_end_id = source->y_end_id;
    dest->y_beg_id = source->x_beg_id;
    dest->y_end_id = source->x_end_id;
    dest->score = source->score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movl (%rax,%rcx,4), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: filter_hap_overlaps_by_length(hap_overlaps_list*, unsigned int)
void filter_hap_overlaps_by_length(hap_overlaps_list* all_ovlp, uint32_t minLen)
{
    if(minLen == 0) return;
    hap_overlaps *x = NULL;
    uint32_t v, i, m, uId;    

    for (v = 0; v < all_ovlp->num; v++)
    {
        uId = v;
        m = 0;
        for (i = 0; i < all_ovlp->x[uId].a.n; i++)
        {
            x = &(all_ovlp->x[uId].a.a[i]);
            if(x->x_end_id - x->x_beg_id < minLen) continue;
            all_ovlp->x[uId].a.a[m] = (*x);
            m++;
        }
        all_ovlp->x[uId].a.n = m;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x17ba6a
jmp 0x17bb59
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x17bb59
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x28(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x17bb32
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x14(%rcx), %eax
cmpl -0xc(%rbp), %eax
jae 0x17baee
jmp 0x17bb24
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movl -0x24(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rdi
movl $0x40, %edx
callq 0x2180
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x17ba9d
movl -0x24(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x28(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17ba79
addq $0x30, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: decode_score(unsigned int, unsigned int)
long long decode_score(uint32_t h_bits, uint32_t l_bits)
{
    uint64_t x; 
    x = h_bits; x <<= 32; x += l_bits;
    long long score = ((uint64_t)((uint64_t)x<<1)>>1);
    if((x>>63) == 0) score *= -1;
    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
shrq %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
shrq $0x3f, %rax
cmpq $0x0, %rax
jne 0x17c38d
imulq $-0x1, -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: clean_purge_graph(asg_t*, float, unsigned int)
void clean_purge_graph(asg_t *purge_g, float drop_ratio, uint32_t is_force_break)
{
    uint64_t operation = 1;
    while (operation > 0)
    {
        operation = 0;
        operation += asg_pop_bubble_purge_graph(purge_g);
        operation += purge_g_arc_del_short_diploid_by_score(purge_g, drop_ratio);
    }
    
    if(is_force_break) purge_g_arc_del_short_diploid_by_score(purge_g, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq $0x1, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x17d9f8
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17cc60
cltq
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
callq 0x17d4a0
cltq
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x17d9bc
cmpl $0x0, -0x10(%rbp)
je 0x17da0f
movq -0x8(%rbp), %rdi
movss 0x201682(%rip), %xmm0   # 0x37f08c
callq 0x17d4a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_all_purge_ovlp(ma_ug_t*, hap_overlaps_list*, char const*)
void print_all_purge_ovlp(ma_ug_t *ug, hap_overlaps_list* all_ovlp, const char* cmd)
{
    fprintf(stderr, "\n%s--->ug->u.n: %u\n", cmd, (uint32_t)ug->u.n);
    uint32_t v, uId, i;
    for (v = 0; v < all_ovlp->num; v++)
    {
        uId = v;
        for (i = 0; i < all_ovlp->x[uId].a.n; i++)
        {
            print_hap_paf(ug, &(all_ovlp->x[uId].a.a[i]));
        }
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x243275(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
leaq 0x2098e0(%rip), %rsi    # 0x38a662
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x180e02
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x20(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x180df5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
movl -0x24(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
callq 0x178a00
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x180da9
jmp 0x180df7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x180d90
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x240a89(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x20a4be(%rip), %rsi    # 0x38da1f
leaq 0x207171(%rip), %rdx    # 0x38a6d9
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x1836a1
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x18(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq 0x2409fb(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x10(%rax), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movq -0x28(%rbp), %rax
movl 0x14(%rax), %r9d
leaq 0x2070e9(%rip), %rsi    # 0x38a6ee
movb $0x0, %al
callq 0x22a0
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
ja 0x183691
movq 0x2409bf(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, %edi
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x167290
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %edx
movl %eax, %ecx
shrl %ecx
addl $0x1, %ecx
leaq 0x207096(%rip), %rsi    # 0x38a715
movb $0x0, %al
callq 0x22a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x183612
jmp 0x183693
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x183586
movq 0x240938(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x20a36d(%rip), %rsi    # 0x38da1f
leaq 0x207020(%rip), %rdx    # 0x38a6d9
movb $0x0, %al
callq 0x22a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x183c04
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x183c04
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rdi
callq 0xcd170
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdi
callq 0xcd170
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x18438c
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x24(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x18437c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jae 0x18435c
jmp 0x184371
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x183c10
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x18430e
jmp 0x18437e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1842f7
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jg 0x18574c
movq -0x20(%rbp), %rax
subq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x185760
movq -0x8(%rbp), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
subq -0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jg 0x1857a4
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x1857bc
movq -0x10(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x1857ce
movq -0x8(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x18(%rbp)
je 0x1857e0
movq -0x10(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x20(%rbp)
je 0x1857f2
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x28(%rbp)
je 0x185804
movq -0x28(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
subq -0x8(%rbp), %rax
addq $0x1, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: modify_target_interval(long long, long long, long long, long long*, long long*)
inline void modify_target_interval(long long beg, long long end, long long len,
long long* target_beg, long long* target_end)
{
    #define TARGET_SGIFT 3
    beg -= TARGET_SGIFT;
    end += TARGET_SGIFT;
    if(beg < 0) beg = 0;
    if(end >= len) end = len - 1;
    (*target_beg) = beg;
    (*target_end) = end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
subq $0x3, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jge 0x1859bf
movq $0x0, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jl 0x1859d5
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x1, %eax
jle 0x185c88
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movl %eax, %eax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jl 0x185c80
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x185c86
movl -0x20(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x185c26
movl -0x18(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
jl 0x185d24
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x185cf0
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x185cca
popq %rbp
retq
nopw %cs:(%rax,%rax)