LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: push_replace_alnw(overlap_region*, int, long, long, long, long)
void push_replace_alnw(overlap_region *aux_o, int32_t qs, int64_t qe, int64_t ts, int64_t te, int64_t mode)
{
    window_list *p = NULL;
    kv_pushp(window_list, aux_o->w_list, &p);
    p->x_start = qs; p->x_end = qe;
    p->y_start = ts; p->y_end = te;
    p->error_threshold = mode; p->error = 0;
    p->extra_begin = p->extra_end = 0;
    p->cidx = p->clen = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jne 0x60ea0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x60e65
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x60e70
movl $0x2, %eax
movq %rax, -0x40(%rbp)
jmp 0x60e70
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x48(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x48(%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x38(%rbp), %rax
movw $0x0, 0x14(%rax)
movq -0x38(%rbp), %rax
movw $0x0, 0x12(%rax)
movq -0x38(%rbp), %rax
movw $0x0, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x18(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: set_exact_exz(bit_extz_t*, long, long, long, long)
void set_exact_exz(bit_extz_t *exz, int64_t qs, int64_t qe, int64_t ts, int64_t te)
{
    clear_align(*exz); exz->thre = 0; exz->cigar.n = 0;
    exz->err = 0; push_trace(&(exz->cigar), 0, qe - qs);
    exz->pl = te - ts; exz->ps = 0; exz->pe = exz->pl-1;
    exz->tl = qe - qs; exz->ts = 0; exz->te = exz->tl-1;
    exz->ps += ts; exz->pe += ts;
    exz->ts += qs; exz->te += qs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl $0x7fffffff, 0x2c(%rax) # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rdi
addq $0xa8, %rdi
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
movl %eax, %edx
xorl %esi, %esi
callq 0xc1070
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq 0x1c(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq 0x20(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x20(%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: prt_k_mer_hit(k_mer_hit*, long)
void prt_k_mer_hit(k_mer_hit *ch_a, int64_t ch_n)
{
    int64_t k;
    for (k = 0; k < ch_n; k++) {
        fprintf(stderr, "[M::%s::k->%ld] q_pos::%u, t_pos::%u, cnt::%u, cov::%u\n", 
        __func__, k, ch_a[k].self_offset, ch_a[k].offset, ch_a[k].cnt, ch_a[k].readID);
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x62981
movq 0x3616e3(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl 0x8(%rax), %r8d
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl 0x4(%rax), %r9d
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl 0xc(%rax), %r10d
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x320f93(%rip), %rsi    # 0x3838ed
leaq 0x320fc4(%rip), %rdx    # 0x383925
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x628e8
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: debug_iter_k_mer_hit(k_mer_hit*, long, unsigned long, unsigned long, long, long)
void debug_iter_k_mer_hit(k_mer_hit *ch_a, int64_t ch_n, uint64_t s, uint64_t e, int64_t ibeg, int64_t iend)
{
    int64_t i, beg = -1, end = -1;
    for (i = 0; i < ch_n; i++) {
        if((ch_a[i].self_offset >= s) && (ch_a[i].self_offset < e)) {
            if(beg == -1) beg = i;
            end = i+1;
        }
    }
    assert(ibeg==beg && iend==end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $-0x1, -0x40(%rbp)
movq $-0x1, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x62a2d
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x18(%rbp), %rax
jb 0x62a1d
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x20(%rbp), %rax
jae 0x62a1d
cmpq $-0x1, -0x40(%rbp)
jne 0x62a11
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x62a1f
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x629c8
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x49(%rbp)
jne 0x62a4a
movq -0x30(%rbp), %rax
cmpq -0x48(%rbp), %rax
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x62a53
jmp 0x62a55
jmp 0x62a74
leaq 0x320ed7(%rip), %rdi    # 0x383933
leaq 0x31f8b8(%rip), %rsi    # 0x38231b
movl $0x3ff7, %edx           # imm = 0x3FF7
leaq 0x320edb(%rip), %rcx    # 0x38394a
callq 0x2130
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: query_gen_gov_idx(asg64_v*, unsigned long, unsigned long)
uint64_t query_gen_gov_idx(asg64_v *ovidx, uint64_t v, uint64_t w)
{
    uint64_t m, s, e;
    if(v > w) {
        m = v; v = w; w = m;
    }
    s = ovidx->a[v]>>32; e = s + (uint32_t)ovidx->a[v];
    for (m = s; m < e; m++) {
        if(ovidx->a[m] == w) return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x6bf32
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x6bfa9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x20(%rbp), %rax
jne 0x6bf99
movq $0x1, -0x8(%rbp)
jmp 0x6bfb1
jmp 0x6bf9b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6bf6f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: push_sec_aln(overlap_region*, long, long, long)
void push_sec_aln(overlap_region *z, int64_t s, int64_t e, int64_t sec_err)
{
    window_list *p;
    if(z->align_length > 0) {
        p = z->w_list.a + z->w_list.n + z->align_length - 1;
        if((p->x_end == s) && ((!!(p->clen)) == (!!sec_err))) {
            p->x_end = e; p->clen += sec_err;
            return;
        }
    }
    if((z->w_list.n+z->align_length)==z->w_list.m) {
        z->w_list.m = z->w_list.m? z->w_list.m<<1 : 2; 
        z->w_list.a = (window_list*)realloc(z->w_list.a, sizeof(window_list)*z->w_list.m); 
    }
    p = &(z->w_list.a[z->w_list.n+z->align_length]); z->align_length++; memset(p, 0, sizeof((*p)));
    p->x_start = s; p->x_end = e; p->clen += sec_err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jbe 0x6c072
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x28(%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
addq $-0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq 0x4(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x6c070
movq -0x28(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x0, -0x20(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x6c070
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x1c(%rax)
jmp 0x6c151
jmp 0x6c072
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x28(%rcx), %ecx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jne 0x6c0e5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x6c0aa
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
shlq %rax
movq %rax, -0x30(%rbp)
jmp 0x6c0b5
movl $0x2, %eax
movq %rax, -0x30(%rbp)
jmp 0x6c0b5
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x28(%rdx), %edx
addq %rdx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2100
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x1c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: is_mask_ov(mask_ul_ov_t*, unsigned long*, unsigned long, unsigned long)
uint64_t is_mask_ov(mask_ul_ov_t *mk, uint64_t *bes_id, uint64_t bes_n, uint64_t sec_id)
{
    uint64_t s = mk->idx.a[sec_id]>>32, e = (uint32_t)(mk->idx.a[sec_id]), bk, si;
    bk = 0; si = s;
    while (bk < bes_n && si < e) {
        if (bes_id[bk] < mk->srt.a[si].tn) {
            bk++;
        } else if(mk->srt.a[si].tn < bes_id[bk]) {
            si++;
        } else {///bes_id[bk] == mk->srt.a[si].tn
            if(!(mk->srt.a[si].qs)) return 1;
            return 0;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x49(%rbp)
jae 0x70dff
movq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
setb %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x70e0b
jmp 0x70e9d
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
imulq $0x1c, -0x48(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x70e3d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x70e98
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
imulq $0x1c, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x70e6c
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x70e96
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
imulq $0x1c, -0x48(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x70e8c
movq $0x1, -0x8(%rbp)
jmp 0x70ea5
movq $0x0, -0x8(%rbp)
jmp 0x70ea5
jmp 0x70e98
jmp 0x70de2
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: convert_ul_ov_t(ul_ov_t*, overlap_region*, ma_ug_t*)
void convert_ul_ov_t(ul_ov_t *des, overlap_region *src, ma_ug_t *ug)
{
	des->qn = (uint32_t)-1; des->qs = src->x_pos_s; des->qe = src->x_pos_e+1;
    des->tn = src->y_id; des->el = 1; des->rev = src->y_pos_strand;
    des->sec = src->non_homopolymer_errors;
	if(des->rev) {
		des->ts = ug->u.a[des->tn].len - (src->y_pos_e+1); 
		des->te = ug->u.a[des->tn].len - src->y_pos_s;
	} else {
		des->ts = src->y_pos_s; 
		des->te = src->y_pos_e+1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x721e9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
subl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x72208
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: check_connect_ug(ul_idx_t const*, unsigned int, unsigned int, long, double, long)
uint64_t check_connect_ug(const ul_idx_t *uref, uint32_t v, uint32_t w, int64_t bw, double diff_ec_ul, int64_t dq)
{
	const asg_t *g = uref?uref->ug->g:NULL; int64_t dt = -1;
	uint32_t nv = asg_arc_n(g, v), i; asg_arc_t *av = asg_arc_a(g, v);
	for (i = 0; i < nv; i++) {
		if(av[i].del || av[i].v != w) continue;
		dt = av[i].ol; 
		break;
	}
	if(dt < 0) return 0;
	int64_t diff = (dq>dt? dq-dt:dt-dq), mm = MAX(dq, dt);
	mm *= diff_ec_ul; if(mm < bw) mm = bw;
	if(diff <= mm) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x72243
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x7224b
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x7224b
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $-0x1, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0x722fc
movq -0x50(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x722d1
movq -0x50(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x18(%rbp), %eax
je 0x722d3
jmp 0x722f1
movq -0x50(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x722fc
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x7229a
cmpq $0x0, -0x40(%rbp)
jge 0x72310
movq $0x0, -0x8(%rbp)
jmp 0x723a6
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jle 0x72328
movq -0x30(%rbp), %rax
subq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x72334
movq -0x40(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jl 0x72350
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x72358
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movsd -0x28(%rbp), %xmm1
cvtsi2sdq -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x7238a
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jg 0x7239e
movq $0x1, -0x8(%rbp)
jmp 0x723a6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: govlp_check(ul_idx_t const*, ug_opt_t const*, long, double, ul_ov_t*, ul_ov_t*)
uint32_t govlp_check(const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, double diff_ec_ul, ul_ov_t *li, ul_ov_t *lj)
{
	int64_t qo = infer_rovlp(li, lj, NULL, NULL, /**ridx**/NULL, uref->ug); ///overlap length in query (UL read)
	
	// fprintf(stderr, "+++[M::%s::utg%.6dl->utg%.6dl] qo::%ld\n", __func__, (int32_t)li->tn+1, (int32_t)lj->tn+1, qo);
	if(check_connect_ug(uref, ((li->tn<<1)|li->rev)^1, ((lj->tn<<1)|lj->rev)^1, bw, diff_ec_ul, qo)) return 1;
	// fprintf(stderr, "[M::%s::] check_connect_ug fail\n", __func__);
	if(check_connect_rg(uref, uopt, ((li->tn<<1)|li->rev)^1, ((lj->tn<<1)|lj->rev)^1, bw, diff_ec_ul, qo)) return 1;
	// fprintf(stderr, "[M::%s::] check_connect_rg fail\n", __func__);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %r9
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x71a90
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0xc(%rax), %esi
shll %esi
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
orl %eax, %esi
xorl $0x1, %esi
movq -0x38(%rbp), %rax
movl 0xc(%rax), %edx
shll %edx
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
orl %eax, %edx
xorl $0x1, %edx
movq -0x20(%rbp), %rcx
movsd -0x28(%rbp), %xmm0
movq -0x40(%rbp), %r8
callq 0x72210
cmpq $0x0, %rax
je 0x72b39
movl $0x1, -0x4(%rbp)
jmp 0x72b99
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movl 0xc(%rax), %edx
shll %edx
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
orl %eax, %edx
xorl $0x1, %edx
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ecx
shll %ecx
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
orl %eax, %ecx
xorl $0x1, %ecx
movq -0x20(%rbp), %r8
movsd -0x28(%rbp), %xmm0
movq -0x40(%rbp), %r9
callq 0x723b0
cmpq $0x0, %rax
je 0x72b92
movl $0x1, -0x4(%rbp)
jmp 0x72b99
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: prt_overlap_region_phase_stat(overlap_region*, long)
void prt_overlap_region_phase_stat(overlap_region *z, int64_t sid)
{
    uint64_t k = 0;
    fprintf(stderr, "[M::%s::utg%.6dl::%c] sid::%ld, q::[%d, %d), t::[%d, %d)\n", __func__, 
        (int32_t)z->y_id+1, "+-"[z->y_pos_strand], sid, z->x_pos_s, z->x_pos_e+1, z->y_pos_s, z->y_pos_e+1);
    for (k = 0; k < z->w_list.n; k++) {
        fprintf(stderr, "[k::%lu] sid::%ld, q::[%d, %d), sec::%u\n", k, sid,
        z->w_list.a[k].x_start, z->w_list.a[k].x_end, z->w_list.a[k].clen);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq 0x350a80(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, %edx
leaq 0x30f91e(%rip), %rax    # 0x382e9b
movsbl (%rax,%rdx), %r8d
movq -0x18(%rbp), %r9
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ebx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r11d
addl $0x1, %r11d
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r10d
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
leaq 0x3116f7(%rip), %rsi    # 0x384ca9
leaq 0x31172a(%rip), %rdx    # 0x384ce3
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x7365e
movq 0x3509f2(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movl (%rax), %r8d
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movl 0x4(%rax), %r9d
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movl 0x1c(%rax), %eax
leaq 0x3116be(%rip), %rsi    # 0x384d01
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x735d9
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: debug_snp_site(overlap_region*, All_reads*, UC_Read*, haplotype_evdience*, long)
void debug_snp_site(overlap_region* ol, All_reads *rref, UC_Read *qu, haplotype_evdience *a, int64_t a_n)
{
    int64_t k; char ystr; 
    for (k = 0; k < a_n; k++) {
        recover_UC_Read_sub_region(&ystr, a[k].overlapSite, 1, ol[a[k].overlapID].y_pos_strand, rref, ol[a[k].overlapID].y_id);
        // if(a[k].misBase == ystr) fprintf(stderr, "[M::%s] misBase::%c\tystr::%c\n", __func__, a[k].misBase, ystr);
        assert(a[k].misBase == ystr);
        if(a[k].type == 0) {
            assert(qu->seq[a[k].site] == ystr);
        } else {
            assert(qu->seq[a[k].site] != ystr);
        }
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x75494
movq -0x20(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
imulq $0x18, -0x30(%rbp), %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %r8
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rdx
imulq $0x18, -0x30(%rbp), %rdi
addq %rdi, %rdx
movl 0x4(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
movl %ecx, %r9d
leaq -0x31(%rbp), %rdi
movl $0x1, %edx
movzbl %al, %ecx
callq 0x9a30
movq -0x20(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rcx
addq %rcx, %rax
movsbl 0x14(%rax), %eax
movsbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jne 0x753c5
jmp 0x753e4
leaq 0x30fa98(%rip), %rdi    # 0x384e64
leaq 0x30cf48(%rip), %rsi    # 0x38231b
movl $0x4c6a, %edx           # imm = 0x4C6A
leaq 0x30fa9a(%rip), %rcx    # 0x384e79
callq 0x2130
movq -0x20(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
cmpl $0x0, %eax
jne 0x7543d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
imulq $0x18, -0x30(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
movsbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7541c
jmp 0x7543b
leaq 0x30fab3(%rip), %rdi    # 0x384ed6
leaq 0x30cef1(%rip), %rsi    # 0x38231b
movl $0x4c6c, %edx           # imm = 0x4C6C
leaq 0x30fa43(%rip), %rcx    # 0x384e79
callq 0x2130
jmp 0x75481
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
imulq $0x18, -0x30(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
movsbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
je 0x75460
jmp 0x7547f
leaq 0x30fa8a(%rip), %rdi    # 0x384ef1
leaq 0x30cead(%rip), %rsi    # 0x38231b
movl $0x4c6e, %edx           # imm = 0x4C6E
leaq 0x30f9ff(%rip), %rcx    # 0x384e79
callq 0x2130
jmp 0x75481
jmp 0x75483
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x75334
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: is_get_group(ul_ov_t*, unsigned long*, unsigned long*, unsigned long, unsigned long)
uint64_t is_get_group(ul_ov_t *a/**, uint64_t an, uint64_t rid**/, uint64_t *ga, uint64_t *ia, uint64_t gi, uint64_t tn)
{
    // fprintf(stderr, "+[M::%s] gi::%lu\n", __func__, gi);
    uint64_t k = ga[gi]>>32;
    // while ((k != ((uint64_t)-1)) && (a[k].tn != tn)) {
    //     fprintf(stderr, "+[M::%s] k::%lu\n", __func__, k);
    //     k = ia[k];
    //     fprintf(stderr, "-[M::%s] k::%lu\n", __func__, k);
    // }
    for (k = ga[gi]>>32; (k != ((uint64_t)-1)) && (a[k].tn != tn); k = ia[k]);
    // if((k != ((uint32_t)-1)) && (k >= an)) {
    //     fprintf(stderr, "-[M::%s] rid::%lu, an::%lu, k::%lu\n", __func__, rid, an, k);
    // }
    if((k != ((uint64_t)-1)) && (a[k].tn == tn)) return 0;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x38(%rbp)
movb %al, -0x39(%rbp)
je 0x76955
movq -0x10(%rbp), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpq -0x30(%rbp), %rax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x7695e
jmp 0x76972
jmp 0x76960
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x76930
cmpq $-0x1, -0x38(%rbp)
je 0x76998
movq -0x10(%rbp), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpq -0x30(%rbp), %rax
jne 0x76998
movq $0x0, -0x8(%rbp)
jmp 0x769a0
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/Correct.cpp
// Function: gen_aln_ul_ov_t(long, long, overlap_region*, ul_ov_t*)
int64_t gen_aln_ul_ov_t(int64_t in_id, int64_t tl, overlap_region *in, ul_ov_t *ou)
{
    int64_t zwn; memset(ou, 0, sizeof((*ou)));
    zwn = in->w_list.n; if(!zwn) return 0;

    ///in_id -> ovlp id
    ou->qn = in_id; ou->tn = in->y_id; 
    ou->rev = in->y_pos_strand;
    ou->qs = in->w_list.a[0].x_start;
    ou->qe = in->w_list.a[zwn-1].x_end+1;
    
    if(!(ou->rev)) {
        ou->ts = in->w_list.a[0].y_start;
        ou->te = in->w_list.a[zwn-1].y_end+1;
    } else {
        ou->ts = tl-(in->w_list.a[zwn-1].y_end+1);
        ou->te = tl-in->w_list.a[0].y_start;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2100
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x7ab88
movq $0x0, -0x8(%rbp)
jmp 0x7ac91
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x7ac3d
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x8(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x7ac89
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq -0x30(%rbp), %rdx
subq $0x1, %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x8b074
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x8b0a9
movq -0x58(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
subl %ecx, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x8b167
movq -0x18(%rbp), %rax
imulq $0xc, -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
cmpq -0x40(%rbp), %rax
ja 0x8b0de
jmp 0x8b156
movq -0x68(%rbp), %rax
movl 0x4(%rax), %eax
cmpq -0x48(%rbp), %rax
jb 0x8b0ed
jmp 0x8b167
movq -0x8(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x8aa50
cmpq $0x0, %rax
je 0x8b154
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
cmpq 0x10(%rbp), %rax
jb 0x8b135
jmp 0x8b167
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
cmpq -0x30(%rbp), %rax
ja 0x8b152
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x8b154
jmp 0x8b156
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x8b0b1
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x963a5
movq 0x32dd83(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $-0x1, 0xc(%rcx)
movb %al, -0x11(%rbp)
je 0x962ec
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %ecx
xorl %eax, %eax
cmpl $0x7fff, %ecx           # imm = 0x7FFF
movb %al, -0x21(%rbp)
jne 0x962e4
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, 0x1c(%rcx)
movb %al, -0x21(%rbp)
jne 0x962e4
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
setl %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
xorb $-0x1, %al
movb %al, -0x11(%rbp)
movq -0x20(%rbp), %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl (%rax), %r8d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x4(%rax), %r9d
addl $0x1, %r9d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x8(%rax), %r11d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0xc(%rax), %r10d
addl $0x1, %r10d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movswl 0x14(%rax), %eax
leaq 0x2efdc7(%rip), %rsi    # 0x386140
leaq 0x2efdf4(%rip), %rdx    # 0x386174
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x96244
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x97a77
movq 0x32c613(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x4(%rax), %r8d
addl $0x1, %r8d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x8(%rax), %r9d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0xc(%rax), %r10d
addl $0x1, %r10d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movswl 0x14(%rax), %eax
leaq 0x2ee832(%rip), %rsi    # 0x386282
leaq 0x2ee858(%rip), %rdx    # 0x3862af
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x979b4
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl %ecx, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
ja 0x997b5
jmp 0x9986f
movw $0xffff, -0x1a(%rbp)    # imm = 0xFFFF
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jbe 0x9980b
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %eax
sarl $0xe, %eax
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
movl %eax, -0x20(%rbp)
movzwl -0x1a(%rbp), %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jne 0x9983d
movl -0x20(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movw -0x12(%rbp), %ax
movl -0x18(%rbp), %edx
movzwl %ax, %esi
callq 0xc1070
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movw $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jg 0x9a2fa
movw -0x24(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x9a44b
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x9a39e
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
sarl $0xe, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
cltq
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x40(%rbp)
je 0x9a345
jmp 0x9a39e
movw $0x3, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
shll $0xe, %eax
movw %ax, -0x22(%rbp)
movq -0x48(%rbp), %rcx
movzwl -0x22(%rbp), %eax
addq %rcx, %rax
movw %ax, -0x22(%rbp)
movw -0x22(%rbp), %dx
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x8(%rax)
movw $0x1, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x9a302
movq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jl 0x9a443
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
sarl $0xe, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
cltq
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x40(%rbp)
je 0x9a3ea
jmp 0x9a443
movw $0x3, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
shll $0xe, %eax
movw %ax, -0x22(%rbp)
movq -0x48(%rbp), %rcx
movzwl -0x22(%rbp), %eax
addq %rcx, %rax
movw %ax, -0x22(%rbp)
movw -0x22(%rbp), %dx
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0xc(%rax)
movw $0x1, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x9a3aa
movw -0x24(%rbp), %ax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jl 0x9ae9c
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x9aea4
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jg 0x9aec0
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x9aec8
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x9aee8
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x9aef0
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0x9aef0
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x2, -0x30(%rbp)
je 0x9af15
cmpq $0x0, -0x48(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x9af3b
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jl 0x9af32
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jg 0x9af32
movl $0x1, -0x4(%rbp)
jmp 0x9af3b
jmp 0x9af34
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x24(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq 0x24(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x29(%rbp)
jge 0x9bb6b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
cmpq -0x18(%rbp), %rax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x9bb74
jmp 0x9bb8e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x9bb33
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
cqto
idivq -0x18(%rbp)
imulq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
subq -0x30(%rbp), %rax
cqto
idivq -0x18(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9e173
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jge 0x9e171
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x9e173
cmpq $0x0, -0x28(%rbp)
je 0x9e1be
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
addq $0x1, %rax
imulq -0x18(%rbp), %rax
addq %rax, %rcx
subq $0x1, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
jle 0x9e1bc
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x9e1be
popq %rbp
retq