user: Please show me the C implementation that matches the assembly code listed below:

```asm
<idct3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x100,%rsp
  mov    %rdi,-0xf8(%rbp)
  mov    %rsi,-0x100(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x94(%rbp)
  jmp    L4
L39:
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %ax,-0xbc(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x8(%rax),%eax
  mov    %ax,-0xba(%rbp)
  movzwl D353(%rip),%eax
  cwtl
  movswl -0xbc(%rbp),%ecx
  movswl -0xba(%rbp),%edx
  add    %ecx,%edx
  imul   %edx,%eax
  sar    $0xe,%eax
  mov    %ax,-0xb8(%rbp)
  movzwl D353(%rip),%eax
  cwtl
  movswl -0xbc(%rbp),%edx
  movswl -0xba(%rbp),%ecx
  sub    %ecx,%edx
  imul   %edx,%eax
  sar    $0xe,%eax
  mov    %ax,-0xb6(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x4(%rax),%eax
  mov    %ax,-0xb4(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0xc(%rax),%eax
  mov    %ax,-0xb2(%rbp)
  movzwl D90(%rip),%eax
  movswl %ax,%edx
  movswl -0xb4(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D276(%rip),%eax
  movswl %ax,%edx
  movswl -0xb2(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0xe,%eax
  mov    %ax,-0xb0(%rbp)
  movzwl D276(%rip),%eax
  movswl %ax,%edx
  movswl -0xb4(%rbp),%eax
  imul   %edx,%eax
  movzwl D90(%rip),%edx
  movswl %dx,%ecx
  movswl -0xb2(%rbp),%edx
  imul   %ecx,%edx
  sub    %edx,%eax
  sar    $0xe,%eax
  mov    %ax,-0xae(%rbp)
  movzwl -0xb8(%rbp),%edx
  movzwl -0xb0(%rbp),%eax
  add    %edx,%eax
  mov    %ax,-0xac(%rbp)
  movzwl -0xb8(%rbp),%eax
  movzwl -0xb0(%rbp),%edx
  sub    %edx,%eax
  mov    %ax,-0xaa(%rbp)
  movzwl -0xb6(%rbp),%edx
  movzwl -0xae(%rbp),%eax
  add    %edx,%eax
  mov    %ax,-0xa8(%rbp)
  movzwl -0xb6(%rbp),%eax
  movzwl -0xae(%rbp),%edx
  sub    %edx,%eax
  mov    %ax,-0xa6(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x2(%rax),%eax
  mov    %ax,-0xa4(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x6(%rax),%eax
  mov    %ax,-0xa2(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0xa(%rax),%eax
  mov    %ax,-0xa0(%rbp)
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movzwl 0xe(%rax),%eax
  mov    %ax,-0x9e(%rbp)
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0xa4(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xa0(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xa2(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0x9e(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0xe,%eax
  mov    %ax,-0x9c(%rbp)
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xa4(%rbp),%eax
  imul   %edx,%eax
  movzwl D366(%rip),%edx
  movswl %dx,%ecx
  movswl -0xa0(%rbp),%edx
  imul   %ecx,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xa2(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0x9e(%rbp),%eax
  imul   %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  sar    $0xe,%eax
  mov    %ax,-0x9a(%rbp)
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xa4(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xa0(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0xa2(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0x9e(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0xe,%eax
  mov    %ax,-0x98(%rbp)
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xa4(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xa0(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xa2(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0x9e(%rbp),%eax
  imul   %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  sar    $0xe,%eax
  mov    %ax,-0x96(%rbp)
  movzwl -0xac(%rbp),%edx
  movzwl -0x9c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x90,%rax
  mov    %dx,(%rax)
  movzwl -0xac(%rbp),%eax
  movzwl -0x9c(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x82,%rax
  mov    %dx,(%rax)
  movzwl -0xa8(%rbp),%edx
  movzwl -0x9a(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x8e,%rax
  mov    %dx,(%rax)
  movzwl -0xa8(%rbp),%eax
  movzwl -0x9a(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x84,%rax
  mov    %dx,(%rax)
  movzwl -0xa6(%rbp),%edx
  movzwl -0x98(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x8c,%rax
  mov    %dx,(%rax)
  movzwl -0xa6(%rbp),%eax
  movzwl -0x98(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x86,%rax
  mov    %dx,(%rax)
  movzwl -0xaa(%rbp),%edx
  movzwl -0x96(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x8a,%rax
  mov    %dx,(%rax)
  movzwl -0xaa(%rbp),%eax
  movzwl -0x96(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x94(%rbp),%eax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x88,%rax
  mov    %dx,(%rax)
  addl   $0x1,-0x94(%rbp)
L4:
  cmpl   $0x7,-0x94(%rbp)
  jbe    L39
  movl   $0x0,-0x94(%rbp)
  jmp    L33
L8:
  mov    -0x94(%rbp),%eax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xe4(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x20,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xe2(%rbp)
  movzwl D353(%rip),%eax
  cwtl
  movswl -0xe4(%rbp),%ecx
  movswl -0xe2(%rbp),%edx
  add    %ecx,%edx
  imul   %edx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xe0(%rbp)
  movzwl D353(%rip),%eax
  cwtl
  movswl -0xe4(%rbp),%edx
  movswl -0xe2(%rbp),%ecx
  sub    %ecx,%edx
  imul   %edx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xde(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x10,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xdc(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x30,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xda(%rbp)
  movzwl D90(%rip),%eax
  movswl %ax,%edx
  movswl -0xdc(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D276(%rip),%eax
  movswl %ax,%edx
  movswl -0xda(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xd8(%rbp)
  movzwl D276(%rip),%eax
  movswl %ax,%edx
  movswl -0xdc(%rbp),%eax
  imul   %edx,%eax
  movzwl D90(%rip),%edx
  movswl %dx,%ecx
  movswl -0xda(%rbp),%edx
  imul   %ecx,%edx
  sub    %edx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xd6(%rbp)
  movzwl -0xe0(%rbp),%edx
  movzwl -0xd8(%rbp),%eax
  add    %edx,%eax
  mov    %ax,-0xd4(%rbp)
  movzwl -0xe0(%rbp),%eax
  movzwl -0xd8(%rbp),%edx
  sub    %edx,%eax
  mov    %ax,-0xd2(%rbp)
  movzwl -0xde(%rbp),%edx
  movzwl -0xd6(%rbp),%eax
  add    %edx,%eax
  mov    %ax,-0xd0(%rbp)
  movzwl -0xde(%rbp),%eax
  movzwl -0xd6(%rbp),%edx
  sub    %edx,%eax
  mov    %ax,-0xce(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x8,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xcc(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x18,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xca(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x28,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xc8(%rbp)
  mov    -0x94(%rbp),%eax
  add    $0x38,%rax
  movzwl -0x90(%rbp,%rax,2),%eax
  mov    %ax,-0xc6(%rbp)
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0xcc(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xc8(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xca(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xc6(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xc4(%rbp)
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xcc(%rbp),%eax
  imul   %edx,%eax
  movzwl D366(%rip),%edx
  movswl %dx,%ecx
  movswl -0xc8(%rbp),%edx
  imul   %ecx,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xca(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xc6(%rbp),%eax
  imul   %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xc2(%rbp)
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xcc(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xc8(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0xca(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xc6(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xc0(%rbp)
  movzwl D430(%rip),%eax
  movswl %ax,%edx
  movswl -0xcc(%rbp),%eax
  mov    %edx,%ecx
  imul   %eax,%ecx
  movzwl D227(%rip),%eax
  movswl %ax,%edx
  movswl -0xc8(%rbp),%eax
  imul   %edx,%eax
  add    %eax,%ecx
  movzwl D204(%rip),%eax
  movswl %ax,%edx
  movswl -0xca(%rbp),%eax
  imul   %edx,%eax
  sub    %eax,%ecx
  movzwl D366(%rip),%eax
  movswl %ax,%edx
  movswl -0xc6(%rbp),%eax
  imul   %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  sar    $0x10,%eax
  mov    %ax,-0xbe(%rbp)
  movzwl -0xd4(%rbp),%edx
  movzwl -0xc4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%ecx
  mov    -0x100(%rbp),%rax
  mov    -0x94(%rbp),%edx
  mov    %cx,(%rax,%rdx,2)
  movzwl -0xd4(%rbp),%eax
  movzwl -0xc4(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x100(%rbp),%rax
  lea    0x70(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xd0(%rbp),%edx
  movzwl -0xc2(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x100(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xd0(%rbp),%eax
  movzwl -0xc2(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x100(%rbp),%rax
  lea    0x60(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xce(%rbp),%edx
  movzwl -0xc0(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x100(%rbp),%rax
  lea    0x20(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xce(%rbp),%eax
  movzwl -0xc0(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x100(%rbp),%rax
  lea    0x50(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xd2(%rbp),%edx
  movzwl -0xbe(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x100(%rbp),%rax
  lea    0x30(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  movzwl -0xd2(%rbp),%eax
  movzwl -0xbe(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x100(%rbp),%rax
  lea    0x40(%rax),%rdx
  mov    -0x94(%rbp),%eax
  mov    %cx,(%rdx,%rax,2)
  addl   $0x1,-0x94(%rbp)
L33:
  cmpl   $0x7,-0x94(%rbp)
  jbe    L8
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L22
  call   <__stack_chk_fail@plt>
L22:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D353
type_infered: byte[2]
name: retrieve_data
arguments: label: D90
type_infered: byte[2]
name: retrieve_data
arguments: label: D276
type_infered: byte[2]
name: retrieve_data
arguments: label: D366
type_infered: byte[2]
name: retrieve_data
arguments: label: D204
type_infered: byte[2]
name: retrieve_data
arguments: label: D227
type_infered: byte[2]
name: retrieve_data
arguments: label: D430
type_infered: byte[2]

tool: {"D353": [0x42,0x2d]}

tool: {"D90": [0x21,0x3b]}

tool: {"D276": [0x7e,0x18]}

tool: {"D366": [0xc6,0x3e]}

tool: {"D204": [0x8f,0x23]}

tool: {"D227": [0x37,0x35]}

tool: {"D430": [0x7c,0x0c]}

assistant: ```c
void idct3(short data[8][8], short pixel[8][8]) {
  short rows[8][8];
  unsigned i;
  static const short C1 = 16070, C2 = 15137, C3 = 13623, C4 = 11586, C5 = 9103, C6 = 6270, C7 = 3196;
  for (i = 0; i < 8; i++) {
    const short x0 = data[i][0];
    const short x4 = data[i][4];
    const short t0 = C4 * (x0 + x4) >> 14;
    const short t4 = C4 * (x0 - x4) >> 14;
    const short x2 = data[i][2];
    const short x6 = data[i][6];
    const short t2 = (C2 * x2 + C6 * x6) >> 14;
    const short t6 = (C6 * x2 - C2 * x6) >> 14;
    const short e0 = t0 + t2;
    const short e3 = t0 - t2;
    const short e1 = t4 + t6;
    const short e2 = t4 - t6;
    const short x1 = data[i][1];
    const short x3 = data[i][3];
    const short x5 = data[i][5];
    const short x7 = data[i][7];
    const short o0 = (C1 * x1 + C5 * x5 + C3 * x3 + C7 * x7) >> 14;
    const short o1 = (C3 * x1 - C1 * x5 - C7 * x3 - C5 * x7) >> 14;
    const short o2 = (C5 * x1 + C7 * x5 - C1 * x3 + C3 * x7) >> 14;
    const short o3 = (C7 * x1 + C3 * x5 - C5 * x3 - C1 * x7) >> 14;
    rows[i][0] = e0 + o0;
    rows[i][7] = e0 - o0;
    rows[i][1] = e1 + o1;
    rows[i][6] = e1 - o1;
    rows[i][2] = e2 + o2;
    rows[i][5] = e2 - o2;
    rows[i][3] = e3 + o3;
    rows[i][4] = e3 - o3;
  }
  for (i = 0; i < 8; i++) {
    const short x0 = rows[0][i];
    const short x4 = rows[4][i];
    const short t0 = C4 * (x0 + x4) >> 16;
    const short t4 = C4 * (x0 - x4) >> 16;
    const short x2 = rows[2][i];
    const short x6 = rows[6][i];
    const short t2 = (C2 * x2 + C6 * x6) >> 16;
    const short t6 = (C6 * x2 - C2 * x6) >> 16;
    const short e0 = t0 + t2;
    const short e3 = t0 - t2;
    const short e1 = t4 + t6;
    const short e2 = t4 - t6;
    const short x1 = rows[1][i];
    const short x3 = rows[3][i];
    const short x5 = rows[5][i];
    const short x7 = rows[7][i];
    const short o0 = (C1 * x1 + C5 * x5 + C3 * x3 + C7 * x7) >> 16;
    const short o1 = (C3 * x1 - C1 * x5 - C7 * x3 - C5 * x7) >> 16;
    const short o2 = (C5 * x1 + C7 * x5 - C1 * x3 + C3 * x7) >> 16;
    const short o3 = (C7 * x1 + C3 * x5 - C5 * x3 - C1 * x7) >> 16;
    pixel[0][i] = e0 + o0;
    pixel[7][i] = e0 - o0;
    pixel[1][i] = e1 + o1;
    pixel[6][i] = e1 - o1;
    pixel[2][i] = e2 + o2;
    pixel[5][i] = e2 - o2;
    pixel[3][i] = e3 + o3;
    pixel[4][i] = e3 - o3;
  }
}
```