user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<fdct>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %rsi,%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rsi
  mov    %rsp,%rcx
  lea    0x80(%rdi),%r8
  mov    %rcx,%rdi
L15:
  mov    $0x0,%eax
L56:
  movzwl (%rsi,%rax,2),%edx
  mov    %edx,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    $0x8,%rax
  jne    L56
  add    $0x10,%rsi
  add    $0x20,%rdi
  cmp    %r8,%rsi
  jne    L15
  mov    %rsp,%rax
  lea    0x100(%rsp),%r11
L50:
  mov    (%rax),%edx
  mov    %edx,%ebx
  add    0x1c(%rax),%ebx
  sub    0x1c(%rax),%edx
  mov    0x4(%rax),%esi
  mov    %esi,%r10d
  add    0x18(%rax),%r10d
  sub    0x18(%rax),%esi
  mov    0x8(%rax),%edi
  mov    %edi,%r12d
  add    0x14(%rax),%r12d
  sub    0x14(%rax),%edi
  mov    0xc(%rax),%r8d
  mov    %r8d,%r13d
  add    0x10(%rax),%r13d
  sub    0x10(%rax),%r8d
  lea    (%rbx,%r13,1),%ebp
  sub    %r13d,%ebx
  lea    (%r10,%r12,1),%r13d
  sub    %r12d,%r10d
  lea    0x0(%rbp,%r13,1),%r12d
  add    %r12d,%r12d
  mov    %r12d,(%rax)
  sub    %r13d,%ebp
  add    %ebp,%ebp
  mov    %ebp,0x10(%rax)
  lea    (%rbx,%r10,1),%ebp
  imul   $0x1151,%ebp,%ebp
  imul   $0x187e,%ebx,%ebx
  lea    0x800(%rbp,%rbx,1),%ebx
  sar    $0xc,%ebx
  mov    %ebx,0x8(%rax)
  imul   $0xffffc4df,%r10d,%r10d
  lea    0x800(%rbp,%r10,1),%r10d
  sar    $0xc,%r10d
  mov    %r10d,0x18(%rax)
  lea    (%rdx,%r8,1),%ebx
  lea    (%rsi,%rdi,1),%r12d
  lea    (%rsi,%r8,1),%ebp
  lea    (%rdx,%rdi,1),%r13d
  lea    0x0(%rbp,%r13,1),%r10d
  imul   $0x25a1,%r10d,%r10d
  imul   $0xffffe333,%ebx,%ebx
  imul   $0xffffadfd,%r12d,%r12d
  imul   $0xffffc13b,%ebp,%ebp
  imul   $0xfffff384,%r13d,%r13d
  add    %r10d,%ebp
  add    %r13d,%r10d
  imul   $0x98e,%r8d,%r8d
  add    %ebx,%r8d
  lea    0x800(%rbp,%r8,1),%r8d
  sar    $0xc,%r8d
  mov    %r8d,0x1c(%rax)
  imul   $0x41b3,%edi,%edi
  add    %r12d,%edi
  lea    0x800(%r10,%rdi,1),%edi
  sar    $0xc,%edi
  mov    %edi,0x14(%rax)
  imul   $0x6254,%esi,%esi
  add    %r12d,%esi
  lea    0x800(%rbp,%rsi,1),%esi
  sar    $0xc,%esi
  mov    %esi,0xc(%rax)
  imul   $0x300b,%edx,%edx
  add    %ebx,%edx
  lea    0x800(%r10,%rdx,1),%edx
  sar    $0xc,%edx
  mov    %edx,0x4(%rax)
  add    $0x20,%rax
  cmp    %r11,%rax
  jne    L50
  mov    %rsp,%rax
  lea    0x20(%rsp),%r10
