LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: merge_snp_vectors_and_test(haplotype_evdience_alloc*, int)
int merge_snp_vectors_and_test(haplotype_evdience_alloc* hap, int diff_vector_ID)
{
    int8_t *r_vector = Get_Result_SNP_Vector((*hap));
    int vectorLen = Get_SNP_Vector_Length((*hap));
    memset(r_vector, -1, vectorLen);
    hap->result_stat.occ_0 = 0;
    hap->result_stat.occ_1 = 0;

    int8_t* vector;
    int vectorID;
    int i, j;

    for (i = 0; i < (int)hap->core_snp; i++)
    {
        if(i == diff_vector_ID)
        {
            continue;
        }

        vectorID = hap->snp_stat.a[i].id;
        vector = Get_SNP_Vector((*hap), vectorID);

        for (j = 0; j < vectorLen; j++)
        {
            if(r_vector[j] == -1)
            {
                if(vector[j] == 0)
                {
                    hap->result_stat.occ_0++;
                    r_vector[j] = vector[j];
                }
                else if(vector[j] == 1)
                {
                    hap->result_stat.occ_1++;
                    r_vector[j] = vector[j];
                }
            }
            else ///can debug here
            {
                ///has confilict
                if(vector[j] != -1 && vector[j] != 2 && vector[j] != r_vector[j])
                {
                    return 0;
                }
            }
        }
    }

    hap->result_stat.overlap_num = hap->result_stat.occ_0 + hap->result_stat.occ_1;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x1e0(%rdi), %r14
movslq 0x1c8(%rdi), %r15
movq %r14, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x20e0
movq $0x0, 0x1f4(%rbx)
cmpl $0x0, 0x1c4(%rbx)
jle 0x50f10
movl %r15d, %eax
leaq 0x1f4(%rbx), %rcx
leaq 0x1f8(%rbx), %rdx
movl %ebp, %esi
xorl %edi, %edi
cmpq %rsi, %rdi
je 0x50efd
testl %eax, %eax
jle 0x50efd
movq 0x218(%rbx), %r9
leaq (%rdi,%rdi,4), %r10
movl 0x1c8(%rbx), %r8d
imull (%r9,%r10,8), %r8d
addq 0x1d0(%rbx), %r8
xorl %r9d, %r9d
movb (%r14,%r9), %r11b
movzbl (%r8,%r9), %r10d
cmpb $-0x1, %r11b
je 0x50ed9
cmpl $0x2, %r10d
je 0x50ef5
cmpl $0xff, %r10d
je 0x50ef5
cmpb %r11b, %r10b
je 0x50ef5
jmp 0x50f29
movq %rcx, %r11
testl %r10d, %r10d
je 0x50eea
movq %rdx, %r11
cmpl $0x1, %r10d
jne 0x50ef5
incl (%r11)
movb (%r8,%r9), %r10b
movb %r10b, (%r14,%r9)
incq %r9
cmpq %r9, %rax
jne 0x50eb4
incq %rdi
movslq 0x1c4(%rbx), %r8
cmpq %r8, %rdi
jl 0x50e8a
movl 0x1f8(%rbx), %eax
addl 0x1f4(%rbx), %eax
movl %eax, 0x1f0(%rbx)
movl $0x1, %eax
jmp 0x50f2b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: Preorder_Merge_Advance_Repeat(unsigned int, haplotype_evdience_alloc*, int)
void Preorder_Merge_Advance_Repeat(uint32_t snpID, haplotype_evdience_alloc* hap, int pathLen) 
{ 
    hap->dp.visit[snpID] = 1;
    hap->dp.buffer[pathLen] = snpID;
    pathLen++;

    if(hap->dp.backtrack_length[snpID] == 0)
    {
        insert_SNP_IDs_addition(&(hap->dp.SNP_IDs), hap->dp.buffer, pathLen);
        return;
    }
    else
    {
        uint32_t* column;
        int j;

        column = Get_DP_Backtrack_Column(hap->dp, snpID);
        for (j = 0; j < (int)hap->dp.backtrack_length[snpID]; j++)
        {
            Preorder_Merge_Advance_Repeat(column[j], hap, pathLen); 
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x258(%rsi), %rax
movl %edi, %r13d
movb $0x1, (%rax,%r13)
movq 0x290(%rsi), %r15
movslq %edx, %r14
movl %edi, (%r15,%r14,4)
incl %r14d
movq 0x278(%rsi), %rax
cmpl $0x0, (%rax,%r13,4)
je 0x51279
movq 0x278(%rbx), %rax
cmpl $0x0, (%rax,%r13,4)
jle 0x51337
movl %edi, %r12d
imull 0x250(%rbx), %r12d
shlq $0x2, %r12
addq 0x280(%rbx), %r12
xorl %r15d, %r15d
movl (%r12,%r15,4), %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x511eb
incq %r15
movq 0x278(%rbx), %rax
movslq (%rax,%r13,4), %rax
cmpq %rax, %r15
jl 0x51252
jmp 0x51337
movl %edx, %ebp
movq 0x2b0(%rbx), %rax
cmpq %rax, 0x2b8(%rbx)
jl 0x512ad
leaq (%rax,%rax), %rcx
movq %rcx, 0x2b0(%rbx)
movq 0x2c8(%rbx), %rdi
imulq $0x38, %rax, %rsi
callq 0x2370
movq %rax, 0x2c8(%rbx)
movq 0x2d8(%rbx), %rsi
movq 0x2b8(%rbx), %rax
movq 0x2c8(%rbx), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
movl %esi, (%rcx,%rdx)
movslq %r14d, %r14
addl %esi, %ebp
movl %ebp, 0x4(%rcx,%rdx)
addq %r14, %rsi
cmpq 0x2d0(%rbx), %rsi
jle 0x51307
leaq (%rsi,%rsi), %rax
movq %rax, 0x2d0(%rbx)
movq 0x2e0(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x2e0(%rbx)
movq 0x2d8(%rbx), %rdi
shlq $0x2, %rdi
addq 0x2e0(%rbx), %rdi
leaq (,%r14,4), %rdx
movq %r15, %rsi
callq 0x2160
incq 0x2b8(%rbx)
addq %r14, 0x2d8(%rbx)
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/Correct.cpp
// Function: Preorder_Merge_Advance(unsigned int, haplotype_evdience_alloc*, int)
void Preorder_Merge_Advance(uint32_t snpID, haplotype_evdience_alloc* hap, int pathLen) 
{ 
    hap->dp.visit[snpID] = 1;
    hap->dp.buffer[pathLen] = snpID;
    pathLen++;

    if(hap->dp.backtrack_length[snpID] == 0)
    {
        generate_result_vector(hap, pathLen);
        return;
    }
    else
    {
        uint32_t* column;
        int j;

        column = Get_DP_Backtrack_Column(hap->dp, snpID);
        for (j = 0; j < (int)hap->dp.backtrack_length[snpID]; j++)
        {
            Preorder_Merge_Advance(column[j], hap, pathLen); 
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x258(%rsi), %rax
movl %edi, %r12d
movb $0x1, (%rax,%r12)
movq 0x290(%rsi), %rax
movslq %edx, %r15
movl %edi, (%rax,%r15,4)
incl %r15d
movq 0x278(%rsi), %rax
cmpl $0x0, (%rax,%r12,4)
je 0x51604
movq 0x278(%rbx), %rax
cmpl $0x0, (%rax,%r12,4)
jle 0x515fa
movl %edi, %r14d
imull 0x250(%rbx), %r14d
shlq $0x2, %r14
addq 0x280(%rbx), %r14
xorl %r13d, %r13d
movl (%r14,%r13,4), %edi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x51577
incq %r13
movq 0x278(%rbx), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %r13
jl 0x515d8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
movl %r15d, %esi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x51346
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: if_snp_vector_useful(haplotype_evdience_alloc*, long long, long long, unsigned int*, long long)
int if_snp_vector_useful(haplotype_evdience_alloc* hap,
long long occ_0, long long occ_1, uint32_t* SNPs, long long SNPsLen)
{

    double occ_1_coverage_low = (occ_0 + occ_1) * 0.3;
    
    if(occ_1 == 0 || occ_0 == 0)
    {
        return 0;
    }

    ///Fix-attention
    if(occ_1 >= occ_1_coverage_low && occ_0 >= occ_1_coverage_low)
    {
        return 1;
    }
    else if(occ_1 >= 5 && occ_0 >= 5)
    {
        return 1;
    }
    else if(occ_1 >= 3 && occ_0 >= 3 && SNPsLen >= 2)
    {
        int nearsnp;
        int non_nearsnps;
        count_nearby_snps(hap, SNPs, SNPsLen, &nearsnp, &non_nearsnps);
        if(non_nearsnps > 0)
        {
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %r9b
xorl %ebx, %ebx
orb %al, %r9b
jne 0x516af
leaq (%rdx,%rsi), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x1d359f(%rip), %xmm0   # 0x224be0
cvtsi2sd %rdx, %xmm1
ucomisd %xmm0, %xmm1
movl $0x1, %ebx
jb 0x5165f
xorps %xmm1, %xmm1
cvtsi2sd %rsi, %xmm1
ucomisd %xmm0, %xmm1
jae 0x516af
cmpq $0x5, %rdx
setge %al
cmpq $0x5, %rsi
setge %r9b
testb %al, %r9b
jne 0x516af
cmpq $0x3, %rdx
setl %al
cmpq $0x3, %rsi
setl %dl
orb %al, %dl
cmpq $0x2, %r8
setl %al
orb %dl, %al
jne 0x516ad
leaq 0x4(%rsp), %rax
movq %rsp, %r14
movq %rcx, %rsi
movl %r8d, %edx
movq %rax, %rcx
movq %r14, %r8
callq 0x876ab
cmpl $0x0, (%r14)
jg 0x516af
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: merge_SNP_Vectors(haplotype_evdience_alloc*, unsigned int*, long long)
void merge_SNP_Vectors(haplotype_evdience_alloc* hap, uint32_t* SNPs, long long SNPLen)
{
    
    int8_t* vector = Get_Result_SNP_Vector((*hap));
    memset(vector, -1, Get_SNP_Vector_Length((*hap)));
    hap->result_stat.occ_0 = 0;
    hap->result_stat.occ_1 = 0;
    hap->result_stat.occ_2 = 0;
    hap->result_stat.score = SNPLen;
    hap->result_stat.homopolymer_num = 0;
    hap->result_stat.non_homopolymer_num = 0;

    long long snpID1;
    long long j = 0;
    int flag, vectorID;
    for (j = 0; j < SNPLen; j++)
    {
        snpID1 = SNPs[j];
        vectorID = hap->snp_stat.a[snpID1].id;
        vector = Get_SNP_Vector((*hap), vectorID);
        if(hap->snp_stat.a[snpID1].is_homopolymer)
        {
            hap->result_stat.homopolymer_num++;
        }
        else
        {
            hap->result_stat.non_homopolymer_num++;
        }

        if((flag = debug_add_to_result_snp_vector(hap, vector, Get_SNP_Vector_Length((*hap))))!= -1)
        {
            fprintf(stderr, "incompatible snp vector....\n");
            exit(0);
        }
    }
    hap->result_stat.overlap_num = hap->result_stat.occ_0 + hap->result_stat.occ_1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x1e0(%rdi), %rdi
movl 0x1c8(%rbx), %edx
movl $0xff, %esi
callq 0x20e0
xorl %eax, %eax
movq %rax, 0x1f4(%rbx)
movl $0x0, 0x1fc(%rbx)
movl %r14d, 0x208(%rbx)
movq %rax, 0x200(%rbx)
testq %r14, %r14
jle 0x51753
xorl %r12d, %r12d
movl (%r15,%r12,4), %eax
movq 0x218(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movl 0x1c8(%rbx), %edx
movl (%rcx,%rax,8), %esi
imull %edx, %esi
addq 0x1d0(%rbx), %rsi
xorl %edi, %edi
cmpb $0x0, 0x24(%rcx,%rax,8)
sete %dil
incl 0x200(%rbx,%rdi,4)
movq %rbx, %rdi
callq 0x50dc1
cmpl $-0x1, %eax
jne 0x51771
incq %r12
cmpq %r12, %r14
jne 0x5170a
movl 0x1f8(%rbx), %eax
addl 0x1f4(%rbx), %eax
movl %eax, 0x1f0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x5ac9
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: remove_reads(haplotype_evdience_alloc*, unsigned int*, long long, overlap_region_alloc*)
void remove_reads(haplotype_evdience_alloc* hap, uint32_t* SNPs, long long SNPsLen, overlap_region_alloc* overlap_list)
{
    long long i, j, snpID, vectorID, overlapLen;
    int8_t *vector;

    for (i = 0; i < SNPsLen; i++)
    {
        snpID = SNPs[i];
        vectorID = hap->snp_stat.a[snpID].id;
        vector = Get_SNP_Vector((*hap), vectorID);
        ///hap->snp_stat[snpID].site;

        for (j = 0; j < Get_SNP_Vector_Length((*hap)); j++)
        {
            
            if(vector[j] == 1 && overlap_list->list[j].is_match == 1)
            {
                //overlap_list->list[j].is_match = 0;
                overlap_list->list[j].is_match = 2;
                overlapLen = overlap_list->list[j].x_pos_e - overlap_list->list[j].x_pos_s + 1;
                ///overlap_list->mapped_overlaps--;
                overlap_list->mapped_overlaps_length -= overlapLen;
            }

            /****************************may have bugs********************************/
            if( hap->snp_stat.a[snpID].site >= overlap_list->list[j].x_pos_s
                &&
                hap->snp_stat.a[snpID].site <= overlap_list->list[j].x_pos_e)
              {
                  overlap_list->list[j].strong = 1;
              }
            /****************************may have bugs********************************/

        }
    }
}

// Assembly:
testq %rdx, %rdx
jle 0x51824
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x218(%rdi), %rax
movq 0x1d0(%rdi), %r8
movl 0x1c8(%rdi), %edi
imulq $0xa8, %rdi, %r9
xorl %r10d, %r10d
testq %rdi, %rdi
je 0x51813
movl (%rsi,%r10,4), %r11d
leaq (%r11,%r11,4), %rbx
movl (%rax,%rbx,8), %r11d
imulq %rdi, %r11
addq %r8, %r11
movl 0x20(%rax,%rbx,8), %ebx
movq (%rcx), %r14
xorl %r15d, %r15d
cmpb $0x1, (%r11)
jne 0x517f0
movq (%rcx), %r12
cmpb $0x1, 0x2c(%r12,%r15)
jne 0x517f0
movb $0x2, 0x2c(%r12,%r15)
movl 0x8(%r12,%r15), %r13d
subl 0x4(%r12,%r15), %r13d
incl %r13d
subq %r13, 0x18(%rcx)
cmpl 0x4(%r14,%r15), %ebx
jb 0x51804
cmpl 0x8(%r14,%r15), %ebx
ja 0x51804
movb $0x1, 0x2e(%r14,%r15)
addq $0xa8, %r15
incq %r11
cmpq %r15, %r9
jne 0x517c8
incq %r10
cmpq %rdx, %r10
jne 0x517a6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: try_to_remove_reads(signed char*, long long, overlap_region_alloc*, unsigned int*, long long, haplotype_evdience_alloc*)
void try_to_remove_reads(int8_t* vector, long long vectorLen, overlap_region_alloc* overlap_list,
uint32_t* SNPs, long long SNPLen, haplotype_evdience_alloc* hap)
{
    long long i, overlapLen;
    long long removed_num = 0;

    for (i = 0; i < vectorLen; i++)
    {
        if(vector[i] == 1 && overlap_list->list[i].is_match == 1)
        {
            
            ///overlap_list->list[i].is_match = 0;
            overlap_list->list[i].is_match = 2;
            overlapLen = overlap_list->list[i].x_pos_e - overlap_list->list[i].x_pos_s + 1;
            ///overlap_list->mapped_overlaps--;
            overlap_list->mapped_overlaps_length -= overlapLen;
            removed_num++;
        }
    }


    long long snpID, j;
    for (i = 0; i < SNPLen; i++)
    {
        snpID = SNPs[i];
        ///check all overlaps
        for (j = 0; j < Get_SNP_Vector_Length((*hap)); j++)
        {
            /****************************may have bugs********************************/
            if( hap->snp_stat.a[snpID].site >= overlap_list->list[j].x_pos_s
                &&
                hap->snp_stat.a[snpID].site <= overlap_list->list[j].x_pos_e)
              {
                  overlap_list->list[j].strong = 1;
              }
            /****************************may have bugs********************************/
        }
    }
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
jle 0x51867
movl $0x2c, %eax
xorl %r10d, %r10d
cmpb $0x1, (%rdi,%r10)
jne 0x51859
movq (%rdx), %r11
cmpb $0x1, (%r11,%rax)
jne 0x51859
movb $0x2, (%r11,%rax)
movl -0x24(%r11,%rax), %ebx
subl -0x28(%r11,%rax), %ebx
incl %ebx
subq %rbx, 0x18(%rdx)
incq %r10
addq $0xa8, %rax
cmpq %r10, %rsi
jne 0x51833
testq %r8, %r8
jle 0x518c1
movl 0x1c8(%r9), %eax
imulq $0xa8, %rax, %rsi
xorl %edi, %edi
testl %eax, %eax
je 0x518b9
movl (%rcx,%rdi,4), %r10d
movq 0x218(%r9), %r11
leaq (%r10,%r10,4), %r10
movl 0x20(%r11,%r10,8), %r10d
movq (%rdx), %r11
xorl %ebx, %ebx
cmpl 0x4(%r11,%rbx), %r10d
jb 0x518ad
cmpl 0x8(%r11,%rbx), %r10d
ja 0x518ad
movb $0x1, 0x2e(%r11,%rbx)
addq $0xa8, %rbx
cmpq %rbx, %rsi
jne 0x51899
incq %rdi
cmpq %r8, %rdi
jne 0x5187c
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: process_repeat_snps(haplotype_evdience_alloc*, overlap_region_alloc*)
void process_repeat_snps(haplotype_evdience_alloc* hap, overlap_region_alloc* overlap_list)
{
    int i;
    uint32_t* snp_ids;
    long long length;

    

    for (i = 0; i < hap->dp.SNP_IDs.IDs_length; i++)
    {
        snp_ids = hap->dp.SNP_IDs.buffer + hap->dp.SNP_IDs.IDs[i].beg;
        length = hap->dp.SNP_IDs.IDs[i].end -hap->dp.SNP_IDs.IDs[i].beg + 1;

        merge_SNP_Vectors(hap, snp_ids, length);

        if(if_snp_vector_useful(hap, hap->result_stat.occ_0, hap->result_stat.occ_1, 
        snp_ids, length))
        {
            try_to_remove_reads(Get_Result_SNP_Vector((*hap)), Get_SNP_Vector_Length((*hap)), 
            overlap_list, snp_ids, length, hap);

            hap->dp.SNP_IDs.IDs[i].is_remove = 1;
        }
        else
        {
            hap->dp.SNP_IDs.IDs[i].is_remove = 0;
        }
    }
}

// Assembly:
cmpq $0x0, 0x2b8(%rdi)
jle 0x5198d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x2c8(%r14), %rax
movl (%rax,%r13), %r12d
movl 0x4(%rax,%r13), %r15d
subl %r12d, %r15d
shlq $0x2, %r12
addq 0x2e0(%r14), %r12
incl %r15d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x516b9
movl 0x1f4(%r14), %esi
movl 0x1f8(%r14), %edx
movq %r14, %rdi
movq %r12, %rcx
movq %r15, %r8
callq 0x51618
movl $0x0, %ecx
testl %eax, %eax
je 0x5195f
movq 0x1e0(%r14), %rdi
movl 0x1c8(%r14), %esi
movq %rbx, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x51825
movl $0x1, %ecx
movq 0x2c8(%r14), %rax
movl %ecx, 0x18(%rax,%r13)
incq %rbp
addq $0x1c, %r13
cmpq %rbp, 0x2b8(%r14)
jg 0x518e7
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/Correct.cpp
// Function: debug_print_snp_stat(char*, haplotype_evdience_alloc*, overlap_region_alloc*, All_reads*)
int debug_print_snp_stat(char* name, haplotype_evdience_alloc* hap, overlap_region_alloc* overlap_list, All_reads* R_INF)
{
    if(overlap_list->length > 0 &&
       memcmp(name, Get_NAME((*R_INF), overlap_list->list[0].x_id), 
       Get_NAME_LENGTH((*R_INF), overlap_list->list[0].x_id)) == 0)
    {
        fprintf(stderr, "\n%s, available_snp: %d\n", name, (int)hap->snp_stat.n);
        int i;
        for (i = 0; i < (int)hap->snp_stat.n; i++)
        {
            fprintf(stderr, "site: %d, occ_0: %d, occ_1: %d, occ_2: %d\n", 
            hap->snp_stat.a[i].site, hap->snp_stat.a[i].occ_0,
            hap->snp_stat.a[i].occ_1, hap->snp_stat.a[i].occ_2);
        }
    }

    return 1;  
}

// Assembly:
cmpq $0x0, 0x10(%rdx)
je 0x51cdd
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rcx), %rax
movq (%rdx), %rdx
movl (%rdx), %edx
movq (%rax,%rdx,8), %rdi
movq 0x8(%rcx), %rsi
addq %rdi, %rsi
leal 0x1(%rdx), %ecx
movq (%rax,%rcx,8), %rdx
subq %rdi, %rdx
movq %rbx, %rdi
callq 0x21a0
testl %eax, %eax
je 0x51ce3
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5aed
jmp 0x51cd6
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: is_hpc_vec(SnpStats*, unsigned long, haplotype_evdience*)
int64_t is_hpc_vec(SnpStats *ai, uint64_t id, haplotype_evdience *za)
{
    haplotype_evdience *iz = NULL; int64_t in, ik, n0 = ai->occ_0, n1 = ai->occ_1, f = 0; 
    iz = za + ai->non_homopolymer_num; in = ai->homopolymer_num - ai->non_homopolymer_num;

    for (ik = 0; ik < in; ik++) {
        if(!hh_hp(iz[ik])) continue;
        if(hh_tp(iz[ik]) == 0) {
            ai->occ_0 -= iz[ik].cov;
        } else if(iz[ik].overlapSite == id){
            ai->occ_1 -= iz[ik].cov;
        }
    }
    if((ai->occ_0 < 2 || ai->occ_1 < 2) || (!(ai->occ_0 >= asm_opt.s_hap_cov && ai->occ_1 >= asm_opt.infor_cov))) f = 1;
    ai->occ_0 = n0; ai->occ_1 = n1;
    // if((sec_check) && (((n0)<=((n0+n1)*0.333333)) || ((n1)<=((n0+n1)*0.333333)))) f = 1;
    return f;
}

// Assembly:
pushq %rbx
leaq 0x8(%rdi), %rcx
movl 0x8(%rdi), %r8d
movl 0xc(%rdi), %r9d
leaq 0xc(%rdi), %r10
movl 0x18(%rdi), %r11d
movl 0x14(%rdi), %eax
cmpl %r11d, %eax
je 0x54561
subl %r11d, %eax
cmpl $0x1, %eax
adcl $0x0, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%r11,%r11,2), %rdi
leaq (%rdx,%rdi,8), %rdx
addq $0x10, %rdx
xorl %edi, %edi
movzbl -0x4(%rdx,%rdi), %ebx
testb $0x2, %bl
je 0x54558
movq %rcx, %r11
testb $0x1, %bl
je 0x54552
movl -0x8(%rdx,%rdi), %ebx
movq %r10, %r11
cmpq %rsi, %rbx
jne 0x54558
movl (%rdx,%rdi), %ebx
subl %ebx, (%r11)
addq $0x18, %rdi
cmpq %rdi, %rax
jne 0x54534
movl (%rcx), %eax
cmpq $0x2, %rax
jae 0x54570
movl $0x1, %eax
jmp 0x54594
movl (%r10), %edx
cmpq $0x2, %rdx
jb 0x54569
leaq 0x2361d8(%rip), %rsi    # 0x28a758
cmpq %rax, 0x218(%rsi)
jg 0x54569
cmpq %rdx, 0x210(%rsi)
jg 0x54569
xorl %eax, %eax
movl %r8d, (%rcx)
movl %r9d, (%r10)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: get_hq_value(SnpStats*, unsigned long, haplotype_evdience*, long*, long*, long*, long*, unsigned char*)
void get_hq_value(SnpStats *ai, uint64_t id, haplotype_evdience *za, int64_t *lq0, int64_t *hq0, int64_t *lq1, int64_t *hq1, uint8_t *ref_a)
{
    haplotype_evdience *z; int64_t n, k, occ0[2], occ1[2]; uint8_t fi;
    z = za + ai->non_homopolymer_num; n = ai->homopolymer_num - ai->non_homopolymer_num;
    occ0[0] = occ0[1] = occ1[0] = occ1[1] = 0;
    for (k = 0; k < n; k++) {
        if((hh_tp(z[k]) == 1) && (z[k].overlapSite != id)) continue;
        fi = 0;
        if((hh_bq(z[k]) > 1)) fi = 1;

        if(hh_tp(z[k]) == 0) occ0[fi]++;
        else occ1[fi]++;
    }
    if(ref_a) {
        if(ref_a[ai->site] > 1) occ0[1]++;
        else occ0[0]++;
    }
    (*lq0) = occ0[0]; (*hq0) = occ0[1]; 
    (*lq1) = occ1[0]; (*hq1) = occ1[1]; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movl 0x14(%rdi), %r11d
movl 0x18(%rdi), %r10d
cmpl %r10d, %r11d
jne 0x545c8
xorl %r11d, %r11d
xorl %ebx, %ebx
xorl %r10d, %r10d
xorl %edx, %edx
jmp 0x5464d
subl %r10d, %r11d
cmpl $0x1, %r11d
adcl $0x0, %r11d
shlq $0x3, %r11
leaq (%r11,%r11,2), %r14
leaq (%r10,%r10,2), %r10
leaq (%rdx,%r10,8), %r15
addq $0xc, %r15
xorl %r12d, %r12d
xorl %edx, %edx
xorl %r10d, %r10d
xorl %ebx, %ebx
xorl %r11d, %r11d
movb (%r15,%r12), %bpl
testb $0x1, %bpl
je 0x54608
movl -0x4(%r15,%r12), %r13d
cmpq %rsi, %r13
jne 0x54644
testb $0x1, %bpl
jne 0x5462a
testb $0x8, %bpl
movq %rbx, %r13
cmoveq %r11, %r13
incq %r13
testb $0x8, %bpl
cmoveq %r13, %r11
cmovneq %r13, %rbx
jmp 0x54644
testb $0x8, %bpl
movq %rdx, %r13
cmoveq %r10, %r13
incq %r13
testb $0x8, %bpl
cmoveq %r13, %r10
cmovneq %r13, %rdx
addq $0x18, %r12
cmpq %r12, %r14
jne 0x545f4
movq 0x38(%rsp), %rsi
testq %rax, %rax
je 0x54668
movl 0x20(%rdi), %edi
cmpb $0x2, (%rax,%rdi)
jb 0x54665
incq %rbx
jmp 0x54668
incq %r11
movq %r11, (%rcx)
movq %rbx, (%r8)
movq %r10, (%r9)
movq %rdx, (%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: debug_phasing_snp_site_status(haplotype_evdience_alloc*, haplotype_evdience*, unsigned long, overlap_region_alloc*)
void debug_phasing_snp_site_status(haplotype_evdience_alloc* h, haplotype_evdience* a, uint64_t a_n, overlap_region_alloc* olist)
{
    uint64_t i;
    for (i = 0; i < a_n; i++) {
        if(a[i].site == 76046) {
            fprintf(stderr, "[M::utg%.6dl::]x_site->%u, y_site->%u, type->%u, cov->%u, misBase->%c\n", 
            (int)olist->list[a[i].overlapID].y_id+1, a[i].site, 
            a[i].overlapSite, a[i].type, a[i].cov, a[i].misBase);
        }
    }
}

// Assembly:
testq %rdx, %rdx
je 0x584ac
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
cmpl $0x1290e, (%r15)        # imm = 0x1290E
je 0x5849a
addq $0x18, %r15
decq %r14
jne 0x58486
jmp 0x584a7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5c40
jmp 0x5848f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: ovlp_occ(overlap_region_alloc*, unsigned char)
uint64_t ovlp_occ(overlap_region_alloc* overlap_list, uint8_t is_match)
{
    uint64_t occ = 0, k;
    for (k = 0; k < overlap_list->length; k++) {
        if(overlap_list->list[k].is_match == is_match) occ++;
    }
    return occ;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x58e55
movq (%rdi), %rdx
addq $0x2c, %rdx
xorl %eax, %eax
xorl %edi, %edi
cmpb %sil, (%rdx)
sete %dil
addq %rdi, %rax
addq $0xa8, %rdx
decq %rcx
jne 0x58e3c
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: clear_Correct_dumy(Correct_dumy*, overlap_region_alloc*, void*)
void clear_Correct_dumy(Correct_dumy* list, overlap_region_alloc* overlap_list, void *km)
{
    list->length = 0;
    list->lengthNT = 0;
    list->start_i = 0;

    if (list->size < overlap_list->length){
        list->size = overlap_list->length;
        if(!km) REALLOC(list->overlapID, list->size);
        else KREALLOC(km, list->overlapID, list->size);
    }

    list->last_boundary_length = 0;
    list->corrected_read_length = 0;
    list->corrected_base = 0;
    
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rdi)
movq 0x10(%rsi), %rax
cmpq %rax, 0x40(%rdi)
jae 0x59186
movq %rax, 0x40(%rbx)
shlq $0x3, %rax
movq 0x28(%rbx), %rsi
testq %rdx, %rdx
je 0x59174
movq %rdx, %rdi
movq %rax, %rdx
callq 0x1e3800
jmp 0x5917f
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movq $0x0, 0x20(%rbx)
movups %xmm0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: print_ovlp_occ_stat(overlap_region_alloc*, unsigned int, unsigned char)
void print_ovlp_occ_stat(overlap_region_alloc* overlap_list, uint32_t xlen, uint8_t is_match)
{
    uint64_t k;
    for (k = 0; k < overlap_list->length; k++) {
        if(overlap_list->list[k].is_match != is_match) continue;
        fprintf(stderr, "[M::%s::xlen::%u] utg%.6dl(%c), is_match::%u, x::[%u, %u)\n", __func__, xlen,
            (int32_t)overlap_list->list[k].y_id + 1, 
            "+-"[overlap_list->list[k].y_pos_strand], overlap_list->list[k].is_match,
            overlap_list->list[k].x_pos_s, overlap_list->list[k].x_pos_e+1);
    }
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x591e5
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rsi
movb 0x2c(%rsi,%r15), %al
cmpb %bl, %al
je 0x591ce
incq %r12
addq $0xa8, %r15
cmpq 0x10(%r14), %r12
jb 0x591b0
jmp 0x591dd
addq %r15, %rsi
movzbl %al, %edi
movl %ebp, %edx
callq 0x5c8e
jmp 0x591bc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: resize_Cigar_record_alloc(Cigar_record_alloc*, long long)
void resize_Cigar_record_alloc(Cigar_record_alloc* x, long long new_size)
{
    long long i;
    if(new_size > x->size)
    {
        x->buffer = (Cigar_record*)realloc(x->buffer, new_size*sizeof(Cigar_record));
        for (i = 0; i < x->size; i++)
        {
            clear_Cigar_record(&(x->buffer[i]));
        }
        for (; i < new_size; i++)
        {
            init_Cigar_record(&(x->buffer[i]));
            clear_Cigar_record(&(x->buffer[i]));
        }

        x->size = new_size;
    }
    else
    {
        for (i = 0; i < new_size; i++)
        {
            clear_Cigar_record(&(x->buffer[i]));
        }
    }

    x->length = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x8(%rdi)
jge 0x5958b
movq 0x10(%rbx), %rdi
movq %r14, %rsi
shlq $0x6, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %r15
xorl %ecx, %ecx
testq %r15, %r15
jle 0x595b2
movq %r15, %rdx
movl %ecx, 0x20(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x38(%rax)
movl %ecx, 0x4(%rax)
movb $0x7f, (%rax)
addq $0x40, %rax
decq %rdx
jne 0x5956f
jmp 0x595b5
testq %r14, %r14
jle 0x595fa
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
movl %ecx, 0x20(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x38(%rax)
movl %ecx, 0x4(%rax)
movb $0x7f, (%rax)
addq $0x40, %rax
decq %r14
jne 0x59596
jmp 0x595fa
xorl %r15d, %r15d
movq %r14, %r12
subq %r15, %r12
jle 0x595f6
shlq $0x6, %r15
xorl %r13d, %r13d
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0x480dc
movq 0x10(%rbx), %rax
movl %r13d, 0x20(%rax,%r15)
movq %r13, 0x18(%rax,%r15)
movq %r13, 0x38(%rax,%r15)
movl %r13d, 0x4(%rax,%r15)
movb $0x7f, (%rax,%r15)
addq $0x40, %r15
decq %r12
jne 0x595c4
movq %r14, 0x8(%rbx)
movq $0x0, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: destory_Cigar_record_alloc(Cigar_record_alloc*)
void destory_Cigar_record_alloc(Cigar_record_alloc* x)
{
    long long i;
    for (i = 0; i < x->size; i++)
    {
        destory_Cigar_record(&(x->buffer[i]));
    }
    free(x->buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
jle 0x5964a
movl $0x28, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %r12
movq -0x20(%r12,%r14), %rdi
callq 0x2220
movq (%r12,%r14), %rdi
callq 0x2220
incq %r15
addq $0x40, %r14
cmpq 0x8(%rbx), %r15
jl 0x59626
movq 0x10(%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/Correct.cpp
// Function: add_new_cell_to_cigar_record(Cigar_record*, unsigned int, unsigned int)
void add_new_cell_to_cigar_record(Cigar_record* dummy, uint32_t len, uint32_t type)
{
    uint32_t tmp;
    tmp = len;
    tmp = tmp << 2;
    tmp = tmp | type;

    dummy->length++;


    if(dummy->length > dummy->size)
    {
        dummy->size = dummy->size * 2;
        dummy->record = (uint32_t*)realloc(dummy->record, dummy->size*sizeof(uint32_t));
    }

    dummy->record[dummy->length - 1] = tmp;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rax
incq %rax
movq %rax, 0x18(%rdi)
cmpq %rsi, %rax
jbe 0x59696
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x8(%r14)
shll $0x2, %ebx
orl %ebp, %ebx
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movl %ebx, -0x4(%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: add_new_cell_to_cigar_record_with_different_base(Cigar_record*, unsigned int, unsigned int, char*)
void add_new_cell_to_cigar_record_with_different_base(Cigar_record* dummy, uint32_t len, uint32_t type, char* seq)
{
    uint32_t tmp;
    tmp = len;
    tmp = tmp << 2;
    tmp = tmp | type;
   

    dummy->length++;

    if(dummy->length > dummy->size)
    {
        dummy->size = dummy->size * 2;
        dummy->record = (uint32_t*)realloc(dummy->record, dummy->size*sizeof(uint32_t));
    }

    dummy->record[dummy->length - 1] = tmp;

    

    if (dummy->lost_base_length + len> dummy->lost_base_size)
    {
        dummy->lost_base_size = (dummy->lost_base_length + len) * 2;
        dummy->lost_base = (char*)realloc(dummy->lost_base, dummy->lost_base_size*sizeof(char));
    }

    uint32_t i = 0;
    for (i = 0; i < len; i++, dummy->lost_base_length++)
    {
        dummy->lost_base[dummy->lost_base_length] = seq[i];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %esi, %r15d
movq %rdi, %r14
leal (,%r15,4), %ebp
orl %edx, %ebp
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rax
incq %rax
movq %rax, 0x18(%rdi)
cmpq %rsi, %rax
jbe 0x5970d
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movl %ebp, -0x4(%rax,%rcx,4)
movl %r15d, %r12d
movq 0x38(%r14), %rsi
addq %r12, %rsi
cmpq 0x30(%r14), %rsi
jbe 0x5973d
addq %rsi, %rsi
movq %rsi, 0x30(%r14)
movq 0x28(%r14), %rdi
callq 0x2370
movq %rax, 0x28(%r14)
testl %r15d, %r15d
je 0x5975e
xorl %eax, %eax
movb (%rbx,%rax), %cl
movq 0x28(%r14), %rdx
movq 0x38(%r14), %rsi
movb %cl, (%rdx,%rsi)
incq %rax
incq 0x38(%r14)
cmpq %rax, %r12
jne 0x59744
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: add_existing_cell_to_cigar_record_with_different_base(Cigar_record*, unsigned int, unsigned int, char*)
void add_existing_cell_to_cigar_record_with_different_base(Cigar_record* dummy, uint32_t len, uint32_t type, char* seq)
{
    uint32_t tmp;

    tmp = dummy->record[dummy->length - 1] >> 2;
    tmp = tmp + len;
    tmp = tmp << 2;
    tmp = tmp | type;
    dummy->record[dummy->length - 1] = tmp;

    if (dummy->lost_base_length + len> dummy->lost_base_size)
    {
        dummy->lost_base_size = (dummy->lost_base_length + len) * 2;
        dummy->lost_base = (char*)realloc(dummy->lost_base, dummy->lost_base_size*sizeof(char));
    }

    uint32_t i = 0;
    for (i = 0; i < len; i++, dummy->lost_base_length++)
    {
        dummy->lost_base[dummy->lost_base_length] = seq[i];
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rcx
leal (,%r15,4), %esi
addl -0x4(%rax,%rcx,4), %esi
andl $-0x4, %esi
orl %edx, %esi
movl %esi, -0x4(%rax,%rcx,4)
movl %r15d, %r12d
movq 0x38(%rdi), %rsi
addq %r12, %rsi
cmpq 0x30(%rdi), %rsi
jbe 0x597b9
addq %rsi, %rsi
movq %rsi, 0x30(%r14)
movq 0x28(%r14), %rdi
callq 0x2370
movq %rax, 0x28(%r14)
testl %r15d, %r15d
je 0x597da
xorl %eax, %eax
movb (%rbx,%rax), %cl
movq 0x28(%r14), %rdx
movq 0x38(%r14), %rsi
movb %cl, (%rdx,%rsi)
incq %rax
incq 0x38(%r14)
cmpq %rax, %r12
jne 0x597c0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: get_affine_gap_score(overlap_region*, UC_Read*, UC_Read*, unsigned char*, unsigned char*, unsigned long, unsigned long)
long long get_affine_gap_score(overlap_region* ovc, UC_Read* g_read, UC_Read* overlap_read, uint8_t* x_num,
uint8_t* y_num, uint64_t EstimateXOlen, uint64_t EstimateYOlen)
{
    char* x_string;
    char* y_string;
    uint64_t yStrand;
    long long minus_score_thres = (MAX(EstimateXOlen, EstimateYOlen)*HIGH_HET_ERROR_RATE*(MATCH_SCORE_KSW+(MAX(MISMATCH_SCORE_KSW,GAP_EXT_KSW))));
    long long total_score_thres = MAX(EstimateXOlen, EstimateYOlen)*MATCH_SCORE_KSW - minus_score_thres;

    yStrand = ovc->y_pos_strand;

    if(yStrand == 0)
    {
        recover_UC_Read(overlap_read, &R_INF, ovc->y_id);
    }
    else
    {
        recover_UC_Read_RC(overlap_read, &R_INF, ovc->y_id);
    }
    x_string = g_read->seq;
    y_string = overlap_read->seq;

    long long sum = 0;
    
    if(fill_chain_by_affine_gap(&(ovc->f_cigar), x_string, y_string, ovc, Get_READ_LENGTH(R_INF, ovc->x_id), 
    Get_READ_LENGTH(R_INF, ovc->y_id), NULL, seq_nt6_table, x_num, y_num, &minus_score_thres, &sum) == 0)
    {
        return 0;
    }

    if(sum >= total_score_thres) return 1;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rdx, %rax
movq 0x20(%rsp), %r14
cmpl $0x0, 0x1c(%rdi)
movl 0x10(%rdi), %edx
leaq 0x231a20(%rip), %rsi    # 0x28b230
movq %rax, %rdi
je 0x5981c
callq 0x33dc3
jmp 0x59821
callq 0x33cf8
cmpq %r14, %rbx
cmovaq %rbx, %r14
movq %r14, %xmm0
punpckldq 0x1cba0b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1cba13(%rip), %xmm0   # 0x225250
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1cbcb7(%rip), %xmm1   # 0x225508
mulsd 0x1cbc4f(%rip), %xmm1   # 0x2254a8
addq %r14, %r14
cvttsd2si %xmm1, %rax
subq %rax, %r14
xorl %eax, %eax
testq %r14, %r14
setle %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: iter_hpc(unsigned char*, long, long*, long, long*, long*, long)
int64_t iter_hpc(uint8_t *m, int64_t mn, int64_t *mo, int64_t rev, int64_t *so, int64_t *ho, int64_t sc)
{
    if(sc == 0) return 0;
    if(sc <= (*so)) return (*ho)-1;
    if(!rev) {
        while((*mo) < mn) {
            for (; (*mo) < mn && m[(*mo)] == 255; (*mo)++) {
                (*so) += m[(*mo)];
            }
            (*so) += m[(*mo)]; (*mo)++; (*ho)++;
            if(sc <= (*so)) return (*ho)-1;
        }        
    } else {
        while((*mo) < mn) {
            (*so) += m[mn-(*mo)-1]; (*mo)++; (*ho)++;
            for (; (*mo) < mn && m[mn-(*mo)-1] == 255; (*mo)++) {
                (*so) += m[mn-(*mo)-1];
            }
            if(sc <= (*so)) return (*ho)-1;
        }
    }

    return -1;
}

// Assembly:
movq 0x8(%rsp), %r10
testq %r10, %r10
je 0x59b22
cmpq %r10, (%r8)
jge 0x59ad2
testq %rcx, %rcx
je 0x59b15
addq %rsi, %rdi
movq (%rdx), %rax
cmpq %rsi, %rax
jge 0x59b1a
notq %rax
movzbl (%rdi,%rax), %eax
addq %rax, (%r8)
incq (%rdx)
incq (%r9)
movq (%rdx), %rax
cmpq %rsi, %rax
jge 0x59acd
notq %rax
movzbl (%rdi,%rax), %eax
cmpq $0xff, %rax
jne 0x59acd
addq %rax, (%r8)
movq (%rdx), %rax
incq %rax
movq %rax, (%rdx)
jmp 0x59aab
cmpq %r10, (%r8)
jl 0x59a8c
movq (%r9), %rax
decq %rax
retq
movq (%rdx), %rax
cmpq %rsi, %rax
jge 0x59afc
movzbl (%rdi,%rax), %ecx
cmpq $0xff, %rcx
jne 0x59afc
addq %rcx, (%r8)
movq (%rdx), %rax
incq %rax
movq %rax, (%rdx)
jmp 0x59adc
movzbl (%rdi,%rax), %eax
addq %rax, (%r8)
incq (%rdx)
movq (%r9), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r9)
cmpq %r10, (%r8)
jge 0x59b24
cmpq %rsi, (%rdx)
jl 0x59ad9
movq $-0x1, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_hpc_str(char const*, unsigned int, UC_Read*, unsigned long*)
uint64_t gen_hpc_str(const char *in, uint32_t in_l, UC_Read *z, uint64_t *in_hl)
{
    uint64_t hl, k, l;
    if(in_hl) {
        hl = (*in_hl);
    } else {
        for (l = hl = 0, k = 1; k <= in_l; k++) {
            if((k == in_l) || (in[k] != in[l]) || (seq_nt4_table[(uint8_t)in[l]] >= 4)) {
                hl++; l = k;
            }
        }
    }
    resize_UC_Read(z, hl); z->length = 0;
    for (l = 0, k = 1; k <= in_l; k++) {
        if((k == in_l) || (in[k] != in[l]) || (seq_nt4_table[(uint8_t)in[l]] >= 4)) {
            z->seq[z->length++] = in[l]; l = k;
        }
    }
    return hl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %r12d
testq %rcx, %rcx
je 0x5a129
movq (%rcx), %r15
jmp 0x5a178
testl %ebp, %ebp
je 0x5a175
movq %r12, %rax
negq %rax
movl $0x1, %ecx
xorl %esi, %esi
leaq 0x1d38cf(%rip), %rdx    # 0x22da10
xorl %r15d, %r15d
movq %rax, %rdi
addq %rcx, %rdi
je 0x5a15d
movzbl (%r14,%rsi), %edi
cmpb %dil, (%r14,%rcx)
jne 0x5a15d
cmpb $0x4, (%rdx,%rdi)
jb 0x5a163
incq %r15
movq %rcx, %rsi
leaq (%rax,%rcx), %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x5a144
jmp 0x5a178
xorl %r15d, %r15d
cmpq %r15, 0x10(%rbx)
jge 0x5a190
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, (%rbx)
movq %r15, 0x10(%rbx)
movq $0x0, 0x8(%rbx)
testl %ebp, %ebp
je 0x5a1ef
negq %r12
movl $0x1, %eax
xorl %edx, %edx
leaq 0x1d3863(%rip), %rcx    # 0x22da10
movq %r12, %rsi
addq %rax, %rsi
je 0x5a1c6
movzbl (%r14,%rdx), %esi
cmpb %sil, (%r14,%rax)
jne 0x5a1c6
cmpb $0x4, (%rcx,%rsi)
jb 0x5a1df
movb (%r14,%rdx), %dl
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
leaq 0x1(%rdi), %r8
movq %r8, 0x8(%rbx)
movb %dl, (%rsi,%rdi)
movq %rax, %rdx
leaq (%r12,%rax), %rsi
incq %rsi
incq %rax
cmpq $0x1, %rsi
jne 0x5a1ad
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: split_long_anchors(Candidates_list*, long, long)
void split_long_anchors(Candidates_list *ac, int64_t block, int64_t block_n)
{
    int64_t i, m, an = ac->length;
    if(block_n < 0) {
        for (i = block_n = 0; i < an; i++) {
            if(ac->list[i].cnt <= block) block_n++;
            else block_n += (ac->list[i].cnt/block) + (((ac->list[i].cnt%block) > 0)?1:0);
        }
    }
    if(block_n <= an) return;
    if(block_n > ac->size) {
        ac->size = block_n; REALLOC(ac->list, ac->size);
    }
    for (i = an-1, m = block_n-1; i >= 0; i--) {
        if(ac->list[i].cnt <= block) {
            ac->list[m--] = ac->list[i];
        } else {
            while (ac->list[i].cnt > 0) {
                ac->list[m] = ac->list[i];
                if(ac->list[i].cnt >= block) {
                    ac->list[m].cnt = block;
                    ac->list[i].cnt -= block;
                    ac->list[i].self_offset -= block;
                    ac->list[i].offset -= block;
                } else {
                    ac->list[i].cnt = 0; 
                }
                m--;
            }
        }
    }
    ac->length = block_n; assert(m == -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r12
testq %rdx, %rdx
jns 0x5e13d
testq %r12, %r12
jle 0x5e13a
movq (%rbx), %rcx
addq $0xc, %rcx
xorl %r15d, %r15d
movq %r12, %rsi
movl (%rcx), %eax
cmpq %r14, %rax
jle 0x5e12c
xorl %edx, %edx
idivq %r14
addq %r15, %rax
cmpq $0x1, %rdx
sbbq $-0x1, %rax
movq %rax, %r15
jmp 0x5e12f
incq %r15
addq $0x10, %rcx
decq %rsi
jne 0x5e110
jmp 0x5e13d
xorl %r15d, %r15d
cmpq %r12, %r15
jle 0x5e213
cmpq 0x10(%rbx), %r15
jle 0x5e162
movq %r15, 0x10(%rbx)
movq (%rbx), %rdi
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x2370
movq %rax, (%rbx)
leaq -0x1(%r15), %rax
testq %r12, %r12
jle 0x5e209
movq %r12, %rcx
decq %r12
movq (%rbx), %rsi
movq %r12, %rdx
shlq $0x4, %rdx
movl 0xc(%rsi,%rdx), %edi
cmpq %r14, %rdi
jle 0x5e1ea
movq (%rbx), %rdi
cmpl $0x0, 0xc(%rdi,%rdx)
je 0x5e1ff
leaq (%rdi,%rdx), %r8
movq %rax, %rsi
shlq $0x4, %rsi
movups (%r8), %xmm0
movups %xmm0, (%rdi,%rsi)
movq (%rbx), %rdi
leaq (%rdi,%rdx), %r8
addq $0xc, %r8
movl (%r8), %r9d
cmpq %r14, %r9
jge 0x5e1c1
movl $0x0, (%r8)
jmp 0x5e1d3
movl %r14d, 0xc(%rdi,%rsi)
subl %r14d, (%r8)
subl %r14d, 0x8(%rdi,%rdx)
subl %r14d, 0x4(%rdi,%rdx)
decq %rax
movq (%rbx), %rdi
leaq (%rdi,%rdx), %r8
addq $-0x10, %rsi
cmpl $0x0, 0xc(%rdi,%rdx)
jne 0x5e19d
jmp 0x5e1ff
addq %rsi, %rdx
leaq -0x1(%rax), %rdi
shlq $0x4, %rax
movups (%rdx), %xmm0
movups %xmm0, (%rsi,%rax)
movq %rdi, %rax
cmpq $0x1, %rcx
jg 0x5e16f
movq %r15, 0x8(%rbx)
cmpq $-0x1, %rax
jne 0x5e21f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1c8265(%rip), %rdi    # 0x22648b
leaq 0x1c7416(%rip), %rsi    # 0x225643
leaq 0x1c825f(%rip), %rcx    # 0x226493
movl $0x3554, %edx           # imm = 0x3554
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: wcigar_check(window_list*, window_list_alloc*, char*, char*)
int64_t wcigar_check(window_list *p, window_list_alloc *z, char *qstr, char *tstr)
{
    bit_extz_t ez;
    ez.cigar.a = z->c.a+p->cidx; ez.cigar.n = ez.cigar.m = p->clen;
    ez.ps = p->y_start; ez.pe = p->y_end;
    ez.ts = p->x_start; ez.te = p->x_end;
    ez.err = p->error;
    // prt_cigar(ez.cigar.a, ez.cigar.n);
    return cigar_check_dbg(tstr, qstr, &ez);
}

// Assembly:
subq $0xd8, %rsp
movl 0x18(%rdi), %r8d
addq %r8, %r8
addq 0x28(%rsi), %r8
movq %rsp, %rax
movq %r8, 0xb8(%rax)
movl 0x1c(%rdi), %esi
movq %rsi, 0xb0(%rax)
movq %rsi, 0xa8(%rax)
movl 0x8(%rdi), %esi
movl %esi, 0x10(%rax)
movl 0xc(%rdi), %esi
movl %esi, 0x14(%rax)
movl (%rdi), %esi
movl %esi, 0x1c(%rax)
movl 0x4(%rdi), %esi
movl %esi, 0x20(%rax)
movswl 0x14(%rdi), %esi
movl %esi, 0x2c(%rax)
movq %rcx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x8c93d
movl %eax, %eax
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: update_semi_coord(ul_idx_t const*, hpc_t*, All_reads*, overlap_region*, long, long, long, long*, long*, long*)
int64_t update_semi_coord(const ul_idx_t *uref, hpc_t *hpc_g, All_reads *rref, overlap_region *z, 
int64_t qs, int64_t qe, int64_t thre, int64_t *ts, int64_t *te, int64_t *aux_beg)
{
    int64_t ql = qe - qs, aln_l, t_tot_l, id = z->y_id, aux_end, tl; 
    (*ts) = (qs - z->x_pos_s) + z->y_pos_s;
    (*ts) += y_start_offset(qs, &(z->f_cigar));
    aln_l = ql + (thre<<1);
    if(hpc_g) t_tot_l = hpc_len(*hpc_g, id);
    else if(uref) t_tot_l = uref->ug->u.a[id].len;
    else t_tot_l = Get_READ_LENGTH((*rref), id);
    if(!init_waln(thre, (*ts), t_tot_l, aln_l, aux_beg, &aux_end, ts, &tl)) {
        (*ts) = (*te) = (*aux_beg) = -1;
        return 0;
    }
    (*te) = (*ts) + tl; 
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq 0x58(%rsp), %rbx
subq %r8, %rbp
movl 0x10(%rcx), %r14d
movl 0x4(%rcx), %eax
movl 0x14(%rcx), %edx
movq %r8, %rsi
subq %rax, %rsi
addq %rsi, %rdx
movq %rdx, (%rbx)
leaq 0x38(%rcx), %rsi
movq %r8, %rdi
callq 0x48df6
movq 0x50(%rsp), %rdi
addq (%rbx), %rax
movq %rax, (%rbx)
leaq (,%rdi,2), %rcx
addq %rbp, %rcx
testq %r13, %r13
je 0x60a44
movq (%r13), %rdx
movq 0x10(%rdx), %rdx
leaq (%r14,%r14,4), %rsi
movl (%rdx,%rsi,8), %edx
shrl %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x60a68
testq %r12, %r12
je 0x60a60
movq (%r12), %rdx
movq 0x10(%rdx), %rdx
leaq (%r14,%r14,4), %rsi
movl (%rdx,%rsi,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
jmp 0x60a68
movq 0x18(%r15), %rdx
movq (%rdx,%r14,8), %rdx
movq 0x60(%rsp), %r14
leaq 0x8(%rsp), %r10
leaq 0x10(%rsp), %r9
movq %rax, %rsi
movq 0x68(%rsp), %r15
movq %r15, %r8
pushq %r10
pushq %rbx
callq 0x497df
addq $0x10, %rsp
testl %eax, %eax
je 0x60aa4
movq 0x8(%rsp), %rax
addq (%rbx), %rax
movq %rax, (%r14)
movl $0x1, %eax
jmp 0x60ab6
movq $-0x1, %rax
movq %rax, (%r15)
movq %rax, (%r14)
movq %rax, (%rbx)
xorl %eax, %eax
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/Correct.cpp
// Function: update_semi_non_retrieve_coord(overlap_region*, long, long, long, long, long*, long*, long*)
int64_t update_semi_non_retrieve_coord(overlap_region *z, int64_t qs, int64_t qe, int64_t thre, int64_t t_tot_l, int64_t *ts, int64_t *te, int64_t *aux_beg)
{
    int64_t ql = qe - qs, aln_l, aux_end, tl; 
    (*ts) = (qs - z->x_pos_s) + z->y_pos_s;
    (*ts) += y_start_offset(qs, &(z->f_cigar));
    aln_l = ql + (thre<<1);
    
    if(!init_waln(thre, (*ts), t_tot_l, aln_l, aux_beg, &aux_end, ts, &tl)) {
        (*ts) = (*te) = (*aux_beg) = -1;
        return 0;
    }
    (*te) = (*ts) + tl; 
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rax
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %rbp
subq %rsi, %r13
movl 0x4(%rdi), %ecx
movl 0x14(%rdi), %edx
subq %rcx, %rsi
addq %rsi, %rdx
movq %rdx, (%r9)
leaq 0x38(%rdi), %rsi
movq %rax, %rdi
callq 0x48df6
addq (%rbx), %rax
movq %rax, (%rbx)
leaq (,%r12,2), %rcx
addq %r13, %rcx
leaq 0x8(%rsp), %r10
leaq 0x10(%rsp), %r9
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %r8
pushq %r10
pushq %rbx
callq 0x497df
addq $0x10, %rsp
testl %eax, %eax
je 0x60b54
movq 0x8(%rsp), %rax
addq (%rbx), %rax
movq %rax, (%rbp)
movl $0x1, %eax
jmp 0x60b67
movq $-0x1, %rax
movq %rax, (%r14)
movq %rax, (%rbp)
movq %rax, (%rbx)
xorl %eax, %eax
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/Correct.cpp
// Function: adjust_ext_offset(long*, long*, long*, long*, long, long, long, long)
void adjust_ext_offset(int64_t *qs, int64_t *qe, int64_t *ts, int64_t *te, int64_t ql, int64_t tl, int64_t thre, int64_t mode)
{
    int64_t qoff, toff;
    if(mode == 1) {///forward extension
        qoff = ql - (*qs); toff = tl - (*ts);
        if(qoff <= toff) {
            (*qe) = ql; (*te) = (*ts) + qoff + thre;
        } else {
            (*te) = tl; (*qe) = (*qs) + toff + thre;
        }
    } else if(mode == 2) {///backward extension
        qoff = (*qe); toff = (*te);
        if(qoff <= toff) {
            (*qs) = 0; (*ts) = (*te) - qoff - thre;
        } else {
            (*ts) = 0; (*qs) = (*qe) - toff - thre;
        }
    }
    if((*qs) < 0) (*qs) = 0;
    if((*ts) < 0) (*ts) = 0;
    if((*qe) > ql) (*qe) = ql;
    if((*te) > tl) (*te) = tl;
}

// Assembly:
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rax
cmpq $0x2, %r10
je 0x60bab
cmpq $0x1, %r10
jne 0x60bec
movq %r8, %r10
subq (%rdi), %r10
movq %r9, %r11
subq (%rdx), %r11
cmpq %r11, %r10
jle 0x60bcb
movq %r9, (%rcx)
addq %rax, %r11
addq (%rdi), %r11
movq %r11, (%rsi)
jmp 0x60bec
movq (%rsi), %r10
movq (%rcx), %r11
cmpq %r11, %r10
jle 0x60bd9
movq $0x0, (%rdx)
movq (%rsi), %r10
addq %rax, %r11
subq %r11, %r10
movq %r10, (%rdi)
jmp 0x60bec
movq %r8, (%rsi)
addq %rax, %r10
addq (%rdx), %r10
movq %r10, (%rcx)
jmp 0x60bec
movq $0x0, (%rdi)
movq (%rcx), %r11
addq %rax, %r10
subq %r10, %r11
movq %r11, (%rdx)
cmpq $0x0, (%rdi)
jns 0x60bf9
movq $0x0, (%rdi)
cmpq $0x0, (%rdx)
jns 0x60c06
movq $0x0, (%rdx)
cmpq %r8, (%rsi)
jle 0x60c0e
movq %r8, (%rsi)
cmpq %r9, (%rcx)
jle 0x60c16
movq %r9, (%rcx)
retq