// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: process_boundary(overlap_region_alloc*, All_reads*, Correct_dumy*, Graph*, Graph*, Cigar_record*, long long, Round2_alignment*, window_list_alloc*)
int process_boundary(overlap_region_alloc* overlap_list, All_reads* R_INF, Correct_dumy* dumy, Graph* g, Graph* DAGCon,
Cigar_record* current_cigar, long long uncorrected_window_start, Round2_alignment* second_round, window_list_alloc* win_ciagr_buf)
{
    char* r_string = dumy->corrected_read;
    long long r_total_length = current_cigar->new_read_length;
    long long corrected_window_start, corrected_window_end;
    int extra_begin;
    int extra_end;

    if(dumy->last_boundary_length == 0)
    {
        return 0;
    }

    corrected_window_start = dumy->last_boundary_length - WINDOW_BOUNDARY/2;
    corrected_window_end = dumy->last_boundary_length + WINDOW_BOUNDARY/2 - 1;

    if(corrected_window_start < 0)
    {
        corrected_window_start = 0;
    }

    if (corrected_window_end >= current_cigar->new_read_length)
    {
        corrected_window_end = current_cigar->new_read_length - 1;
    }

    clear_Graph(g);
    clear_Graph(DAGCon);

    long long x_start, x_end;
    long long x_length, x_len, o_len;
    int threshold; 
    long long Window_Len;
    char* x_string = NULL;
    char* y_string = NULL;
    char* backbone = NULL;
    long long backbone_length;
    long long i;
    long long y_start, y_length;
    long long overlapID, windowID;
    long long startNodeID, endNodeID, currentNodeID;
    int end_site;
    unsigned int error;
    int real_y_start;
    long long total_error = 0;

    backbone = r_string + corrected_window_start;
    backbone_length = corrected_window_end - corrected_window_start + 1;
    addUnmatchedSeqToGraph(g, backbone, backbone_length, &startNodeID, &endNodeID);


    long long correct_x_pos_s;
    long long matched_coverage = 0;
    for (i = 0; i < (long long)dumy->length; i++)
    {
        overlapID = dumy->overlapID[i];
        correct_x_pos_s = (overlap_list->list[overlapID].x_pos_s / WINDOW) * WINDOW;
        windowID = (uncorrected_window_start - correct_x_pos_s) / WINDOW;

        ///skip if window is unmatched
        if (overlap_list->list[overlapID].w_list.a[windowID].y_end == -1)
        {
            continue;
        }

        x_start = overlap_list->list[overlapID].w_list.a[windowID].x_start;
        y_start = overlap_list->list[overlapID].w_list.a[windowID].y_start;

        


        /**
         * There are total 3 cases:
         * 1.  this window of x is overlapped fully by y
         *     x: ------|------|---------
         *     y: ------|------|---------
         *     in this case, x_start == uncorrected_window_start, x_length == WINDOW
         * 2.  the suiffx of x's window is overlapped by the prefix of y
         *     x: ------|------|---------
         *               y: |--|-----------  
         *      in this case, x_start > uncorrected_window_start, x_length < WINDOW
         *      this overlap is useless
         * 3.  the prefix of x's window is overlapped by y (see last window)
         *      x: |------|------|-----|---
         *                 y: |--|-----|------  
         *      or
         *          x: |------|------|-----|----
         *        y: --|------|------|-----|--
         *      
         *      in this case, x_start == uncorrected_window_start, x_length < WINDOW
         * 
         *      case 1 and case 3 are useful, while case 2 is useless
         * **/

        ///case 1 and case 3 are useful
        if(x_start == uncorrected_window_start)
        {
            extra_begin = extra_end = 0;
            x_start = corrected_window_start;
            x_end = corrected_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);
            /****************************may have bugs********************************/
            ///y_start may less than 0
            y_start = y_start - WINDOW_BOUNDARY/2;

            ///in fact, we don't need this line, just worry for bug
            if(y_start < 0)
            {
                continue;
            }

            Window_Len = x_len + (threshold << 1);

            error =(unsigned int)-1;
            if(determine_overlap_region(threshold, y_start, overlap_list->list[overlapID].y_id, Window_Len, Get_READ_LENGTH((*R_INF), overlap_list->list[overlapID].y_id),
            &extra_begin, &extra_end, &y_start, &o_len))
            {
                fill_subregion(dumy->overlap_region, y_start, o_len, overlap_list->list[overlapID].y_pos_strand, 
                R_INF, overlap_list->list[overlapID].y_id, extra_begin, extra_end);

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

                ///both end site and real_y_start have extra_begin
                ///should be improved, since most of overlaps are exact overlaps
                ///we can do it quickly
                end_site = Reserve_Banded_BPM_PATH(y_string, Window_Len, x_string, x_len, threshold, &error, &real_y_start,
                        &(dumy->path_length), dumy->matrix_bit, dumy->path, -1, -1);
            }

            

            ///try to calculate using higher threshold
            if(error==(unsigned int)-1)
            {
                extra_begin = extra_end = 0;
                x_start = corrected_window_start;
                x_end = corrected_window_end;
                x_len = x_end - x_start + 1;
                threshold = threshold * 2;
                /****************************may have bugs********************************/
                threshold = Adjust_Threshold(threshold, x_len);
                /****************************may have bugs********************************/
                if(x_len >= 300 && threshold < THRESHOLD_MAX_SIZE)
                {
                    threshold = THRESHOLD_MAX_SIZE;
                }
                if(threshold > THRESHOLD_MAX_SIZE)
                {
                    threshold = THRESHOLD_MAX_SIZE;
                }
                Window_Len = x_len + (threshold << 1);
                y_start = overlap_list->list[overlapID].w_list.a[windowID].y_start - WINDOW_BOUNDARY/2;

                ///in fact, we don't need this line, just worry for bug
                if(y_start < 0)
                {
                    continue;
                }

                error =(unsigned int)-1;
                if(determine_overlap_region(threshold, y_start, overlap_list->list[overlapID].y_id, Window_Len, Get_READ_LENGTH((*R_INF), overlap_list->list[overlapID].y_id),
                &extra_begin, &extra_end, &y_start, &o_len))
                {
                    fill_subregion(dumy->overlap_region, y_start, o_len, overlap_list->list[overlapID].y_pos_strand, 
                    R_INF, overlap_list->list[overlapID].y_id, extra_begin, extra_end);

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

                    ///both end site and real_y_start have extra_begin
                    ///should be improved, since most of overlaps are exact overlaps
                    ///we can do it quickly
                    end_site = Reserve_Banded_BPM_PATH(y_string, Window_Len, x_string, x_len, threshold, &error, &real_y_start,
                            &(dumy->path_length), dumy->matrix_bit, dumy->path, -1, -1);
                }
            }

            if (error!=(unsigned int)-1)
            {

                

                total_error = total_error + error;
                matched_coverage++;
                win_ciagr_buf->a[0].x_start = x_start; win_ciagr_buf->a[0].x_end = x_end;
                win_ciagr_buf->c.n = 0;
                generate_cigar(dumy->path, dumy->path_length, &(win_ciagr_buf->a[0]), win_ciagr_buf, &real_y_start, &end_site, &error, x_string, x_len, y_string);  
                ///both end site and real_y_start have extra_begin
                real_y_start -= extra_begin;
                end_site -= extra_begin;

                y_length = end_site - real_y_start + 1;
                y_start = y_start + real_y_start;
                

                x_start = corrected_window_start;
                x_length = corrected_window_end - x_start + 1;

                ///here can be improved, make y_string = dumy->overlap_region + real_y_start + extra_begin
                recover_UC_Read_sub_region(dumy->overlap_region, y_start, y_length, overlap_list->list[overlapID].y_pos_strand, 
                R_INF, overlap_list->list[overlapID].y_id);

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

                currentNodeID = x_start - corrected_window_start;
                
                addmatchedSeqToGraph(g, currentNodeID, x_string, x_length, y_string, y_length, &(win_ciagr_buf->a[0]), win_ciagr_buf, startNodeID, endNodeID);
            }

        }///case 2 is useless
        else if(x_start != uncorrected_window_start)
        {
            continue;
        }        
    }


    if(matched_coverage >= MIN_COVERAGE_THRESHOLD)
    {
        ///if there are no error, we do not need correction
        if(total_error == 0)
        {
            return 0;
        }
        
        clear_Cigar_record(&(second_round->tmp_cigar));
        clear_Correct_dumy_pure(&(second_round->dumy));

        ///correct bases in [start_base, end_base]
        long long start_base = corrected_window_start + WINDOW_UNCORRECT_SINGLE_SIDE_BOUNDARY;
        long long end_base = corrected_window_end - WINDOW_UNCORRECT_SINGLE_SIDE_BOUNDARY;

        if(end_base > start_base)
        {
            ///note there is an additional "S" node
            ///and start from i-th node, we can correct (i+1)-th base
            /// so the condition when traversing graph is 
            ///(node >= start_base - corrected_window_start && node <= end_base - corrected_window_start)
            get_seq_from_Graph(g, DAGCon, &(second_round->dumy), &(second_round->tmp_cigar), backbone, 
            r_string, r_total_length, corrected_window_start);
            
            /**
            if(verify_cigar_2(backbone, backbone_length, second_round->dumy.corrected_read, 
                second_round->dumy.corrected_read_length, &(second_round->tmp_cigar), -1))
            {
                fprintf(stderr, "hahah\n");
            }
            **/
            
            merge_cigars(dumy, current_cigar, second_round, start_base, end_base,
            corrected_window_start, corrected_window_end);
            


        }
        
    }
    else
    {
        return 0;
    }

    return 1;
    
    
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, 0xa0(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x4f111
movq %rdi, 0x70(%rsp)
movq 0x18(%rsp), %r13
movq (%r13), %rbx
movl 0x20(%r9), %edx
leaq 0xba(%rax), %rsi
cmpq $0xbc, %rax
movl $0xbb, %r14d
cmovgeq %rax, %r14
leaq -0xbb(%r14), %r15
leal -0x1(%rdx), %ebp
movq %rdx, 0xd0(%rsp)
cmpq %rdx, %rsi
cmovlq %rsi, %rbp
movq %rcx, %rdi
movq %rcx, %r12
callq 0x45328
movq 0xa0(%rsp), %rdi
callq 0x45328
movq %rbx, 0xc8(%rsp)
leaq (%rbx,%r14), %rsi
addq $-0xbb, %rsi
movq %rbp, 0xb0(%rsp)
movq %r15, 0x98(%rsp)
subq %r15, %rbp
movq %rbp, 0xb8(%rsp)
leaq 0x1(%rbp), %r15
leaq 0xf0(%rsp), %rcx
leaq 0xe8(%rsp), %r8
movq %r12, %rdi
movq %rsi, 0x40(%rsp)
movq %r15, %rdx
callq 0x45367
cmpq $0x0, 0x30(%r13)
jle 0x4f111
movq %r14, 0xc0(%rsp)
movq 0x130(%rsp), %r9
movq %r15, 0x28(%rsp)
cvtsi2sd %r15, %xmm0
movsd %xmm0, 0xe0(%rsp)
movq 0x18(%rsp), %rcx
leaq 0x50(%rcx), %rax
movq %rax, 0x58(%rsp)
leaq 0x7d70(%rcx), %rax
movq %rax, 0x88(%rsp)
leaq 0xff0(%rcx), %rax
movq %rax, 0x80(%rsp)
leaq 0xa14(%rcx), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0xa8(%rsp)
movabsq $-0x513cc1e098ead65b, %rbp # imm = 0xAEC33E1F671529A5
movq $0x0, 0x90(%rsp)
xorl %r15d, %r15d
xorl %r11d, %r11d
movq $0x0, 0x10(%rsp)
movq %r12, 0x78(%rsp)
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
imulq $0xa8, (%rax,%r15,8), %rbx
movq 0x70(%rsp), %rax
movq (%rax), %rsi
movl 0x4(%rsi,%rbx), %eax
imulq $0x57619f1, %rax, %rax  # imm = 0x57619F1
shrq $0x23, %rax
imull $0x177, %eax, %eax      # imm = 0x177
movq %r9, %rcx
subq %rax, %rcx
movq %rcx, %rax
imulq %rbp
movq %rdx, %r14
addq %rcx, %r14
movq %r14, %rax
shrq $0x3f, %rax
sarq $0x8, %r14
addq %rax, %r14
movq 0x58(%rsi,%rbx), %rax
shlq $0x5, %r14
cmpl $-0x1, 0xc(%rax,%r14)
je 0x4ef83
addq %r14, %rax
movslq (%rax), %rcx
cmpq %r9, %rcx
jne 0x4ef83
leaq 0x23bb37(%rip), %rcx    # 0x28a758
movsd 0xc0(%rcx), %xmm0
mulsd 0xe0(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
movl %ecx, %r12d
movl $0x1, %edx
cmovel %edx, %r12d
cmpq $0x3, 0xb8(%rsp)
movslq 0x8(%rax), %rdx
cmovll %ecx, %r12d
cmpq $0xbb, %rdx
jl 0x4ef83
leaq -0xbb(%rdx), %r8
leal (%r12,%r12), %eax
movl %eax, 0x60(%rsp)
movslq %eax, %rdi
movq 0x28(%rsp), %rax
leaq (%rax,%rdi), %r10
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movl 0x10(%rsi,%rbx), %eax
movq 0x30(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%rax,8), %rcx
movb $0x1, %al
cmpq %r8, %rcx
movq %r10, 0x68(%rsp)
jle 0x4ecb5
subq %rdx, %rdi
leaq (%rdi,%rcx), %rdx
addq $0xda, %rdx
cmpq %r10, %rdx
jge 0x4ecbc
xorl %edi, %edi
xorl %r10d, %r10d
jmp 0x4ed07
movslq %r12d, %rax
subq %rax, %r8
subq %r8, %rcx
cmpq %r10, %rcx
cmovgeq %r10, %rcx
movl %r10d, %edx
subl %ecx, %edx
movl %r8d, %edi
negl %edi
xorl %eax, %eax
testq %r8, %r8
movq %r11, 0x20(%rsp)
movq %r8, %r13
movl $0x0, %r8d
cmovgq %r13, %r8
sarq $0x3f, %r13
andl %edi, %r13d
subq %r13, %rcx
movslq %edx, %r10
movl %r13d, %edi
movq 0x20(%rsp), %r11
movq %rcx, 0x38(%rsp)
testb %al, %al
jne 0x4eded
addq %rbx, %rsi
movzbl 0x1c(%rsi), %ecx
movl 0x10(%rsi), %r9d
movslq %edi, %rdx
movq %rdx, 0xd8(%rsp)
movq 0x58(%rsp), %r13
leaq (%r13,%rdx), %rbp
movq %rdi, 0x48(%rsp)
movq %rbp, %rdi
movq %r8, %rsi
movq %r10, 0x10(%rsp)
movq 0x38(%rsp), %rdx
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %r8
callq 0x337f7
movq %r13, %rdi
movl $0x4e, %esi
movq 0xd8(%rsp), %rdx
callq 0x20e0
addq 0x38(%rsp), %rbp
movq %rbp, %rdi
movl $0x4e, %esi
movq 0x10(%rsp), %rdx
callq 0x20e0
movzwl %r12w, %r8d
movq %r13, %rdi
movq 0x68(%rsp), %rsi
movq 0x40(%rsp), %rbp
movq %rbp, %rdx
movq 0x28(%rsp), %rcx
leaq 0x4(%rsp), %r9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
pushq %rax
pushq %rax
pushq 0x60(%rsp)
pushq 0x98(%rsp)
pushq 0xa8(%rsp)
leaq 0x30(%rsp), %rax
pushq %rax
callq 0x8607d
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %r8
movq 0x160(%rsp), %r9
addq $0x30, %rsp
movl %eax, 0xc(%rsp)
movq %rbp, 0x10(%rsp)
movabsq $-0x513cc1e098ead65b, %rbp # imm = 0xAEC33E1F671529A5
movq %r13, %r11
cmpl $-0x1, 0x4(%rsp)
je 0x4ef23
movl 0x4(%rsp), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x4ef83
addq %rax, 0x90(%rsp)
incq 0xa8(%rsp)
movq 0x140(%rsp), %rcx
movq 0x10(%rcx), %rdx
movq 0x98(%rsp), %rax
movl %eax, (%rdx)
movq 0xb0(%rsp), %rax
movl %eax, 0x4(%rdx)
movq $0x0, 0x18(%rcx)
movq 0x18(%rsp), %rax
movl 0x7d70(%rax), %esi
movq %rdi, %r14
movq 0x50(%rsp), %rdi
movq %r8, %r13
leaq 0x8(%rsp), %r8
leaq 0xc(%rsp), %r9
pushq %r11
movq 0x30(%rsp), %r12
pushq %r12
pushq 0x20(%rsp)
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x8663c
addq $0x20, %rsp
movslq 0x8(%rsp), %rax
movslq %r14d, %rcx
subq %rcx, %rax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %edx
subl %ecx, %edx
movl %edx, 0xc(%rsp)
subl %eax, %edx
incl %edx
movslq %edx, %r14
addq %rax, %r13
movq 0x70(%rsp), %rax
movq (%rax), %rax
movzbl 0x1c(%rax,%rbx), %ecx
movl 0x10(%rax,%rbx), %r9d
movq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq 0x30(%rsp), %r8
callq 0x337f7
movq 0x78(%rsp), %rdi
xorl %esi, %esi
movq 0x40(%rsp), %rbx
movq %rbx, %rdx
movq %r12, %rcx
movq %rbp, %r8
movq %r14, %r9
pushq 0xe8(%rsp)
pushq 0xf8(%rsp)
movq 0x150(%rsp), %rax
pushq %rax
pushq 0x10(%rax)
callq 0x45442
movq 0x150(%rsp), %r9
addq $0x20, %rsp
movq %rbx, 0x10(%rsp)
movq %rbp, %r11
movabsq $-0x513cc1e098ead65b, %rbp # imm = 0xAEC33E1F671529A5
jmp 0x4ef83
testl %r12d, %r12d
movl 0x60(%rsp), %edx
movl %edx, %eax
movl $0x1, %ecx
cmovel %ecx, %eax
movq 0xb8(%rsp), %rcx
cmpq $0x3, %rcx
cmovll %edx, %eax
cmpl $0x20, %eax
movl $0x1f, %r12d
cmovgel %eax, %r12d
cmpq $0x12b, %rcx            # imm = 0x12B
cmovll %eax, %r12d
cmpl $0x1f, %r12d
movl $0x1f, %eax
cmovgel %eax, %r12d
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq 0x58(%rax,%rbx), %rcx
movslq 0x8(%rcx,%r14), %r8
cmpq $0xbb, %r8
jge 0x4ef9a
incq %r15
movq 0x18(%rsp), %rax
cmpq 0x30(%rax), %r15
jl 0x4eba8
jmp 0x4f127
leal (%r12,%r12), %ecx
movslq %ecx, %rsi
movq 0x28(%rsp), %rcx
leaq (%rcx,%rsi), %r10
addq $-0xbb, %r8
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movl 0x10(%rax,%rbx), %ecx
movq 0x30(%rsp), %rdx
movq 0x18(%rdx), %rdx
movq (%rdx,%rcx,8), %rdx
movb $0x1, %cl
cmpq %r8, %rdx
jle 0x4efe0
subq %r8, %rsi
addq %rdx, %rsi
addq $0x1f, %rsi
cmpq %r10, %rsi
jge 0x4efe6
xorl %edi, %edi
xorl %esi, %esi
jmp 0x4f027
movslq %r12d, %rcx
subq %rcx, %r8
subq %r8, %rdx
cmpq %r10, %rdx
cmovgeq %r10, %rdx
movl %r10d, %esi
subl %edx, %esi
movl %r8d, %edi
negl %edi
xorl %ecx, %ecx
testq %r8, %r8
movq %r8, %r14
movl $0x0, %r8d
cmovgq %r14, %r8
sarq $0x3f, %r14
andl %edi, %r14d
subq %r14, %rdx
movslq %esi, %rsi
movl %r14d, %edi
movq %rdx, 0x38(%rsp)
testb %cl, %cl
jne 0x4edf8
movzbl 0x1c(%rax,%rbx), %ecx
movl 0x10(%rax,%rbx), %r9d
movslq %edi, %rdx
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %r13
leaq (%r13,%rdx), %rbp
movq %rdi, 0x48(%rsp)
movq %rbp, %rdi
movq %rsi, 0x68(%rsp)
movq %r8, %rsi
movq 0x38(%rsp), %r14
movq %r14, %rdx
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %r8
movq %r10, 0x10(%rsp)
callq 0x337f7
movq %r13, %rdi
movl $0x4e, %esi
movq 0x60(%rsp), %rdx
callq 0x20e0
addq %r14, %rbp
movq %rbp, %rdi
movabsq $-0x513cc1e098ead65b, %rbp # imm = 0xAEC33E1F671529A5
movl $0x4e, %esi
movq 0x68(%rsp), %rdx
callq 0x20e0
movzwl %r12w, %r8d
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq 0x40(%rsp), %r12
movq %r12, %rdx
movq 0x28(%rsp), %rcx
leaq 0x4(%rsp), %r9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
pushq %rax
pushq %rax
pushq 0x60(%rsp)
pushq 0x98(%rsp)
pushq 0xa8(%rsp)
leaq 0x30(%rsp), %rax
pushq %rax
callq 0x8607d
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %r8
movq 0x160(%rsp), %r9
addq $0x30, %rsp
movl %eax, 0xc(%rsp)
movq %r12, 0x10(%rsp)
movq %r13, %r11
jmp 0x4edf8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
cmpq $0x3, 0xa8(%rsp)
jl 0x4f113
cmpq $0x0, 0x90(%rsp)
je 0x4f113
xorl %eax, %eax
movq 0x138(%rsp), %r12
movl %eax, 0x8de0(%r12)
movq %rax, 0x8dd8(%r12)
movq %rax, 0x8df8(%r12)
movl %eax, 0x8dc4(%r12)
movb $0x7f, 0x8dc0(%r12)
movq %rax, 0x48(%r12)
movq %rax, 0x20(%r12)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r12)
movapd %xmm0, 0x30(%r12)
movq 0xc0(%rsp), %rbx
addq $-0xa2, %rbx
movq 0xb0(%rsp), %r15
addq $-0x19, %r15
movl $0x1, %ebp
cmpq %rbx, %r15
jle 0x4f113
leaq 0x8dc0(%r12), %rcx
movq 0x78(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq %r12, %rdx
movq 0x40(%rsp), %r8
movq 0xc8(%rsp), %r9
movq 0x98(%rsp), %r14
pushq %r14
pushq 0xd8(%rsp)
callq 0x4de85
movq 0x28(%rsp), %rdi
movq %r12, %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x4e6bb
addq $0x10, %rsp
jmp 0x4f113