// File: /workspace/github_c_makefile_star2_O2/akumrao[P]videoAnalyzer/encoder/me.c
// Function: x264_me_umhexagons(x264_t*, unsigned char*, int, unsigned char*, int, int, int, int*, int*)
static int x264_me_umhexagons( 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 i, n, dx, dy;  
      
        int i_bsatd;  
        int i_bmx,i_bmy;  
        int mvx, mvy;  
        int bw, bh;  
      
        int ok;  
      
        static const int hgrid_x[16]= { -4,-4,-4,-2, 0, 2, 4, 4, 4, 4, 4, 2, 0,-2,-4,-4 };  
        static const int hgrid_y[16]= {  0, 1, 2, 3, 4, 3, 2, 1, 0,-1,-2,-3,-4,-3, 2, 1 };  
      
        static const int hexa_x[6] = { -2,-1, 1, 2, 1,-1 };  
        static const int hexa_y[6] = { 0,  2, 2, 0, 2, 2 };  
      
        static const int star_x[4] = { -1, 0, 1,  0 };  
        static const int star_y[4] = {  0, 1, 0, -1 };  
      
        /* 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;  
        }  
      
        /* mv start (clipped) */  
        mvx = x264_clip3( (*pi_mvx)>>2, -16, 16 );  
        mvy = x264_clip3( (*pi_mvy)>>2, -16, 16 );  
      
        /* init with center */  
        i_bmx = mvx;  
        i_bmy = mvy;  
        i_bsatd = h->pixf.sad[i_sad_mode]( p_img, i_img, &p_ref[mvy*i_ref+mvx], i_ref );  
      
        /* First step: Unsymetrical cross edge */  
        for( dx = mvx - 16; dx <= mvx + 16; dx += 2 )  
        {  
            if( dx >= -16 && dx <= 16 )  
            {  
                me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                            i_sad_mode, p_img, i_img, p_ref, i_ref, dx, mvy,  
                            i_lambda_motion, *pi_mvx, *pi_mvy );  
            }  
        }  
        for( dy = mvy - 8; dy <= mvy + 8; dy += 2 )  
        {  
            if( dy >= - 16 && dy <= 16 )  
            {  
                me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                            i_sad_mode, p_img, i_img, p_ref, i_ref, mvx, dy,  
                            i_lambda_motion, *pi_mvx, *pi_mvy );  
            }  
        }  
      
        /* Second step-part 1: full search -2/2 */  
        mvx = i_bmx; mvy = i_bmy;  
        for( dy = -2; dy <= 2; dy++ )  
        {  
            for( dx = -2; dx <= 2; dx++ )  
            {  
                int mx, my;  
                mx = mvx+dx;  
                my = mvy+dy;  
      
                if( mx >= -16 && mx <= 16 && my >= -16 && my < 16 )  
                {  
                    me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                                i_sad_mode, p_img, i_img, p_ref, i_ref, mx, my,  
                                i_lambda_motion, *pi_mvx, *pi_mvy );  
                }  
            }  
        }  
        /* Second step-part 2: multi hexa research */  
        ok = 1;  
        mvx = i_bmx; mvy = i_bmy;  
        for( n = 1; n <= 4; n++ )  
        {  
            for( i = 0; i < 16; i++ )  
            {  
                dx = mvx + hgrid_x[i] * n;  
                dy = mvy + hgrid_y[i] * n;  
                if( dx >= -16 && dx <= 16 && dy >= -16 && dy <= 16 )  
                {  
                    if( me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                                    i_sad_mode, p_img, i_img, p_ref, i_ref, dx, dy,  
                                    i_lambda_motion, *pi_mvx, *pi_mvy ) )  
                    {  
                        ok = 0; /* we will have to do EHS step */  
                    }  
                }  
            }  
        }  
      
        /* Third step: EHS */  
        if( !ok )  
        {  
            do  
            {  
                ok = 1;  
                mvx = i_bmx; mvy = i_bmy;  
      
                for( i = 0; i < 6; i++ )  
                {  
                    dx = mvx + hexa_x[i];  
                    dy = mvy + hexa_y[i];  
                    if( dx >= -16 && dx <= 16 && dy >= -16 && dy <= 16 )  
                    {  
                        if( me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                                        i_sad_mode, p_img, i_img, p_ref, i_ref, dx, dy,  
                                        i_lambda_motion, *pi_mvx, *pi_mvy ) )  
                        {  
                            ok = 0;  
                        }  
                    }  
                }  
            } while( !ok );  
      
            do  
            {  
                ok = 1;  
                mvx = i_bmx; mvy = i_bmy;  
      
                for( i = 0; i < 4; i++ )  
                {  
                    dx = mvx + star_x[i];  
                    dy = mvy + star_y[i];  
                    if( dx >= -16 && dx <= 16 && dy >= -16 && dy <= 16 )  
                    {  
                        if( me_mv_test( h, &i_bsatd, &i_bmx, &i_bmy,  
                                        i_sad_mode, p_img, i_img, p_ref, i_ref, dx, dy,  
                                        i_lambda_motion, *pi_mvx, *pi_mvy ) )  
                        {  
                            ok = 0;  
                        }  
                    }  
                }  
            } while( !ok );  
        }  
      
        /* 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 $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %r10d
movq %rdi, %rbx
cmpl $0x5, %r9d
ja 0x1415f
movl %r9d, %eax
leaq 0xe3b3(%rip), %rdx      # 0x224fc
movl (%rdx,%rax,4), %edx
movq %rdx, -0xb0(%rbp)
leaq 0xe3ba(%rip), %rdx      # 0x22514
movl (%rdx,%rax,4), %eax
jmp 0x14169
pushq $0x4
popq %rax
movq %rax, -0xb0(%rbp)
movq %rax, -0x70(%rbp)
movq 0x18(%rbp), %rax
movl (%rax), %r14d
sarl $0x2, %r14d
pushq $0x10
popq %rax
cmpl %eax, %r14d
cmovgel %eax, %r14d
cmpl $-0xf, %r14d
pushq $-0x10
popq %rdi
cmovll %edi, %r14d
movq 0x20(%rbp), %rdx
movl (%rdx), %r15d
sarl $0x2, %r15d
cmpl %eax, %r15d
cmovgel %eax, %r15d
cmpl $-0xf, %r15d
cmovll %edi, %r15d
leaq -0x30(%rbp), %rax
movl %r14d, (%rax)
leaq -0x2c(%rbp), %rax
movl %r15d, (%rax)
movl %r9d, -0x40(%rbp)
movslq %r9d, %r11
movl %r15d, %eax
imull %r10d, %eax
addl %r14d, %eax
movslq %eax, %rdx
movq %rsi, -0x48(%rbp)
addq %rsi, %rdx
movq %rcx, -0x58(%rbp)
movq %rcx, %rdi
movq %r8, -0x60(%rbp)
movl %r8d, %esi
movq %r10, -0x50(%rbp)
movl %r10d, %ecx
movq %rbx, -0x68(%rbp)
movq %r11, -0x80(%rbp)
callq *0x10f2a8(%rbx,%r11,8)
leaq -0x78(%rbp), %r13
movl %eax, (%r13)
leal 0x10(%r14), %ebx
movl %r14d, %r12d
leal -0x10(%r12), %eax
cmpl %ebx, %eax
jg 0x1425d
cmpl $0x20, %r12d
ja 0x14257
movq 0x18(%rbp), %rcx
movl (%rcx), %r10d
movq 0x20(%rbp), %rcx
movl (%rcx), %r11d
movq -0x68(%rbp), %rdi
movq %r13, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %r11
pushq %r10
movl 0x10(%rbp), %r10d
pushq %r10
pushq %r15
pushq %rax
pushq -0x50(%rbp)
pushq -0x48(%rbp)
pushq -0x60(%rbp)
callq 0x15679
addq $0x40, %rsp
addl $0x2, %r12d
jmp 0x14204
addl $0x8, %r15d
leaq -0x2c(%rbp), %r13
movl %r15d, %ebx
movq -0x60(%rbp), %r12
leal -0x10(%rbx), %eax
cmpl %r15d, %eax
jg 0x142c1
cmpl $0x20, %ebx
ja 0x142bc
movq 0x18(%rbp), %rcx
movl (%rcx), %r10d
movq 0x20(%rbp), %rcx
movl (%rcx), %r11d
movq -0x68(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x30(%rbp), %rdx
movq %r13, %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %r11
pushq %r10
movl 0x10(%rbp), %r10d
pushq %r10
pushq %rax
pushq %r14
pushq -0x50(%rbp)
pushq -0x48(%rbp)
pushq %r12
callq 0x15679
addq $0x40, %rsp
addl $0x2, %ebx
jmp 0x1426c
leaq -0x30(%rbp), %rax
movl (%rax), %eax
leaq -0x2c(%rbp), %rcx
movl (%rcx), %ecx
movq %rcx, -0x88(%rbp)
addl $0xe, %eax
movl %eax, -0xa8(%rbp)
pushq $-0x2
popq %rcx
leaq -0x78(%rbp), %r13
cmpl $0x3, %ecx
je 0x14381
movq -0x88(%rbp), %rax
leal (%rcx,%rax), %r12d
movq %rcx, -0x38(%rbp)
leal (%rcx,%rax), %ebx
addl $0x10, %ebx
movl -0xa8(%rbp), %eax
movl %eax, %r14d
pushq $0x5
popq %r15
subl $0x1, %r15d
jb 0x14376
cmpl $0x20, %ebx
setb %al
cmpl $0x21, %r14d
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x14371
leal -0x10(%r14), %eax
movq 0x18(%rbp), %rcx
movl (%rcx), %r10d
movq 0x20(%rbp), %rcx
movl (%rcx), %r11d
movq -0x68(%rbp), %rdi
movq %r13, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %r11
pushq %r10
movl 0x10(%rbp), %r10d
pushq %r10
pushq %r12
pushq %rax
pushq -0x50(%rbp)
pushq -0x48(%rbp)
pushq -0x60(%rbp)
callq 0x15679
addq $0x40, %rsp
incl %r14d
jmp 0x1430f
movq -0x38(%rbp), %rcx
incl %ecx
jmp 0x142e4
leaq -0x30(%rbp), %rax
movl (%rax), %edi
pushq $0x1
popq %r15
leaq -0x2c(%rbp), %rax
movl (%rax), %esi
leaq 0xdca8(%rip), %r12      # 0x22040
movl %r15d, %r14d
movq %rdi, -0x38(%rbp)
movq %rsi, -0xa8(%rbp)
cmpl $0x5, %r14d
je 0x1445c
xorl %r13d, %r13d
cmpq $0x40, %r13
je 0x14454
movl (%r13,%r12), %eax
imull %r14d, %eax
leal (%rax,%rdi), %ecx
addl $0x10, %ecx
cmpl $0x20, %ecx
ja 0x1444b
leaq 0xdca8(%rip), %rcx      # 0x22080
movl (%r13,%rcx), %r10d
imull %r14d, %r10d
leal (%r10,%rsi), %ecx
addl $0x10, %ecx
cmpl $0x20, %ecx
ja 0x1444b
addl %edi, %eax
addl %esi, %r10d
movq 0x18(%rbp), %rcx
movl (%rcx), %r11d
movq 0x20(%rbp), %rcx
movl (%rcx), %ebx
movq -0x68(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %rbx
pushq %r11
movl 0x10(%rbp), %r11d
pushq %r11
pushq %r10
pushq %rax
pushq -0x50(%rbp)
pushq -0x48(%rbp)
pushq -0x60(%rbp)
callq 0x15679
movq -0x38(%rbp), %rdi
movq -0xa8(%rbp), %rsi
addq $0x40, %rsp
testl %eax, %eax
movl $0x0, %eax
cmovnel %eax, %r15d
addq $0x4, %r13
jmp 0x143b3
incl %r14d
jmp 0x143a6
testl %r15d, %r15d
movq -0x50(%rbp), %r12
jne 0x14605
leaq 0xdc50(%rip), %rsi      # 0x220c0
leaq 0xdc69(%rip), %rdi      # 0x220e0
movl -0x30(%rbp), %r15d
movl -0x2c(%rbp), %r14d
xorl %ebx, %ebx
pushq $0x1
popq %r11
cmpq $0x18, %rbx
je 0x1452e
movl (%rbx,%rsi), %eax
movl (%rbx,%rdi), %r10d
leal (%rax,%r15), %ecx
addl $0x10, %ecx
cmpl $0x21, %ecx
setb %cl
leal (%r10,%r14), %edx
addl $0x10, %edx
cmpl $0x21, %edx
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x14525
addl %r15d, %eax
addl %r14d, %r10d
movq 0x18(%rbp), %rcx
movl %r11d, -0x38(%rbp)
movl (%rcx), %r11d
movq 0x20(%rbp), %rcx
movl (%rcx), %r12d
movq -0x68(%rbp), %rdi
movq %rsi, %r13
leaq -0x78(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %r12
movq -0x50(%rbp), %r12
pushq %r11
movl 0x10(%rbp), %r11d
pushq %r11
pushq %r10
pushq %rax
pushq %r12
pushq -0x48(%rbp)
pushq -0x60(%rbp)
callq 0x15679
movl -0x38(%rbp), %r11d
leaq 0xdbcd(%rip), %rdi      # 0x220e0
movq %r13, %rsi
addq $0x40, %rsp
testl %eax, %eax
movl $0x0, %eax
cmovnel %eax, %r11d
addq $0x4, %rbx
jmp 0x14485
testl %r11d, %r11d
je 0x14477
leaq 0xdff2(%rip), %rsi      # 0x22530
leaq 0x6c9b(%rip), %rdi      # 0x1b1e0
movl -0x30(%rbp), %r15d
movl -0x2c(%rbp), %r14d
xorl %ebx, %ebx
pushq $0x1
popq %r11
cmpq $0x10, %rbx
je 0x145fc
movl (%rbx,%rsi), %eax
movl (%rbx,%rdi), %r10d
leal (%rax,%r15), %ecx
addl $0x10, %ecx
cmpl $0x21, %ecx
setb %cl
leal (%r10,%r14), %edx
addl $0x10, %edx
cmpl $0x21, %edx
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x145f3
addl %r15d, %eax
addl %r14d, %r10d
movq 0x18(%rbp), %rcx
movl %r11d, -0x38(%rbp)
movl (%rcx), %r11d
movq 0x20(%rbp), %rcx
movl (%rcx), %r12d
movq -0x68(%rbp), %rdi
movq %rsi, %r13
leaq -0x78(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movl -0x40(%rbp), %r8d
movq -0x58(%rbp), %r9
pushq %r12
movq -0x50(%rbp), %r12
pushq %r11
movl 0x10(%rbp), %r11d
pushq %r11
pushq %r10
pushq %rax
pushq %r12
pushq -0x48(%rbp)
pushq -0x60(%rbp)
callq 0x15679
movl -0x38(%rbp), %r11d
leaq 0x6bff(%rip), %rdi      # 0x1b1e0
movq %r13, %rsi
addq $0x40, %rsp
testl %eax, %eax
movl $0x0, %eax
cmovnel %eax, %r11d
addq $0x4, %rbx
jmp 0x14553
testl %r11d, %r11d
je 0x14545
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %ebx
movl %ebx, %eax
imull %r12d, %eax
addl %ecx, %eax
movq %rcx, %r14
movq %rcx, -0xc8(%rbp)
movslq %eax, %rdx
movq -0x48(%rbp), %r13
addq %r13, %rdx
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl %r12d, %ecx
movq -0x80(%rbp), %rax
movq -0x68(%rbp), %r8
callq *0x10f2e0(%r8,%rax,8)
movl %eax, -0xa8(%rbp)
leal (,%r14,4), %r14d
movl %r14d, %edi
movq %r14, -0x40(%rbp)
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r15d
leal (,%rbx,4), %edi
movl %edi, -0x38(%rbp)
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %ecx
addl %r15d, %ecx
movl 0x10(%rbp), %eax
imull %eax, %ecx
addl -0xa8(%rbp), %ecx
movl %ecx, -0x88(%rbp)
leal -0x1(,%rbx,4), %r9d
leaq -0x1d0(%rbp), %r15
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq -0xb0(%rbp), %r12
movl %r12d, %ecx
movl %r14d, %r8d
movl %r9d, -0xa8(%rbp)
movq -0x70(%rbp), %rax
pushq %rax
pushq %r12
movq -0x68(%rbp), %r13
callq *0x10f380(%r13)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %r15, %rdx
movl %r12d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r13,%rax,8)
movl %eax, -0x74(%rbp)
movl %r14d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r13d
movq 0x20(%rbp), %rax
movl (%rax), %eax
notl %eax
leal (%rax,%rbx,4), %edi
callq 0x15763
addl %r13d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x74(%rbp), %eax
movl %eax, -0xa0(%rbp)
leal 0x1(,%rbx,4), %ebx
movq -0x60(%rbp), %r14
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
movl %r12d, %ecx
movq -0x40(%rbp), %r13
movl %r13d, %r8d
movl %ebx, %r9d
pushq -0x70(%rbp)
pushq %r12
movq -0x68(%rbp), %r15
callq *0x10f380(%r15)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movl %r14d, %esi
leaq -0x1d0(%rbp), %rdx
movl %r12d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r15,%rax,8)
movl %eax, -0x74(%rbp)
movl %r13d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r15d
movq %rbx, -0xb8(%rbp)
movl %ebx, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r15d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x74(%rbp), %eax
movq %r14, %r13
movl %eax, -0x9c(%rbp)
movq -0xc8(%rbp), %r15
leal -0x1(,%r15,4), %r8d
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
movl %r12d, %ecx
movl %r8d, -0xbc(%rbp)
movl -0x38(%rbp), %r14d
movl %r14d, %r9d
pushq -0x70(%rbp)
pushq %r12
movq -0x68(%rbp), %rbx
callq *0x10f380(%rbx)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movl %r13d, %esi
leaq -0x1d0(%rbp), %rdx
movl %r12d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%rbx,%rax,8)
movl %eax, -0x74(%rbp)
movq 0x18(%rbp), %rax
movl (%rax), %eax
notl %eax
leal (%rax,%r15,4), %edi
movq %r15, %r13
callq 0x15763
movl %eax, %r15d
movl %r14d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
addl %r15d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x74(%rbp), %eax
movl %eax, -0x98(%rbp)
leal 0x1(,%r13,4), %r13d
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x1d0(%rbp), %r15
movq %r15, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movl %r14d, %r9d
pushq -0x70(%rbp)
pushq %r12
callq *0x10f380(%rbx)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %r15, %rdx
movl %r12d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%rbx,%rax,8)
movl %r13d, %ebx
movl %eax, %r15d
movl %r13d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r13d
movq 0x20(%rbp), %rax
subl (%rax), %r14d
movl %r14d, %edi
callq 0x15763
addl %r13d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl %r15d, %eax
movl %eax, -0x94(%rbp)
xorl %r13d, %r13d
pushq $0x1
popq %rax
movslq %r13d, %rcx
cmpq $0x4, %rax
je 0x148ff
movl -0xa0(%rbp,%rax,4), %esi
movl %eax, %edx
cmpl -0xa0(%rbp,%rcx,4), %esi
jl 0x148f7
movl %r13d, %edx
incq %rax
movl %edx, %r13d
jmp 0x148d9
movq %r12, -0xb0(%rbp)
movl -0xa0(%rbp,%rcx,4), %edx
movl -0x88(%rbp), %esi
cmpl %esi, %edx
movq -0x70(%rbp), %r15
movl -0xa8(%rbp), %r12d
jge 0x1494b
cmpl $0x3, %r13d
movl %edx, -0x88(%rbp)
ja 0x14988
movl %r13d, %eax
leaq 0xd6b8(%rip), %rcx      # 0x21ff0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x38(%rbp), %r9d
addl $-0x2, %r9d
jmp 0x1498f
movq -0x40(%rbp), %r8
movl -0x38(%rbp), %r12d
jmp 0x14c80
movl %r12d, %r9d
movl -0x38(%rbp), %r12d
movl -0xbc(%rbp), %eax
movl %eax, %r8d
jmp 0x14993
movl %r12d, %r9d
movl -0x38(%rbp), %r12d
movl %ebx, %r8d
jmp 0x14993
movl %edx, -0xa0(%rbp)
movq -0xb8(%rbp), %rax
jmp 0x14a25
movl %r12d, %r9d
movl -0x38(%rbp), %r12d
movq -0x40(%rbp), %r8
leaq -0x1d0(%rbp), %rdx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0xb0(%rbp), %rbx
movl %ebx, %ecx
pushq %r15
pushq %rbx
movq %r8, %r15
movq -0x68(%rbp), %r14
callq *0x10f380(%r14)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
movl %ebx, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r14,%rax,8)
movl %eax, %ebx
movq %r15, -0x40(%rbp)
movl %r15d, %edi
movq 0x18(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl %eax, %r14d
movq 0x20(%rbp), %rax
movl (%rax), %edi
notl %edi
addl %r12d, %edi
callq 0x15763
addl %r14d, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl %ebx, %eax
movl %eax, -0xa0(%rbp)
testl %r13d, %r13d
je 0x14af3
movl %r12d, %eax
movq -0x70(%rbp), %r15
movq %rax, -0xb8(%rbp)
leal 0x1(%rax), %ebx
leaq -0x1d0(%rbp), %rdx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0xb0(%rbp), %r12
movl %r12d, %ecx
movq -0x40(%rbp), %r14
movl %r14d, %r8d
movl %ebx, %r9d
pushq %r15
pushq %r12
movq -0x68(%rbp), %r15
callq *0x10f380(%r15)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
movl %r12d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r15,%rax,8)
movl %eax, -0x38(%rbp)
movl %r14d, %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
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x38(%rbp), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x3, %r13d
jne 0x14ae7
movl -0x88(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x68(%rbp), %r15
movq %r12, %r14
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x70(%rbp), %r11
movq -0xb8(%rbp), %r9
jmp 0x14baa
movq -0xb8(%rbp), %rax
movl %eax, %r12d
jmp 0x14aff
movl -0x88(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x70(%rbp), %r15
movq -0x40(%rbp), %rbx
leal -0x1(%rbx), %r8d
leaq -0x1d0(%rbp), %rdx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0xb0(%rbp), %r14
movl %r14d, %ecx
movl %r12d, %r9d
pushq %r15
pushq %r14
movq -0x68(%rbp), %r15
callq *0x10f380(%r15)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
movl %r14d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r15,%rax,8)
movl %eax, -0x38(%rbp)
movq 0x18(%rbp), %rax
movl (%rax), %edi
notl %edi
addl %ebx, %edi
callq 0x15763
movl %eax, %ebx
movl %r12d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movq -0x70(%rbp), %r11
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
addl %ebx, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl -0x38(%rbp), %eax
movl %eax, -0x98(%rbp)
movl %r12d, %r9d
movl -0x88(%rbp), %r10d
movl %r10d, %eax
cmpl $0x2, %r13d
je 0x14c22
movq -0x40(%rbp), %rax
leal 0x1(%rax), %ebx
leaq -0x1d0(%rbp), %r12
movq %r12, %rdx
movl %r14d, %ecx
movl %ebx, %r8d
pushq %r11
pushq %r14
movq %r9, %r13
callq *0x10f380(%r15)
addq $0x10, %rsp
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %r12, %rdx
movl %r14d, %ecx
movq -0x80(%rbp), %rax
callq *0x10f2e0(%r15,%rax,8)
movl %eax, %r14d
movq 0x18(%rbp), %rax
subl (%rax), %ebx
movl %ebx, %edi
callq 0x15763
movl %eax, %ebx
movl %r13d, %edi
movq 0x20(%rbp), %rax
subl (%rax), %edi
callq 0x15763
movl -0x88(%rbp), %r10d
addl %ebx, %eax
movl 0x10(%rbp), %ecx
imull %ecx, %eax
addl %r14d, %eax
movl %r13d, %r12d
movl %eax, -0x94(%rbp)
xorl %eax, %eax
pushq $0x1
popq %rcx
movq -0x40(%rbp), %r8
movslq %eax, %rdx
cmpq $0x4, %rcx
je 0x14c55
movl -0xa0(%rbp,%rcx,4), %edi
movl %ecx, %esi
cmpl -0xa0(%rbp,%rdx,4), %edi
jl 0x14c4e
movl %eax, %esi
incq %rcx
movl %esi, %eax
jmp 0x14c31
movl -0xa0(%rbp,%rdx,4), %esi
cmpl %r10d, %esi
jge 0x14c7d
cmpl $0x3, %eax
ja 0x14c80
movl %eax, %eax
leaq 0xd391(%rip), %rcx      # 0x22000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl %r12d
jmp 0x14c80
movl %r10d, %esi
movq 0x18(%rbp), %rax
movl %r8d, (%rax)
movq 0x20(%rbp), %rax
movl %r12d, (%rax)
movl %esi, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %r8d
jmp 0x14c80
incl %r8d
jmp 0x14c80
incl %r12d
jmp 0x14c80