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

```asm
<fft>:
  endbr64
  push   %r15
  push   %r14
  lea    D12(%rip),%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    $0x4,%r12d
  push   %rbp
  push   %rbx
  mov    $0x2,%ebx
  sub    $0x38,%rsp
  mov    D16(%rip),%rax
  movsd  D69(%rip),%xmm2
  mov    %rax,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
L13:
  mov    D100(%rip),%rax
  mov    $0x1,%ebp
  movq   $0x0,0x8(%rsp)
  lea    D57(%rip),%r15
  mov    %rax,0x10(%rsp)
  jmp    L71
  nopw   0x0(%rax,%rax,1)
L76:
  lea    D109(%rip),%rdi
  mov    %rax,0x18(%rsp)
  call   <puts@plt>
  mov    0x18(%rsp),%r8
  mov    %r12,%rcx
  mov    %rbx,%rdx
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <calculoButterflyLoopBloco@plt>
L29:
  movsd  0x10(%rsp),%xmm3
  add    $0x2,%rbp
  xor    %eax,%eax
  mov    %rbx,%rdx
  movsd  0x20(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm4
  mov    %rbp,%rsi
  lea    D70(%rip),%rdi
  movsd  0x28(%rsp),%xmm6
  movapd %xmm3,%xmm0
  movapd %xmm5,%xmm1
  mulsd  %xmm6,%xmm0
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm3
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm4,%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm3,%xmm0
  addsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  cmp    %rbp,%rbx
  jbe    L11
L71:
  cmp    $0x1f,%rbx
  ja     L54
  mov    %rbx,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x10,%eax
  xor    %edx,%edx
  div    %rbx
  cmp    $0x1,%rax
  jbe    L76
  lea    D43(%rip),%rdi
  call   <puts@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %edx,%edx
  mov    $0x8,%eax
  mov    %r12,%rcx
  div    %rbx
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    %eax,%r8d
  mov    %rax,0x18(%rsp)
  call   <calculoButterflyLoopBloco@plt>
  mov    %r15,%rdi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%r9
  mov    %r12,%rcx
  mov    %rbx,%rdx
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  lea    0x10(%rbp),%rsi
  mov    %r13,%rdi
  mov    %r9d,%r8d
  call   <calculoButterflyLoopBloco@plt>
  jmp    L29
L54:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L11:
  lea    (%r12,%r12,1),%rbp
  test   %r12,%r12
  js     L39
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12,%xmm0
L70:
  movsd  D55(%rip),%xmm1
  mov    %r12,%rbx
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  mulsd  D39(%rip),%xmm0
  call   <sin@plt>
  movsd  D16(%rip),%xmm2
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm1,%xmm0
  movsd  %xmm2,0x28(%rsp)
  call   <sin@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  xor    %eax,%eax
  lea    D20(%rip),%rdi
  movsd  %xmm0,0x20(%rsp)
  mov    %rbp,%r12
  call   <printf@plt>
  jmp    L13
  nop
L39:
  mov    %r12,%rax
  pxor   %xmm0,%xmm0
  shr    %rax
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L70
```

tool_calls: name: read_data
arguments: data_tag: D12
type_guessed: string
name: read_data
arguments: data_tag: D16
type_guessed: f32[2]
name: read_data
arguments: data_tag: D69
type_guessed: byte[8]
name: read_data
arguments: data_tag: D100
type_guessed: f64
name: read_data
arguments: data_tag: D57
type_guessed: string
name: read_data
arguments: data_tag: D109
type_guessed: string
name: read_data
arguments: data_tag: D70
type_guessed: string
name: read_data
arguments: data_tag: D43
type_guessed: string
name: read_data
arguments: data_tag: D55
type_guessed: f64
name: read_data
arguments: data_tag: D39
type_guessed: f64
name: read_data
arguments: data_tag: D20
type_guessed: string

tool: D12: >>> Inicio do while -> mmax:%lu


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

tool: {"D69": [0x7f,0x74,0x9d,0x39,0x3b,0xcb,0xdd,0xbc]}

tool: D100: 1

tool: D57:      qtdBlocos:%lu


tool: D109:      processa na main

tool: D70:      >>> FOR 1 -> m:%lu mmax:%lu


tool: D43:      processa em thread

tool: D55: 6.28318530717959

tool: D39: 0.5

tool: D20: <<< Final do while -> istep:%lu mmax:%lu



assistant: ```c
void fft(float data[]) {
  unsigned long mmax, j, m, istep, i;
  double wtemp, wr, wpr, wpi, wi, theta;
  mmax = 2;
  istep = mmax << 1;
  theta = 1 * (6.28318530717959 / mmax);
  wtemp = sin(0.5 * theta);
  wpr = -2.0 * wtemp * wtemp;
  wpi = sin(theta);
  wr = 1.0;
  wi = 0.0;
  m = 1;
  while (16 * 2 > mmax) {
    printf(">>> Inicio do while -> mmax:%lu\n", mmax);
    if (16 / mmax >= 2) {
      printf("     processa em thread\n");
      unsigned long tamBloco = 16 / mmax / 2;
      unsigned long blocoAtual;
      for (blocoAtual = 0; blocoAtual < 2; blocoAtual++) {
        printf("     qtdBlocos:%lu\n", blocoAtual);
        calculoButterflyLoopBloco(data, ((16 * 2 / 2) * blocoAtual) + m, mmax, istep, wr, wi, tamBloco);
      }
    } else {
      printf("     processa na main\n");
      calculoButterflyLoopBloco(data, m, mmax, istep, wr, wi, 16 / mmax);
    }
    wr = (wtemp = wr) * wpr - wi * wpi + wr;
    wi = wi * wpr + wtemp * wpi + wi;
    m += 2;
    printf("     >>> FOR 1 -> m:%lu mmax:%lu\n", m, mmax);
    if (m >= mmax) {
      mmax = istep;
      istep = mmax << 1;
      theta = 1 * (6.28318530717959 / mmax);
      wtemp = sin(0.5 * theta);
      wpr = -2.0 * wtemp * wtemp;
      wpi = sin(theta);
      wr = 1.0;
      wi = 0.0;
      m = 1;
      printf("<<< Final do while -> istep:%lu mmax:%lu\n\n", istep, mmax);
    }
  }
}
```