// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/frame.c
// Function: deblocking_filter_edgecv(x264_t*, unsigned char*, int, int*, int)
static inline void deblocking_filter_edgecv( x264_t *h, uint8_t *pix, int i_pix_stride, int bS[4], int i_QP )
{
    int i, d;
    const int i_index_a = x264_clip3( i_QP + h->sh.i_alpha_c0_offset, 0, 51 );
    const int alpha = i_alpha_table[i_index_a];
    const int beta  = i_beta_table[x264_clip3( i_QP + h->sh.i_beta_offset, 0, 51 )];

    for( i = 0; i < 4; i++ )
    {
        if( bS[i] == 0 )
        {
            pix += 2 * i_pix_stride;
            continue;
        }

        if( bS[i] < 4 )
        {
            const int tc = i_tc0_table[i_index_a][bS[i] - 1] + 1;
            /* 2px edge length (because we use same bS than the one for luma) */
            for( d = 0; d < 2; d++ )
            {
                const int p0 = pix[-1];
                const int p1 = pix[-2];
                const int q0 = pix[0];
                const int q1 = pix[1];

                if( abs( p0 - q0 ) < alpha &&
                    abs( p1 - p0 ) < beta &&
                    abs( q1 - q0 ) < beta )
                {
                    const int i_delta = x264_clip3( (((q0 - p0 ) << 2) + (p1 - q1) + 4) >> 3, -tc, tc );

                    pix[-1] = clip_uint8( p0 + i_delta );    /* p0' */
                    pix[0]  = clip_uint8( q0 - i_delta );    /* q0' */
                }
                pix += i_pix_stride;
            }
        }
        else
        {
            /* 2px edge length (because we use same bS than the one for luma) */
            for( d = 0; d < 2; d++ )
            {
                const int p0 = pix[-1];
                const int p1 = pix[-2];
                const int q0 = pix[0];
                const int q1 = pix[1];

                if( abs( p0 - q0 ) < alpha &&
                    abs( p1 - p0 ) < beta &&
                    abs( q1 - q0 ) < beta )
                {
                    pix[-1] = ( 2*p1 + p0 + q1 + 2 ) >> 2;   /* p0' */
                    pix[0]  = ( 2*q1 + q0 + p1 + 2 ) >> 2;   /* q0' */
                }
                pix += i_pix_stride;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x8(%rbp), %rax
addl 0x10db54(%rax), %edi
xorl %esi, %esi
movl $0x33, %edx
callq 0x7210
movl %eax, -0x30(%rbp)
movslq -0x30(%rbp), %rcx
leaq 0x229de(%rip), %rax     # 0x290a0
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %edi
movq -0x8(%rbp), %rax
addl 0x10db58(%rax), %edi
xorl %esi, %esi
movl $0x33, %edx
callq 0x7210
movslq %eax, %rcx
leaq 0x22a85(%rip), %rax     # 0x29170
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x6920
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x6728
movl -0x14(%rbp), %ecx
shll %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6912
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jge 0x684a
movslq -0x30(%rbp), %rcx
leaq 0x22afb(%rip), %rax     # 0x29240
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x6845
movq -0x10(%rbp), %rax
movzbl -0x1(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x2(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x40(%rbp), %eax
subl -0x48(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x6826
movl -0x44(%rbp), %eax
subl -0x40(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6826
movl -0x4c(%rbp), %eax
subl -0x48(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6826
movl -0x48(%rbp), %edi
subl -0x40(%rbp), %edi
shll $0x2, %edi
movl -0x44(%rbp), %eax
subl -0x4c(%rbp), %eax
addl %eax, %edi
addl $0x4, %edi
sarl $0x3, %edi
xorl %esi, %esi
subl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %edx
callq 0x7210
movl %eax, -0x50(%rbp)
movl -0x40(%rbp), %edi
addl -0x50(%rbp), %edi
callq 0x7250
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, -0x1(%rax)
movl -0x48(%rbp), %edi
subl -0x50(%rbp), %edi
callq 0x7250
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x676d
jmp 0x6910
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x690e
movq -0x10(%rbp), %rax
movzbl -0x1(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x2(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x54(%rbp), %eax
subl -0x5c(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x68ef
movl -0x58(%rbp), %eax
subl -0x54(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x68ef
movl -0x60(%rbp), %eax
subl -0x5c(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x68ef
movl -0x58(%rbp), %eax
shll %eax
addl -0x54(%rbp), %eax
addl -0x60(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, -0x1(%rax)
movl -0x60(%rbp), %eax
shll %eax
addl -0x5c(%rbp), %eax
addl -0x58(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6851
jmp 0x6910
jmp 0x6912
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x66f8
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)