// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: gen_commen_sketch(All_reads*, ul_idx_t const*, overlap_region_alloc*, unsigned long*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long*, unsigned long, char*, char*, kv_ul_ov_t*, asg64_v*, long, double, long)
uint64_t gen_commen_sketch(All_reads *rref, const ul_idx_t *uref, overlap_region_alloc* ol, uint64_t *id_a, uint64_t id_n, uint64_t s, uint64_t e, uint64_t ql, uint64_t wl,
uint64_t *buf, uint64_t dp, char *str0, char *str1, kv_ul_ov_t *aln, asg64_v *trace,
int64_t max_lgap, double sgap_rate, int64_t sgap)///[s, e)
{
    if(!id_n) return id_n;
    uint64_t i, m, k, rm_n = 0, buf_n = 0, qs, qe, wid, co, occ; char *qstring, *tstring;
    overlap_region *z; uint64_t ws, we; int64_t r_y[2], r_err, p_y[2], p_err, rxl, ryl, pxl;
    ///shrink [qs, qe)
    qs = (s/wl)*wl; if(qs < s) qs += wl; if(qs >= ql) return id_n;
    qe = (e/wl)*wl; if(qe >= ql) qe = ql;
    if(qs >= qe) return id_n;
    //idx_a[] is sorted by aln[].qs
    for (k = 0; k < id_n; k++) {
        if(aln->a[id_a[k]].qs<=qs && aln->a[id_a[k]].qe>=qe) {
            buf[buf_n] = ol->list[aln->a[id_a[k]].qn].align_length; buf[buf_n] <<= 32; buf[buf_n] |= id_a[k];
            buf_n++;
        }
        if(aln->a[id_a[k]].qe < e) rm_n++;
    }
    assert(buf_n == dp && buf_n > 1);

    if(buf_n > 0) {
        ///fs = fe = (uint64_t)-1;
        co = 1; trace->n = occ = 0;
        for (k = qs; k < qe; k += wl) {
            ws = k; we = ws + wl; if(we > qe) we = qe;//[ws, we)
            ///first overlap
            z = &(ol->list[aln->a[(uint32_t)buf[0]].qn]);
            wid = get_win_id_by_s(z, ws, wl, NULL);
            if(!get_win_aln(z, wid, &(r_y[0]), &(r_y[1]), &r_err)) continue;
            if(!ovlp_win_check(z, z->align_length, wid, max_lgap, sgap_rate, sgap)) continue;///not co-linear
            rxl = z->w_list.a[wid].x_end+1-z->w_list.a[wid].x_start;
            ryl = r_y[1]-r_y[0];
            // fprintf(stderr, "+[M::%s::] buf_n::%lu, q::[%lu, %lu), w::[%lu, %lu), rxl::%ld, ryl::%ld, x::[%d, %d), y::[%ld, %ld)\n", 
            //         __func__, buf_n, qs, qe, ws, we, rxl, ryl, z->w_list.a[wid].x_start, z->w_list.a[wid].x_end+1, r_y[0], r_y[1]);
            if(rxl > 1 && ryl > 1) continue;///length of window should be longer than 1
            // if(rxl <= 1 || ryl <= 1) continue;///length of window should be longer than 1
            // fprintf(stderr, "-[M::%s::] buf_n::%lu, q::[%lu, %lu), w::[%lu, %lu), rxl::%ld, ryl::%ld, x::[%d, %d), y::[%ld, %ld)\n", 
            //         __func__, buf_n, qs, qe, ws, we, rxl, ryl, z->w_list.a[wid].x_start, z->w_list.a[wid].x_end+1, r_y[0], r_y[1]);
            qstring = tstring = NULL;
            for (i = 1; i < buf_n; i++) {
                z = &(ol->list[aln->a[(uint32_t)buf[i]].qn]);
                wid = get_win_id_by_s(z, ws, wl, NULL);
                if(!get_win_aln(z, wid, &(p_y[0]), &(p_y[1]), &p_err)) break;
                if(!ovlp_win_check(z, z->align_length, wid, max_lgap, sgap_rate, sgap)) break;///not co-linear
                pxl = z->w_list.a[wid].x_end+1-z->w_list.a[wid].x_start;
                if(pxl != rxl) break;
                if(((r_y[1]-r_y[0]) != (p_y[1]-p_y[0])) || (r_err != p_err)) break;
                if(r_err == 0) continue;
                if(!qstring) {
                    qstring = retrive_str_piece_exz(rref, uref, str0, r_y[0], r_y[1]-r_y[0], 
                                                ol->list[aln->a[(uint32_t)buf[0]].qn].y_pos_strand, ol->list[aln->a[(uint32_t)buf[0]].qn].y_id);
                }
                tstring = retrive_str_piece_exz(rref, uref, str1, p_y[0], p_y[1]-p_y[0], z->y_pos_strand, z->y_id);
                if(memcmp(qstring, tstring, (p_y[1]-p_y[0]))) {
                    // fprintf(stderr, "[M::%s::] qs::%ld, qe::%lu, ts::%ld, te::%lu, err::%ld, rts::%ld, rte::%lu, err::%ld\n", 
                    // __func__, ws, we, p_y[0], p_y[1], r_err, r_y[0], r_y[1], p_err);
                    // fprintf(stderr, "str0::%.*s\n", (int32_t)(r_y[1]-r_y[0]), str0);
                    // fprintf(stderr, "str1::%.*s\n", (int32_t)(p_y[1]-p_y[0]), str1);
                    break;
                }
            }
            if(i < buf_n) continue;
            if(co) {
                for (i = 0; i < buf_n; i++) {
                    z = &(ol->list[aln->a[(uint32_t)buf[i]].qn]);
                    wid = get_win_id_by_s(z, ws, wl, NULL);
                    co = ovlp_win_check(z, buf[i]>>32, wid, max_lgap, sgap_rate, sgap);
                    m = wid; m <<= 32; m |= (uint32_t)buf[i]; buf[i] = m;
                }
                if(co) occ++;
            }
            kv_push(uint64_t, *trace, ws);
        }

        if(trace->n) {
            if(!co) kv_resize(uint64_t, *trace, trace->n<<1);
            trace->n = dp_commen_sketch(aln, ol, buf, buf_n, trace->a, trace->n, trace->a + trace->n, occ, wl, dp, max_lgap, sgap_rate, sgap);
        }
    }
    if(rm_n) {
        for (i = m = 0; i < id_n; i++) {
            if(aln->a[id_a[i]].qe < e) continue;
            id_a[m++] = id_a[i];
        }
        id_n = m;
    }
    return id_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movsd %xmm0, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdi, 0x78(%rsp)
testq %r8, %r8
je 0x7b2a6
movq %r8, %r15
movq 0xf0(%rsp), %rbp
movq 0xe8(%rsp), %r11
movq %r9, %rax
xorl %edx, %edx
divq %rbp
leaq (%r9,%rbp), %r12
subq %rdx, %r12
testq %rdx, %rdx
cmoveq %r9, %r12
cmpq %r11, %r12
jae 0x7b3d3
movq %rcx, %r10
movq 0xe0(%rsp), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %rbp
subq %rdx, %rcx
cmpq %r11, %rcx
cmovbq %rcx, %r11
cmpq %r12, %rcx
jbe 0x7b3d3
movq 0x118(%rsp), %rax
movq 0xf8(%rsp), %r14
movq (%rax), %rax
xorl %ebx, %ebx
xorl %edi, %edi
xorl %ecx, %ecx
movq (%r10,%rcx,8), %rsi
leaq (%rsi,%rsi,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rsi, %rdx
movl 0x4(%rax,%rdx), %esi
cmpq %rsi, %r12
jb 0x7a907
addq %rax, %rdx
movl 0x8(%rdx), %esi
cmpq %rsi, %r11
ja 0x7a907
movq 0x38(%rsp), %rsi
movq (%rsi), %rsi
movl (%rdx), %edx
imulq $0xa8, %rdx, %rdx
movl 0x28(%rsi,%rdx), %edx
shlq $0x20, %rdx
movq %rdx, (%r14,%rbx,8)
orq (%r10,%rcx,8), %rdx
movq %rdx, (%r14,%rbx,8)
incq %rbx
movq (%r10,%rcx,8), %rdx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movl 0x8(%rax,%rsi), %edx
cmpq 0xe0(%rsp), %rdx
adcq $0x0, %rdi
incq %rcx
cmpq %rcx, %r15
jne 0x7a8bc
cmpq 0x100(%rsp), %rbx
jne 0x7b3e8
cmpq $0x1, %rbx
jbe 0x7b3e8
movq 0x120(%rsp), %rax
movq $0x0, (%rax)
cmpq %r11, %r12
movq %r10, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
jae 0x7b2ad
movl $0x1, %eax
movq %rax, 0x30(%rsp)
movq $0x0, 0x60(%rsp)
movq %r15, 0x18(%rsp)
movq %r11, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x118(%rsp), %rcx
movq (%rcx), %rcx
movl (%r14), %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movl (%rcx,%rsi), %ecx
imulq $0xa8, %rcx, %rcx
leaq (%rax,%rcx), %rsi
movl 0x4(%rax,%rcx), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %rbp
leaq (%rdx,%r12), %rax
subq %rcx, %rax
cqto
idivq %rbp
movb $0x1, %cl
movq $-0x2, 0x48(%rsp)
testq %rax, %rax
je 0x7aa27
movq 0x58(%rsi), %rdx
movq %rax, %r8
shlq $0x5, %r8
movslq 0xc(%rdx,%r8), %rdi
cmpq $-0x1, %rdi
je 0x7aa27
movslq -0x14(%rdx,%r8), %r9
cmpq $-0x1, %r9
je 0x7aa27
cmpl %r9d, %edi
jle 0x7aa27
incq %r9
incq %rdi
movswq 0x14(%rdx,%r8), %rcx
movq %rcx, 0x48(%rsp)
xorl %ecx, %ecx
movq %rdi, 0x98(%rsp)
movq %r9, 0x68(%rsp)
testb %cl, %cl
je 0x7aa35
movq 0x8(%rsp), %rdi
jmp 0x7b24d
cmpl $-0x1, %eax
je 0x7aacd
movl 0x28(%rsi), %edx
cmpl $-0x1, %edx
je 0x7aacd
movb $0x1, %r8b
testq %rdx, %rdx
je 0x7aa82
movq 0x58(%rsi), %rdi
movq %rdx, %r9
shlq $0x5, %r9
movslq 0xc(%rdi,%r9), %rcx
cmpq $-0x1, %rcx
je 0x7aa82
movslq -0x14(%rdi,%r9), %rdi
cmpq $-0x1, %rdi
je 0x7aa82
cmpl %edi, %ecx
jle 0x7aa82
incq %rdi
incq %rcx
xorl %r8d, %r8d
jmp 0x7aa82
testb %r8b, %r8b
jne 0x7aacd
movq 0x58(%rsi), %r10
movl %eax, %r11d
movb $0x1, %bl
testl %eax, %eax
je 0x7aac0
movq %r11, %r9
shlq $0x5, %r9
movslq 0xc(%r10,%r9), %r8
cmpq $-0x1, %r8
je 0x7aac0
movslq -0x14(%r10,%r9), %r9
cmpq $-0x1, %r9
je 0x7aac0
cmpl %r9d, %r8d
jle 0x7aac0
incq %r9
incq %r8
xorl %ebx, %ebx
jmp 0x7aac0
testb %bl, %bl
movq 0x20(%rsp), %rbx
je 0x7b0d0
movq 0x58(%rsi), %rcx
shlq $0x5, %rax
movl 0x4(%rcx,%rax), %r13d
subl (%rcx,%rax), %r13d
incl %r13d
movq 0x98(%rsp), %rax
subq 0x68(%rsp), %rax
cmpl $0x2, %r13d
jl 0x7ab0e
cmpq $0x1, %rax
jle 0x7ab0e
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %r11
jmp 0x7b24d
cmpq $0x2, %rbx
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r11
jb 0x7ae97
movq %rax, 0x88(%rsp)
movl $0x1, %r14d
movq $0x0, 0x70(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rsi
movq 0x118(%rsp), %rax
movq (%rax), %rdi
movq 0xf8(%rsp), %rax
movl (%rax,%r14,8), %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl (%rdi,%rcx), %eax
imulq $0xa8, %rax, %rax
leaq (%rsi,%rax), %r15
movl 0x4(%rsi,%rax), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %rbp
leaq (%rdx,%r12), %rax
subq %rcx, %rax
cqto
idivq %rbp
movb $0x1, %dl
movq $-0x2, %rcx
testq %rax, %rax
je 0x7abdb
movq 0x58(%r15), %r8
movq %rax, %r10
shlq $0x5, %r10
movslq 0xc(%r8,%r10), %r9
cmpq $-0x1, %r9
je 0x7abdb
movslq -0x14(%r8,%r10), %r11
cmpq $-0x1, %r11
je 0x7abdb
cmpl %r11d, %r9d
jle 0x7abdb
incq %r11
incq %r9
movswq 0x14(%r8,%r10), %rcx
xorl %edx, %edx
movq %r9, 0xa0(%rsp)
movq %r11, 0x90(%rsp)
testb %dl, %dl
jne 0x7b21a
cmpl $-0x1, %eax
je 0x7ad61
movl 0x28(%r15), %r8d
cmpl $-0x1, %r8d
je 0x7ad61
movb $0x1, %r10b
testq %r8, %r8
je 0x7ac3a
movq 0x58(%r15), %r9
movq %r8, %r11
shlq $0x5, %r11
movslq 0xc(%r9,%r11), %rdx
cmpq $-0x1, %rdx
je 0x7ac3a
movslq -0x14(%r9,%r11), %r9
cmpq $-0x1, %r9
je 0x7ac3a
movq %r9, 0x58(%rsp)
cmpl %r9d, %edx
jle 0x7ac3a
incq 0x58(%rsp)
incq %rdx
xorl %r10d, %r10d
jmp 0x7ac3a
testb %r10b, %r10b
jne 0x7ad61
movq 0x58(%r15), %rbx
movl %eax, %r11d
movb $0x1, %r9b
testl %eax, %eax
je 0x7ac8d
movq %r11, %rbp
shlq $0x5, %rbp
movslq 0xc(%rbx,%rbp), %r10
cmpq $-0x1, %r10
je 0x7ac8f
movslq -0x14(%rbx,%rbp), %rbp
cmpq $-0x1, %rbp
je 0x7ac8f
movq %rbp, 0x50(%rsp)
cmpl %ebp, %r10d
movq 0xf0(%rsp), %rbp
jle 0x7ac97
incq 0x50(%rsp)
incq %r10
xorl %r9d, %r9d
jmp 0x7ac97
jmp 0x7ac97
movq 0xf0(%rsp), %rbp
testb %r9b, %r9b
jne 0x7ad61
shlq $0x5, %r8
movslq (%rbx,%r8), %rbp
shlq $0x5, %r11
movl (%rbx,%r11), %r9d
cmpl %ebp, %r9d
jl 0x7b28f
movl 0x4(%rbx,%r8), %r8d
movl 0x4(%rbx,%r11), %r11d
cmpl %r8d, %r11d
jl 0x7b28f
movq 0x50(%rsp), %rbx
cmpq 0x58(%rsp), %rbx
movq 0x20(%rsp), %rbx
jl 0x7b27b
cmpq %rdx, %r10
jl 0x7b27b
movslq %r11d, %r11
subq %rbp, %r11
incq %r11
subq 0x58(%rsp), %r10
movq %r11, %rbp
subq %r10, %rbp
movq %rbp, %rbx
negq %rbx
cmovsq %rbp, %rbx
cmpq %rdx, 0x50(%rsp)
jge 0x7ad4b
incl %r8d
cmpl %r9d, %r8d
jne 0x7ad4b
cmpq %r10, %r11
cmovlq %r11, %r10
cmpq 0x130(%rsp), %rbx
movq 0xf0(%rsp), %rbp
jle 0x7ad61
cvtsi2sd %rbx, %xmm0
cvtsi2sd %r10, %xmm1
mulsd 0x40(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7ad61
jmp 0x7b1f9
cmpq 0x128(%rsp), %rbx
movq 0xf0(%rsp), %rbp
jg 0x7b1f9
movq 0x58(%r15), %rdx
shlq $0x5, %rax
movl 0x4(%rdx,%rax), %r8d
subl (%rdx,%rax), %r8d
incl %r8d
cmpl %r13d, %r8d
jne 0x7b1f9
movq 0xa0(%rsp), %rbx
subq 0x90(%rsp), %rbx
cmpq %rbx, 0x88(%rsp)
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r11
jne 0x7b1f2
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jne 0x7b1f2
testq %rax, %rax
je 0x7ae86
movq 0x70(%rsp), %rax
testq %rax, %rax
jne 0x7ae24
movq 0xf8(%rsp), %rax
movl (%rax), %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl (%rdi,%rcx), %eax
imulq $0xa8, %rax, %rax
movl 0x10(%rsi,%rax), %r10d
movl 0x1c(%rsi,%rax), %r9d
subq $0x8, %rsp
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %r8
pushq %r10
callq 0x62406
addq $0x10, %rsp
movl 0x10(%r15), %r10d
movl 0x1c(%r15), %r9d
subq $0x8, %rsp
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq 0x98(%rsp), %rcx
movq %rbx, %r8
pushq %r10
movq %rax, %r15
callq 0x62406
addq $0x10, %rsp
movq %r15, 0x70(%rsp)
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x21a0
testl %eax, %eax
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r11
jne 0x7b1f2
incq %r14
movq 0x20(%rsp), %rbx
cmpq %r14, %rbx
jne 0x7ab39
cmpq $0x0, 0x30(%rsp)
je 0x7b183
movq 0x38(%rsp), %rax
movq (%rax), %rsi
movq 0x118(%rsp), %rax
movq (%rax), %rdi
xorl %r8d, %r8d
movq 0x18(%rsp), %r15
movq 0xf8(%rsp), %r14
movq (%r14,%r8,8), %r10
movl %r10d, %r9d
leaq (%r9,%r9,8), %rax
leaq (%rax,%rax,2), %rax
addq %r9, %rax
movl (%rdi,%rax), %eax
imulq $0xa8, %rax, %r11
movl 0x4(%rsi,%r11), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %rbp
leaq (%rdx,%r12), %rax
subq %rcx, %rax
cqto
idivq %rbp
shrq $0x20, %r10
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r10
je 0x7af4b
cmpl $-0x1, %eax
je 0x7af4b
addq %rsi, %r11
movb $0x1, %bl
testq %r10, %r10
je 0x7af47
movq 0x58(%r11), %rdx
movq %r10, %r14
shlq $0x5, %r14
movslq 0xc(%rdx,%r14), %rcx
cmpq $-0x1, %rcx
je 0x7af47
movslq -0x14(%rdx,%r14), %rdx
cmpq $-0x1, %rdx
je 0x7af47
cmpl %edx, %ecx
jle 0x7af47
incq %rdx
incq %rcx
xorl %ebx, %ebx
jmp 0x7af47
testb %bl, %bl
je 0x7af5a
movl $0x1, %ecx
movq %rcx, 0x30(%rsp)
jmp 0x7b081
movq 0x58(%r11), %r14
movl %eax, %r15d
movb $0x1, %r13b
testl %eax, %eax
je 0x7af95
movq %r15, %rbx
shlq $0x5, %rbx
movslq 0xc(%r14,%rbx), %r11
cmpq $-0x1, %r11
je 0x7af95
movslq -0x14(%r14,%rbx), %rbx
cmpq $-0x1, %rbx
je 0x7af95
cmpl %ebx, %r11d
jle 0x7af95
incq %rbx
incq %r11
xorl %r13d, %r13d
jmp 0x7af95
testb %r13b, %r13b
je 0x7afa9
movl $0x1, %ecx
movq %rcx, 0x30(%rsp)
jmp 0x7b07c
shlq $0x5, %r10
movslq (%r14,%r10), %rbp
shlq $0x5, %r15
movl (%r14,%r15), %r13d
cmpl %ebp, %r13d
jl 0x7b073
movl 0x4(%r14,%r10), %r10d
movl 0x4(%r14,%r15), %r14d
cmpl %r10d, %r14d
jl 0x7b073
cmpq %rdx, %rbx
movq 0x18(%rsp), %r15
jl 0x7b0ac
movl %r13d, 0x48(%rsp)
movq %r12, %r13
movq %rdi, %r12
movq %r15, %rdi
movl $0x0, %r15d
movq %r15, 0x30(%rsp)
movq %rdi, %r15
movq %r12, %rdi
movq %r13, %r12
cmpq %rcx, %r11
jl 0x7b081
movslq %r14d, %r14
subq %rbp, %r14
incq %r14
subq %rdx, %r11
movq %r14, %r15
subq %r11, %r15
movq %r15, %rdx
negq %rdx
cmovsq %r15, %rdx
cmpq %rcx, %rbx
jge 0x7b065
incl %r10d
cmpl 0x48(%rsp), %r10d
jne 0x7b065
cmpq %r11, %r14
cmovlq %r14, %r11
cmpq 0x130(%rsp), %rdx
jle 0x7af9a
cvtsi2sd %rdx, %xmm0
cvtsi2sd %r11, %xmm1
mulsd 0x40(%rsp), %xmm1
ucomisd %xmm1, %xmm0
ja 0x7b073
jmp 0x7af9a
cmpq 0x128(%rsp), %rdx
jle 0x7af9a
movq $0x0, 0x30(%rsp)
movq 0x18(%rsp), %r15
shlq $0x20, %rax
orq %r9, %rax
movq 0xf8(%rsp), %r14
movq %rax, (%r14,%r8,8)
incq %r8
cmpq %r8, 0x20(%rsp)
movq 0xf0(%rsp), %rbp
jne 0x7aec6
jmp 0x7b0b7
movq $0x0, 0x30(%rsp)
jmp 0x7b081
movq 0x30(%rsp), %rax
addq %rax, 0x60(%rsp)
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r11
jmp 0x7b199
shlq $0x5, %rdx
movslq (%r10,%rdx), %r14
shlq $0x5, %r11
movl (%r10,%r11), %ebx
cmpl %r14d, %ebx
jl 0x7b1fe
movl 0x4(%r10,%rdx), %edx
movl 0x4(%r10,%r11), %r10d
cmpl %edx, %r10d
jl 0x7b1fe
cmpq %rdi, %r9
movq 0x28(%rsp), %r11
jl 0x7b236
cmpq %rcx, %r8
jl 0x7b236
movslq %r10d, %r10
subq %r14, %r10
incq %r10
subq %rdi, %r8
movq %r10, %r11
subq %r8, %r11
movq %r11, %rdi
negq %rdi
cmovsq %r11, %rdi
cmpq %rcx, %r9
jge 0x7b25b
incl %edx
cmpl %ebx, %edx
jne 0x7b25b
cmpq %r8, %r10
cmovlq %r10, %r8
cmpq 0x130(%rsp), %rdi
movq 0xf8(%rsp), %r14
movq 0x20(%rsp), %rbx
jle 0x7aacd
cvtsi2sd %rdi, %xmm0
cvtsi2sd %r8, %xmm1
mulsd 0x40(%rsp), %xmm1
ucomisd %xmm1, %xmm0
ja 0x7aafa
jmp 0x7aacd
movq $0x0, 0x30(%rsp)
movq 0x18(%rsp), %r15
movq 0xf8(%rsp), %r14
movq 0x120(%rsp), %rbx
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x7b1d9
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x28(%rsp), %r11
movq 0x10(%rsp), %r10
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r12, (%rcx,%rax,8)
movq 0x8(%rsp), %rdi
jmp 0x7b248
movq 0x18(%rsp), %r15
jmp 0x7b23b
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rdi
movq 0xf8(%rsp), %r14
movq 0x20(%rsp), %rbx
jmp 0x7ab04
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rdi
movq 0xf8(%rsp), %r14
jmp 0x7ab04
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rdi
movq 0xf8(%rsp), %r14
movq 0x20(%rsp), %rbx
addq %rbp, %r12
cmpq %r11, %r12
jb 0x7a98a
jmp 0x7b2b4
cmpq 0x128(%rsp), %rdi
movq 0xf8(%rsp), %r14
movq 0x20(%rsp), %rbx
jle 0x7aacd
jmp 0x7aafa
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %r10
movq 0xf0(%rsp), %rbp
jmp 0x7b224
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %r10
movq 0xf0(%rsp), %rbp
jmp 0x7b203
xorl %eax, %eax
jmp 0x7b3d6
xorl %ecx, %ecx
xorl %r12d, %r12d
jmp 0x7b2c2
cmpq $0x0, 0x30(%rsp)
sete %cl
movq 0x60(%rsp), %r12
movq 0x120(%rsp), %rbx
movq (%rbx), %rax
testq %rax, %rax
je 0x7b389
testb %cl, %cl
je 0x7b334
addq %rax, %rax
cmpq %rax, 0x8(%rbx)
jae 0x7b334
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %r9
movq 0x10(%rbx), %r8
leaq (%r8,%r9,8), %rax
movq 0x118(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %r14, %rdx
movq 0x20(%rsp), %rcx
movsd 0x40(%rsp), %xmm0
pushq 0x130(%rsp)
pushq 0x130(%rsp)
pushq 0x110(%rsp)
pushq %rbp
pushq %r12
pushq %rax
callq 0x7a370
addq $0x30, %rsp
movq %rax, (%rbx)
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7b3d3
movq 0x118(%rsp), %rax
movq (%rax), %rcx
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %edx, %edx
xorl %eax, %eax
movq (%r10,%rdx,8), %rsi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
movl 0x8(%rcx,%rdi), %edi
cmpq 0xe0(%rsp), %rdi
jb 0x7b3c9
movq %rsi, (%r10,%rax,8)
incq %rax
incq %rdx
cmpq %rdx, %r15
jne 0x7b3a5
jmp 0x7b3d6
movq %r15, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ad7a4(%rip), %rdi    # 0x228b93
leaq 0x1aa24d(%rip), %rsi    # 0x225643
leaq 0x1ad7af(%rip), %rcx    # 0x228bac
movl $0x571d, %edx           # imm = 0x571D
callq 0x2110