LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: check_chain_indels(Fake_Cigar*, long long, long long, float)
int check_chain_indels(Fake_Cigar* chain, long long xBeg, long long xEnd, float indel_rate)
{
    uint64_t i = 0;
    long long indels = 0, xOffset;
    if(chain->length != 0)
    {
        indels += abs(get_fake_gap_shift(chain, 0));
        xOffset = get_fake_gap_pos(chain, 0);
        if(indels > (xOffset - xBeg + 1) * indel_rate) return 0;

        for (i = 1; i < chain->length; i++)
        {
            indels += abs((get_fake_gap_shift(chain, i) - get_fake_gap_shift(chain, i-1)));
            xOffset = get_fake_gap_pos(chain, i);
            if(indels > (xOffset - xBeg + 1) * indel_rate) return 0;
        }
    }

    if(indels > (xEnd - xBeg + 1) * indel_rate) return 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
xorl %r14d, %r14d
cmpl $0x0, 0x8(%rdi)
je 0x3b92e
movq %rdi, %r12
xorl %esi, %esi
movss %xmm0, 0xc(%rsp)
callq 0x3dc3a
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
movq %r12, %rdi
xorl %esi, %esi
callq 0x3dc2f
movss 0xc(%rsp), %xmm0
cltq
cvtsi2ss %ebp, %xmm2
subq %r15, %rax
incq %rax
cvtsi2ss %rax, %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm1, %xmm2
ja 0x3b95f
movq %rbx, 0x10(%rsp)
movl %ebp, %r14d
cmpl $0x2, 0x8(%r12)
jb 0x3b936
movl $0x1, %r13d
movq %r14, %rbx
movq %r12, %rdi
movl %r13d, %esi
callq 0x3dc3a
movl %eax, %ebp
leal -0x1(%r13), %esi
movq %r12, %rdi
callq 0x3dc3a
subl %eax, %ebp
movl %ebp, %r14d
negl %r14d
cmovsl %ebp, %r14d
addq %rbx, %r14
movq %r12, %rdi
movl %r13d, %esi
callq 0x3dc2f
movss 0xc(%rsp), %xmm0
cltq
xorps %xmm2, %xmm2
cvtsi2ss %r14, %xmm2
subq %r15, %rax
incq %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm1, %xmm2
ja 0x3b971
incq %r13
movl 0x8(%r12), %eax
cmpq %rax, %r13
jb 0x3b8c2
jmp 0x3b936
movq %rbx, 0x10(%rsp)
xorl %r14d, %r14d
xorps %xmm2, %xmm2
cvtsi2ss %r14, %xmm2
movq 0x10(%rsp), %rax
subq %r15, %rax
incq %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
mulss %xmm0, %xmm1
xorl %r14d, %r14d
ucomiss %xmm1, %xmm2
setbe %r14b
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x3b95f
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: update_exact_overlaps(overlap_region_alloc*, UC_Read*, UC_Read*)
void update_exact_overlaps(overlap_region_alloc* overlap_list, UC_Read* g_read, UC_Read* overlap_read)
{
    uint64_t j;
    for (j = 0; j < overlap_list->length; j++)
    {
        if (overlap_list->list[j].is_match != 1)
        {
            if((overlap_list->list[j].x_pos_e + 1 - overlap_list->list[j].x_pos_s) != 
               (overlap_list->list[j].y_pos_e + 1 - overlap_list->list[j].y_pos_s))
            {
                continue;
            }

            if(overlap_list->list[j].y_pos_strand == 0)
            {
                recover_UC_Read(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }
            else
            {
                recover_UC_Read_RC(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }

            if(if_exact_match(g_read->seq, g_read->length, overlap_read->seq, overlap_read->length, 
            overlap_list->list[j].x_pos_s, overlap_list->list[j].x_pos_e, 
            overlap_list->list[j].y_pos_s, overlap_list->list[j].y_pos_e))
            {
                overlap_list->list[j].is_match = 1;
                overlap_list->list[j].strong = 0;
                overlap_list->list[j].without_large_indel = 1;
                overlap_list->list[j].shared_seed = 1;
            }
        }
    }
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x3bc88
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r15), %rax
cmpb $0x1, 0x2c(%rax,%r13)
je 0x3bc66
movl 0x8(%rax,%r13), %ecx
subl 0x4(%rax,%r13), %ecx
movl 0x18(%rax,%r13), %edx
subl 0x14(%rax,%r13), %edx
cmpl %edx, %ecx
jne 0x3bc66
cmpl $0x0, 0x1c(%rax,%r13)
movl 0x10(%rax,%r13), %edx
movq %rbx, %rdi
leaq 0x24f623(%rip), %rsi    # 0x28b230
je 0x3bc16
callq 0x33dc3
jmp 0x3bc1b
callq 0x33cf8
movq (%r15), %r12
movl 0x4(%r12,%r13), %edi
movl 0x8(%r12,%r13), %edx
movl 0x14(%r12,%r13), %esi
movl 0x18(%r12,%r13), %eax
subq %rdi, %rdx
subq %rsi, %rax
cmpq %rdx, %rax
jne 0x3bc66
incq %rdx
addq (%r14), %rdi
addq (%rbx), %rsi
callq 0x21a0
testl %eax, %eax
jne 0x3bc66
movw $0x101, 0x2c(%r12,%r13) # imm = 0x101
movb $0x0, 0x2e(%r12,%r13)
movl $0x1, 0x24(%r12,%r13)
incq %rbp
addq $0xa8, %r13
cmpq 0x10(%r15), %rbp
jb 0x3bbd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: Final_phasing(overlap_region_alloc*, Cigar_record_alloc*, UC_Read*, UC_Read*, unsigned char*)
void Final_phasing(overlap_region_alloc* overlap_list, Cigar_record_alloc* cigarline,
UC_Read* g_read, UC_Read* overlap_read, uint8_t* c2n)
{
    uint64_t i, xLen, yStrand;
    char* x_string;
    char* y_string;
    Cigar_record* cigar;
    resize_Cigar_record_alloc(cigarline, overlap_list->length);



    for (i = 0; i < overlap_list->length; i++)
    {
        if(overlap_list->list[i].is_match == 1 ||
           overlap_list->list[i].is_match == 2 ||
           overlap_list->list[i].is_match == 3)
        {
            xLen = overlap_list->list[i].x_pos_e - overlap_list->list[i].x_pos_s + 1;
            yStrand = overlap_list->list[i].y_pos_strand;
            cigar = &(cigarline->buffer[i]);
            ///has already been matched exactly
            if(overlap_list->list[i].is_match == 1 && overlap_list->list[i].shared_seed == 1)
            {
                add_cigar_record(g_read->seq + overlap_list->list[i].x_pos_s, xLen, cigar, 0);
            }
            else 
            {
                if(yStrand == 0)
                {
                    recover_UC_Read(overlap_read, &R_INF, overlap_list->list[i].y_id);
                }
                else
                {
                    recover_UC_Read_RC(overlap_read, &R_INF, overlap_list->list[i].y_id);
                }
                x_string = g_read->seq;
                y_string = overlap_read->seq;

                fill_chain(&(overlap_list->list[i].f_cigar), x_string, y_string, 
                overlap_list->list[i].x_pos_s, overlap_list->list[i].y_pos_s,
                Get_READ_LENGTH(R_INF, overlap_list->list[i].x_id), 
                Get_READ_LENGTH(R_INF, overlap_list->list[i].y_id), cigar, c2n);
            }

        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %rax
movq %rdi, %r15
movq 0x10(%rdi), %rsi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x59538
cmpq $0x0, 0x10(%r15)
je 0x3bd74
movl $0x2c, %r13d
xorl %r14d, %r14d
leaq 0x24f563(%rip), %rbp    # 0x28b230
xorl %r12d, %r12d
movq %rbx, 0x8(%rsp)
movq (%r15), %rax
movb (%rax,%r13), %cl
decb %cl
cmpb $0x2, %cl
ja 0x3bd5c
movl -0x10(%rax,%r13), %ecx
cmpb $0x1, (%rax,%r13)
jne 0x3bd20
cmpl $0x1, -0x8(%rax,%r13)
jne 0x3bd20
movl -0x24(%rax,%r13), %ebp
subl -0x28(%rax,%r13), %ebp
incl %ebp
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rbx
leaq (%rbx,%r14), %rdi
cmpb $0x0, (%rdi)
je 0x3bd3d
movl %ebp, %esi
xorl %edx, %edx
callq 0x5965e
jmp 0x3bd46
movl -0x1c(%rax,%r13), %edx
movq %rbx, %rdi
movq %rbp, %rsi
testl %ecx, %ecx
je 0x3bd36
callq 0x33dc3
jmp 0x3bd5c
callq 0x33cf8
jmp 0x3bd5c
movl %ebp, %esi
xorl %edx, %edx
callq 0x596ac
addl %ebp, 0x20(%rbx,%r14)
movb $0x0, (%rbx,%r14)
movq 0x8(%rsp), %rbx
leaq 0x24f4d4(%rip), %rbp    # 0x28b230
incq %r12
addq $0x40, %r14
addq $0xa8, %r13
cmpq 0x10(%r15), %r12
jb 0x3bcd5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: reset_final_overlaps(overlap_region_alloc*)
void reset_final_overlaps(overlap_region_alloc *overlap_list)
{
    
    uint64_t i;
    for (i = 0; i < overlap_list->length; i++)
    {
        if (overlap_list->list[i].is_match == 1 || overlap_list->list[i].is_match == 2)
        {
            overlap_list->list[i].x_pos_s = overlap_list->list[i].x_pos_e = (uint32_t)-1;
            overlap_list->list[i].y_pos_s = overlap_list->list[i].y_pos_e = (uint32_t)-1;
            overlap_list->list[i].is_match = 0;
        }
    }

    ha_sort_list_by_anchor(overlap_list);
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x124b44
movq (%rdi), %rcx
addq $0x2c, %rcx
movq $-0x1, %rdx
movb (%rcx), %sil
decb %sil
cmpb $0x1, %sil
ja 0x3bdb5
movq %rdx, -0x28(%rcx)
movq %rdx, -0x18(%rcx)
movb $0x0, (%rcx)
addq $0xa8, %rcx
decq %rax
jne 0x3bd9e
jmp 0x124b44
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: debug_affine_gap_alignment(overlap_region_alloc*, UC_Read*, UC_Read*)
void debug_affine_gap_alignment(overlap_region_alloc *overlap_list, UC_Read* g_read, UC_Read* overlap_read)
{
    uint64_t i;
    kvec_t(uint8_t) x_num;
    kvec_t(uint8_t) y_num;
    kv_init(x_num);
    kv_init(y_num);
    for (i = 0; i < overlap_list->length; i++)
    {
        if (overlap_list->list[i].is_match == 1 && overlap_list->list[i].shared_seed == 1)
        {

            kv_resize(uint8_t, x_num, (uint64_t)(Get_READ_LENGTH(R_INF, overlap_list->list[i].x_id)));
            kv_resize(uint8_t, y_num, (uint64_t)(Get_READ_LENGTH(R_INF, overlap_list->list[i].y_id)));

            get_affine_gap_score(&(overlap_list->list[i]), g_read, overlap_read, x_num.a, y_num.a,
            overlap_list->list[i].x_pos_e + 1 - overlap_list->list[i].x_pos_s, 
            overlap_list->list[i].y_pos_e + 1 - overlap_list->list[i].y_pos_s);
        }
    }

    kv_destroy(x_num);
    kv_destroy(y_num);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x10(%rdi)
je 0x3bf2b
movq %rdi, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
movq (%r15), %rax
cmpb $0x1, 0x2c(%rax,%r14)
jne 0x3bf15
cmpl $0x1, 0x24(%rax,%r14)
jne 0x3bf15
movq 0x24f424(%rip), %rcx    # 0x28b248
movl (%rax,%r14), %eax
movq (%rcx,%rax,8), %rax
cmpq %rax, %rbx
jae 0x3be7a
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rbx
shrq $0x10, %rbx
orq %rax, %rbx
incq %rbx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x2370
movq %rax, 0x10(%rsp)
movq %r13, %rax
movq 0x24f3c4(%rip), %rdx    # 0x28b248
movq (%r15), %rcx
movl 0x10(%rcx,%r14), %ecx
movq (%rdx,%rcx,8), %rdx
cmpq %rdx, %rbp
jae 0x3bed7
decq %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rbp
shrq $0x10, %rbp
orq %rdx, %rbp
incq %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2370
movq (%r15), %rdx
leaq (%rdx,%r14), %rdi
movl 0x8(%rdx,%r14), %r9d
movl 0x18(%rdx,%r14), %ecx
subl 0x4(%rdx,%r14), %r9d
incl %r9d
subl 0x14(%rdx,%r14), %ecx
incl %ecx
movq %rcx, (%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %rax, %r13
movq %rax, %r8
callq 0x597f3
incq %r12
addq $0xa8, %r14
cmpq 0x10(%r15), %r12
jb 0x3be02
jmp 0x3bf37
movq $0x0, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x10(%rsp), %rdi
callq 0x2220
movq %r13, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: check_cluster(unsigned long*, long long, ma_hit_t_alloc*, float)
int check_cluster(uint64_t* list, long long listLen, ma_hit_t_alloc* paf, float threshold)
{
    long long i, k;
    uint32_t qn, tn;
    long long T_edges, A_edges;
    T_edges = A_edges = 0;
    for (i = 0; i < listLen; i++)
    {
        qn = (uint32_t)list[i];
        for (k = i + 1; k < listLen; k++)
        {
            tn = (uint32_t)list[k];
            if(get_specific_overlap(&(paf[qn]), qn, tn) != -1)
            {
                A_edges++;
            }

            if(get_specific_overlap(&(paf[tn]), tn, qn) != -1)
            {
                A_edges++;
            }

            T_edges = T_edges + 2;
        }

    }

    if(A_edges >= (T_edges*threshold))
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x10(%rsp)
testq %rsi, %rsi
jle 0x3c046
movss %xmm0, 0xc(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %eax, %eax
movq %rsi, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
leaq 0x1(%rax), %r14
cmpq %rsi, %r14
movq %r14, 0x18(%rsp)
jge 0x3c026
movq (%rdi,%rax,8), %rax
movq %rax, 0x38(%rsp)
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x30(%rsp)
movq (%rdi,%r14,8), %rbp
movl %ebp, %eax
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r13
movl %r13d, %esi
movl %ebp, %edx
callq 0xa04f9
xorl %r12d, %r12d
cmpq $-0x1, %rax
setne %r12b
addq %r15, %r12
movq 0x40(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0xa04f9
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
xorl %r15d, %r15d
cmpq $-0x1, %rax
setne %r15b
addq %r12, %r15
addq $0x2, %rbx
incq %r14
cmpq %rsi, %r14
jl 0x3bfb9
movq 0x18(%rsp), %rax
cmpq %rsi, %rax
jne 0x3bf8a
cvtsi2ss %r15, %xmm1
cvtsi2ss %rbx, %xmm2
movss 0xc(%rsp), %xmm0
jmp 0x3c04c
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
mulss %xmm0, %xmm2
xorl %eax, %eax
ucomiss %xmm2, %xmm1
setae %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_overlap_final()
void ha_overlap_final(void)
{
	int i, hom_cov, het_cov;
	ha_ovec_buf_t **b;
    ha_flt_tab_hp = ha_idx_hp = NULL;

	CALLOC(b, asm_opt.thread_num);
	for (i = 0; i < asm_opt.thread_num; ++i)
		b[i] = ha_ovec_init(asm_opt.flag & HA_F_HIGH_HET, 1,0);///b[i] = ha_ovec_init(1, 1);
	ha_idx = ha_pt_gen(&asm_opt, ha_flt_tab, 1, 0, &R_INF, &hom_cov, &het_cov); // build the index
    // if(asm_opt.flag & HA_F_HIGH_HET)
    // {
    //     kt_for(asm_opt.thread_num, worker_ov_final_high_het, b, R_INF.total_reads);
    // }
    // else
    {
        kt_for(asm_opt.thread_num, worker_ov_final, b, R_INF.total_reads);
    }
    
	ha_pt_destroy(ha_idx);
	ha_idx = 0;
	for (i = 0; i < asm_opt.thread_num; ++i)
		ha_ovec_destroy(b[i]);
	free(b);
    asm_opt.hom_cov = hom_cov;
    asm_opt.het_cov = het_cov;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x24f3d0(%rip), %rax    # 0x28b448
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq 0x24f3bc(%rip), %rax    # 0x28b440
movq %rcx, (%rax)
leaq 0x24e6ca(%rip), %rbx    # 0x28a758
movslq 0x7c(%rbx), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, %r14
testq %r15, %r15
jle 0x3c0cf
xorl %r15d, %r15d
movl $0x400, %ebp            # imm = 0x400
movl (%rbx), %edi
andl %ebp, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x39240
movq %rax, (%r14,%r15,8)
incq %r15
movslq 0x7c(%rbx), %rax
cmpq %rax, %r15
jl 0x3c0af
leaq 0x24f35a(%rip), %rax    # 0x28b430
movq (%rax), %rsi
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x24f147(%rip), %r8     # 0x28b230
leaq 0x14(%rsp), %r9
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x1448a
leaq 0x24f334(%rip), %r15    # 0x28b438
movq %rax, (%r15)
movl 0x7c(%rbx), %edi
movq 0x24f16f(%rip), %rcx    # 0x28b280
leaq 0x5c(%rip), %rsi        # 0x3c174
movq %r14, %rdx
callq 0x1047b4
movq (%r15), %rdi
callq 0x113930
movq $0x0, (%r15)
cmpl $0x0, 0x7c(%rbx)
jle 0x3c14d
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x395cd
incq %r15
movslq 0x7c(%rbx), %rax
cmpq %rax, %r15
jl 0x3c138
movq %r14, %rdi
callq 0x2220
movl 0x14(%rsp), %eax
movl %eax, 0xd0(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0xd4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: worker_ov_final(void*, long, int)
static void worker_ov_final(void *data, long i, int tid)
{
	ha_ovec_buf_t *b = ((ha_ovec_buf_t**)data)[tid];

	//get_new_candidates(i, &g_read, &overlap_list, &array_list, &l, 0.001, 0);
    ha_get_candidates_interface(b->ab, i, &b->self_read, &b->olist, &b->olist_hp, &b->clist, 0.001, 
    asm_opt.max_n_chain, 0, NULL/**&(b->k_flag)**/, &b->r_buf, &(R_INF.paf[i]), &(R_INF.reverse_paf[i]), &(b->tmp_region), NULL, &(b->sp));

	overlap_region_sort_y_id(b->olist.list, b->olist.length);
	ma_hit_sort_tn(R_INF.paf[i].buffer, R_INF.paf[i].length);
	ma_hit_sort_tn(R_INF.reverse_paf[i].buffer, R_INF.reverse_paf[i].length);

	update_overlaps(&b->olist, &(R_INF.paf[i]), &b->self_read, &b->ovlp_read, 1, 1);
	update_overlaps(&b->olist, &(R_INF.reverse_paf[i]), &b->self_read, &b->ovlp_read, 2, 0);
	///recover missing exact overlaps
	update_exact_overlaps(&b->olist, &b->self_read, &b->ovlp_read);

	///Final_phasing(&overlap_list, &cigarline, &g_read, &overlap_read, c2n);
	push_final_overlaps(&(R_INF.paf[i]), R_INF.reverse_paf, &b->olist, 1);
	push_final_overlaps(&(R_INF.reverse_paf[i]), R_INF.reverse_paf, &b->olist, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edx, %rax
movq (%rdi,%rax,8), %r15
movq 0xe0(%r15), %rdi
leaq 0x8(%r15), %r12
leaq 0xa0(%r15), %rbx
leaq 0xc0(%r15), %r8
leaq 0x48(%r15), %r9
leaq 0x24e5ae(%rip), %rax    # 0x28a758
movl 0xe8(%rax), %eax
movq %rax, (%rsp)
leaq 0x12160(%r15), %r10
leaq (,%rsi,8), %rcx
leaq (%rcx,%rcx,2), %r14
movq 0x24f0da(%rip), %r11    # 0x28b2a8
addq %r14, %r11
movq 0x24f0d8(%rip), %r13    # 0x28b2b0
addq %r14, %r13
leaq 0x121a0(%r15), %rbp
leaq 0x12250(%r15), %rax
subq $0x8, %rsp
movsd 0x1e89e3(%rip), %xmm0   # 0x224bd8
movq %r12, %rdx
movq %rbx, %rcx
pushq %rax
movl $0x0, %eax
pushq %rax
movl $0x0, %eax
pushq %rbp
pushq %r13
pushq %r11
pushq %r10
pushq %rax
pushq $0x0
pushq 0x48(%rsp)
callq 0x1245e4
addq $0x50, %rsp
movq 0xa0(%r15), %rdi
movq 0xb0(%r15), %rsi
callq 0x3daa2
movq 0x24f070(%rip), %rax    # 0x28b2a8
movq (%rax,%r14), %rdi
movl 0xc(%rax,%r14), %esi
callq 0x9fc49
movq 0x24f063(%rip), %rax    # 0x28b2b0
movq (%rax,%r14), %rdi
movl 0xc(%rax,%r14), %esi
callq 0x9fc49
movq 0x24f046(%rip), %rsi    # 0x28b2a8
addq %r14, %rsi
addq $0x28, %r15
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x3b625
movq 0x24f026(%rip), %rsi    # 0x28b2b0
addq %r14, %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x3b625
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3bbad
movq 0x24efef(%rip), %rdi    # 0x28b2a8
addq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x38e36
addq 0x24efe0(%rip), %r14    # 0x28b2b0
movq %r14, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38e36
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_ec_ff(int)
void ha_ec_ff(int renew_idx)
{
	int hom_cov, het_cov;
    ha_flt_tab_hp = ha_idx_hp = NULL;

    if(ha_idx && renew_idx) {
        ha_pt_destroy(ha_idx); ha_idx = NULL;
    }

    if(!ha_idx) {
        ha_idx = ha_pt_gen(&asm_opt, ha_flt_tab, 1, 0, &R_INF, &hom_cov, &het_cov); // build the index
        asm_opt.hom_cov = hom_cov; asm_opt.het_cov = het_cov;
    }

    cal_ov_r(asm_opt.thread_num, R_INF.total_reads, renew_idx);

	ha_pt_destroy(ha_idx); ha_idx = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x24f144(%rip), %rax    # 0x28b448
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq 0x24f130(%rip), %rax    # 0x28b440
movq %rcx, (%rax)
leaq 0x24f11e(%rip), %r12    # 0x28b438
movq (%r12), %rdi
testq %rdi, %rdi
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x3c33a
callq 0x113930
movq $0x0, (%r12)
cmpq $0x0, (%r12)
jne 0x3c392
leaq 0x24f0e8(%rip), %rax    # 0x28b430
movq (%rax), %rsi
leaq 0x8(%rsp), %r13
movq %r13, (%rsp)
leaq 0x24e3fd(%rip), %r14    # 0x28a758
leaq 0x24eece(%rip), %r8     # 0x28b230
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
movq %r15, %r9
callq 0x1448a
movq %rax, (%r12)
movl (%r15), %eax
movl %eax, 0xd0(%r14)
movl (%r13), %eax
movl %eax, 0xd4(%r14)
leaq 0x24e3bf(%rip), %rax    # 0x28a758
movslq 0x7c(%rax), %rdi
movq 0x24eedc(%rip), %rsi    # 0x28b280
movslq %ebx, %rdx
callq 0x18bff4
movq (%r12), %rdi
callq 0x113930
movq $0x0, (%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: ug_idx_build(ma_ug_t*, int)
void ug_idx_build(ma_ug_t *ug, int hap_n)
{
    int flag = asm_opt.flag&HA_F_NO_HPC, i;
    asm_opt.flag -= flag;
    // ha_flt_tab = ha_ft_ug_gen(&asm_opt, &(ug->u), hap_n, hap_n);
    // ha_idx = ha_pt_ug_gen(&asm_opt, ha_flt_tab, &(ug->u), hap_n);

    ha_ovec_buf_t **b = NULL;
    // overlap and correct reads
    CALLOC(b, asm_opt.thread_num);
    for (i = 0; i < asm_opt.thread_num; ++i)
    {
        b[i] = ha_ovec_init(1, 1, 0);
        b[i]->ua = &(ug->u);
    }
            
    kt_for(asm_opt.thread_num, worker_ov_utg, b, R_INF.total_reads);

    for (i = 0; i < asm_opt.thread_num; ++i)
        ha_ovec_destroy(b[i]);
    free(b);

    ha_ft_destroy(ha_flt_tab); 
    ha_pt_destroy(ha_idx);
    asm_opt.flag += flag;
    exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x24e378(%rip), %r12    # 0x28a758
movl (%r12), %ebp
movl %ebp, %eax
andl $-0x2, %eax
movl %eax, (%r12)
movslq 0x7c(%r12), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, %rbx
testq %r15, %r15
jle 0x3c433
xorl %r13d, %r13d
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x39240
movq %rax, (%rbx,%r13,8)
movq %r14, 0x12248(%rax)
incq %r13
movslq 0x7c(%r12), %r15
cmpq %r15, %r13
jl 0x3c40a
movq 0x24ee46(%rip), %rcx    # 0x28b280
leaq 0x63(%rip), %rsi        # 0x3c4a4
movl %r15d, %edi
movq %rbx, %rdx
callq 0x1047b4
cmpl $0x0, 0x7c(%r12)
jle 0x3c46d
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x395cd
incq %r14
movslq 0x7c(%r12), %rax
cmpq %rax, %r14
jl 0x3c457
andl $0x1, %ebp
movq %rbx, %rdi
callq 0x2220
leaq 0x24efb1(%rip), %rax    # 0x28b430
movq (%rax), %rdi
callq 0x114a78
leaq 0x24efaa(%rip), %rax    # 0x28b438
movq (%rax), %rdi
callq 0x113930
addl %ebp, (%r12)
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: worker_ov_utg(void*, long, int)
static void worker_ov_utg(void *data, long i, int tid)
{
	ha_ovec_buf_t *b = ((ha_ovec_buf_t**)data)[tid];
    if(b->ua->a[i].len == 0) return;

    ha_get_ug_candidates(b->ab, i, &(b->ua->a[i]), b->ua, &b->olist, &b->clist, 
    0.3, asm_opt.polyploidy*5, 0, &(b->k_flag), &b->r_buf, ha_flt_tab, ha_idx,
    &(b->tmp_region), NULL, /**0.3**/0);
    
	overlap_region_sort_y_id(b->olist.list, b->olist.length);
	ma_hit_sort_tn(R_INF.paf[i].buffer, R_INF.paf[i].length);
	ma_hit_sort_tn(R_INF.reverse_paf[i].buffer, R_INF.reverse_paf[i].length);

	update_overlaps(&b->olist, &(R_INF.paf[i]), &b->self_read, &b->ovlp_read, 1, 1);
	update_overlaps(&b->olist, &(R_INF.reverse_paf[i]), &b->self_read, &b->ovlp_read, 2, 0);
	///recover missing exact overlaps
	update_exact_overlaps(&b->olist, &b->self_read, &b->ovlp_read);

	///Final_phasing(&overlap_list, &cigarline, &g_read, &overlap_read, c2n);
	push_final_overlaps(&(R_INF.paf[i]), R_INF.reverse_paf, &b->olist, 1);
	push_final_overlaps(&(R_INF.reverse_paf[i]), R_INF.reverse_paf, &b->olist, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edx, %rax
movq (%rdi,%rax,8), %r14
movq 0x12248(%r14), %rcx
movq 0x10(%rcx), %rax
leaq (%rsi,%rsi,4), %rdx
testl $0x7fffffff, (%rax,%rdx,8) # imm = 0x7FFFFFFF
je 0x3c623
movq %rsi, %r15
leaq (%rax,%rdx,8), %rdx
movq 0xe0(%r14), %rdi
leaq 0xa0(%r14), %rbx
leaq 0x48(%r14), %r9
leaq 0x24e266(%rip), %rax    # 0x28a758
movl 0x1bc(%rax), %eax
leal (%rax,%rax,4), %eax
leaq 0x12180(%r14), %r10
leaq 0x12160(%r14), %r11
leaq 0x24ef20(%rip), %r12    # 0x28b430
leaq 0x24ef21(%rip), %r13    # 0x28b438
leaq 0x121a0(%r14), %rbp
movsd 0x1e86ba(%rip), %xmm0   # 0x224be0
xorps %xmm1, %xmm1
movq %rbx, %r8
pushq $0x0
pushq %rbp
pushq (%r13)
pushq (%r12)
pushq %r11
pushq %r10
pushq $0x0
pushq %rax
callq 0x123ffb
addq $0x40, %rsp
movq 0xa0(%r14), %rdi
movq 0xb0(%r14), %rsi
callq 0x3daa2
movq 0x24ed47(%rip), %rax    # 0x28b2a8
shlq $0x3, %r15
leaq (%r15,%r15,2), %r15
movq (%rax,%r15), %rdi
movl 0xc(%rax,%r15), %esi
callq 0x9fc49
movq 0x24ed32(%rip), %rax    # 0x28b2b0
movq (%rax,%r15), %rdi
movl 0xc(%rax,%r15), %esi
callq 0x9fc49
movq 0x24ed15(%rip), %rsi    # 0x28b2a8
addq %r15, %rsi
leaq 0x8(%r14), %r12
addq $0x28, %r14
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x3b625
movq 0x24ecf1(%rip), %rsi    # 0x28b2b0
addq %r15, %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x3b625
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3bbad
movq 0x24ecba(%rip), %rdi    # 0x28b2a8
addq %r15, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x38e36
addq 0x24ecab(%rip), %r15    # 0x28b2b0
movq %r15, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38e36
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_assemble_ovec()
int ha_assemble_ovec(void)
{
	extern void ha_extract_print_list(const All_reads *rs, int n_rounds, const char *o);
	int r = 0, hom_cov = -1;
	
    ha_flt_tab = ha_idx = NULL;

    // construct hash table for high occurrence k-mers
    if (!(asm_opt.flag & HA_F_NO_KMER_FLT) && ha_flt_tab == NULL) {
        ha_flt_tab = ha_ft_gen(&asm_opt, &R_INF, &hom_cov, 0, 0);
        ha_opt_update_cov(&asm_opt, hom_cov);
    }
    // error correction
    assert(asm_opt.number_of_round > 0);
    ha_opt_reset_to_round(&asm_opt, r); // this update asm_opt.roundID and a few other fields
    ha_overlap_cal(r, 0);
    fprintf(stderr, "[M::%s] size of buffer: %.3fGB\n", __func__, asm_opt.mem_buf / 1073741824.0);
    
    
    ha_print_ovlp_stat(R_INF.paf, R_INF.reverse_paf, R_INF.total_reads);
    ha_ft_destroy(ha_flt_tab);

    Output_PAF0(R_INF.paf, "0");
    Output_PAF0(R_INF.reverse_paf, "1");
    if (asm_opt.flag & HA_F_WRITE_PAF) Output_PAF();

	destory_All_reads(&R_INF);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
leaq 0x24edef(%rip), %rax    # 0x28b438
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq 0x24eddb(%rip), %r12    # 0x28b430
movq %rcx, (%r12)
leaq 0x24e0f8(%rip), %r15    # 0x28a758
testb $0x2, (%r15)
jne 0x3c698
leaq 0x24e0eb(%rip), %rbx    # 0x28a758
leaq 0x24ebbc(%rip), %rsi    # 0x28b230
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14025
movq %rax, (%r12)
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2f59
cmpl $0x0, 0xf8(%r15)
jle 0x3c6ba
leaq 0x4(%rsp), %rdi
callq 0x483d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1e87f4(%rip), %rdi    # 0x224eb5
leaq 0x1e8809(%rip), %rsi    # 0x224ed1
leaq 0x1e880f(%rip), %rcx    # 0x224ede
movl $0x7ea, %edx            # imm = 0x7EA
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_assemble_ovec_cc()
int ha_assemble_ovec_cc(void)
{
    ha_idx = NULL;

    ha_opt_reset_to_round(&asm_opt, 0); // this update asm_opt.roundID and a few other fields
    ha_ec_dbg();

    // Output_PAF0(R_INF.paf, "0");
	destory_All_reads(&R_INF);
	return 0;
}

// Assembly:
pushq %rax
leaq 0x24ed57(%rip), %rax    # 0x28b438
movq $0x0, (%rax)
leaq 0x24e069(%rip), %rdi    # 0x28a758
xorl %esi, %esi
callq 0x3051a
callq 0x3ac89
leaq 0x24eb2e(%rip), %rdi    # 0x28b230
callq 0x3259c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/./Correct.h
// Function: destoryHaplotypeEvdience(haplotype_evdience_alloc*)
inline void destoryHaplotypeEvdience(haplotype_evdience_alloc* h)
{
    free(h->list);
    // free(h->snp_stat);
    kv_destroy(h->snp_stat);
    kv_destroy(h->snp_srt);
    free(h->snp_matrix);
    free(h->r_snp);
    free(h->dp.backtrack);
    free(h->dp.max);
    free(h->dp.max_for_sort);
    free(h->dp.visit);
    free(h->dp.backtrack_length);
    free(h->dp.buffer);
    free(h->dp.max_buffer);
    destory_SNP_IDs(&(h->dp.SNP_IDs));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2220
movq 0x218(%rbx), %rdi
callq 0x2220
movq 0x248(%rbx), %rdi
callq 0x2220
movq 0x1d0(%rbx), %rdi
callq 0x2220
movq 0x1e0(%rbx), %rdi
callq 0x2220
movq 0x280(%rbx), %rdi
callq 0x2220
movq 0x260(%rbx), %rdi
callq 0x2220
movq 0x268(%rbx), %rdi
callq 0x2220
movq 0x258(%rbx), %rdi
callq 0x2220
movq 0x278(%rbx), %rdi
callq 0x2220
movq 0x290(%rbx), %rdi
callq 0x2220
movq 0x298(%rbx), %rdi
callq 0x2220
movq 0x2e0(%rbx), %rdi
callq 0x2220
movq 0x2c8(%rbx), %rdi
popq %rbx
jmp 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: init_overlap_region_alloc(overlap_region_alloc*)
void init_overlap_region_alloc(overlap_region_alloc* list)
{
    list->size = 1000;
    list->length = 0;
    ///list->list = (overlap_region*)malloc(sizeof(overlap_region)*list->size);
    list->list = (overlap_region*)calloc(list->size, sizeof(overlap_region));
    uint64_t i;
    for (i = 0; i < list->size; i++) { 
        init_fake_cigar(&(list->list[i].f_cigar));
        init_window_list_alloc(&(list->list[i].w_list));
        init_window_list_alloc(&(list->list[i].boundary_cigars));
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x3e8, 0x8(%rdi)       # imm = 0x3E8
movq $0x0, 0x10(%rdi)
movl $0x3e8, %edi            # imm = 0x3E8
movl $0xa8, %esi
callq 0x2120
movq %rax, (%rbx)
xorl %eax, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movq (%rbx), %rdx
movups %xmm0, 0x38(%rdx,%rax)
movq (%rbx), %rdx
movups %xmm0, 0x68(%rdx,%rax)
movups %xmm0, 0x58(%rdx,%rax)
movups %xmm0, 0x48(%rdx,%rax)
movq (%rbx), %rdx
movups %xmm0, 0x98(%rdx,%rax)
movups %xmm0, 0x88(%rdx,%rax)
movups %xmm0, 0x78(%rdx,%rax)
incq %rcx
addq $0xa8, %rax
cmpq 0x8(%rbx), %rcx
jb 0x3dade
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: clear_overlap_region_alloc(overlap_region_alloc*)
void clear_overlap_region_alloc(overlap_region_alloc* list)
{
    list->length = 0;
    list->mapped_overlaps_length = 0;
    uint64_t i = 0;
    for (i = 0; i < list->size; i++) {   
        clear_fake_cigar(&(list->list[i].f_cigar));
        clear_window_list_alloc(&(list->list[i].w_list));
        clear_window_list_alloc(&(list->list[i].boundary_cigars));
    }
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3db72
movq (%rdi), %rcx
addq $0x40, %rcx
xorl %edx, %edx
movl $0x0, (%rcx)
movq %rdx, 0x20(%rcx)
movq %rdx, 0x8(%rcx)
movq %rdx, 0x50(%rcx)
movq %rdx, 0x38(%rcx)
addq $0xa8, %rcx
decq %rax
jne 0x3db50
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: destory_overlap_region_alloc(overlap_region_alloc*)
void destory_overlap_region_alloc(overlap_region_alloc* list)
{
    uint64_t i = 0;
    for (i = 0; i < list->size; i++) {
        destory_fake_cigar(&(list->list[i].f_cigar));
        destory_window_list_alloc(&(list->list[i].w_list));
        destory_window_list_alloc(&(list->list[i].boundary_cigars));
    }
    free(list->list);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x3dbf6
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
cmpl $0x0, 0x44(%rax,%r14)
je 0x3dbb2
movq 0x38(%rax,%r14), %rdi
callq 0x2220
movq (%rbx), %r12
movq 0x58(%r12,%r14), %rdi
callq 0x2220
movq 0x70(%r12,%r14), %rdi
callq 0x2220
movq (%rbx), %r12
movq 0x88(%r12,%r14), %rdi
callq 0x2220
movq 0xa0(%r12,%r14), %rdi
callq 0x2220
incq %r15
addq $0xa8, %r14
cmpq 0x8(%rbx), %r15
jb 0x3db9d
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: gen_fake_cigar(Fake_Cigar*, overlap_region*, long, k_mer_hit*, long)
void gen_fake_cigar(Fake_Cigar* z, overlap_region *o, int64_t apend_be, k_mer_hit* hit, int64_t n_hit)
{
    int64_t k, dq, dr, dd, pdd; z->length = 0;
    if(apend_be == 1) add_fake_cigar(z, o->x_pos_s, 0, NULL);
    for (k = 0, pdd = INT32_MAX; k < n_hit; k++) {
        dq = hit[k].self_offset - o->x_pos_s; 
        dr = hit[k].offset - o->y_pos_s; 
        dd = dr - dq;
        // if(print) {
        //     fprintf(stderr, "[M::k->%lu] x::%u, y::%u, cnt::%u, dd::%ld, pdd::%ld, z->n::%u\n", 
        //         k, hit[k].self_offset, hit[k].offset, hit[k].cnt&(0xffu), dd, pdd, z->length);
        // }
        if(dd != pdd) {
            pdd = dd;
            add_fake_cigar(z, hit[k].self_offset, pdd, NULL);
        }
    }
    
    if((apend_be == 1) && (get_fake_gap_pos(z, z->length-1)!=((int64_t)o->x_pos_e))) {
        add_fake_cigar(z, o->x_pos_e, get_fake_gap_shift(z, z->length-1), NULL);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
cmpq $0x1, %rdx
jne 0x3dc89
movl 0x4(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3dd21
testq %r15, %r15
jle 0x3dcc9
addq $0x8, %r13
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl -0x4(%r13), %ebp
movl (%r13), %esi
movl %esi, %ecx
subl 0x4(%r14), %ecx
subl 0x14(%r14), %ebp
subq %rcx, %rbp
cmpq %rax, %rbp
je 0x3dcc0
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x3dd21
movq %rbp, %rax
addq $0x10, %r13
decq %r15
jne 0x3dc97
cmpq $0x1, %r12
jne 0x3dced
movl 0x8(%rbx), %eax
decl %eax
movq (%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
sarq $0x20, %rcx
movl 0x8(%r14), %esi
cmpq %rsi, %rcx
jne 0x3dcfc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ecx
shrl %ecx
movl %ecx, %edx
negl %edx
testb $0x1, %al
cmovel %ecx, %edx
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3dd21
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: add_fake_cigar(Fake_Cigar*, unsigned int, int, void*)
void add_fake_cigar(Fake_Cigar* x, uint32_t gap_site, int32_t gap_shift, void *km)
{
    if(x->length + 1 > x->size)
    {
        x->size = x->length + 1;
        kroundup32(x->size);
        if(!km) {
            REALLOC(x->buffer, x->size);
        } else {
            KREALLOC(km, x->buffer, x->size);
        }
        // x->buffer = (uint64_t*)realloc(x->buffer, sizeof(uint64_t) * x->size);
    }

    x->buffer[x->length] = gap_site;
    x->buffer[x->length] = x->buffer[x->length] << 32;

    if(gap_shift < 0)
    {
        gap_shift = gap_shift * -1;
        gap_site = gap_shift;
        gap_site = gap_site << 1;
        gap_site = gap_site | ((uint32_t)1);
    }
    else
    {
        gap_site = gap_shift;
        gap_site = gap_site << 1;
    }

    x->buffer[x->length] = x->buffer[x->length] | ((uint32_t)gap_site);

    x->length++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movl 0x8(%rdi), %eax
leal 0x1(%rax), %edx
cmpl 0xc(%rdi), %edx
jbe 0x3dd85
movl %eax, %edx
shrl %edx
orl %eax, %edx
movl %edx, %eax
shrl $0x2, %eax
orl %edx, %eax
movl %eax, %edx
shrl $0x4, %edx
orl %eax, %edx
movl %edx, %eax
shrl $0x8, %eax
orl %edx, %eax
movl %eax, %edx
shrl $0x10, %edx
orl %eax, %edx
incl %edx
movl %edx, 0xc(%rbx)
shlq $0x3, %rdx
movq (%rbx), %rsi
testq %rcx, %rcx
je 0x3dd77
movq %rcx, %rdi
callq 0x1e3800
jmp 0x3dd82
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2370
movq %rax, (%rbx)
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
shlq $0x20, %r14
leal (%r15,%r15), %edx
movl $0x1, %esi
subl %edx, %esi
testl %r15d, %r15d
cmovnsl %edx, %esi
orq %r14, %rsi
movq %rsi, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: debug_cigar(Fake_Cigar*, overlap_region*, long, k_mer_hit*, unsigned long)
void debug_cigar(Fake_Cigar* z, overlap_region *o, int64_t apend_be, k_mer_hit* hit, uint64_t n_hit)
{
    gen_fake_cigar(z, o, apend_be, hit, n_hit);
    if(!((z->length==o->f_cigar.length) && 
                    (!memcmp(z->buffer, o->f_cigar.buffer, sizeof((*(o->f_cigar.buffer)))*o->f_cigar.length)))) {
        uint64_t k;
        fprintf(stderr, "\n[M::%s] z->n::%u, o->n::%u, rev::%u\n", __func__, z->length, o->f_cigar.length, o->y_pos_strand);
        for (k = 0; k < z->length; k++) {
            fprintf(stderr, "[z::k->%lu] pos::%d, off::%d\n", k, 
                                    get_fake_gap_pos(z, k), get_fake_gap_shift(z, k));
        }
        for (k = 0; k < o->f_cigar.length; k++) {
            fprintf(stderr, "[o::k->%lu] pos::%d, off::%d\n", k, 
                                    get_fake_gap_pos(&(o->f_cigar), k), get_fake_gap_shift(&(o->f_cigar), k));
        }
        // gen_fake_cigar(z, o, apend_be, hit, n_hit, 1);
        // for (k = 0; k < o->f_cigar.length; k++) {
        // 	fprintf(stderr, "[M::k->%lu] x::%u, y::%u, cnt::%u\n", 
		// 			k, hit[k].self_offset, hit[k].offset, hit[k].cnt&(0xffu));
        // }
        
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x3dc52
movl 0x8(%r15), %ebp
leaq 0x38(%rbx), %r14
movl 0x40(%rbx), %r12d
cmpl %r12d, %ebp
jne 0x3de00
movq (%r15), %rdi
movq (%r14), %rsi
leaq (,%r12,8), %rdx
callq 0x21a0
testl %eax, %eax
jne 0x3de00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%r15), %r13
movq 0x24c1d5(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movl 0x1c(%rbx), %r9d
addq $0x40, %rbx
leaq 0x1e745b(%rip), %rsi    # 0x225278
leaq 0x1e747a(%rip), %rdx    # 0x22529e
movl %ebp, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, (%r13)
jne 0x3de49
cmpl $0x0, (%rbx)
je 0x3ddf1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x508b
jmp 0x3ddf1
movq %r15, %rdi
movq %r13, %rsi
callq 0x500b
jmp 0x3de37
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: resize_fake_cigar(Fake_Cigar*, unsigned long, void*)
void resize_fake_cigar(Fake_Cigar* x, uint64_t size, void *km)
{
    if (size > x->size) {
        x->size = size;
        if(!km) {
            REALLOC(x->buffer, x->size);
        }
        else {
            KREALLOC(km, x->buffer, x->size);
        }
		
    }
    x->length = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %eax
cmpq %rsi, %rax
jae 0x3e63c
movl %esi, 0xc(%rbx)
movl %esi, %eax
shlq $0x3, %rax
movq (%rbx), %rsi
testq %rdx, %rdx
je 0x3e62e
movq %rdx, %rdi
movq %rax, %rdx
callq 0x1e3800
jmp 0x3e639
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2370
movq %rax, (%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: append_overlap_region_alloc_debug(overlap_region_alloc*, overlap_region*)
void append_overlap_region_alloc_debug(overlap_region_alloc* list, overlap_region* tmp)
{
   
    if (list->length + 1 > list->size)
    {
        list->size = list->size * 2;
        list->list = (overlap_region*)realloc(list->list, sizeof(overlap_region)*list->size);
    }

    
    list->list[list->length].x_id = tmp->x_id;
    list->list[list->length].x_pos_e = tmp->x_pos_e;
    list->list[list->length].x_pos_s = tmp->x_pos_s;
    list->list[list->length].x_pos_strand = tmp->x_pos_strand;

    list->list[list->length].y_id = tmp->y_id;
    list->list[list->length].y_pos_e = tmp->y_pos_e;
    list->list[list->length].y_pos_s = tmp->y_pos_s;
    list->list[list->length].y_pos_strand = tmp->y_pos_strand;

    list->list[list->length].shared_seed = tmp->shared_seed;

    list->length++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
incq %rcx
cmpq %rax, %rcx
jbe 0x3ef72
leaq (%rax,%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rbx), %rdi
imulq $0x150, %rax, %rsi      # imm = 0x150
callq 0x2370
movq %rax, (%rbx)
movl (%r14), %eax
movq (%rbx), %rcx
movq 0x10(%rbx), %rdx
imulq $0xa8, %rdx, %rsi
movl %eax, (%rcx,%rsi)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rcx,%rsi)
movl 0x4(%r14), %eax
movl %eax, 0x4(%rcx,%rsi)
movl 0xc(%r14), %eax
movl %eax, 0xc(%rcx,%rsi)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rcx,%rsi)
movl 0x18(%r14), %eax
movl %eax, 0x18(%rcx,%rsi)
movl 0x14(%r14), %eax
movl %eax, 0x14(%rcx,%rsi)
movl 0x1c(%r14), %eax
movl %eax, 0x1c(%rcx,%rsi)
movl 0x24(%r14), %eax
movl %eax, 0x24(%rcx,%rsi)
incq %rdx
movq %rdx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: debug_chain(k_mer_hit*, long long, Chain_Data*)
void debug_chain(k_mer_hit* a, long long a_n, Chain_Data* dp)
{
    long long i, j, current_j;
    long long selfLen, indels;
    long long distance_self_pos, distance_pos, distance_gap;
    for (i = 0; i < a_n; ++i) 
    {
        selfLen = indels = 0;
        j = i;
        while (j >= 0)
        {
            current_j = j;

            j = dp->pre[j];

            if(j != -1)
            {
                distance_self_pos = a[current_j].self_offset - a[j].self_offset;
                distance_pos = a[current_j].offset - a[j].offset;
                distance_gap = distance_pos > distance_self_pos? distance_pos - distance_self_pos : distance_self_pos - distance_pos;

                indels += distance_gap; 
                selfLen += distance_self_pos;
            }
        }

        if(indels != dp->indels[i])
        {
            fprintf(stderr, "indels: %lld, dp->indels[i]: %ld\n", indels, (long)dp->indels[i]);
        }

        if(selfLen != dp->self_length[i])
        {
            fprintf(stderr, "selfLen: %lld, dp->self_length[i]: %ld\n", selfLen, (long)dp->self_length[i]);
        }

    }
}

// Assembly:
testq %rsi, %rsi
jle 0x3f0ad
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x24afe7(%rip), %r12    # 0x289fe0
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq %r13, %rsi
xorl %ebp, %ebp
xorl %edx, %edx
movq (%rax,%rsi,8), %rcx
cmpq $-0x1, %rcx
je 0x3f048
shlq $0x4, %rsi
movl 0x4(%r15,%rsi), %edi
movl 0x8(%r15,%rsi), %esi
movq %rcx, %r8
shlq $0x4, %r8
subl 0x8(%r15,%r8), %esi
subl 0x4(%r15,%r8), %edi
movq %rsi, %r8
subq %rdi, %r8
movq %rdi, %r9
subq %rsi, %r9
cmpl %esi, %edi
cmovbeq %r8, %r9
addq %r9, %rdx
addq %rsi, %rbp
movq %rcx, %rsi
testq %rcx, %rcx
jns 0x3f007
movq 0x10(%rbx), %rax
movslq (%rax,%r13,4), %rcx
cmpq %rcx, %rdx
jne 0x3f074
movq 0x18(%rbx), %rax
movslq (%rax,%r13,4), %rcx
cmpq %rcx, %rbp
jne 0x3f088
incq %r13
cmpq %r14, %r13
jne 0x3effc
jmp 0x3f09f
movq (%r12), %rdi
leaq 0x1e6267(%rip), %rsi    # 0x2252e6
xorl %eax, %eax
callq 0x22b0
jmp 0x3f05d
movq (%r12), %rdi
leaq 0x1e6275(%rip), %rsi    # 0x225308
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0x3f06a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: resize_Chain_Data(Chain_Data*, long long, void*)
void resize_Chain_Data(Chain_Data* x, long long size, void *km)
{
	if (size + 1 > x->size) {
		x->size = size + 1;
		kroundup64(x->size);
        if(!km) {
            REALLOC(x->score, x->size);
            REALLOC(x->pre, x->size);
            REALLOC(x->indels, x->size);
            REALLOC(x->self_length, x->size);
            REALLOC(x->occ, x->size);
            REALLOC(x->tmp, x->size);
        } else {
            KREALLOC(km, x->score, x->size);
            KREALLOC(km, x->pre, x->size);
            KREALLOC(km, x->indels, x->size);
            KREALLOC(km, x->self_length, x->size);
            KREALLOC(km, x->occ, x->size);
            KREALLOC(km, x->tmp, x->size);
        }
	}
}

// Assembly:
cmpq %rsi, 0x38(%rdi)
jg 0x3f992
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rax
sarq %rax
orq %rsi, %rax
movq %rax, %rcx
sarq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
sarq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
sarq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
sarq $0x10, %rax
orq %rcx, %rax
movq %rax, %rcx
sarq $0x20, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x38(%rdi)
movq (%rdi), %rsi
leaq 0x4(,%rcx,4), %rdx
testq %r14, %r14
je 0x3f914
movq %r14, %rdi
callq 0x1e3800
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0x1e3800
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1e3800
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1e3800
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1e3800
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0x1e3800
jmp 0x3f987
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
movq 0x38(%rbx), %rsi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movq 0x38(%rbx), %rsi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rdi
movq 0x38(%rbx), %rsi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rsi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rdi
movq 0x38(%rbx), %rsi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: append_window_list(overlap_region*, unsigned long, unsigned long, int, int, int, int, int, int, int, void*)
void append_window_list(overlap_region* region, uint64_t x_start, uint64_t x_end, int y_start, int y_end, int error,
                        int extra_begin, int extra_end, int error_threshold, int blockLen, void *km)
{
    window_list *p = NULL;
    kv_pushp(window_list, region->w_list, &p);

    p->x_start = x_start;
    p->x_end = x_end;
    p->y_start = y_start;
    p->y_end = y_end;
    p->error = error;
    p->extra_begin = extra_begin;
    p->extra_end = extra_end;
    p->error_threshold = error_threshold;
    p->cidx = p->clen = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x50(%rsp), %esi
movl 0x48(%rsp), %edi
movl 0x40(%rsp), %r8d
movq 0x50(%r13), %rax
cmpq %rax, 0x48(%r13)
jne 0x3fba7
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x50(%r13)
movq 0x58(%r13), %rdi
shlq $0x5, %rsi
callq 0x2370
movl 0x40(%rsp), %r8d
movl 0x48(%rsp), %edi
movl 0x50(%rsp), %esi
movq %rax, 0x58(%r13)
movq 0x48(%r13), %rax
movq 0x58(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x48(%r13)
shlq $0x5, %rax
movl %r12d, (%rcx,%rax)
movl %r15d, 0x4(%rcx,%rax)
movl %r14d, 0x8(%rcx,%rax)
movl %ebp, 0xc(%rcx,%rax)
movw %bx, 0x14(%rcx,%rax)
movw %r8w, 0x10(%rcx,%rax)
movw %di, 0x12(%rcx,%rax)
movw %si, 0x16(%rcx,%rax)
movq $0x0, 0x18(%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq