LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq %rdi, %r15
xorl %r14d, %r14d
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq 0x10(%r15), %r12
jae 0xed37
movq (%r15), %rax
cmpb $0x1, 0x2c(%rax,%r14)
jne 0xed28
cmpl $0x1, 0x24(%rax,%r14)
jne 0xed28
movq 0x245615(%rip), %rcx    # 0x254248
movl (%rax,%r14), %edx
movq (%rcx,%rdx,8), %rdx
cmpq %rdx, 0x10(%rsp)
jae 0xec99
decq %rdx
movq %rdx, %rax
shrq %rax
orq %rdx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rbp, %rdi
movq %rsi, 0x10(%rsp)
movq %r8, %r13
callq 0x2370
movq %r13, %r8
movq %rax, %rbp
movq 0x2455b2(%rip), %rcx    # 0x254248
movq (%r15), %rax
movl 0x10(%rax,%r14), %edx
movq (%rcx,%rdx,8), %rcx
cmpq %rcx, %rbx
jae 0xecef
decq %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbx
shrq $0x10, %rbx
orq %rcx, %rbx
incq %rbx
movq %r8, %rdi
movq %rbx, %rsi
callq 0x2370
movq %rax, %r8
movq (%r15), %rax
leaq (%rax,%r14), %rdi
movl 0x8(%rax,%r14), %r9d
movl 0x18(%rax,%r14), %ecx
subl 0x4(%rax,%r14), %r9d
incl %r9d
subl 0x14(%rax,%r14), %ecx
incl %ecx
movq %rcx, (%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %rcx
movq %r8, %r13
callq 0x2993a
movq %r13, %r8
incq %r12
addq $0xa8, %r14
jmp 0xec07
movq %rbp, %rdi
movq %r8, %rbx
callq 0x2220
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/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 $0x38, %rsp
movss %xmm0, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
xorl %r15d, %r15d
testq %rsi, %rsi
movl $0x0, %eax
movq %rsi, 0x30(%rsp)
cmovgq %rsi, %rax
movq %rax, 0x18(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq 0x18(%rsp), %r15
je 0xf35d
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %r12
movl %r12d, %eax
incq %r15
imulq $0x18, %rax, %rax
addq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
cmpq 0x30(%rsp), %r15
jge 0xf353
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rbp
movl %ebp, %r13d
movq 0x28(%rsp), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x696ab
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
addq %rcx, %r14
imulq $0x18, %r13, %rdi
addq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x696ab
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
addq %rcx, %r14
addq $0x2, %rbx
incq %r15
jmp 0xf2fd
movq 0x20(%rsp), %r15
jmp 0xf2d0
cvtsi2ss %r14, %xmm0
cvtsi2ss %rbx, %xmm1
mulss 0x4(%rsp), %xmm1
xorl %eax, %eax
ucomiss %xmm1, %xmm0
setae %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: hap_recalculate_peaks(char*)
void hap_recalculate_peaks(char* output_file_name)
{
    destory_read_bin(&R_INF);
    destory_ma_hit_t_alloc(R_INF.paf);
    destory_ma_hit_t_alloc(R_INF.reverse_paf);

    char* gfa_name = (char*)malloc(strlen(output_file_name)+25);
	sprintf(gfa_name, "%s.ec", output_file_name);

    int hom_cov, het_cov;
    // construct hash table for high occurrence k-mers
    if (!(asm_opt.flag & HA_F_NO_KMER_FLT)) {
        ha_flt_tab = ha_ft_gen(&asm_opt, &R_INF, &hom_cov, 0, 0);
        ha_opt_update_cov(&asm_opt, hom_cov);
    }
    free(R_INF.read_length);
    free(R_INF.name_index);

    load_All_reads(&R_INF, gfa_name);

    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;
    ha_pt_destroy(ha_idx);
    ha_idx = 0;

    destory_read_bin(&R_INF);
    free(gfa_name);

    load_all_data_from_disk(&R_INF.paf, &R_INF.reverse_paf, asm_opt.output_file_name); 
    fprintf(stderr, "M::%s has done.\n", __func__);   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x244ae5(%rip), %rdi    # 0x254230
callq 0x67f3
movq 0x244b51(%rip), %rdi    # 0x2542a8
callq 0x696a3
movq 0x244b4d(%rip), %rdi    # 0x2542b0
callq 0x696a3
movq %r14, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x1d3735(%rip), %rsi    # 0x1e2eb8
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x243fc1(%rip), %r14    # 0x253758
testb $0x2, (%r14)
jne 0xf7d6
leaq 0x243fb4(%rip), %r15    # 0x253758
leaq 0x244a85(%rip), %rsi    # 0x254230
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xd61b1
leaq 0x244c69(%rip), %rcx    # 0x254430
movq %rax, (%rcx)
movl (%r12), %esi
movq %r15, %rdi
callq 0x3430
leaq 0x244a53(%rip), %r15    # 0x254230
movq 0x244a64(%rip), %rdi    # 0x254248
callq 0x2220
movq 0x244a80(%rip), %rdi    # 0x254270
callq 0x2220
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5bfa
leaq 0x244c29(%rip), %rax    # 0x254430
movq (%rax), %rsi
leaq 0x14(%rsp), %r13
movq %r13, (%rsp)
pushq $0x1
popq %rdx
leaq 0x10(%rsp), %r12
movq %r14, %rdi
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0xd6a80
leaq 0x244c06(%rip), %rbp    # 0x254438
movq %rax, (%rbp)
movl (%r12), %ecx
movl %ecx, 0xd0(%r14)
movl (%r13), %ecx
movl %ecx, 0xd4(%r14)
movq %rax, %rdi
callq 0xd4d2f
andq $0x0, (%rbp)
movq %r15, %rdi
callq 0x67f3
movq %rbx, %rdi
callq 0x2220
movq 0x10(%r14), %rdx
leaq 0x244a34(%rip), %rdi    # 0x2542a8
leaq 0x244a35(%rip), %rsi    # 0x2542b0
callq 0xa4465
movq 0x243759(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d362d(%rip), %rsi    # 0x1e2ebe
leaq 0x1d3637(%rip), %rdx    # 0x1e2ecf
xorl %eax, %eax
callq 0x22b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x244b85(%rip), %rax    # 0x254448
andq $0x0, (%rax)
leaq 0x244b72(%rip), %rax    # 0x254440
andq $0x0, (%rax)
leaq 0x243e7f(%rip), %rbx    # 0x253758
movl 0x7c(%rbx), %r13d
movslq %r13d, %rdi
pushq $0x8
popq %rsi
callq 0x2120
movq %rax, %r14
xorl %r15d, %r15d
movl $0x400, %r12d           # imm = 0x400
pushq $0x1
popq %rbp
movslq %r13d, %rax
cmpq %rax, %r15
jge 0xf91a
movl (%rbx), %edi
andl %r12d, %edi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc44b
movq %rax, (%r14,%r15,8)
incq %r15
movl 0x7c(%rbx), %r13d
jmp 0xf8f7
leaq 0x244b0f(%rip), %rax    # 0x254430
movq (%rax), %rsi
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x2448fc(%rip), %r8     # 0x254230
pushq $0x1
popq %rdx
xorl %r15d, %r15d
leaq 0x14(%rsp), %r9
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xd6a80
leaq 0x244ae8(%rip), %r12    # 0x254438
movq %rax, (%r12)
movl 0x7c(%rbx), %edi
movq 0x244922(%rip), %rcx    # 0x254280
leaq 0x58(%rip), %rsi        # 0xf9bd
movq %r14, %rdx
callq 0xc67c0
movq (%r12), %rdi
callq 0xd4d2f
andq $0x0, (%r12)
movslq 0x7c(%rbx), %rax
cmpq %rax, %r15
jge 0xf992
movq (%r14,%r15,8), %rdi
callq 0xc5d1
incq %r15
jmp 0xf97b
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 %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x243d65(%rip), %rax    # 0x253758
movl 0xe8(%rax), %eax
movq %rax, (%rsp)
leaq 0x12160(%r15), %r10
imulq $0x18, %rsi, %r14
movq 0x244899(%rip), %r11    # 0x2542a8
addq %r14, %r11
movq 0x244897(%rip), %r13    # 0x2542b0
addq %r14, %r13
leaq 0x121a0(%r15), %rbp
leaq 0x12250(%r15), %rax
subq $0x8, %rsp
movsd 0x1d31c2(%rip), %xmm0   # 0x1e2bf8
movq %r12, %rdx
movq %rbx, %rcx
pushq %rax
pushq $0x0
pushq %rbp
pushq %r13
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq 0x48(%rsp)
callq 0xe53a4
addq $0x50, %rsp
movq 0xa0(%r15), %rdi
movq 0xb0(%r15), %rsi
callq 0x1188f
movq 0x244837(%rip), %rax    # 0x2542a8
movq (%rax,%r14), %rdi
movl 0xc(%rax,%r14), %esi
callq 0x68ee7
movq 0x24482a(%rip), %rax    # 0x2542b0
movq (%rax,%r14), %rdi
movl 0xc(%rax,%r14), %esi
callq 0x68ee7
movq 0x24480d(%rip), %rsi    # 0x2542a8
addq %r14, %rsi
addq $0x28, %r15
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0xe2c6
movq 0x2447f0(%rip), %rsi    # 0x2542b0
addq %r14, %rsi
pushq $0x2
popq %r13
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0xe2c6
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe880
movq 0x2447b8(%rip), %rdi    # 0x2542a8
addq %r14, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xc073
addq 0x2447ac(%rip), %r14    # 0x2542b0
movq %r14, %rdi
movq %rbx, %rdx
movl %r13d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc073
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x244914(%rip), %rax    # 0x254448
andq $0x0, (%rax)
leaq 0x244901(%rip), %rax    # 0x254440
andq $0x0, (%rax)
movl %edi, %ebx
leaq 0x2448ec(%rip), %r12    # 0x254438
movq (%r12), %rdi
testq %rdi, %rdi
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0xfb6b
callq 0xd4d2f
andq $0x0, (%r12)
jmp 0xfb70
testq %rdi, %rdi
jne 0xfbbf
leaq 0x2448b9(%rip), %rax    # 0x254430
movq (%rax), %rsi
leaq 0x8(%rsp), %r13
movq %r13, (%rsp)
leaq 0x243bce(%rip), %r14    # 0x253758
leaq 0x24469f(%rip), %r8     # 0x254230
pushq $0x1
popq %rdx
leaq 0xc(%rsp), %r15
movq %r14, %rdi
xorl %ecx, %ecx
movq %r15, %r9
callq 0xd6a80
movq %rax, (%r12)
movl (%r15), %eax
movl %eax, 0xd0(%r14)
movl (%r13), %eax
movl %eax, 0xd4(%r14)
leaq 0x243b92(%rip), %rax    # 0x253758
movslq 0x7c(%rax), %rdi
movq 0x2446af(%rip), %rsi    # 0x254280
movslq %ebx, %rdx
callq 0x14de7c
movq (%r12), %rdi
callq 0xd4d2f
andq $0x0, (%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x243b4e(%rip), %r12    # 0x253758
movl (%r12), %eax
movl 0x7c(%r12), %ebp
movl %eax, 0x4(%rsp)
andl $-0x2, %eax
movl %eax, (%r12)
movslq %ebp, %rdi
pushq $0x8
popq %rsi
callq 0x2120
movq %rax, %rbx
xorl %r13d, %r13d
pushq $0x1
popq %r15
movslq %ebp, %rax
cmpq %rax, %r13
jge 0xfc5d
movl %r15d, %edi
movl %r15d, %esi
xorl %edx, %edx
callq 0xc44b
movq %rax, (%rbx,%r13,8)
movq %r14, 0x12248(%rax)
incq %r13
movl 0x7c(%r12), %ebp
jmp 0xfc33
movq 0x24461c(%rip), %rcx    # 0x254280
leaq 0x5e(%rip), %rsi        # 0xfcc9
movl %ebp, %edi
movq %rbx, %rdx
callq 0xc67c0
xorl %r14d, %r14d
movslq 0x7c(%r12), %rax
cmpq %rax, %r14
jge 0xfc90
movq (%rbx,%r14,8), %rdi
callq 0xc5d1
incq %r14
jmp 0xfc78
movl 0x4(%rsp), %ebp
andl $0x1, %ebp
movq %rbx, %rdi
callq 0x2220
leaq 0x24478a(%rip), %rax    # 0x254430
movq (%rax), %rdi
callq 0xd5c37
leaq 0x244783(%rip), %rax    # 0x254438
movq (%rax), %rdi
callq 0xd4d2f
addl %ebp, (%r12)
pushq $0x1
popq %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/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), %rdx
imulq $0x28, %rsi, %rax
testl $0x7fffffff, (%rdx,%rax) # imm = 0x7FFFFFFF
je 0xfe3a
movq %rsi, %r15
addq %rax, %rdx
movq 0xe0(%r14), %rdi
leaq 0xa0(%r14), %rbx
leaq 0x48(%r14), %r9
leaq 0x243a42(%rip), %rax    # 0x253758
imull $0x5, 0x1bc(%rax), %eax
leaq 0x12180(%r14), %r10
leaq 0x12160(%r14), %r11
leaq 0x2446fe(%rip), %r12    # 0x254430
leaq 0x2446ff(%rip), %r13    # 0x254438
leaq 0x121a0(%r14), %rbp
movsd 0x1d2eb8(%rip), %xmm0   # 0x1e2c00
xorps %xmm1, %xmm1
movq %rbx, %r8
pushq $0x0
pushq %rbp
pushq (%r13)
pushq (%r12)
pushq %r11
pushq %r10
pushq $0x0
pushq %rax
callq 0xe4e5f
addq $0x40, %rsp
movq 0xa0(%r14), %rdi
movq 0xb0(%r14), %rsi
callq 0x1188f
movq 0x244525(%rip), %rax    # 0x2542a8
imulq $0x18, %r15, %r15
movq (%rax,%r15), %rdi
movl 0xc(%rax,%r15), %esi
callq 0x68ee7
movq 0x244514(%rip), %rax    # 0x2542b0
movq (%rax,%r15), %rdi
movl 0xc(%rax,%r15), %esi
callq 0x68ee7
movq 0x2444f7(%rip), %rsi    # 0x2542a8
addq %r15, %rsi
leaq 0x8(%r14), %r12
addq $0x28, %r14
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0xe2c6
movq 0x2444d6(%rip), %rsi    # 0x2542b0
addq %r15, %rsi
pushq $0x2
popq %r13
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0xe2c6
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe880
movq 0x24449e(%rip), %rdi    # 0x2542a8
addq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xc073
addq 0x244492(%rip), %r15    # 0x2542b0
movq %r15, %rdi
movq %rbx, %rdx
movl %r13d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc073
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/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
orl $-0x1, 0x4(%rsp)
leaq 0x2445db(%rip), %rax    # 0x254438
andq $0x0, (%rax)
leaq 0x2445c8(%rip), %r12    # 0x254430
andq $0x0, (%r12)
leaq 0x2438e4(%rip), %rbx    # 0x253758
testb $0x2, (%rbx)
jne 0xfeab
leaq 0x2438d8(%rip), %r14    # 0x253758
leaq 0x2443a9(%rip), %rsi    # 0x254230
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xd61b1
movq %rax, (%r12)
movl (%r15), %esi
movq %r14, %rdi
callq 0x3430
cmpl $0x0, 0xf8(%rbx)
jle 0xff68
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3418
xorl %edi, %edi
xorl %esi, %esi
callq 0xdf2c
movq 0x24310e(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
cvtsi2sdq 0x1a8(%rbx), %xmm0
mulsd 0x1d2d22(%rip), %xmm0   # 0x1e2c08
leaq 0x1d3038(%rip), %rsi    # 0x1e2f25
leaq 0x1d3051(%rip), %rdx    # 0x1e2f45
movb $0x1, %al
callq 0x22b0
movq 0x2443a6(%rip), %rdi    # 0x2542a8
movq 0x2443a7(%rip), %rsi    # 0x2542b0
movq 0x244370(%rip), %rdx    # 0x254280
callq 0xe95b
movq (%r12), %rdi
callq 0xd5c37
movq 0x244383(%rip), %rdi    # 0x2542a8
leaq 0x1d407a(%rip), %rsi    # 0x1e3fa6
callq 0xefef
movq 0x244378(%rip), %rdi    # 0x2542b0
leaq 0x1ec5f9(%rip), %rsi    # 0x1fc538
callq 0xefef
testb $0x10, (%rbx)
je 0xff4e
callq 0xed58
leaq 0x2442db(%rip), %rdi    # 0x254230
callq 0x5891
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1d2f76(%rip), %rdi    # 0x1e2ee5
leaq 0x1d2f8b(%rip), %rsi    # 0x1e2f01
leaq 0x1d2f91(%rip), %rcx    # 0x1e2f0e
movl $0x7ea, %edx            # imm = 0x7EA
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2444a9(%rip), %rax    # 0x254438
andq $0x0, (%rax)
leaq 0x2437be(%rip), %rdi    # 0x253758
xorl %esi, %esi
callq 0x3418
callq 0xd96c
leaq 0x244283(%rip), %rdi    # 0x254230
callq 0x5891
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: init_bit_extz_t(bit_extz_t*, unsigned long)
inline void init_bit_extz_t(bit_extz_t *ex, uint64_t thres) {
	memset(ex, 0, sizeof((*ex)));
	///(bitwbit<<2) >= (((thres)<<1)+1);->at least 4 cells for each w128_t
	if(((uint64_t)thres)<(((((uint64_t)bitwbit)<<2)-1)>>1)) thres=(((bitwbit<<2)-1)>>1);
	resize_bit_extz_t((*ex), (thres));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0xd8, %edx
xorl %esi, %esi
callq 0x20e0
cmpq $0x7f, %r14
pushq $0x7f
popq %r15
cmovaq %r14, %r15
testl %r15d, %r15d
jle 0x10800
movl %r15d, %r14d
shrl $0x5, %r14d
imull $0xc, %r14d, %eax
leal 0xc(%rax), %ebp
leaq 0x60(,%rax,8), %rdi
callq 0x2280
movq %rax, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movl %r14d, %ecx
incl %ecx
leal 0x8(,%r14,8), %edx
leaq (%rax,%rdx), %rsi
movq %rsi, 0x50(%rbx)
movl %ecx, %esi
shll $0x4, %esi
addq %rax, %rsi
movq %rsi, 0x58(%rbx)
leal (%rcx,%rcx,2), %esi
leaq (%rax,%rsi,8), %rsi
movq %rsi, 0x60(%rbx)
leal 0x4(,%r14,4), %esi
leaq (%rax,%rsi,8), %rsi
movq %rsi, 0x68(%rbx)
leal (%rcx,%rcx,4), %esi
leaq (%rax,%rsi,8), %rsi
movq %rsi, 0x70(%rbx)
imull $0x6, %ecx, %esi
leaq (%rax,%rsi,8), %rsi
movq %rsi, 0x78(%rbx)
imull $0x7, %ecx, %esi
leaq (%rax,%rsi,8), %rsi
movq %rsi, 0x80(%rbx)
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x88(%rbx)
leal (%rcx,%rcx,8), %edx
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x90(%rbx)
imull $0xa, %ecx, %edx
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x98(%rbx)
imull $0xb, %ecx, %edx
leaq (%rax,%rdx,8), %rax
movq %rax, 0xa0(%rbx)
movl %ebp, 0x38(%rbx)
movl %ecx, 0x34(%rbx)
movl %r15d, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
addq $0x2b0, %rbx            # imm = 0x2B0
movq %rbx, %rdi
popq %rbx
jmp 0x10aa0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: if_exact_match(char*, long long, char*, long long, long long, long long, long long, long long)
inline int if_exact_match(char* x, long long xLen, char* y, long long yLen, long long xBeg, long long xEnd, long long yBeg, long long yEnd)
{
    long long overlapLen = xEnd - xBeg + 1;

    if(yEnd - yBeg + 1 == overlapLen)
    {
        if(memcmp(x+xBeg, y+yBeg, overlapLen)==0) return 1;
    }

    return 0;
}

// Assembly:
pushq %rax
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %r8, %r9
subq %rax, %rcx
cmpq %r9, %rcx
jne 0x109ab
incq %r9
addq %r8, %rdi
addq %rax, %rdx
movq %rdx, %rsi
movq %r9, %rdx
callq 0x21a0
testl %eax, %eax
je 0x109af
xorl %eax, %eax
popq %rcx
retq
pushq $0x1
popq %rax
jmp 0x109ad
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: init_SNP_IDs(Snp_ID_Vector_Alloc*)
inline void init_SNP_IDs(Snp_ID_Vector_Alloc* SNP_IDs)
{
    SNP_IDs->max_snp_id = -1;
    SNP_IDs->buffer_length = 0;
    SNP_IDs->buffer_size = 1000;
    SNP_IDs->buffer = (uint32_t*)malloc(sizeof(uint32_t) * SNP_IDs->buffer_size);

    SNP_IDs->IDs_length = 0;
    SNP_IDs->IDs_size = 10;
    SNP_IDs->IDs = (Snp_ID_Vector*)calloc(SNP_IDs->IDs_size, sizeof(Snp_ID_Vector));

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
orq $-0x1, 0x10(%rdi)
andq $0x0, 0x28(%rdi)
movq $0x3e8, 0x20(%rdi)      # imm = 0x3E8
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x2280
movq %rax, 0x30(%rbx)
andq $0x0, 0x8(%rbx)
movq $0xa, (%rbx)
pushq $0xa
popq %rdi
pushq $0x1c
popq %rsi
callq 0x2120
movq %rax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: push_cigar(Compressed_Cigar_record*, long long, Cigar_record*)
inline void push_cigar(Compressed_Cigar_record* records, long long ID, Cigar_record* input)
{
    if (input->length > records[ID].size)
    {
        records[ID].size = input->length;
        records[ID].record = (uint32_t*)realloc(records[ID].record, records[ID].size*sizeof(uint32_t));     
    }
    records[ID].length = input->length;
    memcpy(records[ID].record, input->record, input->length*sizeof(uint32_t));

    if (input->lost_base_length > records[ID].lost_base_size)
    {
        records[ID].lost_base_size = input->lost_base_length;
        records[ID].lost_base = (char*)realloc(records[ID].lost_base, records[ID].lost_base_size);
    }
    records[ID].lost_base_length = input->lost_base_length;
    memcpy(records[ID].lost_base, input->lost_base, input->lost_base_length);

    records[ID].new_length = input->new_read_length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x18(%rdx), %rdx
imulq $0x28, %rsi, %rax
leaq (%rdi,%rax), %r14
movl 0xc(%rdi,%rax), %ecx
movq (%rdi,%rax), %rdi
cmpq %rcx, %rdx
jbe 0x10af0
movl %edx, 0xc(%r14)
movl %edx, %esi
shlq $0x2, %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, (%r14)
movq 0x18(%rbx), %rdx
movl %edx, 0x8(%r14)
movq 0x8(%rbx), %rsi
shlq $0x2, %rdx
callq 0x2160
movq 0x38(%rbx), %rdx
movl 0x1c(%r14), %eax
cmpq %rax, %rdx
jbe 0x10b2a
movl %edx, 0x1c(%r14)
movq 0x10(%r14), %rdi
movl %edx, %esi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%r14)
movq 0x38(%rbx), %rdx
jmp 0x10b2e
movq 0x10(%r14), %rdi
movl %edx, 0x18(%r14)
movq 0x28(%rbx), %rsi
callq 0x2160
movl 0x20(%rbx), %eax
movl %eax, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: get_cigar_errors(Cigar_record*)
inline int get_cigar_errors(Cigar_record* cigar)
{
    int i;
    int total_errors = 0;
    for (i = 0; i < (long long)cigar->length; i++)
    {
        if (Get_Cigar_Type(cigar->record[i]) > 0)
        {
            total_errors = total_errors + Get_Cigar_Length(cigar->record[i]);
        }
    }
    return total_errors;
}

// Assembly:
movq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovleq %rdx, %rcx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x10b7d
movq 0x8(%rdi), %rsi
movl (%rsi,%rdx,4), %esi
movl %esi, %r8d
andl $0x3, %r8d
shrl $0x2, %esi
testl %r8d, %r8d
cmovel %r8d, %esi
addl %esi, %eax
incq %rdx
jmp 0x10b59
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x3e8, 0x8(%rdi)       # imm = 0x3E8
andq $0x0, 0x10(%rdi)
movl $0x3e8, %r14d           # imm = 0x3E8
movl $0x3e8, %edi            # imm = 0x3E8
movl $0xa8, %esi
callq 0x2120
movq %rax, (%rbx)
xorl %eax, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %r14, %rcx
jae 0x11917
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
movq 0x8(%rbx), %r14
addq $0xa8, %rax
jmp 0x118d1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x40
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x11975
movq (%rdi), %rsi
andl $0x0, (%rsi,%rcx)
andq $0x0, 0x20(%rsi,%rcx)
andq $0x0, 0x8(%rsi,%rcx)
andq $0x0, 0x50(%rsi,%rcx)
andq $0x0, 0x38(%rsi,%rcx)
incq %rdx
addq $0xa8, %rcx
jmp 0x11945
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
pushq $0x78
popq %r14
xorl %r15d, %r15d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r15
jae 0x119d0
addq %r14, %rdi
addq $-0x40, %rdi
callq 0x119da
movq (%rbx), %rax
leaq (%rax,%r14), %rdi
addq $-0x30, %rdi
callq 0x119e9
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x119e9
incq %r15
addq $0xa8, %r14
jmp 0x11994
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/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
andl $0x0, 0x8(%rdi)
cmpq $0x1, %rdx
jne 0x11a57
movl 0x4(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x11af6
xorl %eax, %eax
testq %r15, %r15
cmovleq %rax, %r15
addq $0x8, %r13
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subq $0x1, %r15
jb 0x11a9e
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 0x11a98
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x11af6
movq %rbp, %rax
addq $0x10, %r13
jmp 0x11a69
cmpq $0x1, %r12
jne 0x11ac2
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 0x11ad1
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 0x11af6
// File: /workspace/github_cpp_makefile_star2_O2/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 0x11b4c
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 0x11b51
movq %rcx, %rdi
callq 0x1a3acc
jmp 0x11b5c
movq (%rbx), %rax
jmp 0x11b5f
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2370
movq %rax, (%rbx)
movl 0x8(%rbx), %ecx
shlq $0x20, %r14
leal (%r15,%r15), %edx
pushq $0x1
popq %rsi
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_O2/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, %r14
callq 0x11a23
movl 0x8(%r14), %r15d
movl 0x40(%rbx), %ebp
cmpl %ebp, %r15d
jne 0x11bd1
movq (%r14), %rdi
movq 0x38(%rbx), %rsi
leaq (,%r15,8), %rdx
callq 0x21a0
testl %eax, %eax
jne 0x11bd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x241408(%rip), %r13    # 0x252fe0
movq (%r13), %rdi
movl 0x1c(%rbx), %r9d
leaq 0x1d16c1(%rip), %rsi    # 0x1e32a8
leaq 0x1d16e0(%rip), %rdx    # 0x1e32ce
movl %r15d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x22b0
leaq 0x1d16d8(%rip), %r15    # 0x1e32da
xorl %ebp, %ebp
xorl %r12d, %r12d
movl 0x8(%r14), %eax
cmpq %rax, %r12
jae 0x11c58
movq (%r13), %rdi
movq (%r14), %rax
movq %rbp, %rcx
sarq $0x1d, %rcx
movq (%rax,%rcx), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movl %eax, %edx
shrl %edx
movl %edx, %r8d
negl %r8d
testb $0x1, %al
cmovel %edx, %r8d
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22b0
incq %r12
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbp
jmp 0x11c07
leaq 0x1d1699(%rip), %r14    # 0x1e32f8
xorl %r12d, %r12d
xorl %r15d, %r15d
movl 0x40(%rbx), %eax
cmpq %rax, %r15
jae 0x11bc2
movq (%r13), %rdi
movq 0x38(%rbx), %rax
movq %r12, %rcx
sarq $0x1d, %rcx
movq (%rax,%rcx), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movl %eax, %edx
shrl %edx
movl %edx, %r8d
negl %r8d
testb $0x1, %al
cmovel %edx, %r8d
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
incq %r15
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r12
jmp 0x11c65
// File: /workspace/github_cpp_makefile_star2_O2/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 0x12419
movl %esi, 0xc(%rbx)
movl %esi, %eax
shlq $0x3, %rax
movq (%rbx), %rsi
testq %rdx, %rdx
je 0x1240b
movq %rdx, %rdi
movq %rax, %rdx
callq 0x1a3acc
jmp 0x12416
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2370
movq %rax, (%rbx)
andl $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10(%rdi), %rdx
leaq 0x1(%rdx), %rcx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rsi, %rcx
jbe 0x12d35
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%rbx)
imulq $0x150, %rsi, %rsi      # imm = 0x150
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x10(%rbx), %rdx
leaq 0x1(%rdx), %rcx
imulq $0xa8, %rdx, %rdx
movups (%r14), %xmm0
movups %xmm0, (%rax,%rdx)
movups 0x10(%r14), %xmm0
movups %xmm0, 0x10(%rax,%rdx)
movl 0x24(%r14), %esi
movl %esi, 0x24(%rax,%rdx)
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %r14
movq 0x24025a(%rip), %r12    # 0x252fe0
xorl %r13d, %r13d
cmpq %r14, %r13
je 0x12e32
xorl %edx, %edx
xorl %ebp, %ebp
movq %r13, %rax
testq %rax, %rax
js 0x12de8
movq %rax, %rcx
movq 0x8(%rbx), %rax
movq (%rax,%rcx,8), %rax
cmpq $-0x1, %rax
je 0x12d99
shlq $0x4, %rcx
movl 0x4(%r15,%rcx), %esi
movl 0x8(%r15,%rcx), %ecx
movq %rax, %rdi
shlq $0x4, %rdi
subl 0x8(%r15,%rdi), %ecx
subl 0x4(%r15,%rdi), %esi
movq %rcx, %rdi
subq %rsi, %rdi
movq %rsi, %r8
subq %rcx, %r8
cmpl %ecx, %esi
cmovbeq %rdi, %r8
addq %r8, %rdx
addq %rcx, %rbp
jmp 0x12d99
movq 0x10(%rbx), %rax
movslq (%rax,%r13,4), %rcx
cmpq %rcx, %rdx
jne 0x12e07
movq 0x18(%rbx), %rax
movslq (%rax,%r13,4), %rcx
cmpq %rcx, %rbp
jne 0x12e1b
incq %r13
jmp 0x12d89
movq (%r12), %rdi
leaq 0x1d0504(%rip), %rsi    # 0x1e3316
xorl %eax, %eax
callq 0x22b0
jmp 0x12df5
movq (%r12), %rdi
leaq 0x1d0512(%rip), %rsi    # 0x1e3338
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0x12e02
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/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 0x139a8
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 0x1392a
movq %r14, %rdi
callq 0x1a3acc
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0x1a3acc
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1a3acc
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1a3acc
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1a3acc
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rsi
movq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0x1a3acc
jmp 0x1399d
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