// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/dct.c
// Function: dct4x4(short (*) [4], short (*) [4])
static void dct4x4( int16_t dct[4][4], int16_t diff[4][4] )
{
    int16_t tmp[4][4];
    int s03, s12;
    int d03, d12;
    int i;

    for( i = 0; i < 4; i++ )
    {
        s03 = diff[i][0] + diff[i][3];
        s12 = diff[i][1] + diff[i][2];
        d03 = diff[i][0] - diff[i][3];
        d12 = diff[i][1] - diff[i][2];

        tmp[0][i] =   s03 +   s12;
        tmp[1][i] = 2*d03 +   d12;
        tmp[2][i] =   s03 -   s12;
        tmp[3][i] =   d03 - 2*d12;
    }

    for( i = 0; i < 4; i++ )
    {
        s03 = tmp[i][0] + tmp[i][3];
        s12 = tmp[i][1] + tmp[i][2];
        d03 = tmp[i][0] - tmp[i][3];
        d12 = tmp[i][1] - tmp[i][2];

        dct[0][i] =   s03 +   s12;
        dct[1][i] = 2*d03 +   d12;
        dct[2][i] =   s03 -   s12;
        dct[3][i] =   d03 - 2*d12;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x4593
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x6(%rcx,%rdx,8), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x2(%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x4(%rcx,%rdx,8), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x6(%rcx,%rdx,8), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movswl 0x2(%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movswl 0x4(%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 -0x3c(%rbp), %eax
shll %eax
addl -0x40(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x28(%rbp,%rax,2)
movl -0x34(%rbp), %eax
subl -0x38(%rbp), %eax
movw %ax, %cx
movslq -0x44(%rbp), %rax
movw %cx, -0x20(%rbp,%rax,2)
movl -0x3c(%rbp), %eax
movl -0x40(%rbp), %ecx
shll %ecx
subl %ecx, %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 0x44b3
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x466b
movslq -0x44(%rbp), %rax
movswl -0x30(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2e(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2c(%rbp,%rcx,8), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x30(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2a(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movslq -0x44(%rbp), %rax
movswl -0x2e(%rbp,%rax,8), %eax
movslq -0x44(%rbp), %rcx
movswl -0x2c(%rbp,%rcx,8), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x3c(%rbp), %eax
shll %eax
addl -0x40(%rbp), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x8(%rax,%rcx,2)
movl -0x34(%rbp), %eax
subl -0x38(%rbp), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw %dx, 0x10(%rax,%rcx,2)
movl -0x3c(%rbp), %eax
movl -0x40(%rbp), %ecx
shll %ecx
subl %ecx, %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 0x459a
popq %rbp
retq
nopl (%rax)