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

```asm
<fft>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  mov    %r8,%rsi
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x18,%rsp
  nopl   0x0(%rax,%rax,1)
L47:
  movslq (%rsi,%rax,4),%rdx
  cmp    %eax,%edx
  jle    L13
  shl    $0x3,%rdx
  movsd  (%r14,%rax,8),%xmm1
  movsd  (%r12,%rax,8),%xmm0
  lea    (%r14,%rdx,1),%rcx
  add    %r12,%rdx
  movsd  (%rcx),%xmm2
  movsd  %xmm2,(%r14,%rax,8)
  movsd  (%rdx),%xmm2
  movsd  %xmm2,(%r12,%rax,8)
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rdx)
L13:
  add    $0x1,%rax
  cmp    $0x40,%rax
  jne    L47
  mov    %r14,0x8(%rsp)
  mov    $0x1,%ecx
  nopw   0x0(%rax,%rax,1)
L65:
  mov    %ecx,%esi
  mov    $0x2,%edi
  mov    %ecx,0x4(%rsp)
  call   <myPow@plt>
  mov    0x4(%rsp),%ecx
  cmp    $0x40,%eax
  jg     L24
  mov    %ecx,%esi
  mov    $0x2,%edi
  mov    %ecx,0x4(%rsp)
  call   <myPow@plt>
  mov    0x4(%rsp),%ecx
  mov    %eax,%edi
  mov    %eax,%r14d
  sar    %edi
  test   %edi,%edi
  jle    L20
  mov    %edi,%r8d
  movslq %eax,%r13
  mov    0x8(%rsp),%r11
  mov    %r12,%r10
  shl    $0x3,%r13
  shl    $0x6,%r8d
  xor    %r9d,%r9d
  movslq %edi,%rdi
  nopl   0x0(%rax)
L22:
  mov    %r10,%rdx
  mov    %r11,%rax
  xor    %esi,%esi
  nopl   0x0(%rax,%rax,1)
L27:
  mov    %esi,%r15d
  movsd  (%rax,%rdi,8),%xmm0
  movsd  (%rdx,%rdi,8),%xmm3
  add    $0x40,%esi
  sar    %cl,%r15d
  movslq %r15d,%r15
  movapd %xmm0,%xmm1
  movapd %xmm3,%xmm5
  movsd  (%rbx,%r15,8),%xmm2
  movsd  0x0(%rbp,%r15,8),%xmm4
  mulsd  %xmm2,%xmm1
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm2
  mulsd  %xmm4,%xmm0
  subsd  %xmm5,%xmm1
  addsd  %xmm2,%xmm0
  movsd  (%rax),%xmm2
  subsd  %xmm1,%xmm2
  movsd  %xmm2,(%rax,%rdi,8)
  movsd  (%rdx),%xmm2
  add    $0x8,%rax
  subsd  %xmm0,%xmm2
  movsd  %xmm2,(%rdx,%rdi,8)
  addsd  -0x8(%rax),%xmm1
  add    $0x8,%rdx
  movsd  %xmm1,-0x8(%rax)
  addsd  -0x8(%rdx),%xmm0
  movsd  %xmm0,-0x8(%rdx)
  cmp    %esi,%r8d
  jne    L27
  add    %r14d,%r9d
  add    %r13,%r11
  add    %r13,%r10
  cmp    $0x3f,%r9d
  jle    L22
L20:
  add    $0x1,%ecx
  jmp    L65
L24:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void fft(double *dataA, double *dataB, double *wA, double *wB, int *bitRLocations) {
  int loop = 0;
  int innerLoop = 0;
  int butterflySize = 0;
  int butterflySizeHalf = 0;
  int currButterfly = 0;
  int pos1, pos2;
  int tfLocation = 0;
  double swapA;
  double swapB;
  for (loop = 0; loop < 64; loop++) {
    if (bitRLocations[loop] > loop) {
      swapA = dataA[loop];
      swapB = dataB[loop];
      dataA[loop] = dataA[bitRLocations[loop]];
      dataB[loop] = dataB[bitRLocations[loop]];
      dataA[bitRLocations[loop]] = swapA;
      dataB[bitRLocations[loop]] = swapB;
    }
  }
  for (loop = 1; myPow(2, loop) <= 64; loop += 1) {
    butterflySize = myPow(2, loop);
    for (innerLoop = 0; innerLoop < 64; innerLoop += butterflySize) {
      butterflySizeHalf = butterflySize >> 1;
      for (currButterfly = 0; currButterfly < butterflySizeHalf; currButterfly += 1) {
        pos1 = innerLoop + currButterfly;
        pos2 = pos1 + butterflySizeHalf;
        tfLocation = currButterfly * 64 >> loop;
        swapA = dataA[pos2] * wA[tfLocation] - dataB[pos2] * wB[tfLocation];
        swapB = dataA[pos2] * wB[tfLocation] + dataB[pos2] * wA[tfLocation];
        dataA[pos2] = dataA[pos1] - swapA;
        dataB[pos2] = dataB[pos1] - swapB;
        dataA[pos1] = dataA[pos1] + swapA;
        dataB[pos1] = dataB[pos1] + swapB;
      }
    }
  }
}
```