user: What would the C source look like for the assembly code provided here?

```asm
<taa_h264_inverse_hadamard_and_dequant_4x4>:
  endbr64
  push   %r12
  mov    %rdi,%r8
  lea    D2(%rip),%rax
  movslq %esi,%rsi
  push   %rbp
  mov    (%rax,%rsi,4),%edi
  mov    %r8,%rcx
  lea    0x20(%r8),%rbp
  push   %rbx
  mov    %r8,%rax
L18:
  movswl 0x6(%rax),%r11d
  movswl (%rax),%edx
  add    $0x8,%rax
  movswl -0x4(%rax),%ebx
  movswl -0x6(%rax),%esi
  lea    (%rdx,%rbx,1),%r9d
  lea    (%rsi,%r11,1),%r10d
  sub    %ebx,%edx
  sub    %r11d,%esi
  lea    (%r10,%r9,1),%r12d
  lea    (%rsi,%rdx,1),%r11d
  sub    %r10d,%r9d
  sub    %esi,%edx
  mov    %r12w,-0x8(%rax)
  mov    %r11w,-0x6(%rax)
  mov    %dx,-0x4(%rax)
  mov    %r9w,-0x2(%rax)
  cmp    %rax,%rbp
  jne    L18
  add    $0x8,%r8
L5:
  movswl 0x10(%rcx),%edx
  movswl (%rcx),%eax
  add    $0x2,%rcx
  movswl 0x6(%rcx),%r9d
  lea    (%rax,%rdx,1),%esi
  sub    %edx,%eax
  movswl 0x16(%rcx),%edx
  mov    %r9d,%r10d
  add    %edx,%r9d
  sub    %edx,%r10d
  lea    (%rsi,%r9,1),%edx
  imul   %edi,%edx
  add    $0x2,%edx
  sar    $0x2,%edx
  mov    %dx,-0x2(%rcx)
  lea    (%rax,%r10,1),%edx
  sub    %r10d,%eax
  imul   %edi,%edx
  add    $0x2,%edx
  sar    $0x2,%edx
  mov    %dx,0x6(%rcx)
  mov    %eax,%edx
  mov    %esi,%eax
  sub    %r9d,%eax
  imul   %edi,%edx
  imul   %edi,%eax
  add    $0x2,%edx
  add    $0x2,%eax
  sar    $0x2,%edx
  sar    $0x2,%eax
  mov    %dx,0xe(%rcx)
  mov    %ax,0x16(%rcx)
  cmp    %rcx,%r8
  jne    L5
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_label: D2
type_infered: string

tool: D2: 


assistant: ```c
void taa_h264_inverse_hadamard_and_dequant_4x4(short *block, int qp) {
  int tmp0, tmp1, tmp2, tmp3;
  static const int dequant_coef_dc[52] = {10 << 0, 11 << 0, 13 << 0, 14 << 0, 16 << 0, 18 << 0, 10 << 1, 11 << 1, 13 << 1, 14 << 1, 16 << 1, 18 << 1, 10 << 2, 11 << 2, 13 << 2, 14 << 2, 16 << 2, 18 << 2, 10 << 3, 11 << 3, 13 << 3, 14 << 3, 16 << 3, 18 << 3, 10 << 4, 11 << 4, 13 << 4, 14 << 4, 16 << 4, 18 << 4, 10 << 5, 11 << 5, 13 << 5, 14 << 5, 16 << 5, 18 << 5, 10 << 6, 11 << 6, 13 << 6, 14 << 6, 16 << 6, 18 << 6, 10 << 7, 11 << 7, 13 << 7, 14 << 7, 16 << 7, 18 << 7, 10 << 8, 11 << 8, 13 << 8, 14 << 8};
  int dqc = dequant_coef_dc[qp];
  for (int i = 0; i < 4; i++) {
    tmp0 = block[i * 4 + 0] + block[i * 4 + 2];
    tmp1 = block[i * 4 + 0] - block[i * 4 + 2];
    tmp2 = block[i * 4 + 1] - block[i * 4 + 3];
    tmp3 = block[i * 4 + 1] + block[i * 4 + 3];
    block[i * 4 + 0] = (short)(tmp0 + tmp3);
    block[i * 4 + 1] = (short)(tmp1 + tmp2);
    block[i * 4 + 2] = (short)(tmp1 - tmp2);
    block[i * 4 + 3] = (short)(tmp0 - tmp3);
  }
  for (int i = 0; i < 4; i++) {
    tmp0 = block[0 * 4 + i] + block[2 * 4 + i];
    tmp1 = block[0 * 4 + i] - block[2 * 4 + i];
    tmp2 = block[1 * 4 + i] - block[3 * 4 + i];
    tmp3 = block[1 * 4 + i] + block[3 * 4 + i];
    block[0 * 4 + i] = (short)(((tmp0 + tmp3) * dqc + 2) >> 2);
    block[1 * 4 + i] = (short)(((tmp1 + tmp2) * dqc + 2) >> 2);
    block[2 * 4 + i] = (short)(((tmp1 - tmp2) * dqc + 2) >> 2);
    block[3 * 4 + i] = (short)(((tmp0 - tmp3) * dqc + 2) >> 2);
  }
}
```