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    L33
  mov    %edx,%edx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
L51:
  mov    0x30(%rsp),%rdi
  addsd  (%rdi,%rax,8),%xmm2
  mov    0x38(%rsp),%rdi
  addsd  (%rdi,%rax,8),%xmm0
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L51
L10:
  mov    0x44(%rsp),%edx
  pxor   %xmm7,%xmm7
  cvtsi2sd %edx,%xmm7
  movsd  %xmm7,0x50(%rsp)
  divsd  %xmm7,%xmm2
  movsd  %xmm2,0x8(%rsp)
  divsd  %xmm7,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  D24(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  xorpd  D0(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  movsd  %xmm1,0x20(%rsp)
  test   %eax,%eax
  jle    L32
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x28(%rsp)
  lea    -0x1(%rax),%eax
  lea    0x8(%rcx,%rax,8),%rax
  mov    %rax,0x58(%rsp)
  lea    -0x1(%rdx),%eax
  mov    0x30(%rsp),%rcx
  lea    0x8(%rcx,%rax,8),%r15
L13:
  mov    0x18(%rsp),%rax
  mov    %rax,%r13
  movq   $0x0,(%rax)
  mov    0x28(%rsp),%rax
  mov    %rax,%r12
  movq   $0x0,(%rax)
  cmpl   $0x0,0x44(%rsp)
  jle    L11
  movsd  0x20(%rsp),%xmm1
  mulsd  D27(%rip),%xmm1
  movsd  %xmm1,(%rsp)
  mov    0x38(%rsp),%rbp
  mov    0x30(%rsp),%rbx
  lea    0x68(%rsp),%r14
L44:
  lea    0x60(%rsp),%rsi
  movsd  (%rbx),%xmm0
  subsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x0(%rbp),%xmm0
  movsd  0x10(%rsp),%xmm3
  subsd  %xmm3,%xmm0
  mulsd  0x60(%rsp),%xmm0
  addsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x0(%r13)
  movsd  0x0(%rbp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  0x68(%rsp),%xmm0
  addsd  (%r12),%xmm0
  movsd  %xmm0,(%r12)
  add    $0x8,%rbx
  add    $0x8,%rbp
  cmp    %r15,%rbx
  jne    L44
L11:
  movsd  0x0(%r13),%xmm0
  movsd  0x50(%rsp),%xmm6
  divsd  %xmm6,%xmm0
  movsd  %xmm0,0x0(%r13)
  movsd  (%r12),%xmm0
  divsd  %xmm6,%xmm0
  movsd  %xmm0,(%r12)
  movsd  0x20(%rsp),%xmm7
  addsd  0x48(%rsp),%xmm7
  movsd  %xmm7,0x20(%rsp)
  addq   $0x8,0x18(%rsp)
  mov    0x18(%rsp),%rax
  addq   $0x8,0x28(%rsp)
  cmp    0x58(%rsp),%rax
  jne    L13
L32:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  jmp    L10
```

tool_calls: name: parse_data
arguments: data_label: D24
type_infered: f32[2]
name: parse_data
arguments: data_label: D0
type_infered: f32[4]
name: parse_data
arguments: data_label: D27
type_infered: byte[8]

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

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

tool: {"D27": [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;
  }
}
```