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

```asm
<DFT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    %edx,0x44(%rsp)
  movsd  %xmm0,0x48(%rsp)
  test   %edx,%edx
  jle    L52
  pxor   %xmm0,%xmm0
  movslq %edx,%rdx
  xor    %eax,%eax
  movapd %xmm0,%xmm2
  nopl   0x0(%rax,%rax,1)
L26:
  mov    0x30(%rsp),%rsi
  mov    0x38(%rsp),%rdi
  addsd  (%rsi,%rax,8),%xmm2
  addsd  (%rdi,%rax,8),%xmm0
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L26
L63:
  mov    0x44(%rsp),%edx
  pxor   %xmm7,%xmm7
  cvtsi2sd %edx,%xmm7
  divsd  %xmm7,%xmm0
  movsd  %xmm7,0x50(%rsp)
  divsd  %xmm7,%xmm2
  movsd  %xmm0,0x18(%rsp)
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  D21(%rip),%xmm0
  xorpd  D16(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  cvttsd2si %xmm0,%eax
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm2,0x10(%rsp)
  test   %eax,%eax
  jle    L48
  sub    $0x1,%eax
  mov    %rcx,%r15
  mov    %r8,%r14
  lea    0x8(%rcx,%rax,8),%rax
  mov    0x30(%rsp),%rcx
  mov    %rax,0x58(%rsp)
  lea    -0x1(%rdx),%eax
  lea    0x8(%rcx,%rax,8),%rax
  mov    %rax,0x20(%rsp)
  nopl   0x0(%rax,%rax,1)
L30:
  mov    0x44(%rsp),%eax
  movq   $0x0,(%r15)
  movq   $0x0,(%r14)
  test   %eax,%eax
  jle    L25
  mov    0x38(%rsp),%r12
  mov    0x30(%rsp),%r13
  lea    0x68(%rsp),%rbp
  lea    0x60(%rsp),%rbx
  movsd  D10(%rip),%xmm1
  mulsd  0x28(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  nopw   0x0(%rax,%rax,1)
L22:
  movsd  0x0(%r13),%xmm0
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  add    $0x8,%r13
  subsd  0x10(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  add    $0x8,%r12
  call   <sincos@plt>
  movsd  -0x8(%r12),%xmm0
  movsd  0x18(%rsp),%xmm3
  subsd  %xmm3,%xmm0
  mulsd  0x60(%rsp),%xmm0
  addsd  (%r15),%xmm0
  movsd  %xmm0,(%r15)
  movsd  -0x8(%r12),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  0x68(%rsp),%xmm0
  addsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  cmp    0x20(%rsp),%r13
  jne    L22
L25:
  movsd  (%r15),%xmm0
  movsd  0x50(%rsp),%xmm6
  add    $0x8,%r15
  add    $0x8,%r14
  movsd  0x28(%rsp),%xmm7
  addsd  0x48(%rsp),%xmm7
  divsd  %xmm6,%xmm0
  movsd  %xmm7,0x28(%rsp)
  movsd  %xmm0,-0x8(%r15)
  movsd  -0x8(%r14),%xmm0
  divsd  %xmm6,%xmm0
  movsd  %xmm0,-0x8(%r14)
  cmp    0x58(%rsp),%r15
  jne    L30
L48:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  jmp    L63
```

tool_calls: name: read_data
arguments: data_tag: D21
type: f32[2]
name: read_data
arguments: data_tag: D16
type: f32[4]
name: read_data
arguments: data_tag: D10
type: byte[8]

tool: {"D21": [0.0,1.875]}

tool: {"D16": [0.0,-0.0,0.0,0.0]}

tool: {"D10": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0xc0]}

assistant: ```c
void DFT(double *x, double *y, int N, double df, double Nf, double *f_r, double *f_i) {
  int i, j, Ntot;
  double avx, avy, cosval, sinval, fval, val;
  for (i = 0, avx = 0., avy = 0.; i < N; i++) {
    avx += x[i];
    avy += y[i];
  }
  avx = avx / N;
  avy = avy / N;
  Ntot = 2 * Nf + 1;
  for (i = 0, fval = -Nf * df; i < Ntot; i++, fval += df) {
    for (j = 0, f_r[i] = 0., f_i[i] = 0.; j < N; j++) {
      val = -6.28318530717958647692528676656 * fval * (x[j] - avx);
      cosval = cos(val);
      sinval = sin(val);
      f_r[i] += (y[j] - avy) * cosval;
      f_i[i] += (y[j] - avy) * sinval;
    }
    f_r[i] /= (double)N;
    f_i[i] /= (double)N;
  }
}
```