// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: verify_ul_window(long long, long long, overlap_region_alloc*, Correct_dumy*, ul_idx_t const*, char*, double, long long, long long, void*)
void verify_ul_window(long long window_start, long long window_end, overlap_region_alloc* overlap_list,Correct_dumy* dumy, const ul_idx_t *uref,
char* r_string, double max_ov_diff_ec, long long blockLen, long long max_error, void *km)
{
    long long i;
    long long currentID;
    long long x_start, y_start, o_len;
    long long Window_Len = blockLen + (max_error << 1);
    char* x_string = NULL;
    char* y_string = NULL;
    long long x_end, x_len;
    int end_site;
    unsigned int error;
    int groupLen = 0;
    int return_sites[GROUP_SIZE];
    unsigned int return_sites_error[GROUP_SIZE];
    uint64_t overlapID[GROUP_SIZE];
    uint64_t y_startGroup[GROUP_SIZE];
    int y_extra_begin[GROUP_SIZE];
    int y_extra_end[GROUP_SIZE];
    int error_threshold[GROUP_SIZE];
    int extra_begin;
    int extra_end;

    ///here are overlaps fully covered by blockLen
    for (i = 0; i < (long long)dumy->length; i++)
    {
        extra_begin = extra_end = 0;
        ///if the window has been fully covered, the interval at x is [window_start, window_end]
        x_len = blockLen;
        currentID = dumy->overlapID[i];
        x_start = window_start;
        ///offset of y
        y_start = (x_start - overlap_list->list[currentID].x_pos_s) + overlap_list->list[currentID].y_pos_s;
        /****************************may have bugs********************************/
        y_start += y_start_offset(x_start, &(overlap_list->list[currentID].f_cigar));
        /****************************may have bugs********************************/
        
  
        if(!determine_overlap_region(max_error, y_start, overlap_list->list[currentID].y_id, Window_Len, uref->ug->u.a[overlap_list->list[currentID].y_id].len,
        &extra_begin, &extra_end, &y_start, &o_len)) {
            continue;
        }

        // if(overlap_list->list[currentID].y_id == 4) {
        //     fprintf(stderr, "[M::%s] q_s::%lld, t_s::%lld, t_pri_l::%lld, aux_beg::%d, aux_end::%d, aln_l::%lld\n", __func__, 
        //         x_start, y_start, o_len, extra_begin, extra_end, Window_Len);
        // }

        fill_subregion_ul(dumy->overlap_region_group[groupLen], y_start, o_len, overlap_list->list[currentID].y_pos_strand, 
        uref, overlap_list->list[currentID].y_id, extra_begin, extra_end);

        y_extra_begin[groupLen] = extra_begin;
        y_extra_end[groupLen] = extra_end;
        overlapID[groupLen] = currentID;
        y_startGroup[groupLen] = y_start;
        error_threshold[groupLen] = max_error;
        x_string = r_string + x_start;
        groupLen++;
        

        if (groupLen == GROUP_SIZE)
        {
            // Reserve_Banded_BPM_4_SSE_only(dumy->overlap_region_group[0], dumy->overlap_region_group[1], 
            // dumy->overlap_region_group[2], dumy->overlap_region_group[3], Window_Len, x_string, blockLen,
            //     return_sites, return_sites_error, max_error, dumy->Peq_SSE);
            return_sites[0] = 
                    Reserve_Banded_BPM(dumy->overlap_region_group[0], Window_Len, x_string, blockLen, max_error, &return_sites_error[0]);
            return_sites[1] = 
                    Reserve_Banded_BPM(dumy->overlap_region_group[1], Window_Len, x_string, blockLen, max_error, &return_sites_error[1]);
            return_sites[2] = 
                    Reserve_Banded_BPM(dumy->overlap_region_group[2], Window_Len, x_string, blockLen, max_error, &return_sites_error[2]);
            return_sites[3] = 
                    Reserve_Banded_BPM(dumy->overlap_region_group[3], Window_Len, x_string, blockLen, max_error, &return_sites_error[3]);
            




            groupLen = 0;
            
            if (return_sites_error[0]!=(unsigned int)-1) {
                overlap_list->list[overlapID[0]].align_length += x_len;

                append_window_list(&overlap_list->list[overlapID[0]], window_start, window_end, 
                            y_startGroup[0], y_startGroup[0] + return_sites[0], (int)return_sites_error[0],
                            y_extra_begin[0], y_extra_end[0], error_threshold[0], blockLen, km);
            }
            

            if (return_sites_error[1]!=(unsigned int)-1) {
                overlap_list->list[overlapID[1]].align_length += x_len;
                append_window_list(&overlap_list->list[overlapID[1]], window_start, window_end, 
                            y_startGroup[1], y_startGroup[1] + return_sites[1], (int)return_sites_error[1],
                            y_extra_begin[1], y_extra_end[1], error_threshold[1], blockLen, km);
            }
            

            if (return_sites_error[2]!=(unsigned int)-1) {
                overlap_list->list[overlapID[2]].align_length += x_len;

                append_window_list(&overlap_list->list[overlapID[2]], window_start, window_end, 
                            y_startGroup[2], y_startGroup[2] + return_sites[2], (int)return_sites_error[2],
                            y_extra_begin[2], y_extra_end[2], error_threshold[2], blockLen, km);
            }
            

            if (return_sites_error[3]!=(unsigned int)-1) {
                overlap_list->list[overlapID[3]].align_length += x_len;

                append_window_list(&overlap_list->list[overlapID[3]], window_start, window_end, 
                            y_startGroup[3], y_startGroup[3] + return_sites[3], (int)return_sites_error[3],
                            y_extra_begin[3], y_extra_end[3], error_threshold[3], blockLen, km);
            } 
        }
    }

    if (groupLen == 1)
    {
        end_site = Reserve_Banded_BPM(dumy->overlap_region_group[0], Window_Len, x_string, blockLen, max_error, &error);

        if (error!=(unsigned int)-1) {
            overlap_list->list[overlapID[0]].align_length += x_len;

            append_window_list(&overlap_list->list[overlapID[0]], window_start, window_end, 
                                y_startGroup[0], y_startGroup[0] + end_site, (int)error,
                                y_extra_begin[0], y_extra_end[0], error_threshold[0], blockLen, km);
        }
    }
    else if (groupLen > 1)
    {
        // Reserve_Banded_BPM_4_SSE_only(dumy->overlap_region_group[0], dumy->overlap_region_group[1], 
        //         dumy->overlap_region_group[2], dumy->overlap_region_group[3], Window_Len, x_string, blockLen,
        //             return_sites, return_sites_error, max_error, dumy->Peq_SSE);

        for (i = 0; i < groupLen; i++)
        {
            return_sites[i] = Reserve_Banded_BPM(dumy->overlap_region_group[i], Window_Len, x_string, blockLen, max_error, &return_sites_error[i]);

            if (return_sites_error[i]!=(unsigned int)-1) {
                overlap_list->list[overlapID[i]].align_length += x_len;
                append_window_list(&overlap_list->list[overlapID[i]], window_start, window_end, 
                                y_startGroup[i], y_startGroup[i] + return_sites[i], (int)return_sites_error[i],
                                y_extra_begin[i], y_extra_end[i], error_threshold[i], blockLen, km);
            }
        }

        groupLen = 0;
    }

    long long reverse_i = dumy->size - 1;
    int threshold;
    
    ///here are overlaps partially covered by blockLen
    for (i = 0; i < (long long)dumy->lengthNT; i++)
    {
        extra_begin = extra_end = 0;
        currentID = dumy->overlapID[reverse_i--];
        x_start = MAX(window_start, (long long)overlap_list->list[currentID].x_pos_s);
        x_end = MIN(window_end, (long long)overlap_list->list[currentID].x_pos_e);

        ///overlap length between [window_start, window_end]
        x_len = x_end - x_start + 1;
        threshold = x_len * max_ov_diff_ec;
        /****************************may have bugs********************************/
        threshold = Adjust_Threshold(threshold, x_len);
        if(threshold > THRESHOLD_MAX_SIZE) threshold = THRESHOLD_MAX_SIZE;
        /****************************may have bugs********************************/
        
        ///offset of y
        y_start = (x_start - overlap_list->list[currentID].x_pos_s) + overlap_list->list[currentID].y_pos_s;
        /****************************may have bugs********************************/
        y_start += y_start_offset(x_start, &(overlap_list->list[currentID].f_cigar));
        /****************************may have bugs********************************/

        Window_Len = x_len + (threshold << 1);

        if(!determine_overlap_region(threshold, y_start, overlap_list->list[currentID].y_id, Window_Len, uref->ug->u.a[overlap_list->list[currentID].y_id].len,
        &extra_begin, &extra_end, &y_start, &o_len)) {
            continue;
        }

        // if(overlap_list->list[currentID].y_id == 4) {
        //     fprintf(stderr, "[M::%s] q_s::%lld, t_s::%lld, t_pri_l::%lld, aux_beg::%d, aux_end::%d, aln_l::%lld\n", __func__, 
        //         x_start, y_start, o_len, extra_begin, extra_end, Window_Len);
        // }
        
        fill_subregion_ul(dumy->overlap_region, y_start, o_len, overlap_list->list[currentID].y_pos_strand, 
        uref, overlap_list->list[currentID].y_id, extra_begin, extra_end);        

        x_string = r_string + x_start;
        y_string = dumy->overlap_region;

        end_site = Reserve_Banded_BPM(y_string, Window_Len, x_string, x_len, threshold, &error);

        if (error!=(unsigned int)-1) {
            overlap_list->list[currentID].align_length += x_len;
            append_window_list(&overlap_list->list[currentID], x_start, x_end, y_start, y_start + end_site, (int)error,
            extra_begin, extra_end, threshold, blockLen, km);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movsd %xmm0, 0xf8(%rsp)
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x188(%rsp), %r13
movq 0x180(%rsp), %r12
leaq (%r12,%r13,2), %rax
movq %rax, 0x58(%rsp)
leaq 0x244(%rcx), %rax
movq %rax, 0x38(%rsp)
movq %r9, 0xf0(%rsp)
movq %rdi, 0x20(%rsp)
leaq (%r9,%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x438(%rcx), %rax
movq %rax, 0xe8(%rsp)
leaq 0x62c(%rcx), %rax
movq %rax, 0xe0(%rsp)
leaq 0x820(%rcx), %rax
movq %rax, 0xd8(%rsp)
movq $0x0, 0x68(%rsp)
xorl %ecx, %ecx
movl $0x0, 0x18(%rsp)
movq %r8, 0x60(%rsp)
movq %rbp, 0x90(%rsp)
movzwl %r13w, %eax
movl %eax, 0x70(%rsp)
cmpq 0x30(%rbp), %rcx
jge 0x1c41e
andl $0x0, 0x8(%rsp)
andl $0x0, 0xc(%rsp)
movq 0x28(%rbp), %rax
movq %rcx, 0x88(%rsp)
movq (%rax,%rcx,8), %rcx
movq 0x10(%rsp), %rbp
movq (%rbp), %rax
movq %rcx, 0x78(%rsp)
imulq $0xa8, %rcx, %r12
leaq (%rax,%r12), %rsi
addq $0x38, %rsi
movl -0x34(%rsi), %eax
movl -0x24(%rsi), %r15d
movq 0x20(%rsp), %rdi
movq %rdi, %rbx
subq %rax, %rbx
callq 0x1bebf
addq %rax, %r15
addq %rbx, %r15
movq %r15, 0x80(%rsp)
movq (%rbp), %rbp
movl 0x10(%rbp,%r12), %ebx
movq (%r14), %rax
movq 0x10(%rax), %rax
imulq $0x28, %rbx, %rcx
movl (%rax,%rcx), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
subq $0x8, %rsp
movl %r13d, %edi
movq %r15, %rsi
movq 0x60(%rsp), %rcx
leaq 0x14(%rsp), %r9
leaq 0xa0(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
callq 0x1b53a
addq $0x20, %rsp
testl %eax, %eax
je 0x1c3fe
movl 0x18(%rsp), %r13d
movslq %r13d, %r14
imulq $0x1f4, %r14, %rdi      # imm = 0x1F4
addq 0x38(%rsp), %rdi
movq 0x80(%rsp), %r15
movq 0x98(%rsp), %rdx
movzbl 0x1c(%rbp,%r12), %ecx
movl 0xc(%rsp), %r12d
movl 0x8(%rsp), %ebp
movq %r15, %rsi
movq 0x60(%rsp), %r8
movq %rbx, %r9
pushq %rbp
pushq %r12
callq 0x1b4ca
popq %rax
popq %rcx
movl %r12d, 0xc0(%rsp,%r14,4)
movl %ebp, 0xb0(%rsp,%r14,4)
movq 0x78(%rsp), %rax
movq %rax, 0x120(%rsp,%r14,8)
movq %r15, 0x100(%rsp,%r14,8)
movq 0x188(%rsp), %rcx
movl %ecx, 0xa0(%rsp,%r14,4)
movq 0x60(%rsp), %r14
incl %r13d
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movl %r13d, 0x18(%rsp)
cmpl $0x4, %r13d
movq 0x90(%rsp), %rbp
movq 0x180(%rsp), %r12
movq %rcx, %r13
jne 0x1c40e
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %r14
movl %r14d, %esi
movq 0x50(%rsp), %r13
movq %r13, %rdx
movl %r12d, %ecx
movl 0x70(%rsp), %r15d
movl %r15d, %r8d
leaq 0x40(%rsp), %r9
callq 0x516e4
movl %eax, %ebx
movq 0xe8(%rsp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
leaq 0x44(%rsp), %r9
callq 0x516e4
movl %eax, 0x78(%rsp)
movq 0xe0(%rsp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
leaq 0x48(%rsp), %r9
callq 0x516e4
movl %eax, 0x18(%rsp)
movq 0xd8(%rsp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
leaq 0x4c(%rsp), %r9
callq 0x516e4
movl %eax, %r14d
cmpl $-0x1, 0x40(%rsp)
je 0x1c283
imulq $0xa8, 0x120(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
addl %r12d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0x100(%rsp), %ecx
addl %ecx, %ebx
movl 0x40(%rsp), %r9d
movl 0xc0(%rsp), %eax
movl 0xb0(%rsp), %r10d
movl 0xa0(%rsp), %r11d
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl %ebx, %r8d
pushq 0x198(%rsp)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
callq 0x13b3b
addq $0x30, %rsp
cmpl $-0x1, 0x44(%rsp)
je 0x1c2f7
imulq $0xa8, 0x128(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
addl %r12d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0x108(%rsp), %ecx
movl 0x78(%rsp), %r8d
addl %ecx, %r8d
movl 0x44(%rsp), %r9d
movl 0xc4(%rsp), %eax
movl 0xb4(%rsp), %r10d
movl 0xa4(%rsp), %r11d
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
pushq 0x198(%rsp)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
callq 0x13b3b
addq $0x30, %rsp
cmpl $-0x1, 0x48(%rsp)
je 0x1c36b
imulq $0xa8, 0x130(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
addl %r12d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0x110(%rsp), %ecx
movl 0x18(%rsp), %r8d
addl %ecx, %r8d
movl 0x48(%rsp), %r9d
movl 0xc8(%rsp), %eax
movl 0xb8(%rsp), %r10d
movl 0xa8(%rsp), %r11d
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
pushq 0x198(%rsp)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
callq 0x13b3b
addq $0x30, %rsp
movl $0x0, 0x18(%rsp)
cmpl $-0x1, 0x4c(%rsp)
je 0x1c3e5
imulq $0xa8, 0x138(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
addl %r12d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0x118(%rsp), %ecx
addl %ecx, %r14d
movl 0x4c(%rsp), %r9d
movl 0xcc(%rsp), %eax
movl 0xbc(%rsp), %r10d
movl 0xac(%rsp), %r11d
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl %r14d, %r8d
pushq 0x198(%rsp)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
callq 0x13b3b
addq $0x30, %rsp
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %r14
movq 0x188(%rsp), %r13
jmp 0x1c40e
movq 0x90(%rsp), %rbp
movq 0x180(%rsp), %r12
movq 0x88(%rsp), %rcx
incq %rcx
jmp 0x1c006
cmpl $0x1, 0x18(%rsp)
jne 0x1c4cd
leaq 0x2c(%rsp), %rbx
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x68(%rsp), %rdx
movl %r12d, %ecx
movl 0x70(%rsp), %r8d
movq %rbx, %r9
callq 0x516e4
cmpl $-0x1, (%rbx)
je 0x1c59d
imulq $0xa8, 0x120(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq (%rdx), %rdx
movq 0x180(%rsp), %r14
addl %r14d, 0x28(%rdx,%rcx)
leaq (%rdx,%rcx), %rdi
movl 0x100(%rsp), %ecx
addl %ecx, %eax
movl 0x2c(%rsp), %r9d
movl 0xc0(%rsp), %r10d
movl 0xb0(%rsp), %r11d
movl 0xa0(%rsp), %ebx
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl %eax, %r8d
pushq 0x198(%rsp)
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x13b3b
addq $0x30, %rsp
jmp 0x1c59d
movl 0x70(%rsp), %r13d
jle 0x1c59d
movl 0x18(%rsp), %r15d
shlq $0x2, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x1c59d
leaq (%rsp,%r12), %rbx
addq $0x40, %rbx
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x180(%rsp), %r14
movl %r14d, %ecx
movl %r13d, %r8d
movq %rbx, %r9
callq 0x516e4
cmpl $-0x1, (%rbx)
je 0x1c58b
imulq $0xa8, 0x120(%rsp,%r12,2), %rcx
movq 0x10(%rsp), %rdx
movq (%rdx), %rdx
addl %r14d, 0x28(%rdx,%rcx)
leaq (%rdx,%rcx), %rdi
movl 0x100(%rsp,%r12,2), %ecx
addl %ecx, %eax
movl 0x40(%rsp,%r12), %r9d
movl 0xc0(%rsp,%r12), %r10d
movl 0xb0(%rsp,%r12), %r11d
movl 0xa0(%rsp,%r12), %ebx
subq $0x8, %rsp
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl %eax, %r8d
pushq 0x198(%rsp)
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x13b3b
addq $0x30, %rsp
addq $0x4, %r12
addq $0x1f4, 0x38(%rsp)      # imm = 0x1F4
jmp 0x1c4e4
movq 0x40(%rbp), %rax
leaq 0x50(%rbp), %rcx
movq %rcx, 0x50(%rsp)
leaq -0x8(,%rax,8), %rcx
xorl %eax, %eax
cmpq 0x38(%rbp), %rax
jge 0x1c7d5
movq %rax, 0x78(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, 0xc(%rsp)
movq 0x28(%rbp), %rax
movq %rcx, 0x18(%rsp)
imulq $0xa8, (%rax,%rcx), %r14
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax,%r14), %ecx
movq %rcx, %rbp
cmpq 0x20(%rsp), %rcx
jg 0x1c5fa
movq 0x20(%rsp), %rbp
movl 0x8(%rax,%r14), %ebx
cmpq 0x30(%rsp), %rbx
jl 0x1c60b
movq 0x30(%rsp), %rbx
movq %rbx, 0x38(%rsp)
subq %rbp, %rbx
leaq 0x1(%rbx), %rsi
movq %rsi, 0x88(%rsp)
cvtsi2sd %rsi, %xmm0
mulsd 0xf8(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movl %edx, %esi
cmpl $0x1f, %edx
jl 0x1c63b
pushq $0x1f
popq %rsi
cmpq $0x3, %rbx
movl %esi, %r13d
pushq $0x1
popq %rdi
cmovgel %edi, %r13d
testl %edx, %edx
cmovnel %esi, %r13d
movq %rbp, %rdx
subq %rcx, %rdx
leaq (%rax,%r14), %rsi
addq $0x38, %rsi
movl -0x24(%rsi), %r12d
addq %rdx, %r12
movq %rbp, %rdi
callq 0x1bebf
addq %rax, %r12
movq %r12, 0x80(%rsp)
leal (,%r13,2), %eax
cltq
leaq (%rbx,%rax), %rcx
incq %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rbx
movl 0x10(%rbx,%r14), %r15d
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, %r15, %rdx
movl (%rax,%rdx), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
subq $0x8, %rsp
movl %r13d, %edi
movq %r12, %rsi
movq %rcx, 0x60(%rsp)
leaq 0x14(%rsp), %r9
leaq 0xa0(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
callq 0x1b53a
addq $0x20, %rsp
testl %eax, %eax
je 0x1c7b7
movq 0x80(%rsp), %r12
movq 0x98(%rsp), %rdx
movzbl 0x1c(%rbx,%r14), %ecx
movl 0xc(%rsp), %eax
movl 0x8(%rsp), %r10d
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq 0x60(%rsp), %r8
movq %r15, %r9
movq %rax, %r15
movq %r10, 0x70(%rsp)
pushq %r10
pushq %rax
callq 0x1b4ca
popq %rax
popq %rcx
movq 0xf0(%rsp), %rax
leaq (%rax,%rbp), %rdx
movzwl %r13w, %r8d
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
movq 0x88(%rsp), %rcx
leaq 0x2c(%rsp), %r9
callq 0x516e4
cmpl $-0x1, 0x2c(%rsp)
je 0x1c7b7
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq 0x88(%rsp), %rdx
addl %edx, 0x28(%rcx,%r14)
leaq (%rcx,%r14), %rdi
addl %r12d, %eax
movl 0x2c(%rsp), %r9d
subq $0x8, %rsp
movq %rbp, %rsi
movq 0x40(%rsp), %rdx
movl %r12d, %ecx
movl %eax, %r8d
pushq 0x198(%rsp)
pushq 0x190(%rsp)
pushq %r13
pushq 0x90(%rsp)
pushq %r15
callq 0x13b3b
addq $0x30, %rsp
movq 0x78(%rsp), %rax
incq %rax
movq 0x18(%rsp), %rcx
addq $-0x8, %rcx
movq 0x90(%rsp), %rbp
jmp 0x1c5b4
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq