user: Translate the below assembly code into C programming language:

```asm
<pixel_satd_wxh>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %rdi,0x50(%rsp)
  mov    %esi,0x48(%rsp)
  mov    %rdx,0x58(%rsp)
  mov    %ecx,0x4c(%rsp)
  mov    %r8d,0x64(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  test   %r9d,%r9d
  jle    L60
  lea    0x0(,%rsi,4),%eax
  sub    $0x1,%r9d
  movl   $0x0,0x1c(%rsp)
  cltq
  and    $0xfffffffc,%r9d
  movl   $0x0,0x60(%rsp)
  shl    $0x2,%rax
  mov    %rax,0x68(%rsp)
  lea    0x0(,%rcx,4),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x70(%rsp)
  lea    0x4(%r9),%eax
  mov    %eax,0x78(%rsp)
  lea    -0x1(%r8),%eax
  shr    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,0x7c(%rsp)
  nopw   0x0(%rax,%rax,1)
L33:
  mov    0x64(%rsp),%eax
  test   %eax,%eax
  jle    L69
  mov    0x58(%rsp),%rax
  mov    0x50(%rsp),%rsi
  mov    %rax,0x20(%rsp)
  mov    0x7c(%rsp),%eax
  mov    %rsi,0x8(%rsp)
  shl    $0x4,%rax
  add    %rsi,%rax
  mov    %rax,0x30(%rsp)
  lea    0xc0(%rsp),%rax
  mov    %rax,0x40(%rsp)
  lea    0x80(%rsp),%rax
  mov    %rax,0x38(%rsp)
  lea    0x90(%rsp),%rax
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L3:
  mov    0x4c(%rsp),%r9d
  mov    0x20(%rsp),%r8
  mov    $0x4,%esi
  mov    0x48(%rsp),%ecx
  mov    0x8(%rsp),%rdx
  mov    0x40(%rsp),%rdi
  call   <pixel_sub_wxh@plt>
  mov    0xc0(%rsp),%ecx
  mov    0xc8(%rsp),%r9d
  mov    0xd0(%rsp),%edx
  mov    0xc4(%rsp),%ebx
  mov    0xcc(%rsp),%r14d
  mov    0xd4(%rsp),%r11d
  add    %ecx,%ebx
  sub    0xc4(%rsp),%ecx
  mov    0xd8(%rsp),%r8d
  add    %r9d,%r14d
  add    %edx,%r11d
  sub    0xd4(%rsp),%edx
  sub    0xcc(%rsp),%r9d
  mov    %edx,0x28(%rsp)
  lea    (%rbx,%r14,1),%edx
  sub    %r14d,%ebx
  mov    %ecx,%r14d
  sub    %r9d,%r14d
  movd   %edx,%xmm0
  movd   %ebx,%xmm3
  add    %r9d,%ecx
  mov    0xdc(%rsp),%r13d
  movd   %ecx,%xmm2
  movd   %r14d,%xmm1
  punpckldq %xmm3,%xmm0
  punpckldq %xmm2,%xmm1
  mov    0xe0(%rsp),%eax
  mov    0xe8(%rsp),%edi
  add    %r8d,%r13d
  punpcklqdq %xmm1,%xmm0
  sub    0xdc(%rsp),%r8d
  mov    0xe4(%rsp),%r10d
  lea    (%r11,%r13,1),%edx
  movaps %xmm0,0x80(%rsp)
  mov    0xec(%rsp),%r12d
  sub    %r13d,%r11d
  movd   %edx,%xmm0
  mov    0x28(%rsp),%edx
  movd   %r11d,%xmm5
  add    %eax,%r10d
  mov    0xf0(%rsp),%r15d
  add    %edi,%r12d
  punpckldq %xmm5,%xmm0
  mov    0xf4(%rsp),%esi
  mov    %edx,%ecx
  add    %r8d,%edx
  sub    0xe4(%rsp),%eax
  sub    0xec(%rsp),%edi
  sub    %r8d,%ecx
  movd   %edx,%xmm4
  lea    (%r10,%r12,1),%edx
  add    %r15d,%esi
  movd   %ecx,%xmm1
  mov    %esi,0x2c(%rsp)
  sub    %r12d,%r10d
  mov    0xf8(%rsp),%esi
  punpckldq %xmm4,%xmm1
  mov    0xfc(%rsp),%ebp
  movd   %r10d,%xmm7
  sub    0xf4(%rsp),%r15d
  punpcklqdq %xmm1,%xmm0
  movaps %xmm0,0x90(%rsp)
  movd   %edx,%xmm0
  mov    %eax,%edx
  add    %edi,%eax
  sub    %edi,%edx
  movd   %eax,%xmm6
  mov    0x2c(%rsp),%eax
  add    %esi,%ebp
  movd   %edx,%xmm1
  punpckldq %xmm7,%xmm0
  sub    0xfc(%rsp),%esi
  punpckldq %xmm6,%xmm1
  lea    (%rax,%rbp,1),%ecx
  sub    %ebp,%eax
  punpcklqdq %xmm1,%xmm0
  movd   %eax,%xmm3
  movaps %xmm0,0xa0(%rsp)
  movd   %ecx,%xmm0
  mov    %r15d,%ecx
  add    %esi,%r15d
  sub    %esi,%ecx
  movd   %r15d,%xmm2
  punpckldq %xmm3,%xmm0
  movd   %ecx,%xmm1
  punpckldq %xmm2,%xmm1
  punpcklqdq %xmm1,%xmm0
  movaps %xmm0,0xb0(%rsp)
  mov    0x38(%rsp),%r14
L6:
  mov    (%r14),%ebp
  mov    0x20(%r14),%r12d
  add    $0x4,%r14
  mov    0xc(%r14),%r13d
  mov    0x2c(%r14),%r15d
  add    %ebp,%r13d
  add    %r12d,%r15d
  sub    0xc(%r14),%ebp
  sub    0x2c(%r14),%r12d
  lea    0x0(%r13,%r15,1),%edi
  call   <abs@plt>
  mov    %r13d,%edi
  sub    %r15d,%edi
  mov    %rax,%rbx
  call   <abs@plt>
  mov    %ebp,%edi
  sub    %r12d,%edi
  add    %rax,%rbx
  call   <abs@plt>
  lea    0x0(%rbp,%r12,1),%edi
  add    %rax,%rbx
  call   <abs@plt>
  add    %rax,%rbx
  add    %ebx,0x1c(%rsp)
  cmp    %r14,0x10(%rsp)
  jne    L6
  addq   $0x10,0x8(%rsp)
  mov    0x8(%rsp),%rax
  addq   $0x10,0x20(%rsp)
  cmp    %rax,0x30(%rsp)
  jne    L3
L69:
  mov    0x68(%rsp),%rdx
  addl   $0x4,0x60(%rsp)
  add    %rdx,0x50(%rsp)
  mov    0x60(%rsp),%eax
  mov    0x70(%rsp),%rdx
  add    %rdx,0x58(%rsp)
  cmp    0x78(%rsp),%eax
  jne    L33
  mov    0x1c(%rsp),%esi
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
L23:
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L46
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L60:
  xor    %eax,%eax
  jmp    L23
L46:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int pixel_satd_wxh(uint8_t *pix1, int i_pix1, uint8_t *pix2, int i_pix2, int i_width, int i_height) {
  int16_t tmp[4][4];
  int16_t diff[4][4];
  int x, y;
  int i_satd = 0;
  for (y = 0; y < i_height; y += 4) {
    for (x = 0; x < i_width; x += 4) {
      int d;
      pixel_sub_wxh((int16_t *)diff, 4, &pix1[x], i_pix1, &pix2[x], i_pix2);
      for (d = 0; d < 4; d++) {
        int s01, s23;
        int d01, d23;
        s01 = diff[d][0] + diff[d][1];
        s23 = diff[d][2] + diff[d][3];
        d01 = diff[d][0] - diff[d][1];
        d23 = diff[d][2] - diff[d][3];
        tmp[d][0] = s01 + s23;
        tmp[d][1] = s01 - s23;
        tmp[d][2] = d01 - d23;
        tmp[d][3] = d01 + d23;
      }
      for (d = 0; d < 4; d++) {
        int s01, s23;
        int d01, d23;
        s01 = tmp[0][d] + tmp[1][d];
        s23 = tmp[2][d] + tmp[3][d];
        d01 = tmp[0][d] - tmp[1][d];
        d23 = tmp[2][d] - tmp[3][d];
        i_satd += abs(s01 + s23) + abs(s01 - s23) + abs(d01 - d23) + abs(d01 + d23);
      }
    }
    pix1 += 4 * i_pix1;
    pix2 += 4 * i_pix2;
  }
  return i_satd / 2;
}
```