user: 请将以下的汇编代码转换成C语言代码:

```asm
<FDFT>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x78,%rsp
  movsd  %xmm0,0x28(%rsp)
  test   %edx,%edx
  jle    L114
  cmp    $0x1,%edx
  je     L117
  shr    %edx
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  shl    $0x4,%rdx
  movapd %xmm0,%xmm2
  nopw   0x0(%rax,%rax,1)
L93:
  movsd  0x0(%r13,%rax,1),%xmm3
  addsd  %xmm3,%xmm2
  movsd  0x8(%r13,%rax,1),%xmm3
  addsd  %xmm3,%xmm2
  movsd  0x0(%rbp,%rax,1),%xmm3
  addsd  %xmm3,%xmm0
  movsd  0x8(%rbp,%rax,1),%xmm3
  add    $0x10,%rax
  addsd  %xmm3,%xmm0
  cmp    %rdx,%rax
  jne    L93
  mov    %ebx,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%bl
  je     L42
L66:
  cltq
  addsd  0x0(%r13,%rax,8),%xmm2
  addsd  0x0(%rbp,%rax,8),%xmm0
L42:
  pxor   %xmm7,%xmm7
  cvtsi2sd %ebx,%xmm7
  divsd  %xmm7,%xmm0
  movsd  %xmm7,0x50(%rsp)
  divsd  %xmm7,%xmm2
  movsd  %xmm0,0x38(%rsp)
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  D2(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,0x5c(%rsp)
  movsd  %xmm2,0x30(%rsp)
  test   %eax,%eax
  jle    L178
  movslq %eax,%rcx
  lea    0x0(,%rcx,8),%r12
  lea    (%r15,%r12,1),%rax
  cmp    %rax,%r14
  jae    L29
  lea    (%r14,%r12,1),%rax
  cmp    %rax,%r15
  jb     L4
L29:
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  movsd  %xmm1,0x8(%rsp)
  call   <memset@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  movsd  0x8(%rsp),%xmm1
L170:
  test   %ebx,%ebx
  jle    L92
  xorpd  D35(%rip),%xmm1
  lea    -0x1(%rbx),%eax
  mov    0x5c(%rsp),%r12d
  mov    %rbp,%r8
  subsd  D2(%rip),%xmm1
  mulsd  0x28(%rsp),%xmm1
  lea    0x8(%r13,%rax,8),%rax
  mov    %rax,0x40(%rsp)
  lea    0x68(%rsp),%rbp
  lea    0x60(%rsp),%rbx
  movsd  %xmm1,0x48(%rsp)
  nopl   0x0(%rax,%rax,1)
L180:
  movsd  0x0(%r13),%xmm3
  subsd  0x30(%rsp),%xmm3
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mulsd  D38(%rip),%xmm3
  movsd  0x48(%rsp),%xmm0
  mov    %r8,0x20(%rsp)
  mulsd  %xmm3,%xmm0
  movsd  %xmm3,0x18(%rsp)
  call   <sincos@plt>
  movsd  0x18(%rsp),%xmm3
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mulsd  0x28(%rsp),%xmm3
  movsd  0x60(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm2
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movapd %xmm3,%xmm0
  call   <sincos@plt>
  mov    0x20(%rsp),%r8
  xor    %eax,%eax
  movsd  0x8(%rsp),%xmm2
  movsd  0x60(%rsp),%xmm5
  movsd  0x68(%rsp),%xmm4
  movsd  (%r8),%xmm3
  subsd  0x38(%rsp),%xmm3
  movapd %xmm2,%xmm0
  movsd  0x10(%rsp),%xmm1
  nopl   (%rax)
L1:
  movapd %xmm1,%xmm2
  movapd %xmm4,%xmm6
  movapd %xmm5,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm6
  mulsd  %xmm4,%xmm2
  mulsd  %xmm5,%xmm0
  subsd  %xmm6,%xmm1
  addsd  %xmm2,%xmm0
  movapd %xmm3,%xmm2
  mulsd  %xmm1,%xmm2
  addsd  (%r14,%rax,8),%xmm2
  movsd  %xmm2,(%r14,%rax,8)
  movapd %xmm3,%xmm2
  mulsd  %xmm0,%xmm2
  addsd  (%r15,%rax,8),%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L1
  add    $0x8,%r13
  add    $0x8,%r8
  cmp    0x40(%rsp),%r13
  jne    L180
L92:
  lea    0xf(%r14),%rax
  sub    %r15,%rax
  cmp    $0x1e,%rax
  jbe    L0
  mov    0x5c(%rsp),%eax
  cmp    $0x1,%eax
  je     L0
  shr    %eax
  movsd  0x50(%rsp),%xmm1
  mov    %eax,%edx
  xor    %eax,%eax
  unpcklpd %xmm1,%xmm1
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L126:
  movupd (%r14,%rax,1),%xmm0
  divpd  %xmm1,%xmm0
  movups %xmm0,(%r14,%rax,1)
  movupd (%r15,%rax,1),%xmm0
  divpd  %xmm1,%xmm0
  movups %xmm0,(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L126
  mov    0x5c(%rsp),%ecx
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L178
  shl    $0x3,%rax
  movsd  0x50(%rsp),%xmm7
  add    %rax,%r14
  add    %r15,%rax
  movsd  (%r14),%xmm0
  divsd  %xmm7,%xmm0
  movsd  %xmm0,(%r14)
  movsd  (%rax),%xmm0
  divsd  %xmm7,%xmm0
  movsd  %xmm0,(%rax)
L178:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L102:
  movq   $0x0,(%r14,%rax,8)
  movq   $0x0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L102
  jmp    L170
L0:
  mov    0x5c(%rsp),%r12d
  xor    %eax,%eax
  nopl   (%rax)
L138:
  movsd  (%r14,%rax,8),%xmm0
  movsd  0x50(%rsp),%xmm7
  divsd  %xmm7,%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  movsd  (%r15,%rax,8),%xmm0
  divsd  %xmm7,%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L138
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  jmp    L42
L117:
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  movapd %xmm0,%xmm2
  jmp    L66
```

tool_calls: name: retrieve_data
arguments: data_tag: D2
type_guessed: f32[2]
name: retrieve_data
arguments: data_tag: D35
type_guessed: f32[4]
name: retrieve_data
arguments: data_tag: D38
type_guessed: f64

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

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

tool: D38: 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;
  }
}
```