// File: /workspace/github_cpp_makefile_star2_O3/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, 0x60(%rsp)
movq %rcx, 0x88(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdi, 0x90(%rsp)
testq %r8, %r8
je 0x7ae24
movq %r8, %r12
movq %rdx, %r11
movq 0xf0(%rsp), %r14
movq 0xe8(%rsp), %r13
movq %r9, %rax
xorl %edx, %edx
divq %r14
leaq (%r14,%r9), %rbx
subq %rdx, %rbx
testq %rdx, %rdx
cmoveq %r9, %rbx
cmpq %r13, %rbx
jae 0x7af67
movq 0xe0(%rsp), %rbp
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movq %rbp, %rax
subq %rdx, %rax
cmpq %r13, %rax
cmovbq %rax, %r13
cmpq %rbx, %rax
jbe 0x7af67
movq 0x118(%rsp), %rax
movq 0xf8(%rsp), %r10
movq (%rax), %rcx
xorl %eax, %eax
xorl %r15d, %r15d
xorl %edx, %edx
movq 0x88(%rsp), %r9
movq (%r9,%rdx,8), %rsi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
movl 0x4(%rcx,%rdi), %r8d
cmpq %r8, %rbx
jb 0x7a58a
addq %rcx, %rdi
movl 0x8(%rdi), %r8d
cmpq %r8, %r13
ja 0x7a58a
movq (%r11), %rsi
movl (%rdi), %edi
imulq $0xa8, %rdi, %rdi
movl 0x28(%rsi,%rdi), %esi
shlq $0x20, %rsi
movq %rsi, (%r10,%rax,8)
orq (%r9,%rdx,8), %rsi
movq %rsi, (%r10,%rax,8)
incq %rax
movq (%r9,%rdx,8), %rsi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
movl 0x8(%rcx,%rdi), %esi
cmpq %rbp, %rsi
adcq $0x0, %r15
incq %rdx
cmpq %rdx, %r12
jne 0x7a53e
cmpq 0x100(%rsp), %rax
jne 0x7af7c
cmpq $0x1, %rax
jbe 0x7af7c
movq 0x120(%rsp), %rax
movq $0x0, (%rax)
cmpq %r13, %rbx
jae 0x7af22
movl $0x1, %eax
movq %rax, 0x28(%rsp)
movq $0x0, 0x80(%rsp)
movq %r11, 0x18(%rsp)
movq 0xf8(%rsp), %r10
movq %r12, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq (%r11), %rsi
movq 0x118(%rsp), %rax
movq (%rax), %rax
movl (%r10), %ecx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl (%rax,%rdx), %eax
imulq $0xa8, %rax, %rdi
movl 0x4(%rsi,%rdi), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %r14
leaq (%rdx,%rbx), %rax
subq %rcx, %rax
cqto
idivq %r14
testq %rax, %rax
je 0x7ad7a
addq %rdi, %rsi
movq 0x58(%rsi), %rcx
movq %rax, %rdx
shlq $0x5, %rdx
movslq 0xc(%rcx,%rdx), %r13
cmpq $-0x1, %r13
je 0x7ad75
movslq -0x14(%rcx,%rdx), %r9
cmpq $-0x1, %r9
je 0x7ad75
cmpl %r9d, %r13d
jle 0x7ad75
movzwl 0x14(%rcx,%rdx), %edi
movw %di, 0x46(%rsp)
cmpl $-0x1, %eax
je 0x7a7e0
movl 0x28(%rsi), %edi
cmpl $-0x1, %edi
je 0x7a7e0
testq %rdi, %rdi
je 0x7a7e0
shlq $0x5, %rdi
movl 0xc(%rcx,%rdi), %esi
cmpl $-0x1, %esi
je 0x7a7e0
movslq -0x14(%rcx,%rdi), %r8
cmpq $-0x1, %r8
je 0x7a7e0
cmpl %r8d, %esi
jle 0x7a7e0
testl %eax, %eax
je 0x7a7e0
movl %eax, %r10d
shlq $0x5, %r10
movq %r8, 0x68(%rsp)
movslq 0xc(%rcx,%r10), %r8
movq %r8, 0x38(%rsp)
cmpq $-0x1, %r8
movq 0x68(%rsp), %r8
je 0x7a7e0
movl -0x14(%rcx,%r10), %eax
cmpl $-0x1, %eax
je 0x7a7e0
cmpl %eax, 0x38(%rsp)
jle 0x7a7e0
movl %eax, 0x34(%rsp)
cmpl %esi, 0x38(%rsp)
jl 0x7a802
cmpl %r8d, 0x34(%rsp)
jl 0x7a802
addq %rcx, %rdi
movslq (%rdi), %r14
addq %rcx, %r10
movl (%r10), %r11d
cmpl %r14d, %r11d
jl 0x7ad98
movl 0x4(%rdi), %edi
movl 0x4(%r10), %r10d
cmpl %edi, %r10d
jl 0x7ad98
incq %r8
movslq %r10d, %r10
subq %r14, %r10
incq %r10
movq 0x38(%rsp), %rax
subq %r8, %rax
incq %rax
movq %r10, %r14
movq %rax, 0x38(%rsp)
subq %rax, %r14
movq %r14, %r8
negq %r8
cmovsq %r14, %r8
cmpl %esi, 0x34(%rsp)
jge 0x7a7c9
incl %edi
cmpl %r11d, %edi
jne 0x7a7c9
movq 0x38(%rsp), %rax
cmpq %rax, %r10
cmovlq %r10, %rax
cmpq 0x130(%rsp), %r8
movq 0xf0(%rsp), %r14
movq 0x18(%rsp), %r11
jle 0x7a7e0
cvtsi2sd %r8, %xmm0
cvtsi2sd %rax, %xmm1
mulsd 0x60(%rsp), %xmm1
ucomisd %xmm1, %xmm0
ja 0x7a802
jmp 0x7a7e0
cmpq 0x128(%rsp), %r8
movq 0xf0(%rsp), %r14
movq 0x18(%rsp), %r11
jg 0x7a802
addq %rdx, %rcx
incq %r9
movl 0x4(%rcx), %eax
subl (%rcx), %eax
incq %r13
incl %eax
subq %r9, %r13
movl %eax, 0x38(%rsp)
cmpl $0x2, %eax
jl 0x7a80f
cmpq $0x1, %r13
jle 0x7a80f
movq 0xf8(%rsp), %r10
jmp 0x7ad75
movq %r9, 0xa0(%rsp)
movl $0x1, %r14d
movq $0x0, 0x68(%rsp)
movq 0xf8(%rsp), %r10
movq (%r11), %rsi
movq 0x118(%rsp), %rax
movq (%rax), %rdi
movl (%r10,%r14,8), %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl (%rdi,%rcx), %eax
imulq $0xa8, %rax, %rbp
movl 0x4(%rsi,%rbp), %ecx
movq %rcx, %rax
xorl %edx, %edx
movq 0xf0(%rsp), %r8
idivq %r8
leaq (%rdx,%rbx), %rax
subq %rcx, %rax
cqto
idivq %r8
testq %rax, %rax
je 0x7ad60
addq %rsi, %rbp
movq 0x58(%rbp), %rdx
movq %rax, %r9
shlq $0x5, %r9
movslq 0xc(%rdx,%r9), %rcx
cmpq $-0x1, %rcx
je 0x7ad60
movslq -0x14(%rdx,%r9), %r12
cmpq $-0x1, %r12
je 0x7ad60
cmpl %r12d, %ecx
jle 0x7ad60
movzwl 0x14(%rdx,%r9), %r8d
cmpl $-0x1, %eax
je 0x7aa55
movl 0x28(%rbp), %r11d
cmpl $-0x1, %r11d
je 0x7aa55
testq %r11, %r11
je 0x7aa55
shlq $0x5, %r11
movl 0xc(%rdx,%r11), %r10d
cmpl $-0x1, %r10d
je 0x7aa55
movw %r8w, 0x26(%rsp)
movslq -0x14(%rdx,%r11), %r8
movl %r10d, 0x34(%rsp)
movq %r8, 0x50(%rsp)
movl 0x34(%rsp), %r10d
cmpq $-0x1, %r8
movzwl 0x26(%rsp), %r8d
je 0x7aa55
cmpl 0x50(%rsp), %r10d
jle 0x7aa55
testl %eax, %eax
je 0x7aa55
movl %eax, %eax
shlq $0x5, %rax
movq %rax, 0x58(%rsp)
movslq 0xc(%rdx,%rax), %r10
movq %r10, 0x48(%rsp)
cmpq $-0x1, %r10
movl 0x34(%rsp), %r10d
je 0x7aa55
movq 0x58(%rsp), %rax
movl -0x14(%rdx,%rax), %eax
cmpl $-0x1, %eax
je 0x7aa55
cmpl %eax, 0x48(%rsp)
jle 0x7aa55
cmpl %r10d, 0x48(%rsp)
jl 0x7ad8b
cmpl 0x50(%rsp), %eax
jl 0x7ad8b
movl %eax, 0x74(%rsp)
addq %rdx, %r11
movslq (%r11), %rax
movq %rax, 0x78(%rsp)
movq 0x58(%rsp), %rax
addq %rdx, %rax
movl (%rax), %r8d
cmpl 0x78(%rsp), %r8d
jl 0x7ad8b
movl %r8d, 0x58(%rsp)
movl 0x4(%r11), %r8d
movl 0x4(%rax), %eax
movl %r8d, 0x70(%rsp)
cmpl %r8d, %eax
jl 0x7ad8b
movq 0x50(%rsp), %r11
incq %r11
movq %r11, 0x50(%rsp)
movslq %eax, %r8
subq 0x78(%rsp), %r8
incq %r8
movq 0x48(%rsp), %r11
subq 0x50(%rsp), %r11
incq %r11
movq %r8, %rax
movq %r11, 0x48(%rsp)
subq %r11, %rax
movq %rax, %r11
negq %r11
cmovsq %rax, %r11
cmpl %r10d, 0x74(%rsp)
jge 0x7aa41
movl 0x70(%rsp), %eax
incl %eax
cmpl 0x58(%rsp), %eax
jne 0x7aa41
movq 0x48(%rsp), %rax
cmpq %rax, %r8
cmovlq %r8, %rax
cmpq 0x130(%rsp), %r11
movzwl 0x26(%rsp), %r8d
jle 0x7aa55
cvtsi2sd %r11, %xmm0
cvtsi2sd %rax, %xmm1
mulsd 0x60(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7aa55
jmp 0x7ad8b
cmpq 0x128(%rsp), %r11
movzwl 0x26(%rsp), %r8d
jg 0x7ad8b
addq %r9, %rdx
movl 0x4(%rdx), %eax
subl (%rdx), %eax
incl %eax
cmpl 0x38(%rsp), %eax
jne 0x7ad8b
incq %r12
incq %rcx
subq %r12, %rcx
cmpq %rcx, %r13
movq 0x18(%rsp), %r11
movq 0xf8(%rsp), %r10
jne 0x7ad60
movzwl 0x46(%rsp), %eax
cmpw %r8w, %ax
jne 0x7ad60
testw %ax, %ax
je 0x7ab65
movq 0x68(%rsp), %rax
testq %rax, %rax
jne 0x7ab05
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 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq %r13, %r8
pushq %r10
callq 0x61ef8
addq $0x10, %rsp
movl 0x10(%rbp), %r10d
movl 0x1c(%rbp), %r9d
subq $0x8, %rsp
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
pushq %r10
movq %rax, %r12
callq 0x61ef8
addq $0x10, %rsp
movq %r12, 0x68(%rsp)
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x21a0
testl %eax, %eax
movq 0x18(%rsp), %r11
movq 0xf8(%rsp), %r10
jne 0x7ad60
incq %r14
cmpq %r14, 0x100(%rsp)
jne 0x7a82e
cmpq $0x0, 0x28(%rsp)
je 0x7adaa
movq (%r11), %rsi
movq 0x118(%rsp), %rax
movq (%rax), %rdi
xorl %r8d, %r8d
movq 0xf0(%rsp), %r14
movq (%r10,%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 %r14
leaq (%rdx,%rbx), %rax
subq %rcx, %rax
cqto
idivq %r14
shrq $0x20, %r10
movl $0x1, %ecx
movq %rcx, 0x28(%rsp)
je 0x7ad13
cmpl $-0x1, %r10d
je 0x7ad13
cmpl $-0x1, %eax
je 0x7ad13
addq %rsi, %r11
movq 0x58(%r11), %r14
shlq $0x5, %r10
movl 0xc(%r14,%r10), %ecx
cmpl $-0x1, %ecx
je 0x7ad13
movslq -0x14(%r14,%r10), %r11
cmpq $-0x1, %r11
je 0x7ad13
cmpl %r11d, %ecx
jle 0x7ad13
testl %eax, %eax
je 0x7ad13
movl %eax, %r12d
shlq $0x5, %r12
movslq 0xc(%r14,%r12), %rdx
cmpq $-0x1, %rdx
je 0x7ad13
movl -0x14(%r14,%r12), %ebp
cmpl $-0x1, %ebp
je 0x7ad13
cmpl %ebp, %edx
jle 0x7ad13
cmpl %ecx, %edx
jl 0x7acf4
cmpl %r11d, %ebp
jl 0x7acf4
addq %r14, %r10
movslq (%r10), %r13
addq %r14, %r12
movl (%r12), %r14d
cmpl %r13d, %r14d
jl 0x7acf4
movl %r14d, 0x38(%rsp)
movl 0x4(%r10), %r10d
movl 0x4(%r12), %r12d
movl $0x0, %r14d
movq %r14, 0x28(%rsp)
cmpl %r10d, %r12d
jl 0x7ad13
incq %r11
movslq %r12d, %r12
subq %r13, %r12
incq %r12
subq %r11, %rdx
incq %rdx
movq %r12, %r13
subq %rdx, %r13
movq %r13, %r11
negq %r11
cmovsq %r13, %r11
cmpl %ecx, %ebp
jge 0x7acff
incl %r10d
cmpl 0x38(%rsp), %r10d
jne 0x7acff
cmpq %rdx, %r12
cmovlq %r12, %rdx
cmpq 0x130(%rsp), %r11
jle 0x7ad09
cvtsi2sd %r11, %xmm0
cvtsi2sd %rdx, %xmm1
mulsd 0x60(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7ad09
movq $0x0, 0x28(%rsp)
jmp 0x7ad13
cmpq 0x128(%rsp), %r11
jg 0x7acf4
movl $0x1, %ecx
movq %rcx, 0x28(%rsp)
shlq $0x20, %rax
orq %r9, %rax
movq 0xf8(%rsp), %r10
movq %rax, (%r10,%r8,8)
incq %r8
cmpq %r8, 0x100(%rsp)
movq 0x10(%rsp), %r12
movq 0xe0(%rsp), %rbp
movq 0xf0(%rsp), %r14
jne 0x7ab9b
movq 0x28(%rsp), %rax
addq %rax, 0x80(%rsp)
movq 0x18(%rsp), %r11
jmp 0x7adc8
movq 0x10(%rsp), %r12
movq 0xe0(%rsp), %rbp
movq 0xf0(%rsp), %r14
movq 0x8(%rsp), %r13
addq %r14, %rbx
cmpq %r13, %rbx
jb 0x7a605
jmp 0x7ae2b
movq 0x10(%rsp), %r12
movq 0xe0(%rsp), %rbp
movq 0xf0(%rsp), %r14
movq 0x18(%rsp), %r11
jmp 0x7a802
movq $0x0, 0x28(%rsp)
movq 0x10(%rsp), %r12
movq 0xe0(%rsp), %rbp
movq 0xf0(%rsp), %r14
movq 0x120(%rsp), %r13
movq (%r13), %rcx
movq 0x10(%r13), %rax
cmpq 0x8(%r13), %rcx
jne 0x7ae13
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r13)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xf8(%rsp), %r10
movq 0x18(%rsp), %r11
movq %rax, 0x10(%r13)
movq (%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r13)
movq %rbx, (%rax,%rcx,8)
jmp 0x7ad75
xorl %eax, %eax
jmp 0x7af6a
movq 0x120(%rsp), %rcx
movq (%rcx), %r9
testq %r9, %r9
movq 0x128(%rsp), %r10
je 0x7af22
cmpq $0x0, 0x28(%rsp)
jne 0x7aed6
leaq (%r9,%r9), %rax
cmpq %rax, 0x8(%rcx)
jae 0x7aed6
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 0x120(%rsp), %rdx
movq %rax, 0x8(%rdx)
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq 0x128(%rsp), %r10
movq 0x120(%rsp), %rcx
movq 0x18(%rsp), %r11
movq %rax, 0x10(%rcx)
movq (%rcx), %r9
movq 0x10(%rcx), %r8
leaq (%r8,%r9,8), %rax
movq 0x118(%rsp), %rdi
movq %r11, %rsi
movq 0xf8(%rsp), %rdx
movq %rcx, %rbx
movq 0x100(%rsp), %rcx
movsd 0x60(%rsp), %xmm0
pushq 0x130(%rsp)
pushq %r10
pushq %rcx
pushq %r14
pushq 0xa0(%rsp)
pushq %rax
callq 0x7a066
addq $0x30, %rsp
movq %rax, (%rbx)
testq %r15, %r15
je 0x7af67
movq 0x118(%rsp), %rax
movq (%rax), %rcx
xorl %edx, %edx
xorl %eax, %eax
movq 0x88(%rsp), %r8
movq (%r8,%rdx,8), %rsi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
movl 0x8(%rcx,%rdi), %edi
cmpq %rbp, %rdi
jb 0x7af5d
movq %rsi, (%r8,%rax,8)
incq %rax
incq %rdx
cmpq %rdx, %r12
jne 0x7af3e
jmp 0x7af6a
movq %r12, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b9d20(%rip), %rdi    # 0x234ca3
leaq 0x1b67c9(%rip), %rsi    # 0x231753
leaq 0x1b9d2b(%rip), %rcx    # 0x234cbc
movl $0x571d, %edx           # imm = 0x571D
callq 0x2110