L25:
  mov    (%rax),%edx
  mov    %edx,%ebx
  add    0xe0(%rax),%ebx
  sub    0xe0(%rax),%edx
  mov    0x20(%rax),%esi
  mov    %esi,%r11d
  add    0xc0(%rax),%r11d
  sub    0xc0(%rax),%esi
  mov    0x40(%rax),%edi
  mov    %edi,%r12d
  add    0xa0(%rax),%r12d
  sub    0xa0(%rax),%edi
  mov    0x60(%rax),%ebp
  mov    %ebp,%r13d
  add    0x80(%rax),%r13d
  sub    0x80(%rax),%ebp
  lea    (%rbx,%r13,1),%r8d
  sub    %r13d,%ebx
  lea    (%r11,%r12,1),%r13d
  sub    %r12d,%r11d
  lea    0x1(%r8,%r13,1),%r12d
  sar    %r12d
  mov    %r12d,(%rax)
  sub    %r13d,%r8d
  add    $0x1,%r8d
  sar    %r8d
  mov    %r8d,0x80(%rax)
  lea    (%rbx,%r11,1),%r8d
  imul   $0x1151,%r8d,%r8d
  imul   $0x187e,%ebx,%ebx
  lea    0x2000(%r8,%rbx,1),%ebx
  sar    $0xe,%ebx
  mov    %ebx,0x40(%rax)
  imul   $0xffffc4df,%r11d,%r11d
  lea    0x2000(%r8,%r11,1),%r8d
  sar    $0xe,%r8d
  mov    %r8d,0xc0(%rax)
  lea    (%rdx,%rbp,1),%ebx
  lea    (%rsi,%rdi,1),%r12d
  lea    (%rsi,%rbp,1),%r8d
  lea    (%rdx,%rdi,1),%r13d
  lea    (%r8,%r13,1),%r11d
  imul   $0x25a1,%r11d,%r11d
  imul   $0xffffe333,%ebx,%ebx
  imul   $0xffffadfd,%r12d,%r12d
  imul   $0xffffc13b,%r8d,%r8d
  imul   $0xfffff384,%r13d,%r13d
  add    %r11d,%r8d
  add    %r13d,%r11d
  imul   $0x98e,%ebp,%ebp
  add    %ebx,%ebp
  lea    0x2000(%r8,%rbp,1),%ebp
  sar    $0xe,%ebp
  mov    %ebp,0xe0(%rax)
  imul   $0x41b3,%edi,%edi
  add    %r12d,%edi
  lea    0x2000(%r11,%rdi,1),%edi
  sar    $0xe,%edi
  mov    %edi,0xa0(%rax)
  imul   $0x6254,%esi,%esi
  add    %r12d,%esi
  lea    0x2000(%r8,%rsi,1),%esi
  sar    $0xe,%esi
  mov    %esi,0x60(%rax)
  imul   $0x300b,%edx,%edx
  add    %ebx,%edx
  lea    0x2000(%r11,%rdx,1),%edx
  sar    $0xe,%edx
  mov    %edx,0x20(%rax)
  add    $0x4,%rax
  cmp    %r10,%rax
  jne    L25
  mov    %r9,%rsi
  lea    0x100(%rcx),%rdi
L8:
  mov    $0x0,%eax
