// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec.c
// Function: TransformWHT_C
static void TransformWHT_C(const int16_t* in, int16_t* out) {
  int tmp[16];
  int i;
  for (i = 0; i < 4; ++i) {
    const int a0 = in[0 + i] + in[12 + i];
    const int a1 = in[4 + i] + in[ 8 + i];
    const int a2 = in[4 + i] - in[ 8 + i];
    const int a3 = in[0 + i] - in[12 + i];
    tmp[0  + i] = a0 + a1;
    tmp[8  + i] = a0 - a1;
    tmp[4  + i] = a3 + a2;
    tmp[12 + i] = a3 - a2;
  }
  for (i = 0; i < 4; ++i) {
    const int dc = tmp[0 + i * 4] + 3;    // w/ rounder
    const int a0 = dc             + tmp[3 + i * 4];
    const int a1 = tmp[1 + i * 4] + tmp[2 + i * 4];
    const int a2 = tmp[1 + i * 4] - tmp[2 + i * 4];
    const int a3 = dc             - tmp[3 + i * 4];
    out[ 0] = (a0 + a1) >> 3;
    out[16] = (a3 + a2) >> 3;
    out[32] = (a0 - a1) >> 3;
    out[48] = (a3 - a2) >> 3;
    out += 64;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x54(%rbp)
cmpl $0x4, -0x54(%rbp)
jge 0x14ac0f
movq -0x8(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x8(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0xc, %edx
movslq %edx, %rdx
movswl (%rcx,%rdx,2), %ecx
addl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x8(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0x8, %edx
movslq %edx, %rdx
movswl (%rcx,%rdx,2), %ecx
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x8(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x8(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0x8, %edx
movslq %edx, %rdx
movswl (%rcx,%rdx,2), %ecx
subl %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x8(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0xc, %edx
movslq %edx, %rdx
movswl (%rcx,%rdx,2), %ecx
subl %ecx, %eax
movl %eax, -0x64(%rbp)
movl -0x58(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movl -0x54(%rbp), %eax
addl $0x0, %eax
cltq
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x58(%rbp), %ecx
subl -0x5c(%rbp), %ecx
movl -0x54(%rbp), %eax
addl $0x8, %eax
cltq
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x64(%rbp), %ecx
addl -0x60(%rbp), %ecx
movl -0x54(%rbp), %eax
addl $0x4, %eax
cltq
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x64(%rbp), %ecx
subl -0x60(%rbp), %ecx
movl -0x54(%rbp), %eax
addl $0xc, %eax
cltq
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x14ab13
movl $0x0, -0x54(%rbp)
cmpl $0x4, -0x54(%rbp)
jge 0x14ad10
movl -0x54(%rbp), %eax
shll $0x2, %eax
addl $0x0, %eax
cltq
movl -0x50(%rbp,%rax,4), %eax
addl $0x3, %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movl -0x54(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
addl -0x50(%rbp,%rcx,4), %eax
movl %eax, -0x6c(%rbp)
movl -0x54(%rbp), %eax
shll $0x2, %eax
addl $0x1, %eax
cltq
movl -0x50(%rbp,%rax,4), %eax
movl -0x54(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
addl -0x50(%rbp,%rcx,4), %eax
movl %eax, -0x70(%rbp)
movl -0x54(%rbp), %eax
shll $0x2, %eax
addl $0x1, %eax
cltq
movl -0x50(%rbp,%rax,4), %eax
movl -0x54(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
subl -0x50(%rbp,%rcx,4), %eax
movl %eax, -0x74(%rbp)
movl -0x68(%rbp), %eax
movl -0x54(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
subl -0x50(%rbp,%rcx,4), %eax
movl %eax, -0x78(%rbp)
movl -0x6c(%rbp), %eax
addl -0x70(%rbp), %eax
sarl $0x3, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
sarl $0x3, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x20(%rax)
movl -0x6c(%rbp), %eax
subl -0x70(%rbp), %eax
sarl $0x3, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x40(%rax)
movl -0x78(%rbp), %eax
subl -0x74(%rbp), %eax
sarl $0x3, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x60(%rax)
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x10(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x14ac16
popq %rbp
retq
nopw %cs:(%rax,%rax)