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

```asm
<FDFT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rsi,%r12
  movsd  %xmm0,0x20(%rsp)
  mov    %rcx,%rbx
  mov    %r8,%rbp
  test   %edx,%edx
  jle    L76
  mov    %edx,%ecx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
L19:
  addsd  (%rdi,%rax,8),%xmm2
  addsd  (%r12,%rax,8),%xmm0
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L19
L45:
  pxor   %xmm7,%xmm7
  cvtsi2sd %edx,%xmm7
  movsd  %xmm7,0x28(%rsp)
  divsd  %xmm7,%xmm2
  movsd  %xmm2,0x30(%rsp)
  divsd  %xmm7,%xmm0
  movsd  %xmm0,0x38(%rsp)
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  D8(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,0x1c(%rsp)
  test   %eax,%eax
  jle    L38
  mov    %eax,%ecx
  mov    $0x0,%eax
L32:
  movq   $0x0,(%rbx,%rax,8)
  movq   $0x0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L32
  test   %edx,%edx
  jle    L112
L31:
  xorpd  D39(%rip),%xmm1
  subsd  D8(%rip),%xmm1
  mulsd  0x20(%rsp),%xmm1
  movsd  %xmm1,0x40(%rsp)
  mov    %rdi,%r13
  lea    -0x1(%rdx),%eax
  lea    0x8(%rdi,%rax,8),%rax
  mov    %rax,0x48(%rsp)
L121:
  movsd  0x0(%r13),%xmm0
  subsd  0x30(%rsp),%xmm0
  mulsd  D10(%rip),%xmm0
  movapd %xmm0,%xmm7
  lea    0x58(%rsp),%r14
  lea    0x50(%rsp),%r15
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm7,(%rsp)
  mulsd  %xmm7,%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x50(%rsp),%xmm4
  movsd  %xmm4,0x8(%rsp)
  movsd  0x58(%rsp),%xmm5
  movsd  %xmm5,0x10(%rsp)
  movsd  (%rsp),%xmm7
  mulsd  0x20(%rsp),%xmm7
  movapd %xmm7,%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x50(%rsp),%xmm4
  movsd  0x58(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm0
  movsd  (%r12),%xmm3
  subsd  0x38(%rsp),%xmm3
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L125
  mov    %eax,%edx
  mov    $0x0,%eax
L109:
  movapd %xmm0,%xmm2
  mulsd  %xmm4,%xmm0
  movapd %xmm5,%xmm6
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm0
  mulsd  %xmm4,%xmm1
  mulsd  %xmm5,%xmm2
  addsd  %xmm2,%xmm1
  movapd %xmm3,%xmm2
  mulsd  %xmm0,%xmm2
  addsd  (%rbx,%rax,8),%xmm2
  movsd  %xmm2,(%rbx,%rax,8)
  movapd %xmm3,%xmm2
  mulsd  %xmm1,%xmm2
  addsd  0x0(%rbp,%rax,8),%xmm2
  movsd  %xmm2,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L109
L125:
  add    $0x8,%r13
  add    $0x8,%r12
  cmp    0x48(%rsp),%r13
  jne    L121
  cmpl   $0x0,0x1c(%rsp)
  jle    L55
L112:
  mov    0x1c(%rsp),%edx
  mov    $0x0,%eax
L67:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  0x28(%rsp),%xmm7
  divsd  %xmm7,%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  movsd  0x0(%rbp,%rax,8),%xmm0
  divsd  %xmm7,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L67
L55:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  jmp    L45
L38:
  test   %edx,%edx
  jg     L31
  jmp    L55
```

tool_calls: name: parse_data
arguments: label: D8
type_guessed: f32[2]
name: parse_data
arguments: label: D39
type_guessed: f32[4]
name: parse_data
arguments: label: D10
type_guessed: f64

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

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

tool: D10: 6.283185307179586

assistant: ```c
void FDFT(double *x, double *y, int N, double df, double Nf, double *f_r, double *f_i) {
  int i, j, Ntot;
  double avx, avy, c, s, fval, val, yval;
  double xf0, xdf, sdf, cdf, s0, c0, xt, f0;
  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; i < Ntot; i++) {
    f_r[i] = 0.;
    f_i[i] = 0.;
  }
  for (j = 0; j < N; j++) {
    f0 = (-Nf - 1) * df;
    xt = 6.28318530717958647692528676656 * (x[j] - avx);
    xf0 = xt * f0;
    xdf = xt * df;
    s0 = sin(xf0);
    c0 = cos(xf0);
    sdf = sin(xdf);
    cdf = cos(xdf);
    yval = y[j] - avy;
    for (i = 0; i < Ntot; i++) {
      c = c0 * cdf - s0 * sdf;
      s = s0 * cdf + c0 * sdf;
      f_r[i] += yval * c;
      f_i[i] += yval * s;
      c0 = c;
      s0 = s;
    }
  }
  for (i = 0; i < Ntot; i++) {
    f_r[i] /= (double)N;
    f_i[i] /= (double)N;
  }
}
```