// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/mc.c
// Function: mc_hc(unsigned char*, int, unsigned char*, int, int, int)
static inline void mc_hc( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height )
{
    uint8_t *out;
    uint8_t *pix;
    int x, y;

    for( x = 0; x < i_width; x++ )
    {
        int tap[6];

        pix = &src[x];
        out = &dst[x];

        tap[0] = x264_tapfilter1( &pix[-2*i_src_stride] );
        tap[1] = x264_tapfilter1( &pix[-1*i_src_stride] );
        tap[2] = x264_tapfilter1( &pix[ 0*i_src_stride] );
        tap[3] = x264_tapfilter1( &pix[ 1*i_src_stride] );
        tap[4] = x264_tapfilter1( &pix[ 2*i_src_stride] );

        for( y = 0; y < i_height; y++ )
        {
            tap[5] = x264_tapfilter1( &pix[ 3*i_src_stride] );

            *out = x264_mc_clip1( ( tap[0] - 5*tap[1] + 20 * tap[2] + 20 * tap[3] -5*tap[4] + tap[5] + 512 ) >> 10 );

            /* Next line */
            pix += i_src_stride;
            out += i_dst_stride;
            tap[0] = tap[1];
            tap[1] = tap[2];
            tap[2] = tap[3];
            tap[3] = tap[4];
            tap[4] = tap[5];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xb49b
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
imull $0xfffffffe, -0xc(%rbp), %eax # imm = 0xFFFFFFFE
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
imull $0xffffffff, -0xc(%rbp), %eax # imm = 0xFFFFFFFF
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rdi
imull $0x0, -0xc(%rbp), %eax
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
shll $0x0, %eax
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xb48b
movq -0x38(%rbp), %rdi
imull $0x3, -0xc(%rbp), %eax
cltq
addq %rax, %rdi
callq 0xb8a0
movl %eax, -0x4c(%rbp)
movl -0x60(%rbp), %edi
imull $0x5, -0x5c(%rbp), %eax
subl %eax, %edi
imull $0x14, -0x58(%rbp), %eax
addl %eax, %edi
imull $0x14, -0x54(%rbp), %eax
addl %eax, %edi
imull $0x5, -0x50(%rbp), %eax
subl %eax, %edi
addl -0x4c(%rbp), %edi
addl $0x200, %edi            # imm = 0x200
sarl $0xa, %edi
callq 0xb880
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movl -0xc(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xb3e8
jmp 0xb48d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xb345
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)