// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/frame.c
// Function: deblocking_filter_edgech(x264_t*, unsigned char*, int, int*, int)
static inline void deblocking_filter_edgech( 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 )];

    int i_pix_next  = i_pix_stride;

    for( i = 0; i < 4; i++ )
    {
        if( bS[i] == 0 )
        {
            pix += 2;
            continue;
        }
        if( bS[i] < 4 )
        {
            int tc = i_tc0_table[i_index_a][bS[i] - 1] + 1;
            /* 2px edge length (see deblocking_filter_edgecv) */
            for( d = 0; d < 2; d++ )
            {
                const int p0 = pix[-1*i_pix_next];
                const int p1 = pix[-2*i_pix_next];
                const int q0 = pix[0];
                const int q1 = pix[1*i_pix_next];

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

                    pix[-i_pix_next] = clip_uint8( p0 + i_delta );    /* p0' */
                    pix[0]           = clip_uint8( q0 - i_delta );    /* q0' */
                }
                pix++;
            }
        }
        else
        {
            /* 2px edge length (see deblocking_filter_edgecv) */
            for( d = 0; d < 2; d++ )
            {
                const int p0 = pix[-1*i_pix_next];
                const int p1 = pix[-2*i_pix_next];
                const int q0 = pix[0];
                const int q1 = pix[1*i_pix_next];

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %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 0x2213e(%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 0x221e5(%rip), %rax     # 0x29170
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x71ff
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x6fc7
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x71f1
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jge 0x7109
movslq -0x30(%rbp), %rcx
leaq 0x2225c(%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, -0x40(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x7104
movq -0x10(%rbp), %rax
imull $0xffffffff, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFF
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
imull $0xfffffffe, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFE
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x50(%rbp)
movl -0x44(%rbp), %eax
subl -0x4c(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x70ea
movl -0x48(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x70ea
movl -0x50(%rbp), %eax
subl -0x4c(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x70ea
movl -0x4c(%rbp), %edi
subl -0x44(%rbp), %edi
shll $0x2, %edi
movl -0x48(%rbp), %eax
subl -0x50(%rbp), %eax
addl %eax, %edi
addl $0x4, %edi
sarl $0x3, %edi
xorl %esi, %esi
subl -0x40(%rbp), %esi
movl -0x40(%rbp), %edx
callq 0x7210
movl %eax, -0x54(%rbp)
movl -0x44(%rbp), %edi
addl -0x54(%rbp), %edi
callq 0x7250
movb %al, %dl
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4c(%rbp), %edi
subl -0x54(%rbp), %edi
callq 0x7250
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x700c
jmp 0x71ef
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x71ed
movq -0x10(%rbp), %rax
imull $0xffffffff, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFF
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rax
imull $0xfffffffe, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFE
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x64(%rbp)
movl -0x58(%rbp), %eax
subl -0x60(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x71d3
movl -0x5c(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x71d3
movl -0x64(%rbp), %eax
subl -0x60(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x71d3
movl -0x5c(%rbp), %eax
shll %eax
addl -0x58(%rbp), %eax
addl -0x64(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
shll %eax
addl -0x60(%rbp), %eax
addl -0x5c(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7110
jmp 0x71ef
jmp 0x71f1
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6f9e
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)