// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/macroblock.c
// Function: x264_mb_predict_mv_pskip(x264_macroblock_t*, int*)
void x264_mb_predict_mv_pskip(x264_macroblock_t *mb, int mv[2]) {LOG_CALL;
    int x, y, xn, yn;

    int i_refa = -1;
    int i_refb = -1;

    int mvxa = 0, mvxb = 0;
    int mvya = 0, mvyb = 0;

    x264_macroblock_t *mbn;


    x264_mb_partition_getxy(mb, 0, 0, &x, &y);

    /* Left  pixel (-1,0)*/
    xn = x - 1;
    mbn = mb;
    if (xn < 0)
    {
        xn += 4;
        mbn = mb->context->mba;
    }
    if (mbn)
    {
        i_refa = -2;
        if (!IS_INTRA(mbn->i_type) && mbn->partition[xn][y].i_ref[0] != -1)
        {
            i_refa = mbn->partition[xn][y].i_ref[0];
            mvxa = mbn->partition[xn][y].mv[0][0];
            mvya = mbn->partition[xn][y].mv[0][1];
        }
    }

    /* Up ( pixel(0,-1)*/
    yn = y - 1;
    mbn = mb;
    if (yn < 0)
    {
        yn += 4;
        mbn = mb->context->mbb;
    }
    if (mbn)
    {
        i_refb = -2;
        if (!IS_INTRA(mbn->i_type) && mbn->partition[x][yn].i_ref[0] != -1)
        {
            i_refb = mbn->partition[x][yn].i_ref[0];
            mvxb = mbn->partition[x][yn].mv[0][0];
            mvyb = mbn->partition[x][yn].mv[0][1];
        }
    }

    if (i_refa == -1 || i_refb == -1 ||
            (i_refa == 0 && mvxa == 0 && mvya == 0) ||
            (i_refb == 0 && mvxb == 0 && mvyb == 0))
    {
        mv[0] = 0;
        mv[1] = 0;
    } else
    {
        x264_mb_predict_mv(mb, 0, 0, 0, mv);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x20719(%rip), %rdi     # 0x28eb0
leaq 0x20d43(%rip), %rsi     # 0x294e1
leaq 0x20e20(%rip), %rdx     # 0x295c5
movb $0x0, %al
callq 0x4d20
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
leaq -0x14(%rbp), %rcx
leaq -0x18(%rbp), %r8
movl %edx, %esi
callq 0x7be0
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x881a
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x88e4
movl $0xfffffffe, -0x24(%rbp) # imm = 0xFFFFFFFE
movq -0x40(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x88e2
movq -0x40(%rbp), %rax
cmpl $0x1, 0x18(%rax)
je 0x88e2
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x1c(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
je 0x88e2
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x1c(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x1c(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x1c(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x88e4
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x8914
movl -0x20(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x89de
movl $0xfffffffe, -0x28(%rbp) # imm = 0xFFFFFFFE
movq -0x40(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x89dc
movq -0x40(%rbp), %rax
cmpl $0x1, 0x18(%rax)
je 0x89dc
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x14(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
je 0x89dc
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x14(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x14(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x40(%rbp), %rax
addq $0x30, %rax
movslq -0x14(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0x89de
cmpl $-0x1, -0x24(%rbp)
je 0x8a0e
cmpl $-0x1, -0x28(%rbp)
je 0x8a0e
cmpl $0x0, -0x24(%rbp)
jne 0x89fc
cmpl $0x0, -0x2c(%rbp)
jne 0x89fc
cmpl $0x0, -0x34(%rbp)
je 0x8a0e
cmpl $0x0, -0x28(%rbp)
jne 0x8a25
cmpl $0x0, -0x30(%rbp)
jne 0x8a25
cmpl $0x0, -0x38(%rbp)
jne 0x8a25
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x8a38
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %r8
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7ff0
addq $0x40, %rsp
popq %rbp
retq
nop