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

        if( bS[i] < 4 )
        {
            const int tc0 = i_tc0_table[i_index_a][bS[i] - 1];
            /* 4px edge length */
            for( d = 0; d < 4; d++ )
            {
                const int p0 = pix[-i_pix_next];
                const int p1 = pix[-2*i_pix_next];
                const int p2 = pix[-3*i_pix_next];
                const int q0 = pix[0];
                const int q1 = pix[1*i_pix_next];
                const int q2 = pix[2*i_pix_next];

                if( abs( p0 - q0 ) < alpha &&
                    abs( p1 - p0 ) < beta &&
                    abs( q1 - q0 ) < beta )
                {
                    int tc = tc0;
                    int i_delta;

                    if( abs( p2 - p0 ) < beta )
                    {
                        pix[-2*i_pix_next] = p1 + x264_clip3( ( p2 + ( ( p0 + q0 + 1 ) >> 1 ) - ( p1 << 1 ) ) >> 1, -tc0, tc0 );
                        tc++;
                    }
                    if( abs( q2 - q0 ) < beta )
                    {
                        pix[i_pix_next] = q1 + x264_clip3( ( q2 + ( ( p0 + q0 + 1 ) >> 1 ) - ( q1 << 1 ) ) >> 1, -tc0, tc0 );
                        tc++;
                    }

                    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
        {
            /* 4px edge length */
            for( d = 0; d < 4; d++ )
            {
                const int p0 = pix[-i_pix_next];
                const int p1 = pix[-2*i_pix_next];
                const int p2 = pix[-3*i_pix_next];
                const int q0 = pix[0];
                const int q1 = pix[1*i_pix_next];
                const int q2 = pix[2*i_pix_next];

                if( abs( p0 - q0 ) < alpha &&
                    abs( p1 - p0 ) < beta &&
                    abs( q1 - q0 ) < beta )
                {
                    const int p3 = pix[-4*i_pix_next];
                    const int q3 = pix[ 3*i_pix_next];

                    if( abs( p0 - q0 ) < (( alpha >> 2 ) + 2 ) )
                    {
                        if( abs( p2 - p0 ) < beta )
                        {
                            /* p0', p1', p2' */
                            pix[-1*i_pix_next] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3;
                            pix[-2*i_pix_next] = ( p2 + p1 + p0 + q0 + 2 ) >> 2;
                            pix[-3*i_pix_next] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3;
                        }
                        else
                        {
                            /* p0' */
                            pix[-1*i_pix_next] = ( 2*p1 + p0 + q1 + 2 ) >> 2;
                        }
                        if( abs( q2 - q0 ) < beta )
                        {
                            /* q0', q1', q2' */
                            pix[0*i_pix_next] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3;
                            pix[1*i_pix_next] = ( p0 + q0 + q1 + q2 + 2 ) >> 2;
                            pix[2*i_pix_next] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3;
                        }
                        else
                        {
                            /* q0' */
                            pix[0*i_pix_next] = ( 2*q1 + q0 + p1 + 2 ) >> 2;
                        }
                    }
                    else
                    {
                        /* p0' */
                        pix[-1*i_pix_next] = ( 2*p1 + p0 + q1 + 2 ) >> 2;
                        /* q0' */
                        pix[0*i_pix_next] = ( 2*q1 + q0 + p1 + 2 ) >> 2;
                    }
                }
                pix++;
            }

        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %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 0x2272b(%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 0x227d2(%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 0x6f0f
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x69da
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x6f01
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jge 0x6c19
movslq -0x30(%rbp), %rcx
leaq 0x22849(%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
movl %eax, -0x40(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x6c14
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
subl -0x3c(%rbp), %ecx
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
imull $0xfffffffd, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFD
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x58(%rbp)
movl -0x44(%rbp), %eax
subl -0x50(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x6bfa
movl -0x48(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6bfa
movl -0x54(%rbp), %eax
subl -0x50(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6bfa
movl -0x40(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x4c(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6b43
movl -0x48(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x4c(%rbp), %edi
movl -0x44(%rbp), %eax
addl -0x50(%rbp), %eax
addl $0x1, %eax
sarl %eax
addl %eax, %edi
movl -0x48(%rbp), %eax
shll %eax
subl %eax, %edi
sarl %edi
xorl %esi, %esi
subl -0x40(%rbp), %esi
movl -0x40(%rbp), %edx
callq 0x7210
movl %eax, %ecx
movl -0x84(%rbp), %eax
addl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xfffffffe, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFE
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x58(%rbp), %eax
subl -0x50(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6ba4
movl -0x54(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x58(%rbp), %edi
movl -0x44(%rbp), %eax
addl -0x50(%rbp), %eax
addl $0x1, %eax
sarl %eax
addl %eax, %edi
movl -0x54(%rbp), %eax
shll %eax
subl %eax, %edi
sarl %edi
xorl %esi, %esi
subl -0x40(%rbp), %esi
movl -0x40(%rbp), %edx
callq 0x7210
movl %eax, %ecx
movl -0x88(%rbp), %eax
addl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x50(%rbp), %edi
subl -0x44(%rbp), %edi
shll $0x2, %edi
movl -0x48(%rbp), %eax
subl -0x54(%rbp), %eax
addl %eax, %edi
addl $0x4, %edi
sarl $0x3, %edi
xorl %esi, %esi
subl -0x5c(%rbp), %esi
movl -0x5c(%rbp), %edx
callq 0x7210
movl %eax, -0x60(%rbp)
movl -0x44(%rbp), %edi
addl -0x60(%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 -0x50(%rbp), %edi
subl -0x60(%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 0x6a1c
jmp 0x6eff
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x6efd
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
imull $0xfffffffe, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFE
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rax
imull $0xfffffffd, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFD
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x74(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x78(%rbp)
movl -0x64(%rbp), %eax
subl -0x70(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x34(%rbp), %eax
jge 0x6ee3
movl -0x68(%rbp), %eax
subl -0x64(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6ee3
movl -0x74(%rbp), %eax
subl -0x70(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6ee3
movq -0x10(%rbp), %rax
imull $0xfffffffc, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFC
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
imull $0x3, -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x80(%rbp)
movl -0x64(%rbp), %eax
subl -0x70(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl -0x34(%rbp), %ecx
sarl $0x2, %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x6e9c
movl -0x6c(%rbp), %eax
subl -0x64(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6dbd
movl -0x6c(%rbp), %eax
movl -0x68(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl -0x64(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl -0x70(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl -0x74(%rbp), %eax
addl $0x4, %eax
sarl $0x3, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xffffffff, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFF
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x6c(%rbp), %eax
addl -0x68(%rbp), %eax
addl -0x64(%rbp), %eax
addl -0x70(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xfffffffe, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFE
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x7c(%rbp), %eax
shll %eax
imull $0x3, -0x6c(%rbp), %ecx
addl %ecx, %eax
addl -0x68(%rbp), %eax
addl -0x64(%rbp), %eax
addl -0x70(%rbp), %eax
addl $0x4, %eax
sarl $0x3, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xfffffffd, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFD
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x6de1
movl -0x68(%rbp), %eax
shll %eax
addl -0x64(%rbp), %eax
addl -0x74(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xffffffff, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFF
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x78(%rbp), %eax
subl -0x70(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x38(%rbp), %eax
jge 0x6e79
movl -0x68(%rbp), %eax
movl -0x64(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl -0x70(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl -0x74(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl -0x78(%rbp), %eax
addl $0x4, %eax
sarl $0x3, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0x0, -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
addl -0x70(%rbp), %eax
addl -0x74(%rbp), %eax
addl -0x78(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x80(%rbp), %eax
shll %eax
imull $0x3, -0x78(%rbp), %ecx
addl %ecx, %eax
addl -0x74(%rbp), %eax
addl -0x70(%rbp), %eax
addl -0x64(%rbp), %eax
addl $0x4, %eax
sarl $0x3, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x6e9a
movl -0x74(%rbp), %eax
shll %eax
addl -0x70(%rbp), %eax
addl -0x68(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0x0, -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x6ee1
movl -0x68(%rbp), %eax
shll %eax
addl -0x64(%rbp), %eax
addl -0x74(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0xffffffff, -0x3c(%rbp), %ecx # imm = 0xFFFFFFFF
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x74(%rbp), %eax
shll %eax
addl -0x70(%rbp), %eax
addl -0x68(%rbp), %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0x0, -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x6ee3
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6c20
jmp 0x6eff
jmp 0x6f01
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x69b1
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)