// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: verify_window(long long, long long, overlap_region_alloc*, Correct_dumy*, All_reads*, char*)
void verify_window(long long window_start, long long window_end, overlap_region_alloc* overlap_list,Correct_dumy* dumy, All_reads* R_INF,
char* r_string)
{
    long long i;
    long long currentID;
    long long x_start, y_start, o_len;
    long long Window_Len = WINDOW + (THRESHOLD << 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 WINDOW
    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 = WINDOW;
        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(THRESHOLD, y_start, overlap_list->list[currentID].y_id, Window_Len, Get_READ_LENGTH((*R_INF), overlap_list->list[currentID].y_id),
        &extra_begin, &extra_end, &y_start, &o_len)) {
            continue;
        }

        fill_subregion(dumy->overlap_region_group[groupLen], y_start, o_len, overlap_list->list[currentID].y_pos_strand, 
        R_INF, 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] = THRESHOLD;
        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, WINDOW,
                return_sites, return_sites_error, THRESHOLD, dumy->Peq_SSE);
            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], WINDOW, NULL);
            }
            

            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], WINDOW, NULL);
            }
            

            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], WINDOW, NULL);
            }
            

            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], WINDOW, NULL);
            }  
        }
    }

    if (groupLen == 1)
    {
        end_site = Reserve_Banded_BPM(dumy->overlap_region_group[0], Window_Len, x_string, WINDOW, THRESHOLD, &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], WINDOW, NULL);
        }
    }
    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, WINDOW,
			        return_sites, return_sites_error, THRESHOLD, dumy->Peq_SSE);

        for (i = 0; i < groupLen; 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], WINDOW, NULL);
            }
        }

        groupLen = 0;
    }

    long long reverse_i = dumy->size - 1;
    int threshold;
    
    ///here are overlaps partially covered by WINDOW
    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 * asm_opt.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, Get_READ_LENGTH((*R_INF), overlap_list->list[currentID].y_id),
        &extra_begin, &extra_end, &y_start, &o_len)) {
            continue;
        }
        
        fill_subregion(dumy->overlap_region, y_start, o_len, overlap_list->list[currentID].y_pos_strand, 
        R_INF, 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, WINDOW, NULL);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r9, 0xd8(%rsp)
