user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dfft>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r13d
  mov    %esi,%ebx
  mov    %esi,0xc(%rsp)
  mov    %rdx,%r12
  mov    %rcx,%r14
  mov    %rcx,%rdx
  mov    %r12,%rsi
  call   <cft1st@plt>
  mov    %ebx,%r15d
  shr    $0x1f,%r15d
  add    %ebx,%r15d
  sar    %r15d
  cmp    $0x7,%ebx
  jle    L34
  mov    $0x8,%ebx
  mov    $0x4,%ebp
L27:
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <cftmd1@plt>
  add    $0x2,%ebp
  shl    $0x2,%ebx
  cmp    %r15d,%ebp
  jle    L27
L53:
  mov    0xc(%rsp),%eax
  cmp    %ebp,%eax
  jle    L49
  mov    %eax,%r15d
  sub    $0x1,%r15d
  sub    %ebp,%r15d
  shr    %r15d
  mov    $0x0,%ebp
L20:
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <cftmd2@plt>
  shl    $0x2,%ebx
  mov    %ebp,%eax
  add    $0x1,%ebp
  cmp    %r15d,%eax
  jne    L20
L49:
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    (%r12,%rax,1),%r14
  lea    0x0(,%rbx,4),%edx
  cmp    %r13d,%edx
  je     L79
  test   %ebx,%ebx
  jle    L36
  lea    0x8(%r12),%rax
  lea    0x8(%r14),%rdx
  sub    $0x1,%ebx
  shr    %ebx
  mov    %ebx,%ebx
  shl    $0x4,%rbx
  lea    0x18(%r12,%rbx,1),%rcx
L84:
  movsd  -0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  movsd  -0x8(%rdx),%xmm3
  movsd  (%rdx),%xmm2
  movapd %xmm1,%xmm4
  addsd  %xmm3,%xmm4
  movsd  %xmm4,-0x8(%rax)
  movapd %xmm0,%xmm4
  addsd  %xmm2,%xmm4
  movsd  %xmm4,(%rax)
  subsd  %xmm3,%xmm1
  movsd  %xmm1,-0x8(%rdx)
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x10,%rax
  add    $0x10,%rdx
  cmp    %rcx,%rax
  jne    L84
L36:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  mov    $0x8,%ebx
  mov    $0x4,%ebp
  jmp    L53
L79:
  test   %ebx,%ebx
  jle    L36
  lea    (%r14,%rax,1),%r15
  lea    (%r15,%rax,1),%r13
  mov    $0x0,%ebp
L26:
  mov    %r13,%r8
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r12,%rsi
  pxor   %xmm5,%xmm5
  mov    D9(%rip),%rax
  movq   %rax,%xmm4
  movapd %xmm5,%xmm3
  movq   %rax,%xmm2
  movapd %xmm5,%xmm1
  movq   %rax,%xmm0
  mov    %ebp,%edi
  call   <btrfly@plt>
  add    $0x2,%ebp
  cmp    %ebx,%ebp
  jl     L26
  jmp    L36
```

tool_calls: name: extract_symbolic_data
arguments: label: D9
data_type: f64

tool: D9: 1

assistant: ```c
void dfft(int n, int logn, double *a, double *w) {
  int i, l, j;
  double *v, *b, *c, *d;
  cft1st(n, a, w);
  i = 4;
  l = 8;
  for (; i <= logn / 2; i += 2, l *= 4)
    cftmd1(n, l, a, w);
  for (; i <= logn - 1; i += 2, l *= 4)
    cftmd2(n, l, a, w);
  v = w + 1;
  b = a + l;
  c = a + l + l;
  d = a + l + l + l;
  if ((l << 2) == n) {
#pragma mta use 100 streams
#pragma mta assert no dependence
    for (j = 0; j < l; j += 2)
      btrfly(j, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, a, b, c, d);
  } else {
#pragma mta use 100 streams
#pragma mta assert no dependence
    for (j = 0; j < l; j += 2) {
      double x0r = a[j];
      double x0i = a[j + 1];
      double x1r = b[j];
      double x1i = b[j + 1];
      a[j] = x0r + x1r;
      a[j + 1] = x0i + x1i;
      b[j] = x0r - x1r;
      b[j + 1] = x0i - x1i;
    }
  }
}
```