LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: push_emask_flt(kv_emask_t*, unsigned long*, unsigned long, unsigned long, kv_ul_ov_t*)
uint32_t push_emask_flt(kv_emask_t *in, uint64_t *flt, uint64_t flt_n, uint64_t qn, kv_ul_ov_t *res)
{
    uint32_t k = 0, z = 0, tn, rn0 = res->n; ul_ov_t *p;
    while (k < in->n && z < flt_n) {
        if (in->a[k].tn < (flt[z]>>32)) {
            k++;
        } else if((flt[z]>>32) < in->a[k].tn) {
            z++;
        } else {///in->a[k].tn == (flt[z]>>32)
            for (tn = in->a[k].tn; k < in->n && in->a[k].tn == tn; k++) {
                kv_pushp(ul_ov_t, *res, &p);
                p->qn = qn; p->qs = in->a[k].qs; p->qe = in->a[k].qe; 
                p->tn = in->a[k].tn; p->ts = in->a[k].ts; p->te = in->a[k].te; 
                p->rev = in->a[k].rev; p->el = in->a[k].full; p->sec = k;
            }
            for (; z < flt_n && (flt[z]>>32) == tn; z++);
        }
    }
    return res->n-rn0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x8(%r8), %rdi
movq 0x8(%r13), %rax
xorl %r10d, %r10d
pushq $0x2
popq %r11
xorl %ebp, %ebp
movl %r10d, %r9d
movl %ebp, %edx
cmpq %rdx, %rax
jbe 0x418f6
cmpq %r15, %r9
jae 0x418f6
movq (%r13), %rsi
shlq $0x5, %rdx
movl (%rsi,%rdx), %ebx
movq (%r12,%r9,8), %rdx
shrq $0x20, %rdx
cmpq %rbx, %rdx
jbe 0x417db
incl %ebp
jmp 0x417ab
cmpl %ebx, %edx
jae 0x417e4
incl %r10d
jmp 0x417a8
movl %r10d, 0xc(%rsp)
movq %rdi, 0x10(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %ebp, %r14d
cmpq %r14, %rax
jbe 0x418d0
movq (%r13), %r9
shlq $0x5, %r14
cmpl %ebx, (%r9,%r14)
jne 0x418d0
movq (%r8), %rax
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jne 0x4185d
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
cmoveq %r11, %rsi
movq %rsi, 0x10(%r8)
imulq $0x1c, %rsi, %rsi
movq %rax, %rdi
callq 0x2370
pushq $0x2
popq %r11
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq %rax, (%r8)
movq 0x8(%r8), %rdx
movq (%r13), %r9
movl (%r9,%r14), %esi
jmp 0x4185f
movl %ebx, %esi
leaq 0x1(%rdx), %rdi
movq %rdi, 0x8(%r8)
imulq $0x1c, %rdx, %rdx
movl %ecx, (%rax,%rdx)
movq 0xc(%r9,%r14), %rdi
movq %rdi, 0x4(%rax,%rdx)
movl %esi, 0xc(%rax,%rdx)
movq 0x14(%r9,%r14), %rsi
movq %rsi, 0x10(%rax,%rdx)
movl 0x1c(%r9,%r14), %r9d
andl $-0x80, %r9d
shll $0x18, %r9d
movl 0x18(%rax,%rdx), %esi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %esi
orl %r9d, %esi
movl %esi, 0x18(%rax,%rdx)
movq (%r13), %rsi
movl 0x1c(%rsi,%r14), %esi
andl $0x40, %esi
shll $0x18, %esi
movl %ebp, %edi
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
orl %esi, %edi
orl %r9d, %edi
movl %edi, 0x18(%rax,%rdx)
incl %ebp
movq 0x8(%r13), %rax
jmp 0x417f8
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r10d
movl %r10d, %edx
cmpq %r15, %rdx
jae 0x417a8
cmpl %ebx, 0x4(%r12,%rdx,8)
jne 0x417a8
incl %r10d
jmp 0x418da
movl 0x8(%r8), %eax
subl %edi, %eax
addq $0x28, %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_masks(ma_ug_t*, ul_ov_t*, unsigned long)
void prt_masks(ma_ug_t *ug, ul_ov_t *a, uint64_t a_n)
{
    uint64_t k;
    for (k = 0; k < a_n; k++) {
        fprintf(stderr, "[M::%s]\tutg%.6u%c\txl::%u\tx::[%u,\t%u)\t%c\tutg%.6u%c\tyl::%u\ty::[%u,\t%u)\tfull::%u\tis_cal::%u\n", 
        __func__, 
        a[k].qn + 1, "lc"[ug->u.a[a[k].qn].circ], ug->u.a[a[k].qn].len, a[k].qs, a[k].qe, "+-"[a[k].rev],
        a[k].tn + 1, "lc"[ug->u.a[a[k].tn].circ], ug->u.a[a[k].tn].len, a[k].ts, a[k].te,
        a[k].el, (a[k].sec!=((uint32_t)(0x3fffffff)))?1:0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, (%rsp)
addq $0x18, %r14
subq $0x1, %rbx
jb 0x44436
movq 0x20ec8b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl -0x18(%r14), %eax
movl -0x14(%r14), %ecx
movq %rcx, 0x20(%rsp)
leal 0x1(%rax), %ecx
movq (%rsp), %rdx
movq 0x10(%rdx), %rdx
imulq $0x28, %rax, %rax
movl (%rdx,%rax), %r9d
movl %r9d, %eax
shrl $0x1f, %eax
leaq 0x1a2306(%rip), %r10    # 0x1e668b
movsbl (%rax,%r10), %r8d
movl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
andl %r11d, %r9d
movl -0x10(%r14), %eax
movq %rax, 0x18(%rsp)
movl (%r14), %eax
movl %eax, %esi
shrl $0x1f, %esi
leaq 0x19fe78(%rip), %r15    # 0x1e4223
movsbl (%rsi,%r15), %esi
movq %rsi, 0x10(%rsp)
movl -0xc(%r14), %esi
leal 0x1(%rsi), %r15d
movq %r15, 0x8(%rsp)
imulq $0x28, %rsi, %rsi
movl (%rdx,%rsi), %r12d
movl %r12d, %edx
shrl $0x1f, %edx
movsbl (%rdx,%r10), %ebp
andl %r11d, %r12d
movl -0x8(%r14), %r10d
movl %eax, %r15d
shrl $0x1e, %r15d
andl $0x1, %r15d
notl %eax
xorl %r11d, %r11d
testl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl -0x4(%r14), %r13d
setne %r11b
leaq 0x1a2227(%rip), %rsi    # 0x1e6627
leaq 0x1a227a(%rip), %rdx    # 0x1e6681
xorl %eax, %eax
pushq %r11
pushq %r15
pushq %r13
pushq %r10
pushq %r12
pushq %rbp
pushq 0x38(%rsp)
pushq 0x48(%rsp)
pushq 0x58(%rsp)
pushq 0x68(%rsp)
callq 0x22b0
addq $0x50, %rsp
addq $0x1c, %r14
jmp 0x44344
addq $0x28, %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: if_direct_mask(ul_idx_t const*, ug_opt_t const*, ul_ov_t*, ul_ov_t*, unsigned long, double)
uint64_t if_direct_mask(const ul_idx_t *uref, const ug_opt_t *uopt, ul_ov_t *p, ul_ov_t *q, uint64_t bw, double len_diff)
{
    ul_ov_t *li, *lj; uint64_t os, oe, ovlp;
    if(p->qe > q->qe) li = p, lj = q;
    else if(p->qe == q->qe && p->qs >= q->qs) li = p, lj = q;
    else lj = p, li = q;
    os = MAX(li->qs, lj->qs), oe = MIN(li->qe, lj->qe);
    ovlp = ((oe > os)? (oe - os):0);
    if(!ovlp) return 0;//no overlap

    if(lj->qs <= li->qs+G_CHAIN_INDEL) {
        if(govlp_check(uref, uopt, bw, len_diff, li, lj)) return 1;
    } else if((lj->qe+G_CHAIN_INDEL>=li->qe) && (lj->qs+G_CHAIN_INDEL>=li->qs)) {
        if(govlp_check(uref, uopt, bw, len_diff, lj, li)) return 1;
    }
    return 0;
}

// Assembly:
movq %rcx, %rax
movl 0x8(%rdx), %r9d
movl 0x8(%rcx), %ecx
cmpl %ecx, %r9d
jbe 0x447ea
movl %ecx, %r10d
movl %r9d, %ecx
movq %rax, %r9
movq %rdx, %rax
jmp 0x447fc
jne 0x447f6
movl 0x4(%rdx), %r10d
cmpl 0x4(%rax), %r10d
jae 0x4486d
movl %r9d, %r10d
movq %rdx, %r9
pushq %rbp
pushq %rbx
pushq %rax
movl 0x4(%rax), %edx
movl 0x4(%r9), %r11d
cmpl %r11d, %edx
movl %r11d, %ebx
cmoval %edx, %ebx
cmpl %r10d, %ecx
movl %r10d, %ebp
cmovbl %ecx, %ebp
cmpl %ebx, %ebp
jbe 0x44864
leal 0x80(%rdx), %ebx
cmpl %ebx, %r11d
jbe 0x4484d
movl $0x80, %ebx
addl %ebx, %r10d
cmpl %ecx, %r10d
setb %cl
addl %ebx, %r11d
cmpl %edx, %r11d
setb %dl
orb %cl, %dl
jne 0x44864
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
jmp 0x44856
movq %r8, %rdx
movq %rax, %rcx
movq %r9, %r8
callq 0x3d8a8
testl %eax, %eax
je 0x44864
pushq $0x1
popq %rax
jmp 0x44866
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %r9d, %r10d
jmp 0x447df
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: get_chain_x_by_y(overlap_region*, long)
int64_t get_chain_x_by_y(overlap_region* ot, int64_t q)
{
	int64_t x, y, off, i, lx = -1, ly = -1; Fake_Cigar* o = &(ot->f_cigar);
	x = get_fake_gap_pos(o, o->length - 1); 
	off = get_fake_gap_shift(o, o->length - 1);
	y = x - ot->x_pos_s + ot->y_pos_s + off;
	if(y == q) return x;

	for (i = 0; i < (int64_t)o->length; i++){
		x = get_fake_gap_pos(o, i); off = get_fake_gap_shift(o, i);
		y = x - ot->x_pos_s + ot->y_pos_s + off;
		if(q < y) {
			lx = x; ly = y;
			break;
		}
	}

    assert((i!=0)&&(i!=(int64_t)o->length));
	x = get_fake_gap_pos(o, i-1); off = get_fake_gap_shift(o, i-1);
	y = x - ot->x_pos_s + ot->y_pos_s + off;
	y = (((double)(q - y))/((double)(ly - y)))*((double)(lx -x)) + x;
	if(y < ot->x_pos_s) y = ot->x_pos_s;
	if(y > ot->x_pos_e) y = ot->x_pos_e;
	return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rdi), %r15
movl 0x40(%rdi), %esi
decl %esi
movq %r15, %rdi
callq 0x11a00
movslq %eax, %r12
movl 0x40(%rbx), %esi
decl %esi
movq %r15, %rdi
callq 0x11a0b
cltq
movl 0x4(%rbx), %ecx
movl 0x14(%rbx), %edx
addq %r12, %rax
subq %rcx, %rax
addq %rdx, %rax
cmpq %r14, %rax
jne 0x48953
movq %r12, %rax
jmp 0x48a24
xorl %r12d, %r12d
movl 0x40(%rbx), %eax
cmpq %rax, %r12
jae 0x48993
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a00
movslq %eax, %r13
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a0b
movslq %eax, %rbp
movl 0x4(%rbx), %eax
movl 0x14(%rbx), %ecx
addq %r13, %rbp
subq %rax, %rbp
addq %rcx, %rbp
cmpq %r14, %rbp
jg 0x48999
incq %r12
jmp 0x48956
pushq $-0x1
popq %rbp
movq %rbp, %r13
testq %r12, %r12
je 0x48a33
movl 0x40(%rbx), %eax
cmpq %r12, %rax
je 0x48a33
decl %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a00
cltq
movq %rax, (%rsp)
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a0b
movslq %eax, %rcx
movl 0x4(%rbx), %eax
movl 0x14(%rbx), %edx
movq (%rsp), %rsi
addq %rsi, %rcx
subq %rax, %rcx
addq %rdx, %rcx
subq %rcx, %r14
cvtsi2sd %r14, %xmm0
subq %rcx, %rbp
cvtsi2sd %rbp, %xmm1
divsd %xmm1, %xmm0
movq %rsi, %rcx
subq %rsi, %r13
cvtsi2sd %r13, %xmm1
cvtsi2sd %ecx, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rcx
movl 0x8(%rbx), %edx
cmpq %rax, %rcx
cmovgq %rcx, %rax
cmpq %rdx, %rax
cmovgeq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19e2bb(%rip), %rdi    # 0x1e6cf5
leaq 0x19ac62(%rip), %rsi    # 0x1e36a3
leaq 0x19e2cd(%rip), %rcx    # 0x1e6d15
movl $0x5809, %edx           # imm = 0x5809
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_sub_ov(ul_idx_t const*, overlap_region*, kv_ul_ov_t*, unsigned long, unsigned long)
uint64_t gen_sub_ov(const ul_idx_t *udb, overlap_region* o, kv_ul_ov_t *res, uint64_t xs, uint64_t xe)
{
	uint64_t ts, te, i, l, rn = res->n, rev = o->y_pos_strand; ul_ov_t *z;
	utg_ct_t p; ma_utg_t *u = &(udb->ug->u.a[o->y_id]);
    if(!rev){
        ts = o->y_pos_s; te = o->y_pos_e + 1;
    } else {
        ts = u->len - (o->y_pos_e+1); te = u->len - o->y_pos_s;
    }

    for (i = l = 0; i < u->n; i++) {
        p.x = u->a[i]>>32; p.s = l; p.e = l + Get_READ_LENGTH(R_INF, (u->a[i]>>33));
        l += (uint32_t)u->a[i];
        if(p.e <= ts) continue; 
        if(p.s >= te) break;
        if(gen_contain_ov(udb, &p, o, res)) {
            z = &(res->a[res->n-1]);
            if(z->qs >= xe) break;
            if(z->qe <= xs) res->n--; 
        }
    }
    return res->n-rn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, %rbp
movq %rsi, %rdx
movq %rdi, 0x40(%rsp)
movq (%rdi), %rax
movl 0x10(%rsi), %esi
movl 0x18(%rdx), %r15d
imulq $0x28, %rsi, %r10
addq 0x10(%rax), %r10
cmpl $0x0, 0x1c(%rdx)
je 0x48c74
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl (%r10), %esi
notl %r15d
movl %r15d, %eax
addl %esi, %eax
subl 0x14(%rdx), %esi
movl %esi, %r15d
jmp 0x48c7a
movl 0x14(%rdx), %eax
incl %r15d
movq 0x8(%rbp), %rsi
movq %rsi, 0x18(%rsp)
movl %eax, %r11d
xorl %r13d, %r13d
leaq 0x20b5a0(%rip), %r14    # 0x254230
xorl %r12d, %r12d
movq %rdx, 0x38(%rsp)
movq %r11, 0x30(%rsp)
movl 0x10(%r10), %eax
cmpq %rax, %r12
jae 0x48d47
movq 0x18(%r10), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rax
shrq $0x20, %rax
movl %eax, 0xc(%rsp)
movl %r13d, 0x10(%rsp)
movq 0x18(%r14), %rax
movq %rbx, %rsi
shrq $0x21, %rsi
movl (%rax,%rsi,8), %eax
addl %r13d, %eax
movl %eax, 0x14(%rsp)
cmpl %r11d, %eax
jbe 0x48d3c
cmpl %r13d, %r15d
jbe 0x48d47
movq 0x40(%rsp), %rdi
leaq 0xc(%rsp), %rsi
movq %rbp, %rcx
movq %r10, %r14
callq 0x48a52
movq 0x30(%rsp), %r11
movq %r14, %r10
leaq 0x20b52b(%rip), %r14    # 0x254230
movq 0x38(%rsp), %rdx
testq %rax, %rax
je 0x48d3c
movq (%rbp), %r8
movq 0x8(%rbp), %rax
imulq $0x1c, %rax, %rdi
movl -0x18(%r8,%rdi), %esi
cmpq 0x28(%rsp), %rsi
jae 0x48d47
addq %rdi, %r8
movl -0x14(%r8), %esi
cmpq 0x20(%rsp), %rsi
ja 0x48d3c
decq %rax
movq %rax, 0x8(%rbp)
addq %rbx, %r13
incq %r12
jmp 0x48c9d
movq 0x8(%rbp), %rax
subq 0x18(%rsp), %rax
addq $0x48, %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: gen_conta_ov(ul_idx_t const*, overlap_region*, utg_ct_t*, long, kv_ul_ov_t*, unsigned long, unsigned long)
uint64_t gen_conta_ov(const ul_idx_t *udb, overlap_region* o, utg_ct_t *ct_a, int64_t ct_n, kv_ul_ov_t *res, uint64_t xs, uint64_t xe)
{
	int64_t i; uint64_t ys, ye, rn = res->n; ma_utg_t *u = &(udb->ug->u.a[o->y_id]);
     ul_ov_t *z; utg_ct_t *p;

    if(o->y_pos_strand == 0){
        ys = o->y_pos_s; ye = o->y_pos_e + 1;
    } else {
        ys = u->len - (o->y_pos_e+1); ye = u->len - o->y_pos_s;
    }

    for (i = 0; i < ct_n; i++) {
        p = &(ct_a[i]);
        if(p->e <= ys) continue; 
        if(p->s >= ye) break;
        if(gen_contain_ov(udb, p, o, res)) {
            z = &(res->a[res->n-1]);
            if(z->qs >= xe) break;
            if(z->qe <= xs) res->n--; 
        }
    }
    return res->n-rn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
cmpl $0x0, 0x1c(%rsi)
je 0x48db2
movq (%r12), %rax
movq 0x10(%rax), %rax
movl 0x10(%r14), %esi
movl 0x18(%r14), %ebp
imulq $0x28, %rsi, %rsi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl (%rax,%rsi), %r8d
notl %ebp
addl %r8d, %ebp
subl 0x14(%r14), %r8d
movl %r8d, 0x4(%rsp)
jmp 0x48dc0
movl 0x14(%r14), %ebp
movl 0x18(%r14), %eax
incl %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
testq %rcx, %rcx
cmovgq %rcx, %r13
subq $0x1, %r13
jb 0x48e30
cmpl %ebp, 0x8(%r15)
jbe 0x48e2a
movl 0x4(%rsp), %eax
cmpl %eax, 0x4(%r15)
jae 0x48e30
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x48a52
testq %rax, %rax
je 0x48e2a
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
imulq $0x1c, %rax, %r8
movl -0x18(%rcx,%r8), %esi
cmpq 0x50(%rsp), %rsi
jae 0x48e30
addq %r8, %rcx
movl -0x14(%rcx), %ecx
cmpq 0x10(%rsp), %rcx
ja 0x48e2a
decq %rax
movq %rax, 0x8(%rbx)
addq $0xc, %r15
jmp 0x48dd3
movq 0x8(%rbx), %rax
subq 0x8(%rsp), %rax
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: return_t_chain(overlap_region*, Candidates_list*)
int64_t return_t_chain(overlap_region *z, Candidates_list *cl)
{
    int64_t i, cn = cl->length, scn; uint64_t pid; k_mer_hit *ca;

    // if(z->y_id == 30129) {
    //     fprintf(stderr, "\n-0-[M::%s]\tutg%.6ul\tx::[%u,\t%u)\t%c\tutg%.6ul\ty::[%u,\t%u)\n", 
    //         __func__, z->x_id+1, z->x_pos_s, z->x_pos_e+1,
	// 		"+-"[z->y_pos_strand], z->y_id+1, z->y_pos_s, z->y_pos_e+1);
    //     i = z->shared_seed; pid = cl->list[i].readID;
    //     for (; i < cn && cl->list[i].readID == pid && cl->list[i].readID != ((uint32_t)(0x7fffffff)); i++) {
    //         fprintf(stderr, "i::%ld[M::%s]\treadID::%u\tself_offset::%u\toffset::%u\t%c\n", 
    //             i, __func__, cl->list[i].readID, cl->list[i].self_offset, cl->list[i].offset, 
    //             "+-"[cl->list[i].strand]);
    //     }
    // }



    i = z->shared_seed; pid = cl->list[i].readID;
    for (; i < cn && cl->list[i].readID == pid && cl->list[i].readID != ((uint32_t)(0x7fffffff)); i++);
    scn = i - z->shared_seed; ca = cl->list+z->shared_seed;
    i = lchain_refine(ca, scn, ca, &(cl->chainDP), 50, 5000, 512, 16); cn = i;
    for (; i < scn; i++) ca[i].readID = ((uint32_t)(0x7fffffff));
    // if(z->y_id == 30129) fprintf(stderr, "\n-a-[M::%s]\tcn::%ld\n", __func__, cn);


    // if(z->y_id == 30129) {
    //     fprintf(stderr, "\n-1-[M::%s]\tutg%.6ul\tx::[%u,\t%u)\t%c\tutg%.6ul\ty::[%u,\t%u)\n", 
    //         __func__, z->x_id+1, z->x_pos_s, z->x_pos_e+1,
	// 		"+-"[z->y_pos_strand], z->y_id+1, z->y_pos_s, z->y_pos_e+1);
    //     i = z->shared_seed; pid = cl->list[i].readID; cn = cl->length;
    //     for (; i < cn && cl->list[i].readID == pid && cl->list[i].readID != ((uint32_t)(0x7fffffff)); i++) {
    //         fprintf(stderr, "i::%ld[M::%s]\treadID::%u\tself_offset::%u\toffset::%u\t%c\n", 
    //             i, __func__, cl->list[i].readID, cl->list[i].self_offset, cl->list[i].offset, 
    //             "+-"[cl->list[i].strand]);
    //     }
    // }
    return cn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rcx
movq (%rsi), %r14
movq 0x8(%rsi), %rdx
movslq 0x24(%rdi), %rax
movq %rax, %r15
shlq $0x4, %r15
leaq (%r14,%r15), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl (%r14,%r15), %r8d
andl %esi, %r8d
cmpq %rax, %rdx
movq %rax, %rbx
cmovgq %rdx, %rbx
movq %rdi, %r10
movq %rax, %r9
cmpq %rdx, %r9
jge 0x4a067
movl (%r10), %r11d
andl %esi, %r11d
cmpl %r8d, %r11d
jne 0x4a064
cmpl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
je 0x4a064
incq %r9
addq $0x10, %r10
jmp 0x4a042
movq %r9, %rbx
subq %rax, %rbx
addq $0x18, %rcx
pushq $0x32
popq %r8
movl $0x1388, %r9d           # imm = 0x1388
movq %rbx, %rsi
movq %rdi, %rdx
pushq $0x10
pushq $0x200                  # imm = 0x200
callq 0x1751e
addq $0x10, %rsp
movq %rax, %rcx
shlq $0x4, %rcx
addq %r15, %rcx
addq %rcx, %r14
movq %rax, %rcx
cmpq %rbx, %rcx
jge 0x4a0b3
orl $0x7fffffff, (%r14)     # imm = 0x7FFFFFFF
incq %rcx
addq $0x10, %r14
jmp 0x4a09e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: debug_aln_err(overlap_region*, long, long, long, long, double, long, ul_idx_t const*, char*, UC_Read*, bit_extz_t*)
int64_t debug_aln_err(overlap_region *o, int64_t qs, int64_t qe, int64_t ts, int64_t te, double e_rate, 
int64_t estz_err, const ul_idx_t *uref, char* qstr, UC_Read *tu, bit_extz_t *exz)
{
    int64_t ql = qe - qs, tl = te - ts, id = o->y_id, rev = o->y_pos_strand;
    if((!ql) && (!tl)) return 0;
    if((!ql) && (tl)) return tl;
    if((ql) && (!tl)) return ql;
    if(estz_err < 0) estz_err = -1;
    if(hc_aln_exz_simi_adv(id, rev, uref, NULL, NULL, qstr, tu, qs, qe, ts, te, 
                            qs, qe, ts, te, 0, exz, ql, e_rate, MAX_CNS_L, MAX_CNS_E, FORCE_CNS_L, estz_err, NULL, 0)) {
        return exz->err;
    } else {
        return gen_err_unaligned(ql, tl); 
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdx, %r15
subq %rsi, %r15
movq %r8, %rbx
subq %rcx, %rbx
movq %r15, %rax
orq %rbx, %rax
je 0x4b805
testq %rbx, %rbx
setne %al
testq %r15, %r15
sete %r10b
testb %al, %r10b
jne 0x4b807
testq %r15, %r15
sete %al
testq %rbx, %rbx
setne %r10b
orb %al, %r10b
cmpb $0x1, %r10b
jne 0x4b81b
movq 0xd8(%rsp), %r12
movq 0xd0(%rsp), %r13
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %r10
movl 0x10(%rdi), %r11d
movl 0x1c(%rdi), %r14d
testq %r9, %r9
pushq $-0x1
popq %rdi
cmovnsq %r9, %rdi
xorpd %xmm1, %xmm1
movupd %xmm1, 0x80(%rsp)
movq %r12, 0x50(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %r13, (%rsp)
movq %rdi, 0x78(%rsp)
movq $0x100, 0x70(%rsp)      # imm = 0x100
movq $0x3ff, 0x68(%rsp)      # imm = 0x3FF
andq $0x0, 0x48(%rsp)
movq $0xc00, 0x60(%rsp)      # imm = 0xC00
movq %r11, %rdi
movq %r14, %rsi
movq %r10, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4a3ee
testq %rax, %rax
je 0x4b820
movslq 0x2c(%r12), %rbx
jmp 0x4b807
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rbx
jmp 0x4b807
cmpq $0x200, %r15            # imm = 0x200
jg 0x4b837
cmpq %rbx, %r15
cmovgq %r15, %rbx
cvtsi2sd %rbx, %xmm0
jmp 0x4b86d
cmpq %rbx, %r15
cmovlq %r15, %rbx
cvtsi2sd %rbx, %xmm1
cvtsi2sd %r15, %xmm2
mulsd 0x197d48(%rip), %xmm2   # 0x1e3598
addsd 0x197a48(%rip), %xmm2   # 0x1e32a0
movapd %xmm2, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
cvttsd2si %xmm0, %rbx
jmp 0x4b807
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: prt_aln_w(overlap_region*)
void prt_aln_w(overlap_region *o)
{
    uint64_t k;
    for (k = 0; k < o->w_list.n; k++) {
        fprintf(stderr, "[M::%s::aln->%u] q::[%d, %d), t::[%d, %d), err::%d\n", 
            __func__, ((o->w_list.a[k].y_end != -1) && (!(is_ualn_win(o->w_list.a[k])))), 
            o->w_list.a[k].x_start, o->w_list.a[k].x_end+1, 
            o->w_list.a[k].y_start, o->w_list.a[k].y_end+1, o->w_list.a[k].error);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1991c9(%rip), %r14    # 0x1e74c8
leaq 0x1991f6(%rip), %r15    # 0x1e74fc
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq 0x48(%rbx), %rbp
jae 0x4e397
movq 0x58(%rbx), %rax
movl 0xc(%rax,%r13), %r10d
xorl %ecx, %ecx
movzwl 0x14(%rax,%r13), %edx
cmpl $-0x1, %r10d
je 0x4e34e
pushq $0x1
popq %rcx
cmpw $0x7fff, %dx            # imm = 0x7FFF
jne 0x4e34e
movw $0x7fff, %dx            # imm = 0x7FFF
cmpl $0x0, 0x1c(%rax,%r13)
jne 0x4e34e
xorl %ecx, %ecx
cmpw $0x0, 0x12(%rax,%r13)
setns %cl
movq 0x204c8b(%rip), %rsi    # 0x252fe0
movq (%rsi), %rdi
movl (%rax,%r13), %r8d
movl 0x4(%rax,%r13), %r9d
incl %r9d
movl 0x8(%rax,%r13), %r11d
incl %r10d
movswl %dx, %r12d
subq $0x8, %rsp
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
pushq %r12
pushq %r10
pushq %r11
callq 0x22b0
addq $0x20, %rsp
incq %rbp
addq $0x20, %r13
jmp 0x4e30b
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: print_aln_windows(overlap_region*)
void print_aln_windows(overlap_region *z)
{
    uint64_t k;
    for (k = 0; k < z->w_list.n; k++) {
        fprintf(stderr, "[M::%s::] q::[%u, %u), t::[%u, %u), err::%d\n", __func__, 
                z->w_list.a[k].x_start, z->w_list.a[k].x_end+1, 
                z->w_list.a[k].y_start, z->w_list.a[k].y_end+1,
                z->w_list.a[k].error);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2040f6(%rip), %r12    # 0x252fe0
leaq 0x198719(%rip), %r14    # 0x1e760a
leaq 0x19873f(%rip), %r15    # 0x1e7637
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq 0x48(%rbx), %rbp
jae 0x4ef46
movq (%r12), %rdi
movq 0x58(%rbx), %rax
movl (%rax,%r13), %ecx
movl 0x4(%rax,%r13), %r8d
incl %r8d
movl 0x8(%rax,%r13), %r9d
movl 0xc(%rax,%r13), %r10d
incl %r10d
movswl 0x14(%rax,%r13), %r11d
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
incq %rbp
addq $0x20, %r13
jmp 0x4eefd
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: append_cigar(window_list*, window_list_alloc*, unsigned short, unsigned int)
void append_cigar(window_list *idx, window_list_alloc *res, uint16_t c, uint32_t l)
{
    if(l <= 0) return;
    uint16_t c0 = (uint16_t)-1; uint32_t l0 = 0; 
    ///last item of old cigar
    if(idx->clen > 0) {
        c0 = (res->c.a[res->c.n-1]>>14); 
        l0 = (res->c.a[res->c.n-1]&(0x3fff));
    }
    ///first item of new cigar
    if(c0 == c) {l += l0; res->c.n--; idx->clen--;}

    push_trace(((asg16_v *)(&(res->c))), c, l); 
    idx->clen = res->c.n-idx->cidx;
}

// Assembly:
testl %ecx, %ecx
je 0x4fe33
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1c(%rdi), %eax
testl %eax, %eax
je 0x4fdfc
movq 0x18(%r14), %rsi
movq 0x28(%r14), %rdi
movzwl -0x2(%rdi,%rsi,2), %edi
movl %edi, %r8d
shrl $0xe, %r8d
andl $0x3fff, %edi           # imm = 0x3FFF
jmp 0x4fe04
xorl %edi, %edi
movl $0xffff, %r8d           # imm = 0xFFFF
movzwl %dx, %esi
cmpl %esi, %r8d
jne 0x4fe17
decq 0x18(%r14)
addl %edi, %ecx
decl %eax
movl %eax, 0x1c(%rbx)
leaq 0x18(%r14), %rdi
movl %ecx, %edx
callq 0x62885
movl 0x18(%r14), %eax
subl 0x18(%rbx), %eax
movl %eax, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: ajust_end_cigar(window_list*, window_list_alloc*)
uint16_t ajust_end_cigar(window_list *idx, window_list_alloc *res)
{
    uint16_t *ca = res->c.a+idx->cidx, p, rr = 0; int64_t ci, cn = idx->clen, op, cl;
    if(cn <= 0) return rr;
    for (ci = 0; ci < cn; ci++) {
        op = ca[ci]>>14; cl = (ca[ci]&(0x3fff)); 
        if(op != 1) break;
        p = 3; p <<= 14; p += cl; ca[ci] = p; idx->y_start += cl; rr = 1;
    }

    for (ci = cn-1; ci >= 0; ci--) {
        op = ca[ci]>>14; cl = (ca[ci]&(0x3fff)); 
        if(op != 1) break;
        p = 3; p <<= 14; p += cl; ca[ci] = p; idx->y_end -= cl; rr = 1;
    }

    // if(rr) fprintf(stderr, "[M::%s] rr::%u\n", __func__, rr);

    return rr;
}

// Assembly:
movl 0x1c(%rdi), %ecx
testq %rcx, %rcx
je 0x50479
movq 0x28(%rsi), %rdx
movl 0x18(%rdi), %esi
leaq (%rdx,%rsi,2), %r8
xorl %eax, %eax
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x50438
movzwl (%r8,%r9,2), %r10d
movl %r10d, %r11d
andl $0xc000, %r11d          # imm = 0xC000
cmpl $0x4000, %r11d          # imm = 0x4000
jne 0x50438
movl %r10d, %eax
andl $0x3fff, %eax           # imm = 0x3FFF
orl $0xc000, %r10d          # imm = 0xC000
movw %r10w, (%r8,%r9,2)
addl %eax, 0x8(%rdi)
incq %r9
movw $0x1, %ax
jmp 0x503fb
leaq (%rdx,%rsi,2), %rdx
addq $-0x2, %rdx
testq %rcx, %rcx
jle 0x5047b
movzwl (%rdx,%rcx,2), %esi
movl %esi, %r8d
andl $0xc000, %r8d           # imm = 0xC000
cmpl $0x4000, %r8d           # imm = 0x4000
jne 0x5047b
movl %esi, %eax
andl $0x3fff, %eax           # imm = 0x3FFF
orl $0xc000, %esi           # imm = 0xC000
movw %si, (%rdx,%rcx,2)
subl %eax, 0xc(%rdi)
decq %rcx
movw $0x1, %ax
jmp 0x50440
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: is_ovlp_debug(long, long, long, long, long)
uint32_t is_ovlp_debug(int64_t s, int64_t e, int64_t ws, int64_t we, int64_t op)
{
    int64_t os, oe, ovlp;
    os = MAX(s, ws); oe = MIN(e, we);
    ovlp = ((oe>os)? (oe-os):0); 
    if(op != 2) {
        return (!!ovlp);
    } else {
        if(ws >= s && we <= e) return 1;
    }
    return 0;
}

// Assembly:
cmpq $0x2, %r8
jne 0x509de
cmpq %rdi, %rdx
setge %dl
cmpq %rsi, %rcx
setle %al
andb %dl, %al
jmp 0x509f2
cmpq %rcx, %rsi
cmovlq %rsi, %rcx
cmpq %rdx, %rdi
cmovgq %rdi, %rdx
cmpq %rdx, %rcx
setg %al
movzbl %al, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_nkhits(Candidates_list*, overlap_region*)
uint64_t gen_nkhits(Candidates_list *cl, overlap_region *z)
{
    uint64_t pid, kn; int64_t k;
    pid = cl->list[z->shared_seed].readID;kn = 0;
    for (k = z->shared_seed; k < cl->length && cl->list[k].readID == pid; k++) kn++;
    return kn;
}

// Assembly:
movslq 0x24(%rsi), %rcx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
movl (%rax,%rsi), %edi
addq %rax, %rsi
xorl %eax, %eax
leaq (%rcx,%rax), %r8
cmpq %rdx, %r8
jge 0x51289
movl (%rsi), %r8d
xorl %edi, %r8d
testl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
jne 0x51289
incq %rax
addq $0x10, %rsi
jmp 0x51268
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: get_win_se_by_normalize_xs(overlap_region*, long, long, long*, long*)
inline void get_win_se_by_normalize_xs(overlap_region *z, int64_t norm_w_s, int64_t block_s, int64_t *w_s, int64_t *w_e)
{
    int64_t n_s = ((z->x_pos_s/block_s)*block_s), wid = (norm_w_s-n_s)/block_s;
    if(w_s) {
        (*w_s) = n_s + wid*block_s;        
        if((*w_s) < z->x_pos_s) (*w_s) = z->x_pos_s;
    }
    if(w_e) {
        (*w_e) = n_s + (wid+1)*block_s - 1;        
        if((*w_e) > z->x_pos_e) (*w_e) = z->x_pos_e;
    }
}

// Assembly:
movq %rdx, %r9
movq %rsi, %r10
movl 0x4(%rdi), %esi
movq %rsi, %rax
xorl %edx, %edx
idivq %r9
movq %rsi, %r11
subq %rdx, %r11
subq %r11, %r10
movq %r10, %rax
cqto
idivq %r9
testq %rcx, %rcx
je 0x51f6b
movq %rax, %rdx
imulq %r9, %rdx
addq %r11, %rdx
cmpq %rsi, %rdx
cmovleq %rsi, %rdx
movq %rdx, (%rcx)
testq %r8, %r8
je 0x51f8a
incq %rax
imulq %r9, %rax
addq %r11, %rax
decq %rax
movl 0x8(%rdi), %ecx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movq %rcx, (%r8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: get_win_id_by_s(overlap_region*, long, long, long*)
inline int64_t get_win_id_by_s(overlap_region *z, int64_t w_s, int64_t block_s, int64_t *w_e)
{
    int64_t n_s = ((z->x_pos_s/block_s)*block_s), wid = (w_s-n_s)/block_s;
    if(w_e) {
        (*w_e) = n_s + (wid+1)*block_s - 1;        
        if((*w_e) > z->x_pos_e) (*w_e) = z->x_pos_e;
    }
    return wid;
}

// Assembly:
movq %rdx, %r8
movq %rsi, %r9
movl 0x4(%rdi), %esi
movq %rsi, %rax
xorl %edx, %edx
idivq %r8
subq %rdx, %rsi
subq %rsi, %r9
movq %r9, %rax
cqto
idivq %r8
testq %rcx, %rcx
je 0x51fcc
movq %rax, %rdx
incq %rdx
imulq %r8, %rdx
addq %rsi, %rdx
decq %rdx
movl 0x8(%rdi), %esi
cmpq %rsi, %rdx
cmovlq %rdx, %rsi
movq %rsi, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: double_error_threshold(int, int)
inline int double_error_threshold(int pre_threshold, int x_len)
{

    pre_threshold = Adjust_Threshold(pre_threshold, x_len);
    int threshold = pre_threshold * 2;
    ///may have some bugs
    if(x_len >= 300 && threshold < THRESHOLD_MAX_SIZE)
    {
        threshold = THRESHOLD_MAX_SIZE;
    }
    
    if(threshold > THRESHOLD_MAX_SIZE)
    {
        threshold = THRESHOLD_MAX_SIZE;
    }

    return threshold;
}

// Assembly:
leal (%rdi,%rdi), %eax
cmpl $0x4, %esi
pushq $0x2
popq %rcx
cmovll %eax, %ecx
testl %edi, %edi
cmovnel %eax, %ecx
cmpl $0x20, %ecx
pushq $0x1f
popq %rdx
movl %edx, %eax
cmovgel %ecx, %eax
cmpl $0x12c, %esi            # imm = 0x12C
cmovll %ecx, %eax
cmpl $0x1f, %eax
cmovgel %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: double_ul_error_threshold(int, int)
inline int double_ul_error_threshold(int pre_threshold, int x_len)
{

    pre_threshold = Adjust_Threshold(pre_threshold, x_len);
    int threshold = THRESHOLD_UL_MAX * x_len;
    if(threshold < pre_threshold) threshold = pre_threshold;
    if(threshold > THRESHOLD_MAX_SIZE) threshold = THRESHOLD_MAX_SIZE;
    return threshold;
}

// Assembly:
cmpl $0x4, %esi
pushq $0x1
popq %rcx
cmovll %edi, %ecx
testl %edi, %edi
cmovnel %edi, %ecx
cvtsi2sd %esi, %xmm0
mulsd 0x190dc2(%rip), %xmm0   # 0x1e34d0
cvttsd2si %xmm0, %eax
cmpl %eax, %ecx
cmovlel %eax, %ecx
cmpl $0x1f, %ecx
pushq $0x1f
popq %rax
cmovll %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: get_Window(Window_Pool*, long long*, long long*)
inline int get_Window(Window_Pool* dumy, long long* w_beg, long long* w_end)
{   
    (*w_beg) = dumy->window_start;
    (*w_end) = dumy->window_end;

    if(dumy->window_end == dumy->read_length - 1)
    {
        if(dumy->terminal == 1 || dumy->read_length == 0)
        {
            return 0;
        }
        else if(dumy->terminal == 0)
        {
            dumy->terminal = 1;
        }
    }


    dumy->window_start = dumy->window_start + dumy->window_length;
    dumy->window_end = dumy->window_end + dumy->window_length;
    if (dumy->window_end >= dumy->read_length)
    {
        dumy->window_end = dumy->read_length - 1;
    }
    return 1;
}

// Assembly:
movq 0x18(%rdi), %rax
movq %rax, (%rsi)
movq 0x20(%rdi), %rcx
movq %rcx, (%rdx)
movq (%rdi), %rsi
leaq -0x1(%rsi), %rdx
cmpq %rdx, %rcx
jne 0x52761
movl 0x30(%rdi), %r8d
cmpl $0x1, %r8d
sete %r9b
testq %rsi, %rsi
sete %r10b
xorl %eax, %eax
orb %r9b, %r10b
jne 0x5277a
testl %r8d, %r8d
jne 0x52761
movl $0x1, 0x30(%rdi)
movq 0x8(%rdi), %rax
addq %rax, 0x18(%rdi)
addq %rax, %rcx
cmpq %rsi, %rcx
cmovlq %rcx, %rdx
movq %rdx, 0x20(%rdi)
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./POA.h
// Function: get_Edge_Weight(Graph*, Node*, Node*)
inline long long get_Edge_Weight(Graph* DAGCon, Node* inNode, Node* outNode)
{
    Edge* e_forward = NULL;
    Edge* e_backward = NULL;
    get_bi_Edge(DAGCon, inNode, outNode, &e_forward, &e_backward);
    return e_forward->weight;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq %rsp, %r8
andq $0x0, (%r8)
movq %rbx, %rcx
callq 0x1871a
movq (%rbx), %rax
movq 0x10(%rax), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./POA.h
// Function: delete_Node_DAGCon(Graph*, Node*)
uint64_t inline delete_Node_DAGCon(Graph* g, Node* node)
{
    g->g_nodes.delete_length++;
    g->g_nodes.list[(*node).ID].base = 'D';
    g->g_nodes.list[(*node).ID].num_insertions = (uint64_t)-1;
    g->g_nodes.list[(*node).ID].weight = (uint64_t)-1;


    RSet iter;
    Edge* e;
    clear_RSet(&iter);
    while (getOutputEdges(&iter, g, node, &e))
    {
        remove_and_check_bi_direction_edge_from_edge(g, e);
    }

    clear_RSet(&iter);
    while (getInputEdges(&iter, g, node, &e))
    {
        remove_and_check_bi_direction_edge_from_edge(g, e);
    }


    
    clear_Edge_alloc(&(g->g_nodes.list[(*node).ID].insertion_edges));
    clear_Edge_alloc(&(g->g_nodes.list[(*node).ID].mismatch_edges));
    clear_Edge_alloc(&(g->g_nodes.list[(*node).ID].deletion_edges));

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
incq 0x68(%rdi)
movq %rsi, %r14
movq 0x18(%rdi), %rax
movq (%rsi), %rcx
shlq $0x7, %rcx
movb $0x44, 0x18(%rax,%rcx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rax,%rcx)
leaq 0x10(%rsp), %r15
andq $0x0, (%r15)
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x52a35
testl %eax, %eax
je 0x52960
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1828e
jmp 0x5293c
leaq 0x10(%rsp), %r15
andq $0x0, (%r15)
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x18a44
testl %eax, %eax
je 0x52992
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1828e
jmp 0x5296e
movq 0x18(%rbx), %rax
movq (%r14), %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %rdi
addq $0x60, %rdi
callq 0x18054
movq 0x18(%rbx), %rax
movq (%r14), %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %rdi
addq $0x20, %rdi
callq 0x18054
movq 0x18(%rbx), %rax
movq (%r14), %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %rdi
addq $0x40, %rdi
callq 0x18054
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./POA.h
// Function: Pop_Node(Graph*, Node**)
inline int Pop_Node(Graph* DAGCon, Node** node)
{
    long long nodeID = 0;
    int return_flag = pop_from_Queue(&(DAGCon->node_q), &nodeID);

    (*node) = &(G_Node(*DAGCon, nodeID));
    return return_flag;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
addq $0x70, %rdi
movq %r15, %rsi
callq 0x637ed
movq (%r15), %rcx
shlq $0x7, %rcx
addq 0x18(%r14), %rcx
movq %rcx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./POA.h
// Function: extract_path(Graph*, int, int, char*)
inline void extract_path(Graph* backbone, int debug_node_in_backbone, int path_i, char* pre)
{
    int step = G_Node(*backbone, debug_node_in_backbone).insertion_edges.list[path_i].length;
    int string_i = 0, preNode = 0, j = 0;
    if(step != 0)
    {
        string_i = 0;
        preNode = G_Node(*backbone, debug_node_in_backbone).insertion_edges.list[path_i].out_node;
    
        for (j = 0; j < step; j++)
        {
            pre[string_i++] = G_Node(*backbone, preNode).base;
            preNode = G_Node(*backbone, preNode).insertion_edges.list[0].out_node;
        }
    }

    pre[string_i] = '\0';
}

// Assembly:
movq 0x18(%rdi), %r8
movslq %esi, %rax
shlq $0x7, %rax
movq 0x60(%r8,%rax), %rax
movslq %edx, %rdx
imulq $0x38, %rdx, %rdx
leaq (%rax,%rdx), %rsi
movl 0x20(%rax,%rdx), %edx
xorl %eax, %eax
testl %edx, %edx
je 0x52dcc
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x52dc9
movslq 0x8(%rsi), %rsi
shlq $0x7, %rsi
movb 0x18(%r8,%rsi), %r8b
movb %r8b, (%rcx,%rax)
incq %rax
movq 0x18(%rdi), %r8
movq 0x60(%r8,%rsi), %rsi
jmp 0x52da5
movq %rdx, %rax
movb $0x0, (%rcx,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: add_base_to_correct_read_directly(Correct_dumy*, char)
inline void add_base_to_correct_read_directly(Correct_dumy* dumy, char base)
{
  
    if (dumy->corrected_read_length + 2 > dumy->corrected_read_size)
    {
        dumy->corrected_read_size = dumy->corrected_read_size * 2;
        dumy->corrected_read = (char*)realloc(dumy->corrected_read, dumy->corrected_read_size);
    }
    
    dumy->corrected_read[dumy->corrected_read_length] = base;
    dumy->corrected_read_length++;
    dumy->corrected_read[dumy->corrected_read_length] = '\0';

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq 0x2(%rcx), %rdx
movq 0x18(%rdi), %rsi
cmpq %rsi, %rdx
jle 0x530b1
addq %rsi, %rsi
movq %rsi, 0x18(%rbx)
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
movb %bpl, (%rax,%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb $0x0, 0x1(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: add_segment_to_correct_read(Correct_dumy*, char*, long long)
inline void add_segment_to_correct_read(Correct_dumy* dumy, char* segment, long long segment_length)
{

    if (dumy->corrected_read_length + segment_length + 2 > dumy->corrected_read_size)
    {
        dumy->corrected_read_size = dumy->corrected_read_length + segment_length + 2;
        dumy->corrected_read = (char*)realloc(dumy->corrected_read, dumy->corrected_read_size);
    }

    memcpy(dumy->corrected_read + dumy->corrected_read_length, segment, segment_length);
    dumy->corrected_read_length += segment_length;
    dumy->corrected_read[dumy->corrected_read_length] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq (%rdx,%rdi), %rsi
addq $0x2, %rsi
cmpq 0x18(%r14), %rsi
jle 0x531eb
movq %rsi, 0x18(%r14)
movq %rax, %rdi
callq 0x2370
movq %rax, (%r14)
movq 0x8(%r14), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2160
addq 0x8(%r14), %rbx
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax,%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: get_available_fully_covered_interval(long long, long long, overlap_region_alloc*, Correct_dumy*, long long*, long long*)
inline int get_available_fully_covered_interval(long long window_start, long long window_end, 
overlap_region_alloc* overlap_list, Correct_dumy* dumy, long long* real_length, long long* real_length_100)
{
    long long i, fud = 0;
    long long Len;
    long long overlap_length;

    if(window_start == 0) dumy->start_i = 0;
    for (i = dumy->start_i; i < (long long)overlap_list->length; i++)
    {
        if (window_end < (long long)overlap_list->list[i].x_pos_s)
        {
            dumy->start_i = 0;
            return 0;
        }
        else 
        {
            dumy->start_i = i;
            break;
        }
    }


    if (i >= (long long)overlap_list->length)
    {
        dumy->start_i = overlap_list->length;
        return -2;
    }
    



    
    long long fake_length = 0;
    overlap_length = window_end - window_start + 1;
    (*real_length) = 0; fud = 0;

    for (; i < (long long)overlap_list->length; i++)
    {
        if((Len = OVERLAP(window_start, window_end, (long long)overlap_list->list[i].x_pos_s, (long long)overlap_list->list[i].x_pos_e)) > 0)
        {
            fake_length++;

            if (overlap_length == Len && overlap_list->list[i].is_match == 1)
            {
                (*real_length)++;
            }

            if (overlap_length == Len && overlap_list->list[i].is_match == 100)
            {
                (*real_length_100)++;
            }
            if(fud == 0) fud = 1, dumy->start_i = i;
        }
        
        if((long long)overlap_list->list[i].x_pos_s > window_end)
        {
            break;
        }
    }

    if (fake_length == 0)
    {
        return 0;
    }
    else
    {
        return 1;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x53219
movq 0x48(%rcx), %rax
jmp 0x53220
andq $0x0, 0x48(%rcx)
xorl %eax, %eax
movq 0x10(%rdx), %r10
cmpq %r10, %rax
jge 0x53253
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdx), %r11
imulq $0xa8, %rax, %rbx
movl 0x4(%r11,%rbx), %edx
cmpq %rsi, %rdx
jle 0x5325d
andq $0x0, 0x48(%rcx)
xorl %eax, %eax
jmp 0x532e3
movq %r10, 0x48(%rcx)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
movq %rsi, %rdx
subq %rdi, %rdx
andq $0x0, (%r8)
addq %rbx, %r11
addq $0x4, %r11
xorl %r15d, %r15d
movabsq $0x1, %r14
xorl %ebx, %ebx
cmpq %r10, %rax
jge 0x532db
movl (%r11), %r12d
movl 0x4(%r11), %r13d
cmpq %rsi, %r13
cmovaeq %rsi, %r13
cmpq %rdi, %r12
movq %rdi, %rbp
cmovgq %r12, %rbp
subq %rbp, %r13
js 0x532cc
cmpq %r13, %rdx
jne 0x532bd
movzbl 0x28(%r11), %ebp
movq %r8, %r13
cmpl $0x1, %ebp
je 0x532b9
cmpl $0x64, %ebp
jne 0x532bd
movq %r9, %r13
incq (%r13)
incq %rbx
testq %r15, %r15
jne 0x532c9
movq %rax, 0x48(%rcx)
movq %r14, %r15
incq %rax
addq $0xa8, %r11
cmpq %rsi, %r12
jle 0x5327d
xorl %eax, %eax
testq %rbx, %rbx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: addHaplotypeEvdience(haplotype_evdience_alloc*, haplotype_evdience*, void*)
inline void addHaplotypeEvdience(haplotype_evdience_alloc* h, haplotype_evdience* ev, void *km)
{
    if(h->length + 1 > h->size){
        h->size = h->length + 1;
        kroundup32(h->size);
        if(!km) REALLOC(h->list, h->size);
        else KREALLOC(km, h->list, h->size);
        // h->list = (haplotype_evdience*)realloc(h->list, sizeof(haplotype_evdience)*h->size);
    }

    h->list[h->length] = (*ev);
    h->length++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x10(%rdi), %eax
leal 0x1(%rax), %ecx
cmpl 0x14(%rdi), %ecx
jbe 0x53343
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x14(%rbx)
imulq $0x18, %rcx, %rax
movq (%rbx), %rsi
testq %rdx, %rdx
je 0x53348
movq %rdx, %rdi
movq %rax, %rdx
callq 0x1a3acc
jmp 0x53353
movq (%rbx), %rax
jmp 0x53356
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2370
movq %rax, (%rbx)
movl 0x10(%rbx), %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%r14), %xmm0
movups %xmm0, (%rax,%rcx)
incl 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: insert_SNP_IDs_addition(Snp_ID_Vector_Alloc*, unsigned int*, int)
inline void insert_SNP_IDs_addition(Snp_ID_Vector_Alloc* SNP_IDs, uint32_t* IDs_vec, int IDs_vec_length)
{
    if(SNP_IDs->IDs_length + 1 > SNP_IDs->IDs_size)
    {
        SNP_IDs->IDs_size = SNP_IDs->IDs_size * 2;
        SNP_IDs->IDs = (Snp_ID_Vector*)realloc(SNP_IDs->IDs, SNP_IDs->IDs_size * sizeof(Snp_ID_Vector));
    }
    SNP_IDs->IDs[SNP_IDs->IDs_length].beg = SNP_IDs->buffer_length;
    SNP_IDs->IDs[SNP_IDs->IDs_length].end = SNP_IDs->buffer_length + IDs_vec_length - 1;


    if(SNP_IDs->buffer_length + IDs_vec_length > SNP_IDs->buffer_size)
    {
        SNP_IDs->buffer_size = (SNP_IDs->buffer_length + IDs_vec_length) * 2;
        SNP_IDs->buffer = (uint32_t*)realloc(SNP_IDs->buffer, SNP_IDs->buffer_size * sizeof(uint32_t));
    }
    memcpy(SNP_IDs->buffer + SNP_IDs->buffer_length, IDs_vec, IDs_vec_length*sizeof(uint32_t));


    SNP_IDs->IDs_length++;
    SNP_IDs->buffer_length += IDs_vec_length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
cmpq %rax, %rdx
jge 0x5360c
movq 0x18(%rbx), %rax
jmp 0x53628
leaq (%rax,%rax), %rcx
movq %rcx, (%rbx)
movq 0x18(%rbx), %rdi
imulq $0x38, %rax, %rsi
callq 0x2370
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rdx
movq 0x28(%rbx), %rcx
imulq $0x1c, %rdx, %rdx
movl %ecx, (%rax,%rdx)
movslq %ebp, %r15
leal (%r15,%rcx), %esi
decl %esi
movl %esi, 0x4(%rax,%rdx)
leaq (%rcx,%r15), %rsi
cmpq 0x20(%rbx), %rsi
jle 0x53669
leaq (%rsi,%rsi), %rax
movq %rax, 0x20(%rbx)
movq 0x30(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x30(%rbx)
movq 0x28(%rbx), %rcx
jmp 0x5366d
movq 0x30(%rbx), %rax
leaq (%rax,%rcx,4), %rdi
leaq (,%r15,4), %rdx
movq %r14, %rsi
callq 0x2160
incq 0x8(%rbx)
addq %r15, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Correct.h
// Function: calculate_score(int, int)
inline int calculate_score(int new_occ_0, int new_occ_1)
{
    if(new_occ_0 + new_occ_1 == 0)
    {
        return -1;
    }

    if(filter_snp(new_occ_0, new_occ_1, new_occ_0 + new_occ_1) == 0)
    {
        return -1;
    }

    double consensus = new_occ_0 + new_occ_1 - abs(new_occ_0 - new_occ_1);

    consensus = consensus /((double)(new_occ_0 + new_occ_1));

    ///50% vs 50%
    if(new_occ_0 == new_occ_1)
    {
        consensus = consensus + 0.25;
    }
    else if(consensus >= 0.8)
    {
        consensus = consensus + 0.2;
    }
    else if(consensus >= 0.6)
    {
        consensus = consensus + 0.15;
    }
    else if(consensus >= 0.4)
    {
        consensus = consensus + 0.1;
    }
    else if(consensus >= 0.2)
    {
        consensus = consensus + 0.05;
    }
    

    consensus= consensus*((double)(new_occ_0 + new_occ_1));

    return consensus;
}

// Assembly:
movl %esi, %ecx
pushq $-0x1
popq %rax
addl %edi, %ecx
je 0x53714
movl %edi, %edx
subl %esi, %edx
movl %esi, %r8d
cmovll %edi, %r8d
cvtsi2sd %r8d, %xmm1
cvtsi2sd %ecx, %xmm0
divsd %xmm0, %xmm1
movsd 0x18f500(%rip), %xmm2   # 0x1e2c00
ucomisd %xmm1, %xmm2
jb 0x53715
movsd 0x18fdea(%rip), %xmm2   # 0x1e34f8
ucomisd %xmm1, %xmm2
jbe 0x53715
retq
movl %edx, %eax
negl %eax
cmovnsl %edx, %eax
addl %eax, %ecx
cvtsi2sd %ecx, %xmm1
divsd %xmm0, %xmm1
cmpl %esi, %edi
jne 0x53734
addsd 0x18fdee(%rip), %xmm1   # 0x1e3520
jmp 0x53782
ucomisd 0x18fdc4(%rip), %xmm1   # 0x1e3500
jae 0x53766
ucomisd 0x18fd92(%rip), %xmm1   # 0x1e34d8
jae 0x53770
ucomisd 0x18fdc0(%rip), %xmm1   # 0x1e3510
jae 0x5377a
ucomisd 0x18fd76(%rip), %xmm1   # 0x1e34d0
jb 0x53782
addsd 0x18fdb4(%rip), %xmm1   # 0x1e3518
jmp 0x53782
addsd 0x18fd62(%rip), %xmm1   # 0x1e34d0
jmp 0x53782
addsd 0x18fd90(%rip), %xmm1   # 0x1e3508
jmp 0x53782
addsd 0x18f46e(%rip), %xmm1   # 0x1e2bf0
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
retq