// File: /workspace/github_c_makefile_star2_O2/akumrao[P]videoAnalyzer/encoder/me.c
// Function: x264_me_diamond(x264_t*, unsigned char*, int, unsigned char*, int, int, int, int*, int*)
static int x264_me_diamond( x264_t *h,  
                                uint8_t *p_ref, int i_ref,  
                                uint8_t *p_img, int i_img,  
                                int i_sad_mode,  
                                int i_lambda_motion,  
                                int *pi_mvx, int *pi_mvy )  
    {  
        int bw, bh;  
        int i_bsatd;  
        int i_bmx, i_bmy;  
      
        /* block size */  
        switch( i_sad_mode )  
        {  
            case PIXEL_16x16:  
                bw = bh = 16;  
                break;  
            case PIXEL_16x8:  
                bw = 16; bh = 8;  
                break;  
            case PIXEL_8x16:  
                bw = 8; bh = 16;  
                break;  
            case PIXEL_8x8:  
                bw = 8; bh = 8;  
                break;  
            case PIXEL_8x4:  
                bw = 8; bh = 4;  
                break;  
            case PIXEL_4x8:  
                bw = 4; bh = 8;  
                break;  
            case PIXEL_4x4:  
            default:  
                bw = 4; bh = 4;  
                break;  
        }  
      
        /* init with center */  
        i_bmx = x264_clip3( (*pi_mvx)>>2, -16, 16 );  
        i_bmy = x264_clip3( (*pi_mvy)>>2, -16, 16 );  
        i_bsatd = h->pixf.sad[i_sad_mode]( p_img, i_img, &p_ref[i_bmy*i_ref+i_bmx], i_ref );  
      
        for( ;; )  
        {  
            int satd[4];  
            int i, i_b;  
            if( i_bmx < -16 || i_bmx > 16 || i_bmy < -16 || i_bmy > 16 )  
            {  
                break;  
            }  
    #define TEST_MV( mx, my ) \
            h->pixf.sad[i_sad_mode]( p_img, i_img, &p_ref[(my)*i_ref+(mx)], i_ref ) + \
                i_lambda_motion * ( bs_size_se(((mx)<<2) - (*pi_mvx))+bs_size_se(((my)<<2) - (*pi_mvy)) )  
            satd[0] = TEST_MV( i_bmx,   i_bmy-1 );  
            satd[1] = TEST_MV( i_bmx,   i_bmy+1 );  
            satd[2] = TEST_MV( i_bmx-1, i_bmy );  
            satd[3] = TEST_MV( i_bmx+1, i_bmy );  
    #undef TEST_MV  
      
            for( i = 1, i_b = 0; i < 4; i++ )  
            {  
                if( satd[i] < satd[i_b] )  
                {  
                    i_b = i;  
                }  
            }  
            if( satd[i_b] >= i_bsatd )  
            {  
                break;  
            }  
      
            if( i_b == 0 )      i_bmy--;  
            else if( i_b == 1 ) i_bmy++;  
            else if( i_b == 2 ) i_bmx--;  
            else if( i_b == 3 ) i_bmx++;  
            i_bsatd = satd[i_b];  
        }  
      
        /* 1/4 pixel rafinement using diamond research */  
        i_bsatd = h->pixf.satd[i_sad_mode]( p_img, i_img, &p_ref[i_bmx+i_bmy*i_ref], i_ref ) +  
                    i_lambda_motion * ( bs_size_se((i_bmx<<2) - (*pi_mvx))+bs_size_se((i_bmy<<2) - (*pi_mvy)) );  
        i_bmx <<= 2;  
        i_bmy <<= 2;  
        {  
            uint8_t pix[16*16];  
            int satd[4];  
            int i, i_b;  
      
    #define TEST_MV( s, mx, my ) \
            h->mc[MC_LUMA]( p_ref, i_ref, pix, bw, (mx), (my), bw, bh ); \
            (s) = h->pixf.satd[i_sad_mode]( p_img, i_img, pix, bw ) + \
                i_lambda_motion * ( bs_size_se((mx) - (*pi_mvx))+bs_size_se((my) - (*pi_mvy)) )  
      
            TEST_MV( satd[0], i_bmx,   i_bmy-1 );  
            TEST_MV( satd[1], i_bmx,   i_bmy+1 );  
            TEST_MV( satd[2], i_bmx-1, i_bmy );  
            TEST_MV( satd[3], i_bmx+1, i_bmy );  
            for( i = 1, i_b = 0; i < 4; i++ )  
            {  
                if( satd[i] < satd[i_b] )  
                {  
                    i_b = i;  
                }  
            }  
            if( satd[i_b] < i_bsatd )  
            {  
                if( i_b == 0 )      i_bmy--;  
                else if( i_b == 1 ) i_bmy++;  
                else if( i_b == 2 ) i_bmx--;  
                else if( i_b == 3 ) i_bmx++;  
                i_bsatd = satd[i_b];  
      
                if( i_b != 1 ) { TEST_MV( satd[0], i_bmx,   i_bmy-1 ); } else { satd[0] = i_bsatd; }  
                if( i_b != 0 ) { TEST_MV( satd[1], i_bmx,   i_bmy+1 ); } else { satd[1] = i_bsatd; }  
                if( i_b != 3 ) { TEST_MV( satd[2], i_bmx-1, i_bmy   ); } else { satd[2] = i_bsatd; }  
                if( i_b != 2 ) { TEST_MV( satd[3], i_bmx+1, i_bmy   ); } else { satd[3] = i_bsatd; }  
      
                for( i = 1, i_b = 0; i < 4; i++ )  
                {  
                    if( satd[i] < satd[i_b] )  
                    {  
                        i_b = i;  
                    }  
                }  
                if( satd[i_b] < i_bsatd )  
                {  
                    if( i_b == 0 )      i_bmy--;  
                    else if( i_b == 1 ) i_bmy++;  
                    else if( i_b == 2 ) i_bmx--;  
                    else if( i_b == 3 ) i_bmx++;  
                    i_bsatd = satd[i_b];  
                }  
            }  
    #undef TEST_MV  
        }  
      
      
        *pi_mvx = i_bmx;  
        *pi_mvy = i_bmy;  
      
        return i_bsatd;  
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r8d, -0x30(%rbp)
movq %rcx, %r14
movl %edx, -0x2c(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, -0x70(%rbp)
cmpl $0x5, %r9d
ja 0x14cfa
movl %r9d, %eax
leaq 0xd815(%rip), %rcx      # 0x224fc
movl (%rcx,%rax,4), %ecx
movq %rcx, -0x80(%rbp)
leaq 0xd81f(%rip), %rcx      # 0x22514
movl (%rcx,%rax,4), %eax
jmp 0x14d01
pushq $0x4
popq %rax
movq %rax, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movl 0x10(%rbp), %r12d
movq 0x18(%rbp), %rax
movl (%rax), %esi
sarl $0x2, %esi
pushq $0x10
popq %rax
cmpl %eax, %esi
cmovgel %eax, %esi
cmpl $-0xf, %esi
pushq $-0x10
popq %rcx
cmovll %ecx, %esi
movq 0x20(%rbp), %rdx
movl (%rdx), %r13d
sarl $0x2, %r13d
cmpl %eax, %r13d
cmovgel %eax, %r13d
cmpl $-0xf, %r13d
cmovll %ecx, %r13d
movslq %r9d, %rbx
movl %r13d, %eax
movl -0x2c(%rbp), %ecx
imull %ecx, %eax
movq %rsi, -0x40(%rbp)
addl %esi, %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq %r14, %rdi
movl -0x30(%rbp), %esi
movq -0x70(%rbp), %rax
callq *0x10f2a8(%rax,%rbx,8)
movq %r14, -0x60(%rbp)
movq %rbx, %rdx
movq %rbx, -0x78(%rbp)
movl %eax, %ecx
movq -0x40(%rbp), %rax
addl $-0x11, %eax
cmpl $-0x21, %eax
jb 0x14ff8
leal -0x11(%r13), %eax
cmpl $-0x22, %eax
jbe 0x14ff8
movl %ecx, -0x44(%rbp)
leal -0x1(%r13), %eax
movl %eax, -0x54(%rbp)
movl -0x2c(%rbp), %ecx
imull %ecx, %eax
movq -0x40(%rbp), %rbx
addl %ebx, %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq %r14, %rdi
movl -0x30(%rbp), %esi
movq %r13, %r14
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %r8
callq *0x10f2a8(%r8,%rax,8)
movl %eax, -0x68(%rbp)
leal (,%rbx,4), %r13d
movl %r13d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r15d
leal -0x4(,%r14,4), %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r15d, %eax
imull %r12d, %eax
addl -0x68(%rbp), %eax
movl %eax, -0x1c0(%rbp)
leal 0x1(%r14), %eax
movl %eax, -0xa8(%rbp)
movl -0x2c(%rbp), %ecx
imull %ecx, %eax
addl %ebx, %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %r15d
movl %r15d, %esi
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %r8
callq *0x10f2a8(%r8,%rax,8)
movl %eax, -0x68(%rbp)
movq %r13, -0x38(%rbp)
movl %r13d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
leal 0x4(,%r14,4), %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
imull 0x10(%rbp), %eax
addl -0x68(%rbp), %eax
movl %eax, -0x1bc(%rbp)
movl %r14d, %r13d
movl -0x2c(%rbp), %ecx
imull %ecx, %r13d
leal -0x1(%rbx), %eax
movl %eax, -0xb8(%rbp)
leal (%rbx,%r13), %eax
decl %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rdi
movl %r15d, %esi
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %r15
callq *0x10f2a8(%r15,%rax,8)
movl %eax, -0x68(%rbp)
leal -0x4(,%rbx,4), %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movq %r14, -0xb0(%rbp)
leal (,%r14,4), %r14d
movl %r14d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
imull 0x10(%rbp), %eax
addl -0x68(%rbp), %eax
movl %eax, -0x1b8(%rbp)
leal 0x1(%rbx), %eax
movl %eax, -0xb4(%rbp)
movq %r13, -0xc0(%rbp)
leal (%rbx,%r13), %eax
incl %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %ecx
movq -0x78(%rbp), %r13
callq *0x10f2a8(%r15,%r13,8)
movl %eax, %r15d
leal 0x4(,%rbx,4), %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movq %r14, -0x68(%rbp)
movl %r14d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
movl 0x10(%rbp), %r12d
imull %r12d, %eax
addl %r15d, %eax
movl %eax, -0x1b4(%rbp)
xorl %ecx, %ecx
pushq $0x1
popq %rax
movslq %ecx, %rdx
cmpq $0x4, %rax
je 0x14f8e
movl -0x1c0(%rbp,%rax,4), %edi
movl %eax, %esi
cmpl -0x1c0(%rbp,%rdx,4), %edi
jl 0x14f87
movl %ecx, %esi
incq %rax
movl %esi, %ecx
jmp 0x14f6a
movl -0x1c0(%rbp,%rdx,4), %eax
cmpl -0x44(%rbp), %eax
movq -0x60(%rbp), %r14
jge 0x15023
cmpl $0x3, %ecx
ja 0x14fe6
movl %ecx, %ecx
leaq 0xd060(%rip), %rdx      # 0x22010
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %r13, %rdx
movl -0x54(%rbp), %ecx
jmp 0x14ff0
movq %r13, %rdx
movl -0xb8(%rbp), %ecx
jmp 0x14fd5
movq %r13, %rdx
movl -0xb4(%rbp), %ecx
movq %rcx, -0x40(%rbp)
jmp 0x14fe9
movq %r13, %rdx
movl -0xa8(%rbp), %ecx
jmp 0x14ff0
movq %r13, %rdx
movq -0xb0(%rbp), %rcx
movl %ecx, %r13d
jmp 0x14d75
movl %r13d, %eax
imull -0x2c(%rbp), %eax
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rax
leal (,%rax,4), %eax
movq %rax, -0x38(%rbp)
shll $0x2, %r13d
movl %r13d, %eax
movq %rax, -0x68(%rbp)
movq %rdx, %r13
movq -0xc0(%rbp), %rax
addl -0x40(%rbp), %eax
movslq %eax, %rdx
addq -0x50(%rbp), %rdx
movq %r14, %rdi
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %ecx
movq -0x70(%rbp), %rax
callq *0x10f2e0(%rax,%r13,8)
movl %eax, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %edi
movq 0x18(%rbp), %r14
subl (%r14), %edi
callq 0x15763
movl %eax, %r15d
movq -0x68(%rbp), %rax
movl %eax, %edi
movq %rax, %r14
movq %rax, -0x68(%rbp)
movq 0x20(%rbp), %rbx
subl (%rbx), %edi
callq 0x15763
addl %r15d, %eax
imull %r12d, %eax
movl %eax, -0x44(%rbp)
leal -0x1(%r14), %r13d
leaq -0x1c0(%rbp), %rdx
movq -0x50(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %esi
movq -0x80(%rbp), %rbx
movl %ebx, %ecx
movq -0x38(%rbp), %r12
movl %r12d, %r8d
movl %r13d, %r9d
movq -0x88(%rbp), %r14
pushq %r14
pushq %rbx
movq -0x70(%rbp), %r14
callq *0x10f380(%r14)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %ebx, %ecx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r14,%rax,8)
movl %eax, -0x54(%rbp)
movl %r12d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movl %r13d, -0x40(%rbp)
movq 0x20(%rbp), %rax
subl (%rax), %r13d
movl %r13d, %edi
callq 0x15763
addl %r12d, %eax
imull 0x10(%rbp), %eax
addl -0x54(%rbp), %eax
movl %eax, -0xa0(%rbp)
movq -0x68(%rbp), %r13
orl $0x1, %r13d
movq %r15, %rdi
movl -0x2c(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %ebx, %ecx
movq -0x38(%rbp), %r15
movl %r15d, %r8d
movl %r13d, %r9d
pushq -0x88(%rbp)
pushq %rbx
movq %r14, %r12
callq *0x10f380(%r14)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %ebx, %ecx
movq -0x78(%rbp), %r14
callq *0x10f2e0(%r12,%r14,8)
movl %eax, -0x54(%rbp)
movl %r15d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movq %r13, -0xa8(%rbp)
movl %r13d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
imull 0x10(%rbp), %eax
addl -0x54(%rbp), %eax
movl %eax, -0x9c(%rbp)
leal -0x1(%r15), %r12d
movq -0x50(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %ebx, %ecx
movl %r12d, %r8d
movq -0x68(%rbp), %r15
movl %r15d, %r9d
pushq -0x88(%rbp)
pushq %rbx
movq -0x70(%rbp), %r13
callq *0x10f380(%r13)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %ebx, %ecx
callq *0x10f2e0(%r13,%r14,8)
movl %eax, %r14d
movl %r12d, -0x54(%rbp)
movq 0x18(%rbp), %rax
subl (%rax), %r12d
movl %r12d, %edi
callq 0x15763
movl %eax, %r12d
movl %r15d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
imull 0x10(%rbp), %eax
addl %r14d, %eax
movl %eax, -0x98(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %r14d
orl $0x1, %r14d
movq -0x50(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x1c0(%rbp), %r12
movq %r12, %rdx
movl %ebx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
pushq -0x88(%rbp)
pushq %rbx
callq *0x10f380(%r13)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
movq %r12, %rdx
movl %ebx, %ecx
movq %r15, %rbx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r13,%rax,8)
movl %r14d, %r13d
movl %eax, %r15d
movl %r14d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movl %ebx, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r12d, %eax
movl 0x10(%rbp), %r12d
imull %r12d, %eax
addl %r15d, %eax
movl %eax, -0x94(%rbp)
xorl %r14d, %r14d
pushq $0x1
popq %rax
movslq %r14d, %rcx
cmpq $0x4, %rax
je 0x152da
movl -0xa0(%rbp,%rax,4), %esi
movl %eax, %edx
cmpl -0xa0(%rbp,%rcx,4), %esi
jl 0x152d2
movl %r14d, %edx
incq %rax
movl %edx, %r14d
jmp 0x152b4
movl -0x44(%rbp), %esi
addl -0xb0(%rbp), %esi
movl -0xa0(%rbp,%rcx,4), %edx
cmpl %esi, %edx
movq -0x88(%rbp), %r10
jge 0x15641
cmpl $0x3, %r14d
movl %edx, -0x44(%rbp)
ja 0x15357
movl %r14d, %eax
leaq 0xcd14(%rip), %rcx      # 0x22020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq -0x50(%rbp), %rdi
jmpq *%rax
addl $-0x2, %ebx
movl %ebx, %r9d
movq -0x80(%rbp), %r13
jmp 0x15366
movl -0x40(%rbp), %r9d
movl -0x54(%rbp), %eax
movl %eax, %r12d
jmp 0x15338
movl -0x40(%rbp), %r9d
movl %r13d, %r12d
movl %ebx, -0x40(%rbp)
movq -0x80(%rbp), %r13
jmp 0x1536a
movl %edx, -0xa0(%rbp)
movq -0x80(%rbp), %r13
movq -0xa8(%rbp), %rax
jmp 0x153fd
movl -0x40(%rbp), %r9d
movl %ebx, -0x40(%rbp)
movq -0x80(%rbp), %r13
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %r12
leaq -0x1c0(%rbp), %rdx
movl -0x2c(%rbp), %esi
movl %r13d, %ecx
movl %r12d, %r8d
movl %r9d, %ebx
pushq %r10
pushq %r13
movq -0x70(%rbp), %r15
callq *0x10f380(%r15)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %r13d, %ecx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r15,%rax,8)
movl %eax, %r13d
movq %r12, -0x38(%rbp)
movl %r12d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r15d
movq 0x20(%rbp), %rax
subl (%rax), %ebx
movl %ebx, %edi
callq 0x15763
addl %r15d, %eax
imull 0x10(%rbp), %eax
addl %r13d, %eax
movl %eax, -0xa0(%rbp)
testl %r14d, %r14d
je 0x154bf
movl -0x40(%rbp), %eax
movq -0x80(%rbp), %r13
movq -0x50(%rbp), %rdi
movq -0x88(%rbp), %r10
movq %rax, -0xa8(%rbp)
leal 0x1(%rax), %ebx
leaq -0x1c0(%rbp), %rdx
movl -0x2c(%rbp), %esi
movl %r13d, %ecx
movq -0x38(%rbp), %r15
movl %r15d, %r8d
movl %ebx, %r9d
pushq %r10
pushq %r13
movq -0x70(%rbp), %r12
callq *0x10f380(%r12)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %r13d, %ecx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r12,%rax,8)
movl %eax, %r13d
movl %r15d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r12d
movq 0x20(%rbp), %rax
subl (%rax), %ebx
movl %ebx, %edi
callq 0x15763
addl %r12d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl %r13d, %eax
movl %eax, -0x9c(%rbp)
cmpl $0x3, %r14d
jne 0x154b3
movl -0x44(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x70(%rbp), %r13
movq -0x80(%rbp), %r12
movl -0x2c(%rbp), %esi
movq -0x50(%rbp), %rdi
movq -0x88(%rbp), %r10
movq -0xa8(%rbp), %r9
jmp 0x15576
movq -0xa8(%rbp), %rax
movl %eax, %r15d
jmp 0x154cc
movl -0x44(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x40(%rbp), %r15d
movq -0x38(%rbp), %rax
leal -0x1(%rax), %ebx
leaq -0x1c0(%rbp), %rdx
movq -0x50(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x80(%rbp), %r12
movl %r12d, %ecx
movl %ebx, %r8d
movl %r15d, %r9d
movq -0x88(%rbp), %rax
pushq %rax
pushq %r12
movq -0x70(%rbp), %r13
callq *0x10f380(%r13)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1c0(%rbp), %rdx
movl %r12d, %ecx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r13,%rax,8)
movl %eax, -0x40(%rbp)
movq 0x18(%rbp), %rax
subl (%rax), %ebx
movl %ebx, %edi
callq 0x15763
movl %eax, %ebx
movl %r15d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl -0x2c(%rbp), %esi
movq -0x88(%rbp), %r10
movq -0x50(%rbp), %rdi
addl %ebx, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x40(%rbp), %eax
movl %eax, -0x98(%rbp)
movl %r15d, %r9d
movl %r15d, %ebx
movl -0x44(%rbp), %r8d
movl %r8d, %eax
cmpl $0x2, %r14d
je 0x155e8
movq -0x38(%rbp), %rax
leal 0x1(%rax), %ebx
leaq -0x1c0(%rbp), %r14
movq %r14, %rdx
movl %r12d, %ecx
movl %ebx, %r8d
movq %r9, %r15
pushq %r10
pushq %r12
callq *0x10f380(%r13)
addq $0x10, %rsp
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
movq %r14, %rdx
movl %r12d, %ecx
movq -0x78(%rbp), %rax
callq *0x10f2e0(%r13,%rax,8)
movl %eax, %r14d
movq 0x18(%rbp), %rax
subl (%rax), %ebx
movl %ebx, %edi
callq 0x15763
movl %eax, %ebx
movl %r15d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl -0x44(%rbp), %r8d
addl %ebx, %eax
imull 0x10(%rbp), %eax
addl %r14d, %eax
movl %r15d, %ebx
movl %eax, -0x94(%rbp)
xorl %eax, %eax
pushq $0x1
popq %rcx
movslq %eax, %rdx
cmpq $0x4, %rcx
je 0x15617
movl -0xa0(%rbp,%rcx,4), %edi
movl %ecx, %esi
cmpl -0xa0(%rbp,%rdx,4), %edi
jl 0x15610
movl %eax, %esi
incq %rcx
movl %esi, %eax
jmp 0x155f3
movl -0xa0(%rbp,%rdx,4), %esi
cmpl %r8d, %esi
jge 0x1563e
cmpl $0x3, %eax
ja 0x15641
movl %eax, %eax
leaq 0xc9ff(%rip), %rcx      # 0x22030
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl %ebx
jmp 0x15641
movl %r8d, %esi
movq -0x38(%rbp), %rcx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
movq 0x20(%rbp), %rax
movl %ebx, (%rax)
movl %esi, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rcx
decl %ecx
jmp 0x15645
movq -0x38(%rbp), %rcx
incl %ecx
jmp 0x15645
incl %ebx
jmp 0x15641