// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/macroblock.c
// Function: x264_mb_mc_partition_lx(x264_t*, x264_macroblock_t*, int, int, int)
static inline void x264_mb_mc_partition_lx(x264_t *h, x264_macroblock_t *mb, int i_list, int i_part, int i_sub) {LOG_CALL;
    const x264_mb_context_t *ctx = mb->context;

    int mx, my;
    int i_ref;
    int i_width, i_height;
    int x, y;
    int ch;
    int i_dst;
    uint8_t *p_dst;
    int i_src;
    uint8_t *p_src;

    x264_mb_partition_get(mb, i_list, i_part, i_sub, &i_ref, &mx, &my);
    x264_mb_partition_getxy(mb, i_part, i_sub, &x, &y);
    x264_mb_partition_size(mb, i_part, i_sub, &i_width, &i_height);

    if ((i_list == 0 && i_ref > h->i_ref0) ||
            (i_list == 1 && i_ref > h->i_ref1) ||
            i_ref < 0)
    {
        fprintf(stderr, "invalid ref frame\n");
        return;
    }

    i_dst = ctx->i_fdec[0];
    p_dst = ctx->p_fdec[0];
    if (i_list == 0)
    {
        i_src = ctx->i_fref0[i_ref][0];
        p_src = ctx->p_fref0[i_ref][0];
    } else
    {
        i_src = ctx->i_fref1[i_ref][0];
        p_src = ctx->p_fref1[i_ref][0];
    }
    h->mc[MC_LUMA](&p_src[4 * (x + y * i_src)], i_src,
            &p_dst[4 * (x + y * i_dst)], i_dst,
            mx, my, 4 * i_width, 4 * i_height);


    for (ch = 0; ch < 2; ch++)
    {
        i_dst = ctx->i_fdec[1 + ch];
        p_dst = ctx->p_fdec[1 + ch];
        if (i_list == 0)
        {
            i_src = ctx->i_fref0[i_ref][1 + ch];
            p_src = ctx->p_fref0[i_ref][1 + ch];
        } else
        {
            i_src = ctx->i_fref1[i_ref][1 + ch];
            p_src = ctx->p_fref1[i_ref][1 + ch];
        }
        h->mc[MC_CHROMA](&p_src[2 * (x + y * i_src)], i_src,
                &p_dst[2 * (x + y * i_dst)], i_dst,
                mx, my, 2 * i_width, 2 * i_height);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
leaq 0x1fb2c(%rip), %rdi     # 0x28eb0
leaq 0x20156(%rip), %rsi     # 0x294e1
leaq 0x203b2(%rip), %rdx     # 0x29744
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq -0x34(%rbp), %r8
leaq -0x2c(%rbp), %r9
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x7ef0
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq -0x40(%rbp), %rcx
leaq -0x44(%rbp), %r8
callq 0x7be0
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq -0x38(%rbp), %rcx
leaq -0x3c(%rbp), %r8
callq 0x7d70
cmpl $0x0, -0x14(%rbp)
jne 0x940a
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10f078(%rcx), %eax
jg 0x9425
cmpl $0x1, -0x14(%rbp)
jne 0x941f
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10f100(%rcx), %eax
jg 0x9425
cmpl $0x0, -0x34(%rbp)
jge 0x9442
movq 0x2cba4(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
leaq 0x20326(%rip), %rsi     # 0x2975c
movb $0x0, %al
callq 0x2160
jmp 0x967b
movq -0x28(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x9494
movq -0x28(%rbp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movslq -0x34(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x68, %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x94ca
movq -0x28(%rbp), %rax
addq $0x428, %rax            # imm = 0x428
movslq -0x34(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x2a8, %rax            # imm = 0x2A8
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq 0x10f380(%rax), %rax
movq -0x68(%rbp), %rdi
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %edx
imull -0x5c(%rbp), %edx
addl %edx, %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rdi
movl -0x5c(%rbp), %esi
movq -0x58(%rbp), %rdx
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %r8d
imull -0x4c(%rbp), %r8d
addl %r8d, %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rdx
movl -0x4c(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
movl -0x38(%rbp), %r11d
shll $0x2, %r11d
movl -0x3c(%rbp), %r10d
shll $0x2, %r10d
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
callq *%rax
movl $0x0, -0x48(%rbp)
cmpl $0x2, -0x48(%rbp)
jge 0x967b
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0x58(%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq 0x40(%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x95be
movq -0x28(%rbp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movslq -0x34(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x68, %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
jmp 0x9608
movq -0x28(%rbp), %rax
addq $0x428, %rax            # imm = 0x428
movslq -0x34(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x2a8, %rax            # imm = 0x2A8
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq 0x10f388(%rax), %rax
movq -0x68(%rbp), %rdi
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %edx
imull -0x5c(%rbp), %edx
addl %edx, %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rdi
movl -0x5c(%rbp), %esi
movq -0x58(%rbp), %rdx
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %r8d
imull -0x4c(%rbp), %r8d
addl %r8d, %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rdx
movl -0x4c(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
movl -0x38(%rbp), %r11d
shll %r11d
movl -0x3c(%rbp), %r10d
shll %r10d
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
callq *%rax
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x953a
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)