// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/dct.c
// Function: idct4x4(short (*) [4], short (*) [4])
static void idct4x4( int16_t diff[4][4], int16_t dct[4][4] )
{
    int16_t tmp[4][4];
    int s02, d02;
    int s13, d13;
    int i;

    for( i = 0; i < 4; i++ )
    {
        s02 = dct[0][i]      + dct[2][i];
        d02 = dct[0][i]      - dct[2][i];
        s13 = dct[1][i]      + (dct[3][i]>>1);
        d13 = (dct[1][i]>>1) -  dct[3][i];

        tmp[0][i] = s02 + s13;
        tmp[1][i] = d02 + d13;
        tmp[2][i] = d02 - d13;
        tmp[3][i] = s02 - s13;
    }

    for( i = 0; i < 4; i++ )
    {
        s02 =  tmp[i][0]     +  tmp[i][2];
        d02 =  tmp[i][0]     -  tmp[i][2];
        s13 =  tmp[i][1]     + (tmp[i][3]>>1);
        d13 = (tmp[i][1]>>1) -  tmp[i][3];

        diff[i][0] = ( s02 + s13 + 32 ) >> 6;
        diff[i][1] = ( d02 + d13 + 32 ) >> 6;
        diff[i][2] = ( d02 - d13 + 32 ) >> 6;
        diff[i][3] = ( s02 - s13 + 32 ) >> 6;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x4941
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x10(%rcx,%rdx,2), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x10(%rcx,%rdx,2), %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x18(%rcx,%rdx,2), %ecx
sarl %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
sarl %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x18(%rcx,%rdx,2), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl -0x3c(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x30(%rbp,%rax,2)
movl -0x38(%rbp), %eax
addl -0x40(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x28(%rbp,%rax,2)
movl -0x38(%rbp), %eax
subl -0x40(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x20(%rbp,%rax,2)
movl -0x34(%rbp), %eax
subl -0x3c(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x18(%rbp,%rax,2)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4863
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x4a2f
movslq -0x44(%rbp), %rax
movswl -0x30(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2c(%rbp,%rcx,8), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x30(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2c(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2e(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
sarl %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2e(%rbp,%rax,8), %eax
sarl %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl -0x3c(%rbp), %eax
addl $0x20, %eax
sarl $0x6, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, (%rax,%rcx,8)
movl -0x38(%rbp), %eax
addl -0x40(%rbp), %eax
addl $0x20, %eax
sarl $0x6, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x2(%rax,%rcx,8)
movl -0x38(%rbp), %eax
subl -0x40(%rbp), %eax
addl $0x20, %eax
sarl $0x6, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x4(%rax,%rcx,8)
movl -0x34(%rbp), %eax
subl -0x3c(%rbp), %eax
addl $0x20, %eax
sarl $0x6, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x6(%rax,%rcx,8)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4948
popq %rbp
retq
nopw %cs:(%rax,%rax)