// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/dct.c
// Function: dct4x4dc(short (*) [4], short (*) [4])
static void dct4x4dc( int16_t dct[4][4], int16_t diff[4][4] )
{
    int16_t tmp[4][4];
    int s01, s23;
    int d01, d23;
    int i;

    for( i = 0; i < 4; i++ )
    {
        s01 = diff[i][0] + diff[i][1];
        d01 = diff[i][0] - diff[i][1];
        s23 = diff[i][2] + diff[i][3];
        d23 = diff[i][2] - diff[i][3];

        tmp[0][i] = s01 + s23;
        tmp[1][i] = s01 - s23;
        tmp[2][i] = d01 - d23;
        tmp[3][i] = d01 + d23;
    }

    for( i = 0; i < 4; i++ )
    {
        s01 = tmp[i][0] + tmp[i][1];
        d01 = tmp[i][0] - tmp[i][1];
        s23 = tmp[i][2] + tmp[i][3];
        d23 = tmp[i][2] - tmp[i][3];

        dct[0][i] = ( s01 + s23 + 1 ) >> 1;
        dct[1][i] = ( s01 - s23 + 1 ) >> 1;
        dct[2][i] = ( d01 - d23 + 1 ) >> 1;
        dct[3][i] = ( d01 + d23 + 1 ) >> 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x475d
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x2(%rcx,%rdx,8), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x2(%rcx,%rdx,8), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x4(%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x6(%rcx,%rdx,8), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x4(%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x6(%rcx,%rdx,8), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x30(%rbp,%rax,2)
movl -0x34(%rbp), %eax
subl -0x38(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x28(%rbp,%rax,2)
movl -0x3c(%rbp), %eax
subl -0x40(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x20(%rbp,%rax,2)
movl -0x3c(%rbp), %eax
addl -0x40(%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 0x4683
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x4843
movslq -0x44(%rbp), %rax
movswl -0x30(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2e(%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 -0x2e(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2c(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2c(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
addl $0x1, %eax
sarl %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x34(%rbp), %eax
subl -0x38(%rbp), %eax
addl $0x1, %eax
sarl %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x8(%rax,%rcx,2)
movl -0x3c(%rbp), %eax
subl -0x40(%rbp), %eax
addl $0x1, %eax
sarl %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x10(%rax,%rcx,2)
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
addl $0x1, %eax
sarl %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x18(%rax,%rcx,2)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4764
popq %rbp
retq
nopw %cs:(%rax,%rax)