LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
addq $0x14, %r15
movq 0x22a62a(%rip), %r13    # 0x252fe0
leaq 0x1bb706(%rip), %r12    # 0x1e40c3
subq $0x1, %r14
jb 0x28a13
cmpl $0x1290e, -0x14(%r15)   # imm = 0x1290E
je 0x289d3
addq $0x18, %r15
jmp 0x289bd
movq (%r13), %rdi
movq (%rbx), %rax
movl -0x10(%r15), %ecx
movl -0xc(%r15), %r8d
imulq $0xa8, %rcx, %rcx
movl 0x10(%rax,%rcx), %edx
incl %edx
movzbl -0x8(%r15), %r9d
movl -0x4(%r15), %r10d
movsbl (%r15), %r11d
movq %r12, %rsi
movl $0x1290e, %ecx          # imm = 0x1290E
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x289cd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x2c
popq %rdx
xorl %eax, %eax
subq $0x1, %rcx
jb 0x29191
movq (%rdi), %r8
xorl %r9d, %r9d
cmpb %sil, (%r8,%rdx)
sete %r9b
addq %r9, %rax
addq $0xa8, %rdx
jmp 0x29171
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rdi)
movq 0x10(%rsi), %rax
cmpq %rax, 0x40(%rdi)
jae 0x293ab
movq %rax, 0x40(%rbx)
shlq $0x3, %rax
movq 0x28(%rbx), %rsi
testq %rdx, %rdx
je 0x29399
movq %rdx, %rdi
movq %rax, %rdx
callq 0x1a3acc
jmp 0x293a4
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rbx)
movups %xmm0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x4
popq %r13
leaq 0x1bae3c(%rip), %r12    # 0x1e420f
xorl %r15d, %r15d
cmpq 0x10(%r14), %r15
jae 0x29443
movq (%r14), %rax
cmpb %bl, 0x28(%rax,%r13)
je 0x293f2
incq %r15
addq $0xa8, %r13
jmp 0x293d6
movq 0x229be7(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movl 0xc(%rax,%r13), %r8d
incl %r8d
movl 0x18(%rax,%r13), %ecx
leaq 0x1bae13(%rip), %rdx    # 0x1e4223
movsbl (%rcx,%rdx), %r9d
movl (%rax,%r13), %r10d
movl 0x4(%rax,%r13), %r11d
incl %r11d
subq $0x8, %rsp
leaq 0x1bada8(%rip), %rsi    # 0x1e41d4
movq %r12, %rdx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rbx
callq 0x22b0
addq $0x20, %rsp
jmp 0x293e6
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/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x8(%rdi)
jge 0x29751
movq 0x10(%rbx), %rdi
movq %r14, %rsi
shlq $0x6, %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rax
xorl %r15d, %r15d
testq %rax, %rax
cmovgq %rax, %r15
movq %rdi, %rax
movq %r15, %rcx
subq $0x1, %rcx
jb 0x296ff
andl $0x0, 0x20(%rax)
andq $0x0, 0x18(%rax)
andq $0x0, 0x38(%rax)
andl $0x0, 0x4(%rax)
movb $0x7f, (%rax)
addq $0x40, %rax
jmp 0x296de
movq %r15, %r12
shlq $0x6, %r12
cmpq %r14, %r15
jge 0x2973d
addq %r12, %rdi
callq 0x1b2ea
movq 0x10(%rbx), %rdi
andl $0x0, 0x20(%rdi,%r12)
andq $0x0, 0x18(%rdi,%r12)
andq $0x0, 0x38(%rdi,%r12)
andl $0x0, 0x4(%rdi,%r12)
movb $0x7f, (%rdi,%r12)
incq %r15
addq $0x40, %r12
jmp 0x29706
movq %r14, 0x8(%rbx)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
testq %r14, %r14
cmovleq %rax, %r14
subq $0x1, %r14
jb 0x29741
movq 0x10(%rbx), %rcx
andl $0x0, 0x20(%rcx,%rax)
andq $0x0, 0x18(%rcx,%rax)
andq $0x0, 0x38(%rcx,%rax)
andl $0x0, 0x4(%rcx,%rax)
movb $0x7f, (%rcx,%rax)
addq $0x40, %rax
jmp 0x2975a
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq 0x8(%rbx), %r15
jge 0x297ad
addq %r14, %rdi
callq 0x1b416
incq %r15
addq $0x40, %r14
jmp 0x29792
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rcx
incq %rcx
movq %rcx, 0x18(%rdi)
cmpq %rsi, %rcx
jbe 0x297f5
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x8(%r14)
movq 0x18(%r14), %rcx
jmp 0x297f9
movq 0x8(%r14), %rax
shll $0x2, %ebp
orl %ebx, %ebp
movl %ebp, -0x4(%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %r15d
movq %rdi, %r14
leal (,%r15,4), %ebp
orl %edx, %ebp
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rcx
incq %rcx
movq %rcx, 0x18(%rdi)
cmpq %rsi, %rcx
jbe 0x2986d
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x8(%r14)
movq 0x18(%r14), %rcx
jmp 0x29871
movq 0x8(%r14), %rax
movl %ebp, -0x4(%rax,%rcx,4)
movl %r15d, %r15d
movq 0x38(%r14), %rsi
addq %r15, %rsi
cmpq 0x30(%r14), %rsi
jbe 0x29899
addq %rsi, %rsi
movq %rsi, 0x30(%r14)
movq 0x28(%r14), %rdi
callq 0x2370
movq %rax, 0x28(%r14)
xorl %eax, %eax
cmpq %rax, %r15
je 0x298b7
movb (%rbx,%rax), %cl
movq 0x28(%r14), %rdx
movq 0x38(%r14), %rsi
movb %cl, (%rdx,%rsi)
incq %rax
incq 0x38(%r14)
jmp 0x2989b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rcx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rcx
leal (,%rsi,4), %edi
addl -0x4(%rax,%rcx,4), %edi
andl $-0x4, %edi
orl %edx, %edi
movl %edi, -0x4(%rax,%rcx,4)
movl %esi, %r15d
movq 0x38(%r14), %rsi
addq %r15, %rsi
cmpq 0x30(%r14), %rsi
jbe 0x2990d
addq %rsi, %rsi
movq %rsi, 0x30(%r14)
movq 0x28(%r14), %rdi
callq 0x2370
movq %rax, 0x28(%r14)
xorl %eax, %eax
cmpq %rax, %r15
je 0x2992b
movb (%rbx,%rax), %cl
movq 0x28(%r14), %rdx
movq 0x38(%r14), %rsi
movb %cl, (%rdx,%rsi)
incq %rax
incq 0x38(%r14)
jmp 0x2990f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22a8d9(%rip), %rsi    # 0x254230
movq %rax, %rdi
je 0x29963
callq 0x7215
jmp 0x29968
callq 0x715e
cmpq %r14, %rbx
cmovaq %rbx, %r14
movq %r14, %xmm0
punpckldq 0x1b98f4(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1b98fc(%rip), %xmm0   # 0x1e3280
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1b9bc0(%rip), %xmm1   # 0x1e3558
mulsd 0x1b9b58(%rip), %xmm1   # 0x1e34f8
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_O2/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 0x29bbb
movq (%r8), %r11
cmpq %r10, %r11
jge 0x29bb4
testq %rcx, %rcx
je 0x29bbe
addq %rsi, %rdi
movq (%rdx), %rcx
pushq $-0x1
popq %rax
cmpq %rsi, %rcx
jge 0x29bba
notq %rcx
movzbl (%rdi,%rcx), %ecx
addq %rcx, %r11
movq %r11, (%r8)
incq (%rdx)
incq (%r9)
movq (%rdx), %rcx
cmpq %rsi, %rcx
jge 0x29bac
movq %rcx, %r11
notq %r11
cmpb $-0x1, (%rdi,%r11)
jne 0x29bac
addq $0xff, (%r8)
movq (%rdx), %rcx
incq %rcx
movq %rcx, (%rdx)
jmp 0x29b88
movq (%r8), %r11
cmpq %r10, %r11
jl 0x29b6d
movq (%r9), %rax
decq %rax
retq
xorl %eax, %eax
retq
pushq $-0x1
popq %rcx
movq (%rdx), %rax
cmpq %rsi, %rax
jge 0x29c05
movb (%rdi,%rax), %r11b
cmpq %rsi, %rax
jge 0x29bea
cmpb $-0x1, %r11b
jne 0x29bea
addq $0xff, (%r8)
movq (%rdx), %rax
incq %rax
movq %rax, (%rdx)
jmp 0x29bc9
movzbl %r11b, %eax
addq %rax, (%r8)
incq (%rdx)
movq (%r9), %rax
leaq 0x1(%rax), %r11
movq %r11, (%r9)
cmpq %r10, (%r8)
jl 0x29bc1
jmp 0x29bba
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testq %rcx, %rcx
je 0x2a1c0
movq (%rcx), %r15
movl %esi, %r12d
leaq 0x1(%r12), %r13
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x562fa
andq $0x0, 0x8(%rbx)
xorl %ecx, %ecx
leaq 0x1c1995(%rip), %rax    # 0x1ebb00
cmpq %rbp, %r13
je 0x2a1ae
cmpq %rbp, %r12
jne 0x2a17b
movb (%r14,%rcx), %dl
jmp 0x2a194
movb (%r14,%rbp), %sil
movb (%r14,%rcx), %dl
cmpb %dl, %sil
jne 0x2a194
movzbl %sil, %edx
cmpb $0x4, (%rax,%rdx)
movl %esi, %edx
jb 0x2a1a9
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x8(%rbx)
movb %dl, (%rcx,%rsi)
movq %rbp, %rcx
incq %rbp
jmp 0x2a16b
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r12d
leaq 0x1(%r12), %r13
movq %r12, %rax
negq %rax
pushq $0x1
popq %rcx
xorl %r15d, %r15d
leaq 0x1c1925(%rip), %rdx    # 0x1ebb00
xorl %esi, %esi
leaq (%rax,%rcx), %rdi
cmpq $0x1, %rdi
je 0x2a14f
testq %rdi, %rdi
je 0x2a201
movzbl (%r14,%rcx), %edi
cmpb (%r14,%rsi), %dil
jne 0x2a201
cmpb $0x4, (%rdx,%rdi)
jb 0x2a207
incq %r15
movq %rcx, %rsi
incq %rcx
jmp 0x2a1dd
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: prt_cigar(unsigned short*, unsigned int)
void prt_cigar(uint16_t *ca, uint32_t cn)
{
    uint32_t k;
    for (k = 0; k < cn; k++) {
        fprintf(stderr, "%u%c", ca[k]&0x3fff, "EMDI"[ca[k]>>14]);
    }
    fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r15d
movq 0x2285c8(%rip), %r12    # 0x252fe0
leaq 0x1b98a4(%rip), %r13    # 0x1e42c3
leaq 0x1b9898(%rip), %r14    # 0x1e42be
xorl %ebp, %ebp
movq (%r12), %rsi
cmpq %rbp, %r15
je 0x2aa57
movzwl (%rbx,%rbp,2), %eax
movl %eax, %edx
andl $0x3fff, %edx           # imm = 0x3FFF
shrl $0xe, %eax
movsbl (%rax,%r13), %ecx
movq %rsi, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
incq %rbp
jmp 0x2aa28
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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
js 0x2dc8c
cmpq %r12, %r15
jle 0x2dc80
cmpq 0x10(%rbx), %r15
jle 0x2dbdc
movq %r15, 0x10(%rbx)
movq (%rbx), %rdi
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x2370
movq %rax, (%rbx)
leaq -0x1(%r15), %rax
movd %r14d, %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
testq %r12, %r12
jle 0x2dc76
decq %r12
movq (%rbx), %rcx
movq %r12, %rdx
shlq $0x4, %rdx
movl 0xc(%rcx,%rdx), %edi
cmpq %r14, %rdi
jle 0x2dc5a
movq %rax, %rsi
shlq $0x4, %rsi
testl %edi, %edi
je 0x2dbea
movdqu (%rcx,%rdx), %xmm1
movdqu %xmm1, (%rcx,%rsi)
movq (%rbx), %rcx
leaq (%rcx,%rdx), %r8
addq $0xc, %r8
movl (%r8), %r9d
xorl %edi, %edi
cmpq %r14, %r9
jl 0x2dc4e
movl %r14d, 0xc(%rcx,%rsi)
movl (%r8), %edi
subl %r14d, %edi
movq 0x4(%rcx,%rdx), %xmm1
psubd %xmm0, %xmm1
movq %xmm1, 0x4(%rcx,%rdx)
movl %edi, (%r8)
decq %rax
addq $-0x10, %rsi
jmp 0x2dc10
addq %rcx, %rdx
leaq -0x1(%rax), %rsi
shlq $0x4, %rax
movdqu (%rdx), %xmm1
movdqu %xmm1, (%rcx,%rax)
movq %rsi, %rax
jmp 0x2dbea
movq %r15, 0x8(%rbx)
cmpq $-0x1, %rax
jne 0x2dcd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
testq %r12, %r12
movl $0x0, %ecx
cmovgq %r12, %rcx
pushq $0xc
popq %rsi
subq $0x1, %rcx
jb 0x2dbb7
movq (%rbx), %rax
movl (%rax,%rsi), %eax
cmpq %r14, %rax
jle 0x2dcc8
xorl %edx, %edx
idivq %r14
addq %r15, %rax
cmpq $0x1, %rdx
sbbq $-0x1, %rax
movq %rax, %r15
jmp 0x2dccb
incq %r15
addq $0x10, %rsi
jmp 0x2dc9e
leaq 0x1b6813(%rip), %rdi    # 0x1e44eb
leaq 0x1b59c4(%rip), %rsi    # 0x1e36a3
leaq 0x1b680d(%rip), %rcx    # 0x1e44f3
movl $0x3554, %edx           # imm = 0x3554
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq 0x8(%rdi), %rsi
movq %rsi, 0x10(%rax)
movq (%rdi), %rsi
movq %rsi, 0x1c(%rax)
movswl 0x14(%rdi), %esi
movl %esi, 0x2c(%rax)
movq %rcx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x580d8
movl %eax, %eax
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1bebf
movq 0x50(%rsp), %rdi
addq (%rbx), %rax
movq %rax, (%rbx)
leaq (,%rdi,2), %rcx
addq %rbp, %rcx
testq %r13, %r13
je 0x30118
movq (%r13), %rdx
movq 0x10(%rdx), %rdx
imulq $0x28, %r14, %rsi
movl (%rdx,%rsi), %edx
shrl %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x3013c
testq %r12, %r12
je 0x30134
movq (%r12), %rdx
movq 0x10(%rdx), %rdx
imulq $0x28, %r14, %rsi
movl (%rdx,%rsi), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
jmp 0x3013c
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 0x1c7e7
popq %rcx
popq %rdx
testl %eax, %eax
je 0x30174
movq 0x8(%rsp), %rax
addq (%rbx), %rax
movq %rax, (%r14)
pushq $0x1
popq %rax
jmp 0x30182
orq $-0x1, (%r15)
orq $-0x1, (%r14)
orq $-0x1, (%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_O2/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 0x1bebf
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 0x1c7e7
popq %rcx
popq %rdx
testl %eax, %eax
je 0x3021c
movq 0x8(%rsp), %rax
addq (%rbx), %rax
movq %rax, (%rbp)
pushq $0x1
popq %rax
jmp 0x3022b
orq $-0x1, (%r14)
orq $-0x1, (%rbp)
orq $-0x1, (%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_O2/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 0x3026f
cmpq $0x1, %r10
jne 0x302aa
movq %r8, %r10
subq (%rdi), %r10
movq %r9, %r11
subq (%rdx), %r11
cmpq %r11, %r10
jle 0x3028c
movq %r9, (%rcx)
addq %rax, %r11
addq (%rdi), %r11
movq %r11, (%rsi)
jmp 0x302aa
movq (%rsi), %r10
movq (%rcx), %r11
cmpq %r11, %r10
jle 0x3029a
andq $0x0, (%rdx)
movq (%rsi), %r10
addq %rax, %r11
subq %r11, %r10
movq %r10, (%rdi)
jmp 0x302ad
movq %r8, (%rsi)
addq %rax, %r10
addq (%rdx), %r10
movq %r10, (%rcx)
jmp 0x302aa
andq $0x0, (%rdi)
movq (%rcx), %r11
addq %rax, %r10
subq %r10, %r11
movq %r11, (%rdx)
movq (%rdi), %r10
testq %r10, %r10
jns 0x302b6
andq $0x0, (%rdi)
cmpq $0x0, (%rdx)
jns 0x302c0
andq $0x0, (%rdx)
cmpq %r8, (%rsi)
jle 0x302c8
movq %r8, (%rsi)
cmpq %r9, (%rcx)
jle 0x302d0
movq %r9, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cigar_gen(overlap_region*, Candidates_list*, ul_ov_t*, unsigned long, unsigned long, unsigned long, ul_idx_t const*, hpc_t*, All_reads*, char*, UC_Read*, bit_extz_t*, double, long, unsigned long, ul_ov_t*)
uint64_t cigar_gen(overlap_region *z, Candidates_list *cl, ul_ov_t *ov, uint64_t on, uint64_t qn, uint64_t wl,  
const ul_idx_t *uref, hpc_t *hpc_g, All_reads *rref, char* qstr, UC_Read *tu, bit_extz_t *exz, double e_rate, 
int64_t ql, uint64_t rid, ul_ov_t *des)
{
    if(on <= 0) return 0;
    uint64_t i; 
    // des[0] = ov[0]; 
    // for (i = m = 1; i < on; i++) {
    //     fusion_merge();
    // }
    

    for (i = 0; i < on; i++) {
        assert((i<=0)||(ov[i].qs > ov[i-1].qe));
        sub_ciagar_gen(z, cl, ov[i].qs, ov[i].qe, wl, uref, hpc_g, rref, qstr, tu, exz, e_rate, ql, rid);
    }
    return on;
    // uint64_t i, qs = (uint64_t)-1, qe = (uint64_t)-1;
    // for (i = 0; i < on && ov[i].qn == qn; i++) {
    //     assert((i<=0)||(ov[i].qs >= ov[i-1].qe));
    //     if(ov[i].qs <= qe && qe != (uint64_t)-1) {
    //         qe = ov[i].qe;
    //     } else {
    //         if(qs != (uint64_t)-1) sub_ciagar_gen(z, cl, qs, qe, wl, uref, hpc_g, rref, qstr, tu, exz, e_rate, ql, rid);
    //         qs = ov[i].qs; qe = ov[i].qe;
    //     }
    // }
    // if(qs != (uint64_t)-1) sub_ciagar_gen(z, cl, qs, qe, wl, uref, hpc_g, rref, qstr, tu, exz, e_rate, ql, rid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rcx, %rbx
movq %rdx, 0x8(%rsp)
testq %rcx, %rcx
je 0x3122c
movq %r9, %r14
movq %rdi, %r12
movq 0x50(%rsp), %r13
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rbp
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x3122c
testq %r15, %r15
je 0x311d0
movl -0x4(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x311d8
jmp 0x3123e
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
movl (%rbp), %ecx
subq $0x10, %rsp
movq %r12, %rdi
movq %r14, %r8
movq %r13, %r9
movsd 0x20(%rsp), %xmm0
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
callq 0x30e86
addq $0x40, %rsp
incq %r15
addq $0x1c, %rbp
jmp 0x311bc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b3591(%rip), %rdi    # 0x1e47d6
leaq 0x1b2457(%rip), %rsi    # 0x1e36a3
leaq 0x1b35a3(%rip), %rcx    # 0x1e47f6
movl $0x3993, %edx           # imm = 0x3993
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_weight_khits0(unsigned int, unsigned int, k_mer_hit*, long, long, unsigned long)
int64_t gen_weight_khits0(uint32_t qs, uint32_t qe, k_mer_hit *a, int64_t an, int64_t k, uint64_t dp)///[qs, qe)
{
    for (; k >= 0 && a[k].self_offset >= qs; k--); 
    for (k = ((k>=0)?k:0); k < an && a[k].self_offset < qe; k++) {
        if((a[k].self_offset >= qs) && (a[k].self_offset < qe) && (!is_alnw(a[k]))) {
            a[k].readID = dp;
        }
    }
    return k;
}

// Assembly:
movq %r8, %rax
shlq $0x4, %r8
addq %rdx, %r8
addq $0x8, %r8
testq %rax, %rax
js 0x3157a
cmpl %edi, (%r8)
jb 0x3157c
decq %rax
addq $-0x10, %r8
jmp 0x31567
xorl %eax, %eax
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq %rax, %r8
shlq $0x4, %r8
addq %r8, %rdx
cmpq %rcx, %rax
jge 0x315c8
movl 0x8(%rdx), %r8d
cmpl %esi, %r8d
jae 0x315c8
cmpl %edi, %r8d
jb 0x315bf
movl (%rdx), %r8d
movl %r8d, %r10d
notl %r10d
testl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
je 0x315bf
andl $0x80000000, %r8d       # imm = 0x80000000
orl %r9d, %r8d
movl %r8d, (%rdx)
incq %rax
addq $0x10, %rdx
jmp 0x3158d
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_weight_khits(asg64_v*, k_mer_hit*, long)
void gen_weight_khits(asg64_v* idx, k_mer_hit *a, int64_t an)
{
    int64_t i, idx_n = idx->n, dp, old_dp, beg, end, k;
    // fprintf(stderr, "[M::%s::] idx->n::%ld\n", __func__, (int64_t)idx->n);
    for (i = k = 0, dp = old_dp = 0, beg = 0, end = -1; i < idx_n; ++i) {///[beg, end) but coordinates in idx is [, ]
        ///if idx->a.a[] is qe
        old_dp = dp;
        if ((idx->a[i]>>32)&1) {
            --dp; end = (idx->a[i]>>33)+1;
        }else {
            //meet a new overlap; the overlaps are pushed by the x_pos_s
            ++dp; end = (idx->a[i]>>33);
        }
        // fprintf(stderr, "[M::%s::] beg::%ld, end::%ld, old_dp::%ld\n", __func__, beg, end, old_dp);
        if(end > beg) k = gen_weight_khits0(beg, end, a, an, k, old_dp);
        beg = end;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rsi
movq (%rdi), %r12
xorl %ebx, %ebx
testq %r12, %r12
cmovleq %rbx, %r12
movabsq $0x100000000, %r15      # imm = 0x100000000
xorl %ebp, %ebp
xorl %edi, %edi
xorl %eax, %eax
movq %rsi, (%rsp)
cmpq %rbx, %r12
je 0x31660
movq 0x10(%rsi), %rcx
movq (%rcx,%rbx,8), %rcx
movq %rcx, %r13
andq %r15, %r13
shrq $0x21, %rcx
btq $0x20, %r13
movl $0x0, %r14d
sbbq %r14, %r14
shrq $0x20, %r13
addq %rcx, %r13
cmpq %rdi, %r13
jbe 0x31651
movl %r13d, %esi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %rax, %r8
movq %rbp, %r9
callq 0x31559
movq (%rsp), %rsi
orq $0x1, %r14
addq %r14, %rbp
incq %rbx
movq %r13, %rdi
jmp 0x31604
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/Correct.cpp
// Function: prt_khit(Candidates_list*, overlap_region_alloc*, overlap_region*, unsigned long, char const*)
void prt_khit(Candidates_list *cl, overlap_region_alloc* ol, overlap_region *z, uint64_t utg_id, const char *cmd)
{
    uint64_t k, cid; int64_t i; 
    if(!z) {
        for (k = 0; k < ol->length; k++) {
            z = &(ol->list[k]);
            if(z->y_id == utg_id) break;
        }
    }
    if((z) || (z->y_id == utg_id)) {
            fprintf(stderr, "[M::%s::cmd->%s] ******\n", __func__, (char *)cmd);
        for (i = z->shared_seed, cid = cl->list[i].readID; i < cl->length && cl->list[i].readID == cid; i++) {
            fprintf(stderr, "[M::%s::i->%lu] qoff::%u, toff::%u, cid::%lu, cl->length::%lld\n", __func__, i, 
                        cl->list[i].self_offset, cl->list[i].offset, cid, cl->length);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
testq %rdx, %rdx
jne 0x316e5
movq 0x10(%rsi), %rax
incq %rax
movl $0xa8, %edx
xorl %edi, %edi
xorl %r15d, %r15d
decq %rax
je 0x316c2
addq $-0xa8, %rdx
movq (%rsi), %r9
leaq (%r9,%rdi), %r15
movl 0x10(%r9,%rdi), %r10d
addq $0xa8, %rdi
cmpq %rcx, %r10
jne 0x31696
subq %rdx, %r9
movq %r9, %r15
jmp 0x316e5
testq %r15, %r15
jne 0x316e5
movl 0x10, %eax
cmpq %rcx, %rax
je 0x316e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
movq 0x2218f4(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1b32a7(%rip), %rsi    # 0x1e499d
leaq 0x1b32b9(%rip), %r14    # 0x1e49b6
movq %r14, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x22b0
movslq 0x24(%r15), %r15
movq (%rbx), %rax
movq %r15, %rbp
shlq $0x4, %rbp
movl (%rax,%rbp), %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
orq $0x8, %rbp
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x8(%rbx), %r10
cmpq %r10, %r15
jge 0x316d3
movq (%rbx), %rax
movl -0x8(%rax,%rbp), %ecx
andl %r12d, %ecx
cmpl %r13d, %ecx
jne 0x316d3
movq 0x221894(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movl -0x4(%rax,%rbp), %r9d
movl (%rax,%rbp), %r8d
leaq 0x1b3260(%rip), %rsi    # 0x1e49bf
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
pushq %r10
pushq %r13
callq 0x22b0
popq %rcx
popq %rdx
incq %r15
addq $0x10, %rbp
jmp 0x3172d
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cigar_gen_cns(overlap_region*, Candidates_list*, ul_ov_t*, unsigned long, unsigned long, unsigned long, ul_idx_t const*, hpc_t*, All_reads*, char*, UC_Read*, bit_extz_t*, double, long, unsigned long, asg64_v*, ul_ov_t*)
uint64_t cigar_gen_cns(overlap_region *z, Candidates_list *cl, ul_ov_t *ov, uint64_t on, uint64_t qn, uint64_t wl,  
const ul_idx_t *uref, hpc_t *hpc_g, All_reads *rref, char* qstr, UC_Read *tu, bit_extz_t *exz, double e_rate, 
int64_t ql, uint64_t rid, asg64_v* iidx, ul_ov_t *des)
{
    if(on <= 0 || iidx->n <= 0) return 0;
    uint64_t i; 
    for (i = 0; i < on; i++) {
        assert((i<=0)||(ov[i].qs > ov[i-1].qe));
        sub_ciagar_gen(z, cl, ov[i].qs, ov[i].qe, wl, uref, hpc_g, rref, qstr, tu, exz, e_rate, ql, rid);
    }
    return on;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
testq %rcx, %rcx
je 0x319c0
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
je 0x319c0
movq %r9, %r14
movq %rcx, %rbx
movq %rdi, %r12
movq 0x50(%rsp), %r13
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rbp
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x319c2
testq %r15, %r15
je 0x31964
movl -0x4(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x3196c
jmp 0x319d4
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
movl (%rbp), %ecx
subq $0x10, %rsp
movq %r12, %rdi
movq %r14, %r8
movq %r13, %r9
movsd 0x20(%rsp), %xmm0
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
callq 0x30e86
addq $0x40, %rsp
incq %r15
addq $0x1c, %rbp
jmp 0x31950
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b2dfb(%rip), %rdi    # 0x1e47d6
leaq 0x1b1cc1(%rip), %rsi    # 0x1e36a3
leaq 0x1b3016(%rip), %rcx    # 0x1e49ff
movl $0x3a3e, %edx           # imm = 0x3A3E
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: k_hits_bcheck(All_reads*, ul_idx_t const*, overlap_region_alloc*, Candidates_list*, unsigned long, unsigned long*, unsigned long, char*, char*, char*)
uint64_t k_hits_bcheck(All_reads *rref, const ul_idx_t *uref, overlap_region_alloc* ol, Candidates_list *cl, 
uint64_t khit, uint64_t *a, uint64_t a_n, char* qstr, char *str0, char *str1)
{
    if(a_n < 2) return 1;
    uint64_t k, e; char *ref0, *ref1; overlap_region *z;

    e = cl->list[(uint32_t)a[0]].offset; 
    if(e >= khit) e-=khit;
    else return 0;
    z = &(ol->list[cl->list[(uint32_t)a[0]].readID]);
    ref0 = retrive_str_piece_exz(rref, uref, str0, e, khit, z->y_pos_strand, z->y_id);
    // fprintf(stderr, "\n[M::%s::] qstr::%.*s\n", __func__, 
    // (int32_t)khit, qstr+cl->list[(uint32_t)a[0]].self_offset-khit);
    // fprintf(stderr, "[M::%s::qoff->%u::toff->%u::%c] tstr0::%.*s\n", __func__, 
    // cl->list[(uint32_t)a[0]].self_offset, cl->list[(uint32_t)a[0]].offset, "+-"[z->y_pos_strand], (int32_t)khit, ref0);

    for (k = 1; k < a_n; k++) {
        e = cl->list[(uint32_t)a[k]].offset; 
        if(e >= khit) e-=khit;
        else return 0;
        z = &(ol->list[cl->list[(uint32_t)a[k]].readID]);
        ref1 = retrive_str_piece_exz(rref, uref, str1, e, khit, z->y_pos_strand, z->y_id);
        // fprintf(stderr, "[M::%s::qoff->%u::toff->%u::%c] tstr1::%.*s\n", __func__, 
        // cl->list[(uint32_t)a[k]].self_offset, cl->list[(uint32_t)a[k]].offset, "+-"[z->y_pos_strand], (int32_t)khit, ref1);
        if(memcmp(ref0, ref1, khit)) return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x2, 0x50(%rsp)
jae 0x31a83
pushq $0x1
popq %rax
jmp 0x31b55
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq (%rcx), %rax
movl (%r9), %esi
shlq $0x4, %rsi
movl 0x4(%rax,%rsi), %ecx
subq %r8, %rcx
jb 0x31b53
movq %rdi, %rbp
movq 0x60(%rsp), %rdx
addq %rsi, %rax
movq 0x10(%rsp), %rsi
movq (%rsi), %rsi
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
imulq $0xa8, %rax, %rax
movl 0x10(%rsi,%rax), %edi
movl 0x1c(%rsi,%rax), %r9d
movq %rdi, (%rsp)
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %r8
callq 0x319f3
movq %rax, %r12
pushq $0x1
popq %r13
cmpq %r13, 0x50(%rsp)
je 0x31a7b
movq (%r15), %rax
movl (%rbx,%r13,8), %edx
shlq $0x4, %rdx
movl 0x4(%rax,%rdx), %ecx
subq %r14, %rcx
jb 0x31b53
addq %rdx, %rax
movq 0x10(%rsp), %rdx
movq (%rdx), %rdx
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
imulq $0xa8, %rax, %rax
movl 0x10(%rdx,%rax), %esi
movl 0x1c(%rdx,%rax), %r9d
movq %rsi, (%rsp)
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %r14, %r8
callq 0x319f3
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x21a0
incq %r13
testl %eax, %eax
je 0x31ae8
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_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_global(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_global(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_global_64_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_global_128_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_global_infi_w_trace(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x335f9
cmpl $0x2, %eax
jne 0x33602
addq $0x18, %rsp
jmp 0x5975c
addq $0x18, %rsp
jmp 0x58253
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x5b95f
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_global_simi(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_global_simi(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_global_64_w(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_global_128_w(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_global_infi_w(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x3363c
cmpl $0x2, %eax
jne 0x33645
addq $0x18, %rsp
jmp 0x5e7d6
addq $0x18, %rsp
jmp 0x5e55a
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x5ecf4
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_extension_0(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_extension_0(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_extension_64_0_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_extension_128_0_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_extension_infi_0_w_trace(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x3367f
cmpl $0x2, %eax
jne 0x33688
addq $0x18, %rsp
jmp 0x59eef
addq $0x18, %rsp
jmp 0x586b5
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x5c367
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_extension_0_simi(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_extension_0_simi(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_extension_64_0_w(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_extension_128_0_w(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_extension_infi_0_w(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x336c2
cmpl $0x2, %eax
jne 0x336cb
addq $0x18, %rsp
jmp 0x5f769
addq $0x18, %rsp
jmp 0x5f439
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x5fd5a
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_extension_1(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_extension_1(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_extension_64_1_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_extension_128_1_w_trace(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_extension_infi_1_w_trace(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x33705
cmpl $0x2, %eax
jne 0x3370e
addq $0x18, %rsp
jmp 0x5a7c8
addq $0x18, %rsp
jmp 0x58c53
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x5cedd
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_extension_1_simi(char*, int, char*, int, int, bit_extz_t*)
void cal_exz_extension_1_simi(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_extension_64_1_w(pstr, pn, tstr, tn, thre, ez);
    } else if(nword == 2) {
        ed_band_cal_extension_128_1_w(pstr, pn, tstr, tn, thre, ez);
    } else {
        ed_band_cal_extension_infi_1_w(pstr, pn, tstr, tn, thre, &nword, ez);
    }
}

// Assembly:
subq $0x18, %rsp
leal (%r8,%r8), %r10d
sarl $0x6, %r10d
leal 0x1(%r10), %eax
movl %eax, 0x14(%rsp)
testl %r10d, %r10d
jle 0x33748
cmpl $0x2, %eax
jne 0x33751
addq $0x18, %rsp
jmp 0x6095f
addq $0x18, %rsp
jmp 0x605a6
movq %r9, (%rsp)
leaq 0x14(%rsp), %r9
callq 0x60fe9
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_semi(char*, int, char*, int, int, int, bit_extz_t*)
void cal_exz_semi(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, int32_t aux_beg, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_semi_64_w_absent_diag_trace(pstr, pn, tstr, tn, thre, aux_beg, ez);
    } else if(nword == 2) {
        ed_band_cal_semi_128_w_absent_diag_trace(pstr, pn, tstr, tn, thre, aux_beg, ez);
    } else {
        ed_band_cal_semi_infi_w_absent_diag_trace(pstr, pn, tstr, tn, thre, aux_beg, &nword, ez);
    }
}

// Assembly:
pushq %rax
movq 0x10(%rsp), %rax
leal (%r8,%r8), %r11d
sarl $0x6, %r11d
leal 0x1(%r11), %r10d
movl %r10d, 0x4(%rsp)
testl %r11d, %r11d
jle 0x3378c
cmpl $0x2, %r10d
jne 0x33798
popq %rax
jmp 0x5b166
subq $0x8, %rsp
pushq %rax
callq 0x59275
jmp 0x337a5
leaq 0x4(%rsp), %r10
pushq %rax
pushq %r10
callq 0x5dad3
popq %rax
popq %rcx
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: cal_exz_semi_simi(char*, int, char*, int, int, int, bit_extz_t*)
void cal_exz_semi_simi(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, int32_t aux_beg, bit_extz_t *ez)
{
    int32_t bd, nword;
    bd = (((thre)<<1)+1); nword = ((bd>>bitw)+(!!(bd&bitz)));

    if(nword <= 1) {
        ed_band_cal_semi_64_w_absent_diag(pstr, pn, tstr, tn, thre, aux_beg, ez);
    } else if(nword == 2) {
        ed_band_cal_semi_128_w_absent_diag(pstr, pn, tstr, tn, thre, aux_beg, ez);
    } else {
        ed_band_cal_semi_infi_w_absent_diag(pstr, pn, tstr, tn, thre, aux_beg, &nword, ez);
    }
}

// Assembly:
pushq %rax
movq 0x10(%rsp), %rax
leal (%r8,%r8), %r11d
sarl $0x6, %r11d
leal 0x1(%r11), %r10d
movl %r10d, 0x4(%rsp)
testl %r11d, %r11d
jle 0x337d1
cmpl $0x2, %r10d
jne 0x337dd
popq %rax
jmp 0x61901
subq $0x8, %rsp
pushq %rax
callq 0x57947
jmp 0x337ea
leaq 0x4(%rsp), %r10
pushq %rax
pushq %r10
callq 0x61e6d
popq %rax
popq %rcx
popq %rax
retq