L68:
  mov    (%rcx,%rax,4),%edx
  sar    $0x3,%edx
  mov    %dx,(%rsi,%rax,2)
  add    $0x1,%rax
  cmp    $0x8,%rax
  jne    L68
  add    $0x20,%rcx
  add    $0x10,%rsi
  cmp    %rdi,%rcx
  jne    L8
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L52
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L52:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void fdct(const unsigned short *in, short *out) {
  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
  int tmp10, tmp11, tmp12, tmp13;
  int z1, z2, z3, z4, z5;
  int ctr;
  int data[8 * 8];
  int i, j;
  int *dataptr = data;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      int temp;
      temp = in[i * 8 + j];
      dataptr[i * 8 + j] = temp;
    }
  }
  dataptr = data;
  for (ctr = 8 - 1; ctr >= 0; ctr--) {
    tmp0 = dataptr[0] + dataptr[7];
    tmp7 = dataptr[0] - dataptr[7];
    tmp1 = dataptr[1] + dataptr[6];
    tmp6 = dataptr[1] - dataptr[6];
    tmp2 = dataptr[2] + dataptr[5];
    tmp5 = dataptr[2] - dataptr[5];
    tmp3 = dataptr[3] + dataptr[4];
    tmp4 = dataptr[3] - dataptr[4];
    tmp10 = tmp0 + tmp3;
    tmp13 = tmp0 - tmp3;
    tmp11 = tmp1 + tmp2;
    tmp12 = tmp1 - tmp2;
    dataptr[0] = (int)((tmp10 + tmp11) << 1);
    dataptr[4] = (int)((tmp10 - tmp11) << 1);
    z1 = ((tmp12 + tmp13) * (((int)4433)));
    dataptr[2] = (int)(((z1 + ((tmp13) * (((int)6270)))) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    dataptr[6] = (int)(((z1 + ((tmp12) * (-((int)15137)))) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    z1 = tmp4 + tmp7;
    z2 = tmp5 + tmp6;
    z3 = tmp4 + tmp6;
    z4 = tmp5 + tmp7;
    z5 = ((z3 + z4) * (((int)9633)));
    tmp4 = ((tmp4) * (((int)2446)));
    tmp5 = ((tmp5) * (((int)16819)));
    tmp6 = ((tmp6) * (((int)25172)));
    tmp7 = ((tmp7) * (((int)12299)));
    z1 = ((z1) * (-((int)7373)));
    z2 = ((z2) * (-((int)20995)));
    z3 = ((z3) * (-((int)16069)));
    z4 = ((z4) * (-((int)3196)));
    z3 += z5;
    z4 += z5;
    dataptr[7] = (int)(((tmp4 + z1 + z3) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    dataptr[5] = (int)(((tmp5 + z2 + z4) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    dataptr[3] = (int)(((tmp6 + z2 + z3) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    dataptr[1] = (int)(((tmp7 + z1 + z4) + (((int)1) << ((13 - 1) - 1))) >> (13 - 1));
    dataptr += 8;
  }
  dataptr = data;
  for (ctr = 8 - 1; ctr >= 0; ctr--) {
    tmp0 = dataptr[8 * 0] + dataptr[8 * 7];
    tmp7 = dataptr[8 * 0] - dataptr[8 * 7];
    tmp1 = dataptr[8 * 1] + dataptr[8 * 6];
    tmp6 = dataptr[8 * 1] - dataptr[8 * 6];
    tmp2 = dataptr[8 * 2] + dataptr[8 * 5];
    tmp5 = dataptr[8 * 2] - dataptr[8 * 5];
    tmp3 = dataptr[8 * 3] + dataptr[8 * 4];
    tmp4 = dataptr[8 * 3] - dataptr[8 * 4];
    tmp10 = tmp0 + tmp3;
    tmp13 = tmp0 - tmp3;
    tmp11 = tmp1 + tmp2;
    tmp12 = tmp1 - tmp2;
    dataptr[8 * 0] = (int)(((tmp10 + tmp11) + (((int)1) << ((1) - 1))) >> (1));
    dataptr[8 * 4] = (int)(((tmp10 - tmp11) + (((int)1) << ((1) - 1))) >> (1));
    z1 = ((tmp12 + tmp13) * (((int)4433)));
    dataptr[8 * 2] = (int)(((z1 + ((tmp13) * (((int)6270)))) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    dataptr[8 * 6] = (int)(((z1 + ((tmp12) * (-((int)15137)))) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    z1 = tmp4 + tmp7;
    z2 = tmp5 + tmp6;
    z3 = tmp4 + tmp6;
    z4 = tmp5 + tmp7;
    z5 = ((z3 + z4) * (((int)9633)));
    tmp4 = ((tmp4) * (((int)2446)));
    tmp5 = ((tmp5) * (((int)16819)));
    tmp6 = ((tmp6) * (((int)25172)));
    tmp7 = ((tmp7) * (((int)12299)));
    z1 = ((z1) * (-((int)7373)));
    z2 = ((z2) * (-((int)20995)));
    z3 = ((z3) * (-((int)16069)));
    z4 = ((z4) * (-((int)3196)));
    z3 += z5;
    z4 += z5;
    dataptr[8 * 7] = (int)(((tmp4 + z1 + z3) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    dataptr[8 * 5] = (int)(((tmp5 + z2 + z4) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    dataptr[8 * 3] = (int)(((tmp6 + z2 + z3) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    dataptr[8 * 1] = (int)(((tmp7 + z1 + z4) + (((int)1) << ((13 + 1) - 1))) >> (13 + 1));
    dataptr++;
  }
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++)
      out[i * 8 + j] = data[i * 8 + j] >> 3;
}
```