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

```asm
<fft1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %edx,%r14d
  lea    (%rsi,%rsi,1),%ebx
  cmp    $0x1,%ebx
  jle    L151
  mov    %ebx,%esi
  sar    %esi
  cmp    $0x2,%ebx
  setg   %r8b
  mov    $0x3,%ecx
  mov    $0x1,%edx
  jmp    L124
L86:
  mov    %esi,%eax
L67:
  add    %eax,%edx
  cmp    %ecx,%ebx
  jle    L151
  cmp    %ecx,%edx
  jle    L136
  movslq %edx,%rax
  shl    $0x2,%rax
  lea    0x0(%r13,%rax,1),%rdi
  movss  (%rdi),%xmm0
  movss  0x0(%r13,%rcx,4),%xmm1
  movss  %xmm1,(%rdi)
  movss  %xmm0,0x0(%r13,%rcx,4)
  lea    0x4(%r13,%rax,1),%rax
  movss  (%rax),%xmm0
  movss  0x4(%r13,%rcx,4),%xmm1
  movss  %xmm1,(%rax)
  movss  %xmm0,0x4(%r13,%rcx,4)
L136:
  add    $0x2,%rcx
L124:
  cmp    %edx,%esi
  jge    L86
  test   %r8b,%r8b
  je     L86
  mov    %esi,%eax
L87:
  sub    %eax,%edx
  sar    %eax
  cmp    $0x1,%eax
  jle    L67
  cmp    %eax,%edx
  jg     L87
  jmp    L67
L151:
  cmp    $0x2,%ebx
  jle    L122
  mov    $0x2,%ebp
  mov    D38(%rip),%r15
  jmp    L146
L58:
  pxor   %xmm2,%xmm2
  cvtss2sd -0x4(%rdx),%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd (%rdx),%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm3,%xmm1
  movapd %xmm0,%xmm6
  mulsd  %xmm4,%xmm6
  subsd  %xmm6,%xmm1
  cvtsd2ss %xmm1,%xmm1
  mulsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm2
  addsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  (%rax),%xmm2
  subss  %xmm1,%xmm2
  movss  %xmm2,-0x4(%rdx)
  movss  0x4(%rax),%xmm2
  subss  %xmm0,%xmm2
  movss  %xmm2,(%rdx)
  addss  (%rax),%xmm1
  movss  %xmm1,(%rax)
  addss  0x4(%rax),%xmm0
  movss  %xmm0,0x4(%rax)
  add    %ebp,%ecx
  add    %rsi,%rax
  add    %rsi,%rdx
  cmp    %ecx,%ebx
  jge    L58
L74:
  movsd  (%rsp),%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm3,%xmm0
  movapd %xmm5,%xmm1
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm7
  mulsd  %xmm5,%xmm3
  addsd  %xmm7,%xmm3
  addsd  %xmm3,%xmm4
  add    $0x2,%edi
  add    $0x8,%r8
  cmp    %r12d,%edi
  jge    L28
  movapd %xmm0,%xmm3
L45:
  lea    (%r9,%r8,1),%rdx
  mov    %r8,%rax
  mov    %edi,%ecx
  cmp    %edi,%ebx
  jge    L58
  jmp    L74
L28:
  cmp    %ebp,%ebx
  jle    L122
L146:
  mov    %ebp,%r12d
  add    %ebp,%ebp
  mov    %r14d,%eax
  imul   %r12d,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D39(%rip),%xmm5
  divsd  %xmm0,%xmm5
  movsd  D36(%rip),%xmm7
  movsd  %xmm5,0x8(%rsp)
  mulsd  %xmm5,%xmm7
  movapd %xmm7,%xmm0
  call   <sin@plt>
  movsd  D4(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm5
  cmp    $0x1,%r12d
  jle    L28
  lea    0x4(%r13),%r8
  movslq %ebp,%rsi
  shl    $0x2,%rsi
  movslq %r12d,%rax
  pxor   %xmm4,%xmm4
  movq   %r15,%xmm3
  mov    $0x1,%edi
  lea    0x4(,%rax,4),%r9
  jmp    L45
L122:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D38
type_guessed: f64
name: disassemble_data
arguments: data_tag: D39
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D36
type_guessed: f64
name: disassemble_data
arguments: data_tag: D4
type_guessed: f32[2]

tool: D38: 1

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

tool: D36: 0.5

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

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;
  }
}
```