// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/me.c
// Function: me_mv_test(x264_t*, int*, int*, int*, int, unsigned char*, int, unsigned char*, int, int, int, int, int, int)
static inline int me_mv_test( x264_t *h,  
                                  int *pi_sad, int *pi_mvx, int *pi_mvy,  
                                  int i_sad_mode, uint8_t *img, int i_img, uint8_t *test, int i_test_stride,  
                                  int mvx, int mvy,  
                                  int i_lambda_motion, int mvxp, int mvyp )  
    {  
        int i_sad;  
      
        i_sad = h->pixf.sad[i_sad_mode]( img, i_img, &test[mvy*i_test_stride+mvx], i_test_stride );  
        if( i_sad + i_lambda_motion * ( bs_size_se((mvx<<2) - mvxp)+bs_size_se((mvy<<2) - mvyp) ) <  
           *pi_sad + i_lambda_motion * ( bs_size_se(((*pi_mvx)<<2) - mvxp)+bs_size_se(((*pi_mvy)<<2) - mvyp) ) )  
        {  
            *pi_sad = i_sad;  
            *pi_mvx = mvx;  
            *pi_mvy = mvy;  
            return 1;  
        }  
      
        return 0;  
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %rax
movl 0x40(%rbp), %r15d
movl 0x30(%rbp), %edx
movl 0x28(%rbp), %ebx
movl 0x10(%rbp), %esi
movl 0x20(%rbp), %ecx
movslq %r8d, %r8
imull %ecx, %edx
addl %ebx, %edx
movslq %edx, %rdx
addq 0x18(%rbp), %rdx
movq %r9, %rdi
callq *0x10f2a8(%rax,%r8,8)
movl %eax, -0x2c(%rbp)
leal (,%rbx,4), %r14d
subl %r15d, %r14d
leaq 0x6b6a(%rip), %r13      # 0x251b4
leaq 0xaa8b(%rip), %rbx      # 0x290dc
leaq 0xdf98(%rip), %rdx      # 0x2c5f0
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4c22
leal (%r14,%r14), %eax
negl %eax
testl %r14d, %r14d
leal -0x1(%r14,%r14), %r14d
cmovlel %eax, %r14d
leaq 0xaa73(%rip), %rdx      # 0x290f1
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4c22
cmpl $0xfe, %r14d
ja 0x1e6a4
movl %r14d, %eax
leaq 0xdb12(%rip), %rcx      # 0x2c1b0
movl (%rcx,%rax,4), %r12d
jmp 0x1e6e4
leal 0x1(%r14), %eax
movl %eax, %ecx
shrl $0x10, %ecx
decl %ecx
xorl %edx, %edx
cmpl $0xffff, %r14d          # imm = 0xFFFF
setae %dl
cmovbl %eax, %ecx
shll $0x5, %edx
leal 0x10(%rdx), %r12d
movl %ecx, %eax
shrl $0x8, %eax
decl %eax
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %ecx, %eax
cmovbl %edx, %r12d
leaq 0xdad0(%rip), %rcx      # 0x2c1b0
addl (%rcx,%rax,4), %r12d
movl 0x30(%rbp), %eax
leal (,%rax,4), %r14d
subl 0x48(%rbp), %r14d
leaq 0x6aba(%rip), %rbx      # 0x251b4
leaq 0xa9db(%rip), %r13      # 0x290dc
leaq 0xdee8(%rip), %rdx      # 0x2c5f0
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
leal (%r14,%r14), %eax
negl %eax
testl %r14d, %r14d
leal -0x1(%r14,%r14), %r14d
cmovlel %eax, %r14d
leaq 0xa9c3(%rip), %rdx      # 0x290f1
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
cmpl $0xfe, %r14d
ja 0x1e754
movl %r14d, %eax
leaq 0xda62(%rip), %rcx      # 0x2c1b0
movl (%rcx,%rax,4), %r14d
jmp 0x1e794
leal 0x1(%r14), %eax
movl %eax, %ecx
shrl $0x10, %ecx
decl %ecx
xorl %edx, %edx
cmpl $0xffff, %r14d          # imm = 0xFFFF
setae %dl
cmovbl %eax, %ecx
shll $0x5, %edx
leal 0x10(%rdx), %r14d
movl %ecx, %eax
shrl $0x8, %eax
decl %eax
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %ecx, %eax
cmovbl %edx, %r14d
leaq 0xda20(%rip), %rcx      # 0x2c1b0
addl (%rcx,%rax,4), %r14d
addl %r12d, %r14d
imull 0x38(%rbp), %r14d
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %r12d
shll $0x2, %r12d
subl %r15d, %r12d
leaq 0x69fa(%rip), %rbx      # 0x251b4
leaq 0xa91b(%rip), %r13      # 0x290dc
leaq 0xde28(%rip), %rdx      # 0x2c5f0
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
leal (%r12,%r12), %eax
negl %eax
testl %r12d, %r12d
leal -0x1(%r12,%r12), %r15d
cmovlel %eax, %r15d
leaq 0xa903(%rip), %rdx      # 0x290f1
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
cmpl $0xfe, %r15d
ja 0x1e814
movl %r15d, %eax
leaq 0xd9a2(%rip), %rcx      # 0x2c1b0
movl (%rcx,%rax,4), %r15d
jmp 0x1e854
leal 0x1(%r15), %eax
movl %eax, %ecx
shrl $0x10, %ecx
decl %ecx
xorl %edx, %edx
cmpl $0xffff, %r15d          # imm = 0xFFFF
setae %dl
cmovbl %eax, %ecx
shll $0x5, %edx
leal 0x10(%rdx), %r15d
movl %ecx, %eax
shrl $0x8, %eax
decl %eax
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %ecx, %eax
cmovbl %edx, %r15d
leaq 0xd960(%rip), %rcx      # 0x2c1b0
addl (%rcx,%rax,4), %r15d
addl -0x2c(%rbp), %r14d
movq -0x48(%rbp), %rax
movl (%rax), %r12d
shll $0x2, %r12d
subl 0x48(%rbp), %r12d
leaq 0x6946(%rip), %rbx      # 0x251b4
leaq 0xa867(%rip), %r13      # 0x290dc
leaq 0xdd74(%rip), %rdx      # 0x2c5f0
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
leal (%r12,%r12), %eax
negl %eax
testl %r12d, %r12d
leal -0x1(%r12,%r12), %r12d
cmovlel %eax, %r12d
leaq 0xa84f(%rip), %rdx      # 0x290f1
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4c22
cmpl $0xfe, %r12d
ja 0x1e8c7
movl %r12d, %eax
leaq 0xd8ee(%rip), %rcx      # 0x2c1b0
movl (%rcx,%rax,4), %ecx
jmp 0x1e906
leal 0x1(%r12), %eax
movl %eax, %edx
shrl $0x10, %edx
decl %edx
xorl %esi, %esi
cmpl $0xffff, %r12d          # imm = 0xFFFF
setae %sil
cmovbl %eax, %edx
shll $0x5, %esi
leal 0x10(%rsi), %ecx
movl %edx, %eax
shrl $0x8, %eax
decl %eax
cmpl $0x100, %edx            # imm = 0x100
cmovbl %edx, %eax
cmovbl %esi, %ecx
leaq 0xd8ad(%rip), %rdx      # 0x2c1b0
addl (%rdx,%rax,4), %ecx
addl %r15d, %ecx
imull 0x38(%rbp), %ecx
addl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %r14d
jge 0x1e937
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movl 0x28(%rbp), %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movl 0x30(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop