user: 请从给定的汇编指令推导出C源代码:

```asm
<fdct>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rax
  mov    %esi,%r10d
  movslq %esi,%r9
  lea    (%r9,%r9,1),%r11
  mov    %rdi,%rdx
  mov    $0x8,%ebx
L6:
  movswl (%rdx),%ecx
  movswl 0xe(%rdx),%esi
  lea    (%rcx,%rsi,1),%r12d
  sub    %esi,%ecx
  movswl 0x2(%rdx),%esi
  movswl 0xc(%rdx),%edi
  lea    (%rsi,%rdi,1),%ebp
  sub    %edi,%esi
  movswl 0x4(%rdx),%edi
  movswl 0xa(%rdx),%r8d
  lea    (%rdi,%r8,1),%r15d
  sub    %r8d,%edi
  movswl 0x6(%rdx),%r8d
  movswl 0x8(%rdx),%r13d
  lea    (%r8,%r13,1),%r14d
  sub    %r13d,%r8d
  lea    (%r12,%r14,1),%r13d
  sub    %r14d,%r12d
  lea    0x0(%rbp,%r15,1),%r14d
  sub    %r15d,%ebp
  lea    0x0(%r13,%r14,1),%r15d
  shl    $0x2,%r15d
  mov    %r15w,(%rdx)
  sub    %r14d,%r13d
  shl    $0x2,%r13d
  mov    %r13w,0x8(%rdx)
  lea    (%r12,%rbp,1),%r13d
  imul   $0x1151,%r13d,%r13d
  imul   $0x187e,%r12d,%r12d
  add    %r13d,%r12d
  sar    $0xb,%r12d
  mov    %r12w,0x4(%rdx)
  imul   $0xffffc4df,%ebp,%ebp
  add    %r13d,%ebp
  sar    $0xb,%ebp
  mov    %bp,0xc(%rdx)
  lea    (%rcx,%r8,1),%r12d
  lea    (%rsi,%rdi,1),%r14d
  lea    (%rsi,%r8,1),%r13d
  lea    (%rcx,%rdi,1),%r15d
  lea    0x0(%r13,%r15,1),%ebp
  imul   $0x25a1,%ebp,%ebp
  imul   $0xffffe333,%r12d,%r12d
  imul   $0xffffadfd,%r14d,%r14d
  imul   $0xffffc13b,%r13d,%r13d
  imul   $0xfffff384,%r15d,%r15d
  add    %ebp,%r13d
  add    %r15d,%ebp
  imul   $0x98e,%r8d,%r8d
  add    %r12d,%r8d
  add    %r13d,%r8d
  sar    $0xb,%r8d
  mov    %r8w,0xe(%rdx)
  imul   $0x41b3,%edi,%edi
  add    %r14d,%edi
  add    %ebp,%edi
  sar    $0xb,%edi
  mov    %di,0xa(%rdx)
  imul   $0x6254,%esi,%esi
  add    %r14d,%esi
  add    %r13d,%esi
  sar    $0xb,%esi
  mov    %si,0x6(%rdx)
  imul   $0x300b,%ecx,%ecx
  add    %r12d,%ecx
  add    %ebp,%ecx
  sar    $0xb,%ecx
  mov    %cx,0x2(%rdx)
  add    %r11,%rdx
  sub    $0x1,%ebx
  jne    L6
  lea    0x0(,%r10,8),%ebx
  sub    %r10d,%ebx
  movslq %ebx,%rbx
  add    %rbx,%rbx
  lea    (%r10,%r10,2),%ebp
  add    %ebp,%ebp
  movslq %ebp,%rbp
  lea    0x0(%rbp,%rbp,1),%r13
  lea    0x0(,%r9,4),%r12
  lea    (%r10,%r10,4),%edx
  movslq %edx,%rdx
  lea    (%rdx,%rdx,1),%rcx
  mov    %rcx,-0x18(%rsp)
  lea    0x0(,%r9,8),%rcx
  mov    %rcx,-0x10(%rsp)
  lea    0x10(%rax),%rcx
  mov    %rcx,-0x8(%rsp)
L15:
  movswl (%rax),%edx
  movswl (%rax,%rbx,1),%ecx
  lea    (%rdx,%rcx,1),%r9d
  sub    %ecx,%edx
  movswl (%rax,%r11,1),%ecx
  movswl (%rax,%r13,1),%esi
  lea    (%rcx,%rsi,1),%r8d
  sub    %esi,%ecx
  movswl (%rax,%r12,1),%esi
  mov    -0x18(%rsp),%rdi
  movswl (%rax,%rdi,1),%edi
  lea    (%rsi,%rdi,1),%r14d
  sub    %edi,%esi
  movswl (%rax,%rbp,1),%edi
  mov    -0x10(%rsp),%r10
  movswl (%rax,%r10,1),%r10d
  lea    (%rdi,%r10,1),%r15d
  sub    %r10d,%edi
  lea    (%r9,%r15,1),%r10d
  sub    %r15d,%r9d
  lea    (%r8,%r14,1),%r15d
  sub    %r14d,%r8d
  lea    (%r10,%r15,1),%r14d
  sar    $0x5,%r14d
  mov    %r14w,(%rax)
  sub    %r15d,%r10d
  sar    $0x5,%r10d
  mov    -0x10(%rsp),%r14
  mov    %r10w,(%rax,%r14,1)
  lea    (%r9,%r8,1),%r10d
  imul   $0x1151,%r10d,%r10d
  imul   $0x187e,%r9d,%r9d
  add    %r10d,%r9d
  sar    $0x12,%r9d
  mov    %r9w,(%rax,%r12,1)
  imul   $0xffffc4df,%r8d,%r8d
  add    %r10d,%r8d
  sar    $0x12,%r8d
  mov    %r8w,(%rax,%r13,1)
  lea    (%rdx,%rdi,1),%r10d
  lea    (%rcx,%rsi,1),%r14d
  lea    (%rcx,%rdi,1),%r9d
  lea    (%rdx,%rsi,1),%r8d
  lea    (%r9,%r8,1),%r15d
  imul   $0x25a1,%r15d,%r15d
  imul   $0xffffe333,%r10d,%r10d
  imul   $0xffffadfd,%r14d,%r14d
  imul   $0xffffc13b,%r9d,%r9d
  imul   $0xfffff384,%r8d,%r8d
  add    %r15d,%r9d
  add    %r15d,%r8d
  imul   $0x98e,%edi,%edi
  add    %r10d,%edi
  add    %r9d,%edi
  sar    $0x12,%edi
  mov    %di,(%rax,%rbx,1)
  imul   $0x41b3,%esi,%esi
  add    %r14d,%esi
  add    %r8d,%esi
  sar    $0x12,%esi
  mov    -0x18(%rsp),%rdi
  mov    %si,(%rax,%rdi,1)
  imul   $0x6254,%ecx,%ecx
  add    %r14d,%ecx
  add    %r9d,%ecx
  sar    $0x12,%ecx
  mov    %cx,(%rax,%rbp,1)
  imul   $0x300b,%edx,%edx
  add    %r10d,%edx
  add    %r8d,%edx
  sar    $0x12,%edx
  mov    %dx,(%rax,%r11,1)
  add    $0x2,%rax
  cmp    -0x8(%rsp),%rax
  jne    L15
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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