// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: non_trim_error_rate(overlap_region*, All_reads*, ul_idx_t const*, kvec_t_u64_warp const*, Correct_dumy*, UC_Read*, double, long)
inline double non_trim_error_rate(overlap_region *z, All_reads* rref, const ul_idx_t *uref, const kvec_t_u64_warp* v_idx, Correct_dumy* dumy, UC_Read* g_read, double e_rate, int64_t block_s)
{
    int64_t nw, aw = z->w_list.n, k, m, w_id, wn_id, w_s, w_e, idx_e, tErr = 0, tLen = 0, y_s, ex_beg, ex_end, err_thre, p_err_thre;
    int64_t x_len, Window_Len, y_beg_left, y_beg_right;
    unsigned int r_error_left, r_error_right; int32_t r_x_end_left, r_y_end_left, aligned_xLen_left, r_x_end_right, r_y_end_right, aligned_xLen_right;
    nw = get_num_wins(z->x_pos_s, z->x_pos_e+1, block_s);
    assert(nw >= aw && aw > 0);

    for (k = aw-1, idx_e = nw; k >= 0; k--) {
        w_id = get_win_id_by_e(z, z->w_list.a[k].x_end, block_s, &w_s);
        assert(w_s == z->w_list.a[k].x_start && w_id < idx_e && k <= w_id);
        tLen += z->w_list.a[k].x_end + 1 - z->w_list.a[k].x_start;
        tErr += z->w_list.a[k].error;///matched window
        // if(z->y_id == 1) {
        //     fprintf(stderr, "+[M::%s] ws->%d, we->%d, tot_l->%ld, tot_e->%ld\n", 
        //                         __func__, z->w_list.a[k].x_start, z->w_list.a[k].x_end, tLen, tErr);
        // }
        // if(k != w_id) z->w_list.a[w_id] = z->w_list.a[k];
        ///from mapped window w_list.a[k] to the following unmapped windows
        for (m = w_id+1, w_e = z->w_list.a[k].x_end; m < idx_e; m++) {
            w_s = w_e + 1;
            wn_id = get_win_id_by_s(z, w_s, block_s, &w_e);
            assert(wn_id == m); x_len = w_e + 1 - w_s; tLen += x_len;
            ///check if there are some windows that cannot be algined by any overlaps/unitigs
            ///if no, it is likely that the UL read itself has issues
            if(uref && v_idx && z->is_match == 4) {
                if(check_coverage_gap(v_idx->a.a, w_s, w_e, block_s)) {
                    tErr += THRESHOLD_MAX_SIZE;
                    // if(z->y_id == 1) {
                    //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
                    // }
                    continue;
                } 
            }
            if(!get_init_paras(rref, uref, z, w_s, w_e, e_rate, block_s, &y_s, &ex_beg, &ex_end, &err_thre)) {
                tErr += x_len;
                // if(z->y_id == 1) {
                //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
                // }
                continue;
            }
            p_err_thre = err_thre;

            if(rref) {
                err_thre = double_error_threshold(err_thre, x_len);
            } else {
                err_thre = double_ul_error_threshold(err_thre, x_len);
            }
            Window_Len = x_len + (err_thre << 1); 
            r_error_left = r_error_right = 0;
            aligned_xLen_left = aligned_xLen_right = 0;
            y_beg_left = y_beg_right = -1;

            if(m == w_id+1) { ///if the previous window is mapped
                y_beg_left = z->w_list.a[k].y_end + 1;///incorrect
            }

            if(m+1 == idx_e && k+1 < aw) { ///if the next window is mapped
                y_beg_right = z->w_list.a[k+1].y_start-x_len;///incorrect
            }

            if(y_beg_left == -1 && y_beg_right == -1) {
                y_beg_left = y_s;
                if(ex_beg >= 0) y_beg_left = y_beg_left + p_err_thre - ex_beg;
                y_beg_right = y_beg_left;
            }

            if(y_beg_left == -1 && y_beg_right != -1) y_beg_left = y_beg_right;
            if(y_beg_right == -1 && y_beg_left != -1) y_beg_right = y_beg_left;

            if(y_beg_left != -1) {///note: this function will change tstr/qstr
                if(rref) {
                    verify_sub_window(rref, dumy, g_read, w_s, x_len, y_beg_left, Window_Len, 
                    z->y_id, z->y_pos_strand, err_thre, 0, &r_error_left, &r_y_end_left, &r_x_end_left, &aligned_xLen_left);
                } else {
                    verify_ul_sub_window(uref, dumy, g_read, w_s, x_len, y_beg_left, Window_Len, 
                    z->y_id, z->y_pos_strand, err_thre, 0, &r_error_left, &r_y_end_left, &r_x_end_left, &aligned_xLen_left);
                }
            }

            if(y_beg_right != -1) {
                if(rref) {
                    verify_sub_window(rref, dumy, g_read, w_s, x_len, y_beg_right, Window_Len, z->y_id, z->y_pos_strand,
                    err_thre, 1, &r_error_right, &r_y_end_right, &r_x_end_right, &aligned_xLen_right);
                } else {
                    verify_ul_sub_window(uref, dumy, g_read, w_s, x_len, y_beg_right, Window_Len, z->y_id, z->y_pos_strand,
                    err_thre, 1, &r_error_right, &r_y_end_right, &r_x_end_right, &aligned_xLen_right);
                }
            }

            ///aligned in both directions
            if(aligned_xLen_left != 0 && aligned_xLen_right != 0) {
                if(aligned_xLen_left + aligned_xLen_right <= x_len) {
                    tErr += r_error_left + r_error_right + (x_len - aligned_xLen_left - aligned_xLen_right);
                } else {
                    float E_rate = (float)(x_len)/(float)(aligned_xLen_left + aligned_xLen_right);
                    tErr += (r_error_left + r_error_right)*E_rate;
                }
            }///not aligned in both directions
            else if(aligned_xLen_left == 0 && aligned_xLen_right == 0) {
                tErr += x_len;
            }///only aligned in left
            else if(aligned_xLen_left != 0) {
                tErr += r_error_left + (x_len - aligned_xLen_left);
            }///only aligned in right
            else if(aligned_xLen_right != 0) {
                tErr += r_error_right + (x_len - aligned_xLen_right);
            }
            // if(z->y_id == 1) {
            //     fprintf(stderr, "*[M::%s] qs->%ld, ts->%ld, tb[0]->%ld, tb[1]->%ld, di[0]->%u, di[1]->%u, al[0]->%d, al[1]->%d, err_thre->%ld\n", __func__, 
            //     w_s, y_s, y_beg_left, y_beg_right, r_error_left, r_error_right, aligned_xLen_left, aligned_xLen_right, err_thre);
            // }
            // if(z->y_id == 1) {
            //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
            // }
        }
        idx_e = w_id;
    }

    if(idx_e > 0) {
        for (m = 0, w_e = (int64_t)z->x_pos_s-1; m < idx_e; m++) {
            w_s = w_e + 1;
            wn_id = get_win_id_by_s(z, w_s, block_s, &w_e);
            assert(wn_id == m); x_len = w_e + 1 - w_s; tLen += x_len;
            ///check if there are some windows that cannot be algined by any overlaps/unitigs
            ///if no, it is likely that the UL read itself has issues
            if(uref && v_idx && z->is_match == 4) {
                if(check_coverage_gap(v_idx->a.a, w_s, w_e, block_s)) {
                    tErr += THRESHOLD_MAX_SIZE;
                    // if(z->y_id == 1) {
                    //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
                    // }
                    continue;
                } 
                // else {
                //     if(z->y_id == 575) {
                //         fprintf(stderr, "---[M::%s::] z::y_id->%u, w_s->%ld, w_e->%ld\n", __func__, z->y_id, w_s, w_e);
                //     } 
                // }
            }
            if(!get_init_paras(rref, uref, z, w_s, w_e, e_rate, block_s, &y_s, &ex_beg, &ex_end, &err_thre)) {
                tErr += x_len;
                // if(z->y_id == 1) {
                //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
                // }
                continue;
            }
            p_err_thre = err_thre;
            if(rref) {
                err_thre = double_error_threshold(err_thre, x_len);
            } else {
                err_thre = double_ul_error_threshold(err_thre, x_len);
            }
            Window_Len = x_len + (err_thre << 1); 
            r_error_left = r_error_right = 0;
            aligned_xLen_left = aligned_xLen_right = 0;
            y_beg_left = y_beg_right = -1;

            ///impossible that the previous window is mapped
            // if(m == w_id+1) { ///if the previous window is mapped
            //     y_beg_left = z->w_list.a[k].y_end + 1;
            // }

            if(m+1 == idx_e && k+1 < aw) { ///if the next window is mapped
                y_beg_right = z->w_list.a[k+1].y_start-x_len;
            }

            if(y_beg_left == -1 && y_beg_right == -1) {
                y_beg_left = y_s;
                if(ex_beg >= 0) y_beg_left = y_beg_left + p_err_thre - ex_beg;
                y_beg_right = y_beg_left;
            }

            if(y_beg_left == -1 && y_beg_right != -1) y_beg_left = y_beg_right;
            if(y_beg_right == -1 && y_beg_left != -1) y_beg_right = y_beg_left;

            if(y_beg_left != -1) {
                if(rref) {
                    verify_sub_window(rref, dumy, g_read, w_s, x_len, y_beg_left, Window_Len, 
                    z->y_id, z->y_pos_strand, err_thre, 0, &r_error_left, &r_y_end_left, &r_x_end_left, &aligned_xLen_left);
                } else {
                    verify_ul_sub_window(uref, dumy, g_read, w_s, x_len, y_beg_left, Window_Len, 
                    z->y_id, z->y_pos_strand, err_thre, 0, &r_error_left, &r_y_end_left, &r_x_end_left, &aligned_xLen_left);
                }
            }

            if(y_beg_right != -1) {
                if(rref) {
                    verify_sub_window(rref, dumy, g_read, w_s, x_len, y_beg_right, Window_Len, z->y_id, z->y_pos_strand,
                    err_thre, 1, &r_error_right, &r_y_end_right, &r_x_end_right, &aligned_xLen_right);
                } else {
                    verify_ul_sub_window(uref, dumy, g_read, w_s, x_len, y_beg_right, Window_Len, z->y_id, z->y_pos_strand,
                    err_thre, 1, &r_error_right, &r_y_end_right, &r_x_end_right, &aligned_xLen_right);
                }
            }

            ///aligned in both directions
            if(aligned_xLen_left != 0 && aligned_xLen_right != 0) {
                if(aligned_xLen_left + aligned_xLen_right <= x_len) {
                    tErr += r_error_left + r_error_right + (x_len - aligned_xLen_left - aligned_xLen_right);
                } else {
                    float E_rate = (float)(x_len)/(float)(aligned_xLen_left + aligned_xLen_right);
                    tErr += (r_error_left + r_error_right)*E_rate;
                }
            }///not aligned in both directions
            else if(aligned_xLen_left == 0 && aligned_xLen_right == 0) {
                tErr += x_len;
            }///only aligned in left
            else if(aligned_xLen_left != 0) {
                tErr += r_error_left + (x_len - aligned_xLen_left);
            }///only aligned in right
            else if(aligned_xLen_right != 0) {
                tErr += r_error_right + (x_len - aligned_xLen_right);
            }
            // if(z->y_id == 1) {
            //     fprintf(stderr, "-[M::%s] ws->%ld, we->%ld, tot_l->%ld, tot_e->%ld\n", __func__, w_s, w_e, tLen, tErr);
            // }
        }
    }
    
    assert(tLen == z->x_pos_e + 1 - z->x_pos_s);
    return (double)(tErr)/(double)(tLen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movsd %xmm0, 0xe0(%rsp)
movq %r9, 0x70(%rsp)
movq %rcx, 0xc0(%rsp)
movq %rdx, 0x88(%rsp)
movq %rsi, %r10
movq %rdi, %r15
movq 0x130(%rsp), %r14
movq 0x48(%rdi), %rdi
movl 0x4(%r15), %ecx
movl 0x8(%r15), %esi
incl %esi
movq %rcx, %rax
xorl %edx, %edx
idivq %r14
subq %rcx, %rdx
addq %rdx, %rsi
movq %rsi, %rax
cqto
idivq %r14
movq %rax, %r11
xorl %eax, %eax
testq %rdx, %rdx
setg %cl
testq %rdi, %rdi
jle 0x9b3d7
movb %cl, %al
addq %rax, %r11
cmpq %rdi, %r11
jl 0x9b3d7
cmpq $0x0, 0x88(%rsp)
setne %al
cmpq $0x0, 0xc0(%rsp)
setne %cl
andb %al, %cl
movb %cl, 0x17(%rsp)
leaq 0x50(%r8), %rax
movq %rax, 0x28(%rsp)
addq $0x4f, %r8
movq %r8, 0x60(%rsp)
movq %rdi, 0xe8(%rsp)
movq %rdi, 0xb8(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r15, 0x80(%rsp)
movq %r10, 0x68(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x30(%rsp)
decq %rax
movq 0x58(%r15), %rsi
movq %rax, 0xb8(%rsp)
shlq $0x5, %rax
movq %rax, 0xc8(%rsp)
movslq 0x4(%rsi,%rax), %r8
movl 0x4(%r15), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %r14
movq %rcx, %rdi
subq %rdx, %rdi
movq %r8, %rax
subq %rdi, %rax
cqto
idivq %r14
movq %rax, %rdx
imulq %r14, %rdx
addq %rdi, %rdx
cmpq %rcx, %rdx
cmovleq %rcx, %rdx
movq %rax, 0xa0(%rsp)
cmpq %r11, %rax
jge 0x9b399
movq 0xc8(%rsp), %rax
movl (%rsi,%rax), %eax
movslq %eax, %rcx
cmpq %rcx, %rdx
jne 0x9b399
movq 0xb8(%rsp), %rcx
cmpq 0xa0(%rsp), %rcx
jg 0x9b399
addq 0xc8(%rsp), %rsi
movl %r8d, %ecx
subl %eax, %ecx
incl %ecx
movslq %ecx, %rax
addq %rax, %r12
movswq 0x14(%rsi), %rax
addq %rax, %r13
movq 0xa0(%rsp), %rax
incq %rax
cmpq %r11, %rax
jge 0x9a88f
movq %rax, 0xa8(%rsp)
movq %rax, %r9
movq %r11, 0x40(%rsp)
movq %r8, %rbx
leaq 0x1(%r8), %rbp
movl 0x8(%r15), %r8d
movl 0x4(%r15), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %r14
subq %rdx, %rcx
movq %rbp, %rax
subq %rcx, %rax
cqto
idivq %r14
leaq 0x1(%rax), %rdx
imulq %r14, %rdx
addq %rdx, %rcx
decq %rcx
cmpq %r8, %rcx
cmovlq %rcx, %r8
cmpq %r9, %rax
jne 0x9b37a
movq %r8, %rax
subq %rbx, %rax
movq %rax, (%rsp)
cmpb $0x0, 0x17(%rsp)
je 0x99e69
cmpb $0x4, 0x2c(%r15)
jne 0x99e69
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movq (%rcx,%rax,8), %rdx
movq %rdx, %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rsi, %rax
je 0x99e69
shrq $0x20, %rdx
leaq (%rcx,%rdx,8), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
cmpq %rbp, %rdi
jne 0x99e61
movl %esi, %esi
cmpq %r8, %rsi
je 0x9a878
incq %rdx
cmpq %rdx, %rax
jne 0x99e46
movq %rbx, 0x20(%rsp)
movq %r9, 0x38(%rsp)
movq %r10, %rdi
movq 0x88(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %r8, 0x90(%rsp)
movsd 0xe0(%rsp), %xmm0
movq %r14, %r9
leaq 0xb0(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
movq %r10, %rbx
callq 0x4953c
addq $0x20, %rsp
testl %eax, %eax
je 0x99f1d
movq %r13, 0x58(%rsp)
movq 0xb0(%rsp), %rax
testl %eax, %eax
sete %dl
movq (%rsp), %rsi
cmpl $0x4, %esi
setge %cl
andb %dl, %cl
testq %rbx, %rbx
movq %rbx, %r10
movq 0x40(%rsp), %r11
je 0x99f3e
leal (%rax,%rax), %edx
testb %cl, %cl
movl $0x2, %ecx
cmovnel %ecx, %edx
cmpl $0x20, %edx
movl $0x1f, %r13d
cmovgel %edx, %r13d
cmpl $0x12c, %esi            # imm = 0x12C
cmovll %edx, %r13d
jmp 0x99f66
movq (%rsp), %rsi
addq %rsi, %r13
movq %rbx, %r10
movq 0x40(%rsp), %r11
movq 0x90(%rsp), %r8
movq 0x38(%rsp), %r9
jmp 0x9a880
testb %cl, %cl
movl %eax, %r13d
movl $0x1, %ecx
cmovnel %ecx, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
mulsd 0x197625(%rip), %xmm0   # 0x231580
cvttsd2si %xmm0, %ecx
cmpl %ecx, %r13d
cmovlel %ecx, %r13d
movq 0x38(%rsp), %rdi
cmpl $0x1f, %r13d
movl $0x1f, %ecx
cmovgel %ecx, %r13d
movslq %r13d, %r8
movq %r8, 0xb0(%rsp)
movq $-0x1, %rcx
movq $-0x1, %r14
cmpq 0xa8(%rsp), %rdi
jne 0x99fb3
movq 0x58(%r15), %rdx
movq 0xc8(%rsp), %rsi
movslq 0xc(%rdx,%rsi), %r14
movq (%rsp), %rsi
incq %r14
movq 0x30(%rsp), %rdx
cmpq 0xe8(%rsp), %rdx
jge 0x99fe0
leaq 0x1(%rdi), %rdx
cmpq %r11, %rdx
jne 0x99fe0
movq 0x58(%r15), %rcx
movq 0x30(%rsp), %rdx
shlq $0x5, %rdx
movslq 0x8(%rcx,%rdx), %rcx
subq %rsi, %rcx
cmpq $-0x1, %r14
movq %r12, 0x50(%rsp)
jne 0x9a014
cmpq $-0x1, %rcx
jne 0x9a014
movq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %rdx
addq %rcx, %rax
subq %rdx, %rax
testq %rdx, %rdx
cmovsq %rcx, %rax
movq %rax, %r14
movq %rax, %rcx
cmpq $-0x1, %rcx
movq %r14, %rbx
cmovneq %rcx, %rbx
cmpq $-0x1, %r14
cmovneq %r14, %rbx
leaq (%rsi,%r8,2), %r12
cmpq $-0x1, %rbx
cmoveq %rcx, %r14
cmpq $-0x1, %rcx
cmovneq %rcx, %r14
cmpq $-0x1, %rbx
je 0x9a18e
movl 0x10(%r15), %r9d
movl 0x1c(%r15), %eax
testq %r10, %r10
je 0x9a3de
xorl %edi, %edi
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
testq %rbx, %rbx
js 0x9a17b
movq 0x18(%r10), %rcx
movq (%rcx,%r9,8), %r15
cmpq %rbx, %r15
jle 0x9a17b
leal (,%r13,2), %ecx
movslq %ecx, %rcx
subq %rbx, %rcx
addq %r15, %rcx
addq $0x1f, %rcx
cmpq %r12, %rcx
jl 0x9a17b
subq %r8, %rbx
subq %rbx, %r15
cmpq %r12, %r15
cmovgeq %r12, %r15
movl %r12d, %ecx
subl %r15d, %ecx
movl %ecx, 0x18(%rsp)
movl %ebx, %ecx
negl %ecx
testq %rbx, %rbx
movl $0x0, %esi
cmovgq %rbx, %rsi
movslq %ecx, %rcx
sarq $0x3f, %rbx
movl %ecx, %edx
andl %ebx, %edx
subq %rdx, %r15
andq %rcx, %rbx
movq 0x28(%rsp), %rcx
leaq (%rcx,%rbx), %rdi
movq %rdi, 0x78(%rsp)
movzbl %al, %ecx
movq %r15, %rdx
movq %r8, 0x48(%rsp)
movq %r10, %r8
callq 0x32ef8
movq 0x28(%rsp), %rdi
movl $0x4e, %esi
movq %rbx, %rdx
callq 0x20e0
addq 0x78(%rsp), %r15
movslq 0x18(%rsp), %rdx
movq %r15, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rdx
addq %rbp, %rdx
movzwl 0x48(%rsp), %r8d
movq 0x28(%rsp), %rdi
movl %r12d, %esi
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %r11
movq 0x78(%rsp), %r10
addq $0x10, %rsp
movl 0x10(%rsp), %edi
incl %edi
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %eax
cmovel %eax, %edi
movl 0x8(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpq $-0x1, %r14
movq 0x80(%rsp), %r15
jne 0x9a1ae
jmp 0x9a80b
cmpq $-0x1, %rcx
je 0x9a801
movl $0x0, 0x18(%rsp)
movl $0x0, %edi
testq %r10, %r10
je 0x9a531
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %r14, %r14
js 0x9a773
movl 0x10(%r15), %r9d
movq 0x18(%r10), %rdx
movq (%rdx,%r9,8), %rbx
cmpq %r14, %rbx
jle 0x9a773
addl %r13d, %r13d
movslq %r13d, %rdx
subq %r14, %rdx
addq %rbx, %rdx
addq $0x1f, %rdx
cmpq %r12, %rdx
movq 0x58(%rsp), %r13
jl 0x9a778
movq %rdi, 0x78(%rsp)
movq %r8, 0x48(%rsp)
subq %r8, %r14
subq %r14, %rbx
cmpq %r12, %rbx
cmovgeq %r12, %rbx
movl %r12d, %eax
subl %ebx, %eax
movl %eax, 0x9c(%rsp)
movl %r14d, %eax
negl %eax
testq %r14, %r14
movl $0x0, %esi
cmovgq %r14, %rsi
movl 0x1c(%r15), %ecx
cltq
sarq $0x3f, %r14
movl %eax, %edx
andl %r14d, %edx
subq %rdx, %rbx
andq %rax, %r14
movq 0x28(%rsp), %r13
leaq (%r14,%r13), %r15
movzbl %cl, %ecx
movq %r15, %rdi
movq %rbx, %rdx
movq %r10, %r8
callq 0x32ef8
movq %r13, %rdi
movl $0x4e, %esi
movq %r14, %rdx
movq %r13, %r14
callq 0x20e0
addq %r15, %rbx
movslq 0x9c(%rsp), %rdx
movq %rbx, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rbx
cmpl $0x2, %r12d
jl 0x9a2c0
movl %r12d, %eax
shrl %eax
movl %r12d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %rcx
xorl %edx, %edx
movb (%r14,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%r14,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9a2a7
addq %rbx, %rbp
cmpl $0x2, (%rsp)
jl 0x9a301
movq (%rsp), %rcx
movl %ecx, %eax
shrl %eax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x20(%rsp), %rcx
addq %rbx, %rcx
xorl %edx, %edx
movb (%rbp,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%rbp,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9a2e6
movzwl 0x48(%rsp), %r8d
movq %r14, %rdi
movl %r12d, %esi
movq %rbp, %rdx
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
addq $0x10, %rsp
cmpl $0x2, %r12d
movq 0x80(%rsp), %r15
movq 0x58(%rsp), %r13
jl 0x9a374
movl %r12d, %eax
shrl %eax
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %r12
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
movb (%r12), %sil
movb %sil, (%r14,%rcx)
movb %dl, (%r12)
incq %rcx
decq %r12
cmpq %rcx, %rax
jne 0x9a359
cmpl $0x2, (%rsp)
movq 0x68(%rsp), %r10
movq 0x40(%rsp), %r11
movq 0x78(%rsp), %rdi
jl 0x9a3c2
movq (%rsp), %rcx
movl %ecx, %eax
shrl %eax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq 0x20(%rsp), %rdx
addq %rcx, %rdx
addq %rdx, %rbx
xorl %ecx, %ecx
movb (%rbp,%rcx), %dl
movb (%rbx), %sil
movb %sil, (%rbp,%rcx)
movb %dl, (%rbx)
incq %rcx
decq %rbx
cmpq %rcx, %rax
jne 0x9a3a9
movl 0x10(%rsp), %eax
incl %eax
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %ecx
cmovel %ecx, %eax
movl 0x8(%rsp), %ecx
jmp 0x9a778
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
leaq (%r9,%r9,4), %rdx
movl (%rcx,%rdx,8), %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %edi, %edi
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
cmpq %r15, %rbx
jae 0x9a51f
leal (,%r13,2), %esi
movslq %esi, %rsi
subq %rbx, %rsi
addq %r15, %rsi
addq $0x1f, %rsi
cmpq %r12, %rsi
jl 0x9a51f
subq %r8, %rbx
subq %rbx, %r15
cmpq %r12, %r15
cmovgeq %r12, %r15
movl %r12d, %esi
subl %r15d, %esi
movl %esi, 0x18(%rsp)
movl %ebx, %esi
negl %esi
testq %rbx, %rbx
movq %r8, 0x48(%rsp)
movl $0x0, %r8d
cmovgq %rbx, %r8
leaq (%rcx,%rdx,8), %rdx
movslq %esi, %rcx
sarq $0x3f, %rbx
movl %ecx, %esi
andl %ebx, %esi
subq %rsi, %r15
andq %rcx, %rbx
movq 0x28(%rsp), %rcx
leaq (%rcx,%rbx), %rsi
movq %rsi, 0x78(%rsp)
subq $0x8, %rsp
movzbl %al, %ecx
xorl %edi, %edi
movq %r15, %r9
xorl %eax, %eax
pushq %rax
callq 0x36049
addq $0x10, %rsp
movq 0x28(%rsp), %rdi
movl $0x4e, %esi
movq %rbx, %rdx
callq 0x20e0
addq 0x78(%rsp), %r15
movslq 0x18(%rsp), %rdx
movq %r15, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rdx
addq %rbp, %rdx
movzwl 0x48(%rsp), %r8d
movq 0x28(%rsp), %rdi
movl %r12d, %esi
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %r11
movq 0x78(%rsp), %r10
addq $0x10, %rsp
movl 0x10(%rsp), %edi
incl %edi
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %eax
cmovel %eax, %edi
movl 0x8(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpq $-0x1, %r14
movq 0x80(%rsp), %r15
je 0x9a80b
movl 0x10(%r15), %eax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rdx
leaq (%rax,%rax,4), %rsi
movl (%rdx,%rsi,8), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rbx, %r14
jae 0x9a773
addl %r13d, %r13d
movq %rdi, 0x78(%rsp)
movslq %r13d, %rdi
subq %r14, %rdi
addq %rbx, %rdi
addq $0x1f, %rdi
cmpq %r12, %rdi
movq 0x78(%rsp), %rdi
jl 0x9a773
movl 0x1c(%r15), %eax
movq %r8, 0x48(%rsp)
subq %r8, %r14
subq %r14, %rbx
cmpq %r12, %rbx
cmovgeq %r12, %rbx
movl %r12d, %ecx
subl %ebx, %ecx
movl %ecx, 0x9c(%rsp)
movl %r14d, %ecx
negl %ecx
testq %r14, %r14
movl $0x0, %r8d
cmovgq %r14, %r8
leaq (%rdx,%rsi,8), %rdx
movslq %ecx, %rcx
sarq $0x3f, %r14
movl %ecx, %esi
andl %r14d, %esi
subq %rsi, %rbx
andq %rcx, %r14
movq 0x28(%rsp), %r13
leaq (%r14,%r13), %r15
subq $0x8, %rsp
movzbl %al, %ecx
xorl %edi, %edi
movq %r15, %rsi
movq %rbx, %r9
xorl %eax, %eax
pushq %rax
callq 0x36049
addq $0x10, %rsp
movq %r13, %rdi
movl $0x4e, %esi
movq %r14, %rdx
callq 0x20e0
addq %r15, %rbx
movslq 0x9c(%rsp), %rdx
movq %rbx, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rbx
cmpl $0x2, %r12d
jl 0x9a65d
movl %r12d, %eax
shrl %eax
movl %r12d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %rcx
xorl %edx, %edx
movb (%r13,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%r13,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9a642
addq %rbx, %rbp
cmpl $0x2, (%rsp)
jl 0x9a69e
movq (%rsp), %rcx
movl %ecx, %eax
shrl %eax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x20(%rsp), %rcx
addq %rbx, %rcx
xorl %edx, %edx
movb (%rbp,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%rbp,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9a683
movzwl 0x48(%rsp), %r8d
movq %r13, %rdi
movl %r12d, %esi
movq %rbp, %rdx
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
addq $0x10, %rsp
cmpl $0x2, %r12d
movq 0x80(%rsp), %r15
jl 0x9a70e
movl %r12d, %eax
shrl %eax
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %r12
xorl %ecx, %ecx
movb (%r13,%rcx), %dl
movb (%r12), %sil
movb %sil, (%r13,%rcx)
movb %dl, (%r12)
incq %rcx
decq %r12
cmpq %rcx, %rax
jne 0x9a6f1
cmpl $0x2, (%rsp)
movq 0x68(%rsp), %r10
movq 0x40(%rsp), %r11
movq 0x78(%rsp), %rdi
jl 0x9a75c
movq (%rsp), %rcx
movl %ecx, %eax
shrl %eax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq 0x20(%rsp), %rdx
addq %rcx, %rdx
addq %rdx, %rbx
xorl %ecx, %ecx
movb (%rbp,%rcx), %dl
movb (%rbx), %sil
movb %sil, (%rbp,%rcx)
movb %dl, (%rbx)
incq %rcx
decq %rbx
cmpq %rcx, %rax
jne 0x9a743
movl 0x10(%rsp), %eax
incl %eax
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %ecx
cmovel %ecx, %eax
movl 0x8(%rsp), %ecx
movq 0x58(%rsp), %r13
testl %eax, %eax
setne %dl
testl %edi, %edi
setne %sil
movq 0x130(%rsp), %r14
movq 0x50(%rsp), %r12
movq 0x90(%rsp), %r8
movq 0x38(%rsp), %r9
je 0x9a836
testl %eax, %eax
je 0x9a836
leal (%rax,%rdi), %edx
movslq %edx, %rsi
movq %rdi, %rbx
movq (%rsp), %rdi
cmpq %rsi, %rdi
movq %rdi, %rsi
jge 0x9a7f3
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
cvtsi2ss %edx, %xmm1
addl 0x18(%rsp), %ecx
cvtsi2ss %rcx, %xmm2
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %r13, %xmm1
mulss %xmm0, %xmm2
addss %xmm2, %xmm1
cvttss2si %xmm1, %r13
jmp 0x9a880
addl 0x18(%rsp), %ecx
movslq %ebx, %rdx
cltq
addq %rdx, %rax
jmp 0x9a86d
xorl %edi, %edi
movl $0x0, 0x18(%rsp)
testl %edi, %edi
setne %sil
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x130(%rsp), %r14
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %r13
movq 0x90(%rsp), %r8
movq 0x38(%rsp), %r9
movq %rdi, %rbx
orl %eax, %edi
jne 0x9a846
movq (%rsp), %rsi
addq %rsi, %r13
jmp 0x9a880
testb %sil, %sil
je 0x9a861
movl 0x18(%rsp), %eax
movslq %ebx, %rcx
movq (%rsp), %rsi
addq %rsi, %r13
addq %rax, %r13
subq %rcx, %r13
jmp 0x9a880
testb %dl, %dl
movq (%rsp), %rsi
je 0x9a880
movl %ecx, %ecx
cltq
addq %rsi, %r13
subq %rax, %r13
addq %rcx, %r13
jmp 0x9a880
addq $0x1f, %r13
movq (%rsp), %rsi
addq %rsi, %r12
incq %r9
cmpq %r11, %r9
jne 0x99dbc
movq 0xa0(%rsp), %rax
movq %rax, %r11
cmpq $0x2, 0x30(%rsp)
jge 0x99ce2
movl 0x4(%r15), %r8d
testq %rax, %rax
jle 0x9b342
decq %r8
xorl %r11d, %r11d
movq %r8, %rbx
leaq 0x1(%r8), %rbp
movl 0x8(%r15), %r8d
movl 0x4(%r15), %ecx
movq %rcx, %rax
xorl %edx, %edx
idivq %r14
subq %rdx, %rcx
movq %rbp, %rax
subq %rcx, %rax
cqto
idivq %r14
leaq 0x1(%rax), %rdx
imulq %r14, %rdx
addq %rdx, %rcx
decq %rcx
cmpq %r8, %rcx
cmovlq %rcx, %r8
cmpq %r11, %rax
jne 0x9b3b8
movq %r8, %r9
subq %rbx, %r9
cmpb $0x0, 0x17(%rsp)
je 0x9a962
cmpb $0x4, 0x2c(%r15)
jne 0x9a962
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movq (%rcx,%rax,8), %rdx
movq %rdx, %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rsi, %rax
je 0x9a962
shrq $0x20, %rdx
leaq (%rcx,%rdx,8), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
cmpq %rbp, %rdi
jne 0x9a95a
movl %esi, %esi
cmpq %r8, %rsi
je 0x9aff7
incq %rdx
cmpq %rdx, %rax
jne 0x9a93f
movq %rbx, 0x40(%rsp)
movq %r9, (%rsp)
movq %r11, 0x38(%rsp)
movq %r10, %rdi
movq 0x88(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %r8, 0x90(%rsp)
movsd 0xe0(%rsp), %xmm0
movq %r14, %r9
leaq 0xb0(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
movq %r10, %rbx
callq 0x4953c
addq $0x20, %rsp
testl %eax, %eax
je 0x9aa1c
movq %r12, 0x50(%rsp)
movq 0xb0(%rsp), %rax
testl %eax, %eax
sete %dl
movq (%rsp), %r9
cmpl $0x4, %r9d
setge %cl
andb %dl, %cl
testq %rbx, %rbx
movq %rbx, %r10
movq 0x38(%rsp), %r11
je 0x9aa38
leal (%rax,%rax), %edx
testb %cl, %cl
movl $0x2, %ecx
cmovnel %ecx, %edx
cmpl $0x20, %edx
movl $0x1f, %r12d
cmovgel %edx, %r12d
cmpl $0x12c, %r9d            # imm = 0x12C
cmovll %edx, %r12d
jmp 0x9aa61
movq (%rsp), %r9
addq %r9, %r13
movq %rbx, %r10
movq 0x90(%rsp), %r8
movq 0x38(%rsp), %r11
jmp 0x9b32a
testb %cl, %cl
movl %eax, %r12d
movl $0x1, %ecx
cmovnel %ecx, %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
mulsd 0x196b2a(%rip), %xmm0   # 0x231580
cvttsd2si %xmm0, %ecx
cmpl %ecx, %r12d
cmovlel %ecx, %r12d
movq %r13, 0x58(%rsp)
cmpl $0x1f, %r12d
movl $0x1f, %ecx
cmovgel %ecx, %r12d
movslq %r12d, %r8
movq %r8, 0xb0(%rsp)
leaq 0x1(%r11), %rcx
cmpq 0xa0(%rsp), %rcx
jne 0x9aaa4
movq 0x58(%r15), %rcx
movslq 0x8(%rcx), %rcx
subq %r9, %rcx
movq $-0x1, %rbx
cmpq $-0x1, %rcx
jne 0x9aac7
movq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %rdx
addq %rcx, %rax
subq %rdx, %rax
testq %rdx, %rdx
cmovsq %rcx, %rax
movq %rax, %rbx
movq %rax, %rcx
cmpq $-0x1, %rcx
movq %rbx, %r14
cmovneq %rcx, %r14
cmpq $-0x1, %rbx
cmovneq %rbx, %r14
leaq (%r9,%r8,2), %r13
cmpq $-0x1, %r14
cmoveq %rcx, %rbx
cmpq $-0x1, %rcx
cmovneq %rcx, %rbx
cmpq $-0x1, %r14
je 0x9ac43
movl 0x10(%r15), %r9d
movl 0x1c(%r15), %eax
testq %r10, %r10
je 0x9ae90
xorl %edi, %edi
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
testq %r14, %r14
js 0x9ac2c
movq 0x18(%r10), %rcx
movq (%rcx,%r9,8), %r15
cmpq %r14, %r15
jle 0x9ac2c
leal (%r12,%r12), %ecx
movslq %ecx, %rcx
subq %r14, %rcx
addq %r15, %rcx
addq $0x1f, %rcx
cmpq %r13, %rcx
jl 0x9ac2c
subq %r8, %r14
subq %r14, %r15
cmpq %r13, %r15
cmovgeq %r13, %r15
movl %r13d, %ecx
subl %r15d, %ecx
movl %ecx, 0x20(%rsp)
movl %r14d, %ecx
negl %ecx
testq %r14, %r14
movl $0x0, %esi
cmovgq %r14, %rsi
movslq %ecx, %rcx
sarq $0x3f, %r14
movl %ecx, %edx
andl %r14d, %edx
subq %rdx, %r15
andq %rcx, %r14
movq 0x28(%rsp), %rcx
leaq (%rcx,%r14), %rdi
movq %rdi, 0x18(%rsp)
movzbl %al, %ecx
movq %r15, %rdx
movq %r8, 0x30(%rsp)
movq %r10, %r8
callq 0x32ef8
movq 0x28(%rsp), %rdi
movl $0x4e, %esi
movq %r14, %rdx
callq 0x20e0
addq 0x18(%rsp), %r15
movslq 0x20(%rsp), %rdx
movq %r15, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rdx
addq %rbp, %rdx
movzwl 0x30(%rsp), %r8d
movq 0x28(%rsp), %rdi
movl %r13d, %esi
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
movq 0x40(%rsp), %r8
movq 0x48(%rsp), %r11
movq 0x78(%rsp), %r10
addq $0x10, %rsp
movl 0x10(%rsp), %edi
incl %edi
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %eax
cmovel %eax, %edi
movl 0x8(%rsp), %eax
movl %eax, 0x20(%rsp)
cmpq $-0x1, %rbx
movq 0x80(%rsp), %r15
movq (%rsp), %r9
jne 0x9ac63
jmp 0x9b2c2
cmpq $-0x1, %rcx
je 0x9afe8
movl $0x0, 0x20(%rsp)
movl $0x0, %edi
testq %r10, %r10
je 0x9b016
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rbx, %rbx
js 0x9afda
movl 0x10(%r15), %r9d
movq 0x18(%r10), %rdx
movq (%rdx,%r9,8), %r14
cmpq %rbx, %r14
jle 0x9afda
addl %r12d, %r12d
movslq %r12d, %rdx
subq %rbx, %rdx
addq %r14, %rdx
addq $0x1f, %rdx
cmpq %r13, %rdx
movq 0x50(%rsp), %r12
jl 0x9afdf
movq %rdi, 0x18(%rsp)
movq %r8, 0x30(%rsp)
subq %r8, %rbx
subq %rbx, %r14
cmpq %r13, %r14
cmovgeq %r13, %r14
movl %r13d, %eax
subl %r14d, %eax
movl %eax, 0xa8(%rsp)
movl %ebx, %eax
negl %eax
testq %rbx, %rbx
movl $0x0, %esi
cmovgq %rbx, %rsi
movl 0x1c(%r15), %ecx
cltq
sarq $0x3f, %rbx
movl %eax, %edx
andl %ebx, %edx
subq %rdx, %r14
andq %rax, %rbx
movq 0x28(%rsp), %r12
leaq (%r12,%rbx), %r15
movzbl %cl, %ecx
movq %r15, %rdi
movq %r14, %rdx
movq %r10, %r8
callq 0x32ef8
movq %r12, %rdi
movl $0x4e, %esi
movq %rbx, %rdx
callq 0x20e0
addq %r15, %r14
movslq 0xa8(%rsp), %rdx
movq %r14, %rdi
movq %r12, %r14
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rbx
cmpl $0x2, %r13d
jl 0x9ad74
movl %r13d, %eax
shrl %eax
movl %r13d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %rcx
xorl %edx, %edx
movb (%r14,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%r14,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9ad5b
addq %rbx, %rbp
movq (%rsp), %rcx
cmpl $0x2, %ecx
jl 0x9adb8
movl %ecx, %eax
shrl %eax
movl %ecx, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x40(%rsp), %r8
addq %rbx, %r8
xorl %edx, %edx
movb (%rbp,%rdx), %sil
movb (%r8), %dil
movb %dil, (%rbp,%rdx)
movb %sil, (%r8)
incq %rdx
decq %r8
cmpq %rdx, %rax
jne 0x9ad9d
movzwl 0x30(%rsp), %r8d
movq %r14, %rdi
movl %r13d, %esi
movq %rbp, %rdx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
addq $0x10, %rsp
cmpl $0x2, %r13d
movq 0x80(%rsp), %r15
movq 0x50(%rsp), %r12
jl 0x9ae27
movl %r13d, %eax
shrl %eax
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %r13
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
movb (%r13), %sil
movb %sil, (%r14,%rcx)
movb %dl, (%r13)
incq %rcx
decq %r13
cmpq %rcx, %rax
jne 0x9ae0c
movq (%rsp), %rcx
cmpl $0x2, %ecx
movq 0x68(%rsp), %r10
movq 0x38(%rsp), %r11
movq 0x18(%rsp), %rdi
jl 0x9ae74
movl %ecx, %eax
shrl %eax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq 0x40(%rsp), %rdx
addq %rcx, %rdx
addq %rdx, %rbx
xorl %ecx, %ecx
movb (%rbp,%rcx), %dl
movb (%rbx), %sil
movb %sil, (%rbp,%rcx)
movb %dl, (%rbx)
incq %rcx
decq %rbx
cmpq %rcx, %rax
jne 0x9ae5b
movl 0x10(%rsp), %eax
incl %eax
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %ecx
cmovel %ecx, %eax
movl 0x8(%rsp), %ecx
jmp 0x9afdf
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
leaq (%r9,%r9,4), %rdx
movl (%rcx,%rdx,8), %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %edi, %edi
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
cmpq %r15, %r14
jae 0x9b000
leal (%r12,%r12), %esi
movslq %esi, %rsi
subq %r14, %rsi
addq %r15, %rsi
addq $0x1f, %rsi
cmpq %r13, %rsi
movq (%rsp), %r9
jl 0x9b004
subq %r8, %r14
subq %r14, %r15
cmpq %r13, %r15
cmovgeq %r13, %r15
movl %r13d, %esi
subl %r15d, %esi
movl %esi, 0x20(%rsp)
movl %r14d, %esi
negl %esi
testq %r14, %r14
movq %r8, 0x30(%rsp)
movl $0x0, %r8d
cmovgq %r14, %r8
leaq (%rcx,%rdx,8), %rdx
movslq %esi, %rcx
sarq $0x3f, %r14
movl %ecx, %esi
andl %r14d, %esi
subq %rsi, %r15
andq %rcx, %r14
movq 0x28(%rsp), %rcx
leaq (%rcx,%r14), %rsi
movq %rsi, 0x18(%rsp)
subq $0x8, %rsp
movzbl %al, %ecx
xorl %edi, %edi
movq %r15, %r9
xorl %eax, %eax
pushq %rax
callq 0x36049
addq $0x10, %rsp
movq 0x28(%rsp), %rdi
movl $0x4e, %esi
movq %r14, %rdx
callq 0x20e0
addq 0x18(%rsp), %r15
movslq 0x20(%rsp), %rdx
movq %r15, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rdx
addq %rbp, %rdx
movzwl 0x30(%rsp), %r8d
movq 0x28(%rsp), %rdi
movl %r13d, %esi
movq (%rsp), %rcx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
movq 0x40(%rsp), %r8
movq 0x10(%rsp), %r9
movq 0x48(%rsp), %r11
movq 0x78(%rsp), %r10
addq $0x10, %rsp
movl 0x10(%rsp), %edi
incl %edi
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %eax
cmovel %eax, %edi
movl 0x8(%rsp), %eax
movl %eax, 0x20(%rsp)
jmp 0x9b004
movq 0x50(%rsp), %r12
movq (%rsp), %r9
jmp 0x9b25d
xorl %edi, %edi
movl $0x0, 0x20(%rsp)
jmp 0x9b2c2
addq $0x1f, %r13
jmp 0x9b32a
movq (%rsp), %r9
cmpq $-0x1, %rbx
movq 0x80(%rsp), %r15
je 0x9b2c2
movl 0x10(%r15), %eax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rdx
leaq (%rax,%rax,4), %rsi
movl (%rdx,%rsi,8), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %r14, %rbx
jae 0x9b258
addl %r12d, %r12d
movq %rdi, 0x18(%rsp)
movslq %r12d, %rdi
subq %rbx, %rdi
addq %r14, %rdi
addq $0x1f, %rdi
cmpq %r13, %rdi
movq 0x18(%rsp), %rdi
jl 0x9b258
movl 0x1c(%r15), %eax
movq %r8, 0x30(%rsp)
subq %r8, %rbx
subq %rbx, %r14
cmpq %r13, %r14
cmovgeq %r13, %r14
movl %r13d, %ecx
subl %r14d, %ecx
movl %ecx, 0xa8(%rsp)
movl %ebx, %ecx
negl %ecx
testq %rbx, %rbx
movl $0x0, %r8d
cmovgq %rbx, %r8
leaq (%rdx,%rsi,8), %rdx
movslq %ecx, %rcx
sarq $0x3f, %rbx
movl %ecx, %esi
andl %ebx, %esi
subq %rsi, %r14
andq %rcx, %rbx
movq 0x28(%rsp), %r12
leaq (%r12,%rbx), %r15
subq $0x8, %rsp
movzbl %al, %ecx
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %r9
xorl %eax, %eax
pushq %rax
callq 0x36049
addq $0x10, %rsp
movq %r12, %rdi
movl $0x4e, %esi
movq %rbx, %rdx
callq 0x20e0
addq %r15, %r14
movslq 0xa8(%rsp), %rdx
movq %r14, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0x70(%rsp), %rax
movq (%rax), %rbx
cmpl $0x2, %r13d
jl 0x9b141
movl %r13d, %eax
shrl %eax
movl %r13d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %rcx
xorl %edx, %edx
movb (%r12,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%r12,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x9b128
addq %rbx, %rbp
movq (%rsp), %rcx
cmpl $0x2, %ecx
jl 0x9b185
movl %ecx, %eax
shrl %eax
movl %ecx, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x40(%rsp), %r8
addq %rbx, %r8
xorl %edx, %edx
movb (%rbp,%rdx), %sil
movb (%r8), %dil
movb %dil, (%rbp,%rdx)
movb %sil, (%r8)
incq %rdx
decq %r8
cmpq %rdx, %rax
jne 0x9b16a
movzwl 0x30(%rsp), %r8d
movq %r12, %rdi
movl %r13d, %esi
movq %rbp, %rdx
leaq 0x8(%rsp), %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x9b415
addq $0x10, %rsp
cmpl $0x2, %r13d
movq 0x80(%rsp), %r15
jl 0x9b1ef
movl %r13d, %eax
shrl %eax
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addq 0x60(%rsp), %r13
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
movb (%r13), %sil
movb %sil, (%r12,%rcx)
movb %dl, (%r13)
incq %rcx
decq %r13
cmpq %rcx, %rax
jne 0x9b1d4
movq (%rsp), %r9
cmpl $0x2, %r9d
movq 0x68(%rsp), %r10
movq 0x38(%rsp), %r11
movq 0x18(%rsp), %rdi
jl 0x9b241
movl %r9d, %eax
shrl %eax
movl %r9d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq 0x40(%rsp), %rdx
addq %rcx, %rdx
addq %rdx, %rbx
xorl %ecx, %ecx
movb (%rbp,%rcx), %dl
movb (%rbx), %sil
movb %sil, (%rbp,%rcx)
movb %dl, (%rbx)
incq %rcx
decq %rbx
cmpq %rcx, %rax
jne 0x9b228
movl 0x10(%rsp), %eax
incl %eax
cmpl $-0x1, 0xc(%rsp)
movl $0x0, %ecx
cmovel %ecx, %eax
movl 0x8(%rsp), %ecx
movq 0x50(%rsp), %r12
testl %eax, %eax
setne %dl
testl %edi, %edi
setne %sil
movq 0x130(%rsp), %r14
movq 0x58(%rsp), %r13
movq 0x90(%rsp), %r8
je 0x9b2e8
testl %eax, %eax
je 0x9b2e8
leal (%rax,%rdi), %edx
movslq %edx, %rsi
cmpq %rsi, %r9
jge 0x9b315
xorps %xmm0, %xmm0
cvtsi2ss %r9, %xmm0
cvtsi2ss %edx, %xmm1
addl 0x20(%rsp), %ecx
cvtsi2ss %rcx, %xmm2
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %r13, %xmm1
mulss %xmm0, %xmm2
addss %xmm2, %xmm1
cvttss2si %xmm1, %r13
jmp 0x9b32a
testl %edi, %edi
setne %sil
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x130(%rsp), %r14
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %r13
movq 0x90(%rsp), %r8
movq %rdi, %rbx
orl %eax, %edi
jne 0x9b2f4
addq %r9, %r13
jmp 0x9b32a
testb %sil, %sil
je 0x9b30b
movl 0x20(%rsp), %eax
movslq %ebx, %rcx
addq %r9, %r13
addq %rax, %r13
subq %rcx, %r13
jmp 0x9b32a
testb %dl, %dl
je 0x9b32a
movl %ecx, %ecx
cltq
jmp 0x9b321
addl 0x20(%rsp), %ecx
movslq %edi, %rdx
cltq
addq %rdx, %rax
addq %r9, %r13
subq %rax, %r13
addq %rcx, %r13
addq %r9, %r12
incq %r11
cmpq 0xa0(%rsp), %r11
jne 0x9a8b9
movl 0x4(%r15), %r8d
movl 0x8(%r15), %eax
subl %r8d, %eax
incl %eax
cmpq %rax, %r12
jne 0x9b3f6
xorps %xmm0, %xmm0
cvtsi2sd %r13, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
divsd %xmm1, %xmm0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1964d0(%rip), %rdi    # 0x231851
leaq 0x1963cb(%rip), %rsi    # 0x231753
leaq 0x19a676(%rip), %rcx    # 0x235a05
movl $0x44c, %edx            # imm = 0x44C
callq 0x2110
leaq 0x196476(%rip), %rdi    # 0x231816
leaq 0x1963ac(%rip), %rsi    # 0x231753
leaq 0x19a657(%rip), %rcx    # 0x235a05
movl $0x440, %edx            # imm = 0x440
callq 0x2110
leaq 0x196492(%rip), %rdi    # 0x231851
leaq 0x19638d(%rip), %rsi    # 0x231753
leaq 0x19a638(%rip), %rcx    # 0x235a05
movl $0x4b1, %edx            # imm = 0x4B1
callq 0x2110
leaq 0x1963ef(%rip), %rdi    # 0x2317cd
leaq 0x19636e(%rip), %rsi    # 0x231753
leaq 0x19a619(%rip), %rcx    # 0x235a05
movl $0x43c, %edx            # imm = 0x43C
callq 0x2110
leaq 0x19a699(%rip), %rdi    # 0x235a96
leaq 0x19634f(%rip), %rsi    # 0x231753
leaq 0x19a5fa(%rip), %rcx    # 0x235a05
movl $0x512, %edx            # imm = 0x512
callq 0x2110