movq %r8, 0x88(%rsp)
movq %rcx, %r12
movq %rdx, (%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x30(%rcx)
movq %rcx, 0x60(%rsp)
jle 0x4816b
leaq 0x244(%r12), %rax
movq %rax, 0x20(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
leaq 0x438(%r12), %rax
movq %rax, 0x80(%rsp)
leaq 0x62c(%r12), %rax
movq %rax, 0x78(%rsp)
leaq 0x820(%r12), %rax
movq %rax, 0x70(%rsp)
leaq 0x7d80(%r12), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x10(%rsp)
movq 0x28(%r12), %rax
movq (%rax,%rbx,8), %rcx
movq (%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x68(%rsp)
imulq $0xa8, %rcx, %r14
leaq (%rax,%r14), %r12
addq $0x38, %r12
movl -0x34(%r12), %r13d
movl -0x24(%r12), %ebp
movl 0x8(%r12), %esi
decl %esi
movq %r12, %rdi
callq 0x3d110
cltq
movl 0x8(%r12), %r15d
cmpq 0x8(%rsp), %rax
je 0x47c3a
testl %r15d, %r15d
je 0x4843e
xorl %r15d, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x3d110
cltq
cmpq 0x8(%rsp), %rax
jg 0x47c23
incq %r15
movl 0x8(%r12), %eax
cmpq %rax, %r15
jb 0x47c00
jmp 0x47c31
testq %r15, %r15
je 0x4843e
movl 0x8(%r12), %eax
cmpq %rax, %r15
je 0x4843e
movq 0x8(%rsp), %rax
subq %r13, %rax
addq %rax, %rbp
decl %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x3d11b
movslq %eax, %r12
addq %rbp, %r12
js 0x47c8c
movq (%rsp), %rax
movq (%rax), %rax
movl 0x10(%rax,%r14), %r9d
movq 0x88(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%r9,8), %r15
movq %r15, %rcx
subq %r12, %rcx
jle 0x47c8c
addq $0x3d, %rcx
cmpq $0x195, %rcx            # imm = 0x195
jge 0x47ca4
movq 0x60(%rsp), %r12
incq %rbx
cmpq 0x30(%r12), %rbx
jl 0x47ba9
jmp 0x47fe0
leaq -0xf(%r12), %rcx
negl %ecx
subq $0xf, %r12
movl $0x0, %edx
cmovbq %rcx, %rdx
movl %ecx, %esi
movl $0x0, %ecx
cmovael %ecx, %esi
subq %r12, %r15
movl $0x195, %edi            # imm = 0x195
cmpq %rdi, %r15
cmovgeq %rdi, %r15
movl $0x195, %edi            # imm = 0x195
subl %r15d, %edi
movl %edi, 0x10(%rsp)
testq %r12, %r12
cmovleq %rcx, %r12
subq %rdx, %r15
movq %rbx, 0x58(%rsp)
movq 0x38(%rsp), %rbx
movslq %ebx, %rbx
imulq $0x1f4, %rbx, %r13      # imm = 0x1F4
addq 0x20(%rsp), %r13
movzbl 0x1c(%rax,%r14), %ecx
movslq %esi, %rbp
movq %r13, %r14
addq %rbp, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq 0x88(%rsp), %r8
callq 0x32ef8
movq %r13, %rdi
movl $0x4e, %esi
movq %rbp, %rdx
callq 0x20e0
addq %r14, %r15
movslq 0x10(%rsp), %r14
movq %r15, %rdi
movl $0x4e, %esi
movq %r14, %rdx
callq 0x20e0
movl %ebp, 0xb0(%rsp,%rbx,4)
movl %r14d, 0xa0(%rsp,%rbx,4)
movq 0x68(%rsp), %rax
movq %rax, 0x100(%rsp,%rbx,8)
movq %r12, 0xe0(%rsp,%rbx,8)
movl $0xf, 0x90(%rsp,%rbx,4)
incl %ebx
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rbx, 0x38(%rsp)
cmpl $0x4, %ebx
movq 0x58(%rsp), %rbx
movq 0x60(%rsp), %r12
jne 0x47c91
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl $0x195, %r8d            # imm = 0x195
movq 0x38(%rsp), %r9
pushq 0x58(%rsp)
pushq $0xf
leaq 0x58(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
pushq $0x177                  # imm = 0x177
callq 0x8515b
addq $0x30, %rsp
cmpl $-0x1, 0x40(%rsp)
je 0x47e63
imulq $0xa8, 0x100(%rsp), %rax
movq (%rsp), %rcx
movq (%rcx), %rcx
movl $0x177, %r14d           # imm = 0x177
addl %r14d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0xe0(%rsp), %ecx
movl 0xc0(%rsp), %r8d
addl %ecx, %r8d
movl 0x40(%rsp), %r9d
movl 0xb0(%rsp), %eax
movl 0xa0(%rsp), %r10d
movl 0x90(%rsp), %r11d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x0
pushq %r14
pushq %r11
pushq %r10
pushq %rax
callq 0x3efc4
addq $0x30, %rsp
cmpl $-0x1, 0x44(%rsp)
je 0x47eda
imulq $0xa8, 0x108(%rsp), %rax
movq (%rsp), %rcx
movq (%rcx), %rcx
movl $0x177, %r14d           # imm = 0x177
addl %r14d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0xe8(%rsp), %ecx
movl 0xc4(%rsp), %r8d
addl %ecx, %r8d
movl 0x44(%rsp), %r9d
movl 0xb4(%rsp), %eax
movl 0xa4(%rsp), %r10d
movl 0x94(%rsp), %r11d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x0
pushq %r14
pushq %r11
pushq %r10
pushq %rax
callq 0x3efc4
addq $0x30, %rsp
cmpl $-0x1, 0x48(%rsp)
je 0x47f51
imulq $0xa8, 0x110(%rsp), %rax
movq (%rsp), %rcx
movq (%rcx), %rcx
movl $0x177, %r14d           # imm = 0x177
addl %r14d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0xf0(%rsp), %ecx
movl 0xc8(%rsp), %r8d
addl %ecx, %r8d
movl 0x48(%rsp), %r9d
movl 0xb8(%rsp), %eax
movl 0xa8(%rsp), %r10d
movl 0x98(%rsp), %r11d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x0
pushq %r14
pushq %r11
pushq %r10
pushq %rax
callq 0x3efc4
addq $0x30, %rsp
movq $0x0, 0x38(%rsp)
cmpl $-0x1, 0x4c(%rsp)
je 0x47fd1
imulq $0xa8, 0x118(%rsp), %rax
movq (%rsp), %rcx
movq (%rcx), %rcx
movl $0x177, %r14d           # imm = 0x177
addl %r14d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0xf8(%rsp), %ecx
movl 0xcc(%rsp), %r8d
addl %ecx, %r8d
movl 0x4c(%rsp), %r9d
movl 0xbc(%rsp), %eax
movl 0xac(%rsp), %r10d
movl 0x9c(%rsp), %r11d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x0
pushq %r14
pushq %r11
pushq %r10
pushq %rax
callq 0x3efc4
addq $0x30, %rsp
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x47c91
movq 0x38(%rsp), %rbx
cmpl $0x1, %ebx
jne 0x4808d
movl $0x177, %ebx            # imm = 0x177
leaq 0x1c(%rsp), %r14
movq 0x20(%rsp), %rdi
movl $0x195, %esi            # imm = 0x195
movq 0x10(%rsp), %rdx
movl $0x177, %ecx            # imm = 0x177
movl $0xf, %r8d
movq %r14, %r9
callq 0x84e99
cmpl $-0x1, (%r14)
je 0x4816b
imulq $0xa8, 0x100(%rsp), %rcx
movq (%rsp), %rdx
movq (%rdx), %rdx
addl %ebx, 0x28(%rdx,%rcx)
leaq (%rdx,%rcx), %rdi
movl 0xe0(%rsp), %ecx
addl %ecx, %eax
movl 0x1c(%rsp), %r9d
movl 0xb0(%rsp), %r10d
movl 0xa0(%rsp), %r11d
movl 0x90(%rsp), %r14d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl %eax, %r8d
pushq $0x0
pushq %rbx
pushq %r14
pushq %r11
pushq %r10
callq 0x3efc4
addq $0x30, %rsp
jmp 0x4816b
jle 0x4816b
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl $0x195, %r8d            # imm = 0x195
movq 0x18(%rsp), %r9
pushq 0x58(%rsp)
pushq $0xf
leaq 0x58(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
pushq $0x177                  # imm = 0x177
callq 0x8515b
addq $0x30, %rsp
movl %ebx, %ebx
shlq $0x2, %rbx
xorl %r14d, %r14d
movl $0x177, %r15d           # imm = 0x177
cmpl $-0x1, 0x40(%rsp,%r14)
je 0x48162
imulq $0xa8, 0x100(%rsp,%r14,2), %rax
movq (%rsp), %rcx
movq (%rcx), %rcx
addl %r15d, 0x28(%rcx,%rax)
leaq (%rcx,%rax), %rdi
movl 0xe0(%rsp,%r14,2), %ecx
movl 0xc0(%rsp,%r14), %r8d
addl %ecx, %r8d
movl 0x40(%rsp,%r14), %r9d
movl 0xb0(%rsp,%r14), %eax
movl 0xa0(%rsp,%r14), %r10d
movl 0x90(%rsp,%r14), %r11d
subq $0x8, %rsp
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x0
pushq %r15
pushq %r11
pushq %r10
pushq %rax
callq 0x3efc4
addq $0x30, %rsp
addq $0x4, %r14
cmpq %r14, %rbx
jne 0x480ee
cmpq $0x0, 0x38(%r12)
jle 0x4842c
movq 0x40(%r12), %rcx
leaq 0x50(%r12), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
movq %r14, 0x30(%rsp)
movq 0x28(%r12), %rax
movq %rcx, 0x38(%rsp)
imulq $0xa8, -0x8(%rax,%rcx,8), %rcx
movq (%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x68(%rsp)
leaq (%rax,%rcx), %r12
addq $0x38, %r12
movl -0x34(%r12), %r13d
movl -0x30(%r12), %ecx
movq 0x8(%rsp), %rbp
cmpq %rbp, %r13
cmovgq %r13, %rbp
movq 0x28(%rsp), %rax
cmpq %rax, %rcx
cmovgeq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, %rax
subq %rbp, %rax
leaq 0x1(%rax), %rdx
movq %rdx, 0x58(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
leaq 0x24d55e(%rip), %rcx    # 0x295758
mulsd 0xc0(%rcx), %xmm0
cvttsd2si %xmm0, %ecx
cmpl $0x1f, %ecx
movl $0x1f, %edx
cmovll %ecx, %edx
cmpq $0x3, %rax
movl %edx, %ebx
movl $0x1, %eax
cmovgel %eax, %ebx
testl %ecx, %ecx
cmovnel %edx, %ebx
movl -0x24(%r12), %r14d
movl 0x8(%r12), %esi
decl %esi
movq %r12, %rdi
callq 0x3d110
cltq
movl 0x8(%r12), %r15d
cmpq %rax, %rbp
je 0x48288
testl %r15d, %r15d
je 0x48443
xorl %r15d, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x3d110
cltq
cmpq %rax, %rbp
jl 0x48271
incq %r15
movl 0x8(%r12), %eax
cmpq %rax, %r15
jb 0x48250
jmp 0x4827f
testq %r15, %r15
je 0x48443
movl 0x8(%r12), %eax
cmpq %rax, %r15
je 0x48443
movq %rbp, %rax
subq %r13, %rax
addq %rax, %r14
decl %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x3d11b
movslq %eax, %r12
addq %r14, %r12
movq 0x30(%rsp), %r14
js 0x48411
movq (%rsp), %rax
movq (%rax), %rax
movq 0x68(%rsp), %rcx
movl 0x10(%rax,%rcx), %r9d
movq 0x88(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%r9,8), %r13
cmpq %r12, %r13
jle 0x48411
leal (%rbx,%rbx), %ecx
movslq %ecx, %rcx
movq 0x58(%rsp), %rdx
leaq (%rdx,%rcx), %r15
subq %r12, %rcx
addq %r13, %rcx
addq $0x1f, %rcx
cmpq %r15, %rcx
jl 0x48411
movslq %ebx, %rcx
subq %rcx, %r12
subq %r12, %r13
cmpq %r15, %r13
cmovgeq %r15, %r13
movq %r15, %rcx
subq %r13, %rcx
movq %rcx, 0x50(%rsp)
movl %r12d, %ecx
negl %ecx
testq %r12, %r12
movl $0x0, %esi
cmovgq %r12, %rsi
sarq $0x3f, %r12
andl %ecx, %r12d
subq %r12, %r13
movq 0x68(%rsp), %rcx
movzbl 0x1c(%rax,%rcx), %ecx
movslq %r12d, %rdx
movq %rdx, 0x78(%rsp)
movq 0x20(%rsp), %rax
leaq (%rax,%rdx), %rdi
movq %rdi, 0x80(%rsp)
movq %rsi, 0x70(%rsp)
movq %r13, %rdx
movq 0x88(%rsp), %r8
callq 0x32ef8
movq 0x20(%rsp), %rdi
movl $0x4e, %esi
movq 0x78(%rsp), %rdx
callq 0x20e0
addq 0x80(%rsp), %r13
movslq 0x50(%rsp), %rdx
movq %r13, %rdi
movl $0x4e, %esi
callq 0x20e0
movq 0xd8(%rsp), %rax
leaq (%rax,%rbp), %rdx
movzwl %bx, %r8d
movq 0x20(%rsp), %rdi
movl %r15d, %esi
movq 0x58(%rsp), %rcx
leaq 0x1c(%rsp), %r9
callq 0x84e99
cmpl $-0x1, 0x1c(%rsp)
je 0x48411
movq (%rsp), %rcx
movq (%rcx), %rcx
movq 0x68(%rsp), %rdx
movq 0x58(%rsp), %rsi
addl %esi, 0x28(%rcx,%rdx)
leaq (%rcx,%rdx), %rdi
movq 0x70(%rsp), %rcx
addl %ecx, %eax
movl 0x1c(%rsp), %r9d
subq $0x8, %rsp
movq %rbp, %rsi
movq 0x18(%rsp), %rdx
movl %eax, %r8d
pushq $0x0
pushq $0x177                  # imm = 0x177
pushq %rbx
pushq 0x70(%rsp)
pushq %r12
callq 0x3efc4
addq $0x30, %rsp
movq 0x38(%rsp), %rcx
decq %rcx
incq %r14
movq 0x60(%rsp), %r12
cmpq 0x38(%r12), %r14
jl 0x48189
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5690
callq 0x56bc