// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/macroblock.h
// Function: x264_mb_partition_getxy(x264_macroblock_t*, int, int, int*, int*)
static inline void x264_mb_partition_getxy( x264_macroblock_t *mb, int i_part, int i_sub, int *x, int *y )
{
    if( mb->i_partition == D_16x16 )
    {
        *x  = 0;
        *y  = 0;
    }
    else if( mb->i_partition == D_16x8 )
    {
        *x = 0;
        *y = 2*i_part;
    }
    else if( mb->i_partition == D_8x16 )
    {
        *x = 2*i_part;
        *y = 0;
    }
    else if( mb->i_partition == D_8x8 )
    {
        *x = 2 * (i_part%2);
        *y = 2 * (i_part/2);

        if( IS_SUB4x4( mb->i_sub_partition[i_part] ) )
        {
            (*x) += i_sub%2;
            (*y) += i_sub/2;
        }
        else if( IS_SUB4x8( mb->i_sub_partition[i_part] ) )
        {
            (*x) += i_sub;
        }
        else if( IS_SUB8x4( mb->i_sub_partition[i_part] ) )
        {
            (*y) += i_sub;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x10, 0x1c(%rax)
jne 0x7c19
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0x7d6c
movq -0x8(%rbp), %rax
cmpl $0xe, 0x1c(%rax)
jne 0x7c3d
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
shll %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x7d6a
movq -0x8(%rbp), %rax
cmpl $0xf, 0x1c(%rax)
jne 0x7c61
movl -0xc(%rbp), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0x7d68
movq -0x8(%rbp), %rax
cmpl $0xd, 0x1c(%rax)
jne 0x7d66
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
shll %edx
movq -0x18(%rbp), %rax
movl %edx, (%rax)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
shll %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, 0x20(%rax,%rcx,4)
je 0x7cc4
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x4, 0x20(%rax,%rcx,4)
je 0x7cc4
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x8, 0x20(%rax,%rcx,4)
jne 0x7cee
movl -0x10(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x18(%rbp), %rax
addl (%rax), %edx
movl %edx, (%rax)
movl -0x10(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x7d64
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x2, 0x20(%rax,%rcx,4)
je 0x7d1b
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x6, 0x20(%rax,%rcx,4)
je 0x7d1b
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0xa, 0x20(%rax,%rcx,4)
jne 0x7d28
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x7d62
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x1, 0x20(%rax,%rcx,4)
je 0x7d55
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x5, 0x20(%rax,%rcx,4)
je 0x7d55
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x9, 0x20(%rax,%rcx,4)
jne 0x7d60
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x7d62
jmp 0x7d64
jmp 0x7d66
jmp 0x7d68
jmp 0x7d6a
jmp 0x7d6c
popq %rbp
retq
nop