// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: cns_gen_full(overlap_region*, All_reads*, unsigned long, unsigned long, unsigned long, char*, UC_Read*, bit_extz_t*, cc_idx_t*, unsigned long, double, asg32_v*, cns_gfa*, unsigned long, window_list*, window_list_alloc*, unsigned int)
uint64_t cns_gen_full(overlap_region* ol, All_reads *rref, uint64_t s0, uint64_t e0, uint64_t wl, char* qstr, UC_Read* tu, bit_extz_t *exz, cc_idx_t *idx, uint64_t occ_tot, double occ_max, asg32_v* b32, cns_gfa *cns, uint64_t max_trace, window_list *ridx, window_list_alloc *res, uint32_t rid)
{
    uint64_t nec = 0;
    if(e0 - s0 <= wl) {
        nec += cns_gen_full0(ol, rref, s0, e0, 1, qstr, tu, exz, idx, occ_tot, occ_max, b32, cns, max_trace, ridx, res, rid);
    } else {
        uint64_t s, e;
        s = s0; e = s0 + wl; e = ((e<=e0)?e:e0);
        for (; s < e0; ) {
            // rn = iter_cc_idx_t(ol->list, &ii_a, s, e, rr, 0, &ra);
            // debug_inter0(ol->list, ii_a.c_idx, ii_a.idx->a + ii_a.i0, ii_a.srt_n - ii_a.i0, ra, rn, s, e, 0, 1, "-0-");
            // rr = wcns_vote(ol->list, rref, qu->seq, ql, tu, ra, rn, s, e, ii_a.c_idx, &ii_b, occ_tot, occ_exact, aux_o, b32, cns, rid);
            nec += cns_gen_full0(ol, rref, s, e, (s==s0)?1:0, qstr, tu, exz, idx, occ_tot, occ_max, b32, cns, max_trace, ridx, res, rid);
            s += wl; e += wl; e = ((e<=e0)?e:e0);
        }
    }
    return nec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl 0x58(%rbp), %eax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movsd %xmm0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x48(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
ja 0x252ae0
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %r9
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %r8
movq %r8, -0x88(%rbp)
movq 0x20(%rbp), %r13
movq 0x28(%rbp), %r12
movsd -0x60(%rbp), %xmm0
movq 0x30(%rbp), %r15
movq 0x38(%rbp), %r14
movq 0x40(%rbp), %rbx
movq 0x48(%rbp), %r11
movq 0x50(%rbp), %r10
movl 0x58(%rbp), %r8d
movl %r8d, -0x7c(%rbp)
movl $0x1, %r8d
movq %rax, (%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x8(%rsp)
movl -0x7c(%rbp), %eax
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movl %eax, 0x48(%rsp)
callq 0x252620
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x252c3a
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x252b0b
movq -0x78(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x252b16
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x252c38
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq -0x70(%rbp), %r9
movq -0x40(%rbp), %r10
xorl %eax, %eax
movl $0x1, %r8d
cmpq %r10, %r9
cmovel %r8d, %eax
movslq %eax, %r8
movq -0x58(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq 0x20(%rbp), %r13
movq 0x28(%rbp), %r12
movsd -0x60(%rbp), %xmm0
movq 0x30(%rbp), %r15
movq 0x38(%rbp), %r14
movq 0x40(%rbp), %rbx
movq 0x48(%rbp), %r11
movq 0x50(%rbp), %r10
movl 0x58(%rbp), %eax
movl %eax, -0x94(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, (%rsp)
movq -0xa0(%rbp), %rax
movq %rax, 0x8(%rsp)
movl -0x94(%rbp), %eax
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movl %eax, 0x48(%rsp)
callq 0x252620
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x252c1d
movq -0x78(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x252c28
movq -0x48(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x252b21
jmp 0x252c3a
movq -0x68(%rbp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq