user: Converte this assembly snippet into its equivalent C code:

```asm
<fft1>:
  endbr64
  push   %r14
  push   %r13
  lea    (%rsi,%rsi,1),%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  cmp    $0x1,%r13d
  jle    L74
  mov    %r13d,%esi
  mov    %edx,%ebx
  mov    $0x3,%ecx
  mov    $0x1,%edx
  sar    %esi
  cmp    $0x2,%r13d
  setg   %r9b
  nopw   0x0(%rax,%rax,1)
L97:
  mov    %esi,%eax
  cmp    %esi,%edx
  jle    L57
  test   %r9b,%r9b
  jne    L36
  jmp    L57
  nopl   (%rax)
L129:
  cmp    %eax,%edx
  jle    L57
L36:
  sub    %eax,%edx
  sar    %eax
  cmp    $0x1,%eax
  jg     L129
L57:
  add    %eax,%edx
  cmp    %ecx,%r13d
  jle    L121
  cmp    %ecx,%edx
  jle    L27
  movslq %edx,%rax
  movss  (%rdi,%rcx,4),%xmm1
  shl    $0x2,%rax
  lea    (%rdi,%rax,1),%r8
  lea    0x4(%rdi,%rax,1),%rax
  movss  (%r8),%xmm0
  movss  %xmm1,(%r8)
  movss  0x4(%rdi,%rcx,4),%xmm1
  movss  %xmm0,(%rdi,%rcx,4)
  movss  (%rax),%xmm0
  movss  %xmm1,(%rax)
  movss  %xmm0,0x4(%rdi,%rcx,4)
L27:
  add    $0x2,%rcx
  jmp    L97
  cs nopw 0x0(%rax,%rax,1)
L89:
  cmp    %r12d,%r13d
  jg     L100
L74:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L121:
  cmp    $0x2,%r13d
  jle    L74
  mov    $0x2,%r12d
  lea    0x4(%rdi),%rbp
  nopw   0x0(%rax,%rax,1)
L100:
  mov    %r12d,%r14d
  mov    %ebx,%eax
  pxor   %xmm0,%xmm0
  movsd  D37(%rip),%xmm1
  imul   %r14d,%eax
  add    %r12d,%r12d
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  D24(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <sin@plt>
  movsd  D20(%rip),%xmm5
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm5
  movapd %xmm1,%xmm0
  movsd  %xmm5,(%rsp)
  call   <sin@plt>
  lea    -0x1(%r14),%r10d
  lea    0x1(%r14),%r9d
  movslq %r12d,%rsi
  mov    D21(%rip),%rax
  cmp    %r13d,%r10d
  movslq %r9d,%r9
  mov    %rbp,%r8
  movsd  (%rsp),%xmm5
  cmovg  %r13d,%r10d
  movapd %xmm0,%xmm6
  shl    $0x2,%rsi
  pxor   %xmm4,%xmm4
  movq   %rax,%xmm3
  mov    $0x1,%edi
  shl    $0x2,%r9
  nopl   0x0(%rax)
L119:
  lea    (%r9,%r8,1),%rdx
  mov    %r8,%rax
  mov    %edi,%ecx
  nopl   0x0(%rax)
L15:
  pxor   %xmm2,%xmm2
  pxor   %xmm0,%xmm0
  add    %r12d,%ecx
  cvtss2sd -0x4(%rdx),%xmm2
  cvtss2sd (%rdx),%xmm0
  movapd %xmm2,%xmm1
  movapd %xmm0,%xmm7
  mulsd  %xmm3,%xmm1
  mulsd  %xmm4,%xmm7
  mulsd  %xmm4,%xmm2
  mulsd  %xmm3,%xmm0
  subsd  %xmm7,%xmm1
  addsd  %xmm2,%xmm0
  movss  (%rax),%xmm2
  cvtsd2ss %xmm1,%xmm1
  subss  %xmm1,%xmm2
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm2,-0x4(%rdx)
  movss  0x4(%rax),%xmm2
  subss  %xmm0,%xmm2
  movss  %xmm2,(%rdx)
  addss  (%rax),%xmm1
  addss  0x4(%rax),%xmm0
  add    %rsi,%rdx
  movss  %xmm1,(%rax)
  movss  %xmm0,0x4(%rax)
  add    %rsi,%rax
  cmp    %ecx,%r13d
  jge    L15
  movapd %xmm5,%xmm0
  movapd %xmm6,%xmm1
  add    $0x2,%edi
  add    $0x8,%r8
  mulsd  %xmm4,%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm3,%xmm0
  mulsd  %xmm6,%xmm3
  addsd  %xmm1,%xmm3
  addsd  %xmm3,%xmm4
  cmp    %r10d,%edi
  jg     L89
  movapd %xmm0,%xmm3
  jmp    L119
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D37
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D24
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D20
data_type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D21
data_type: f64

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

tool: D24: 0.5

tool: {"D20": [0.0,-2.0]}

tool: D21: 1

assistant: ```c
void fft1(float *data, int nn, int isign) {
  int n, mmax, m, j, istep, i;
  double wtemp, wr, wpr, wpi, wi, theta;
  float tempr, tempi;
  n = nn << 1;
  j = 1;
  for (i = 1; i < n; i += 2) {
    if (j > i) {
      tempr = data[j];
      data[j] = data[i];
      data[i] = tempr;
      tempr = data[j + 1];
      data[j + 1] = data[i + 1];
      data[i + 1] = tempr;
    }
    m = n >> 1;
    while (m >= 2 && j > m) {
      j -= m;
      m >>= 1;
    }
    j += m;
  }
  mmax = 2;
  while (n > mmax) {
    istep = 2 * mmax;
    theta = 2.0 * 3.14159265358979323846 / (isign * mmax);
    wtemp = sin(0.5 * theta);
    wpr = -2.0 * wtemp * wtemp;
    wpi = sin(theta);
    wr = 1.0;
    wi = 0.0;
    for (m = 1; m < mmax; m += 2) {
      for (i = m; i <= n; i += istep) {
        j = i + mmax;
        tempr = wr * data[j] - wi * data[j + 1];
        tempi = wr * data[j + 1] + wi * data[j];
        data[j] = data[i] - tempr;
        data[j + 1] = data[i + 1] - tempi;
        data[i] += tempr;
        data[i + 1] += tempi;
      }
      wr = (wtemp = wr) * wpr - wi * wpi + wr;
      wi = wi * wpr + wtemp * wpi + wi;
    }
    mmax = istep;
  }
}
```