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

```asm
<cft1st>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  movsd  (%rsi),%xmm2
  movsd  0x10(%rsi),%xmm5
  movapd %xmm2,%xmm4
  addsd  %xmm5,%xmm4
  movsd  0x8(%rsi),%xmm0
  movsd  0x18(%rsi),%xmm1
  movapd %xmm0,%xmm3
  addsd  %xmm1,%xmm3
  subsd  %xmm5,%xmm2
  movapd %xmm2,%xmm9
  subsd  %xmm1,%xmm0
  movsd  0x20(%rsi),%xmm1
  movsd  0x30(%rsi),%xmm8
  movapd %xmm1,%xmm6
  addsd  %xmm8,%xmm6
  movsd  0x28(%rsi),%xmm2
  movsd  0x38(%rsi),%xmm7
  movapd %xmm2,%xmm5
  addsd  %xmm7,%xmm5
  subsd  %xmm8,%xmm1
  subsd  %xmm7,%xmm2
  movapd %xmm4,%xmm7
  addsd  %xmm6,%xmm7
  movsd  %xmm7,(%rsi)
  movapd %xmm3,%xmm7
  addsd  %xmm5,%xmm7
  movsd  %xmm7,0x8(%rsi)
  subsd  %xmm6,%xmm4
  movsd  %xmm4,0x20(%rsi)
  subsd  %xmm5,%xmm3
  movsd  %xmm3,0x28(%rsi)
  movapd %xmm9,%xmm3
  subsd  %xmm2,%xmm3
  movsd  %xmm3,0x10(%rsi)
  movapd %xmm0,%xmm3
  addsd  %xmm1,%xmm3
  movsd  %xmm3,0x18(%rsi)
  addsd  %xmm9,%xmm2
  movsd  %xmm2,0x30(%rsi)
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x38(%rsi)
  movsd  0x40(%rsi),%xmm0
  movsd  0x50(%rsi),%xmm2
  movapd %xmm0,%xmm6
  addsd  %xmm2,%xmm6
  movsd  0x48(%rsi),%xmm4
  movsd  0x58(%rsi),%xmm1
  movapd %xmm4,%xmm8
  addsd  %xmm1,%xmm8
  subsd  %xmm2,%xmm0
  subsd  %xmm1,%xmm4
  movsd  0x60(%rsi),%xmm1
  movsd  0x70(%rsi),%xmm10
  movapd %xmm1,%xmm7
  addsd  %xmm10,%xmm7
  movsd  0x68(%rsi),%xmm5
  movsd  0x78(%rsi),%xmm9
  movapd %xmm5,%xmm3
  addsd  %xmm9,%xmm3
  subsd  %xmm10,%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm9,%xmm5
  movapd %xmm6,%xmm1
  addsd  %xmm7,%xmm1
  movsd  %xmm1,0x40(%rsi)
  movapd %xmm8,%xmm1
  addsd  %xmm3,%xmm1
  movsd  %xmm1,0x48(%rsi)
  subsd  %xmm8,%xmm3
  movsd  %xmm3,0x60(%rsi)
  subsd  %xmm7,%xmm6
  movsd  %xmm6,0x68(%rsi)
  movapd %xmm0,%xmm1
  subsd  %xmm5,%xmm1
  movapd %xmm4,%xmm7
  addsd  %xmm2,%xmm7
  movapd %xmm1,%xmm6
  subsd  %xmm7,%xmm6
  movsd  D43(%rip),%xmm3
  mulsd  %xmm3,%xmm6
  movsd  %xmm6,0x50(%rsi)
  addsd  %xmm7,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  %xmm1,0x58(%rsi)
  addsd  %xmm5,%xmm0
  movapd %xmm2,%xmm1
  subsd  %xmm4,%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  movsd  %xmm2,0x70(%rsi)
  addsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x78(%rsi)
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  movsd  D6(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  cmp    $0x10,%edi
  jle    L16
  mov    %edi,%eax
  mov    %rsi,%r12
  mov    %edi,%r13d
  sar    $0x2,%r13d
  mov    %rsi,%rbx
  sub    $0x11,%eax
  shr    $0x4,%eax
  mov    %eax,%eax
  shl    $0x7,%rax
  add    %rax,%r12
  mov    %r13d,%ebp
  lea    0x18(%rsp),%r14
  jmp    L36
L30:
  xor    %r13d,%ebp
  cmp    %ebp,%r13d
  jle    L12
  mov    %r13d,%eax
L9:
  sar    %eax
  xor    %eax,%ebp
  cmp    %eax,%ebp
  jl     L9
L12:
  sub    $0xffffffffffffff80,%rbx
L36:
  lea    0x10(%rsp),%rsi
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x10(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  movapd %xmm2,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D41(%rip),%xmm7
  subsd  %xmm1,%xmm7
  movapd %xmm2,%xmm4
  mulsd  %xmm6,%xmm4
  movapd %xmm4,%xmm1
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm6,%xmm11
  subsd  %xmm2,%xmm11
  mulsd  %xmm6,%xmm1
  subsd  %xmm0,%xmm1
  movsd  0x80(%rbx),%xmm3
  movsd  0x90(%rbx),%xmm12
  movapd %xmm3,%xmm8
  addsd  %xmm12,%xmm8
  movsd  0x88(%rbx),%xmm5
  movsd  0x98(%rbx),%xmm10
  movapd %xmm5,%xmm2
  addsd  %xmm10,%xmm2
  subsd  %xmm12,%xmm3
  subsd  %xmm10,%xmm5
  movsd  0xa0(%rbx),%xmm10
  movsd  0xb0(%rbx),%xmm15
  movapd %xmm10,%xmm13
  addsd  %xmm15,%xmm13
  movsd  0xa8(%rbx),%xmm9
  movsd  0xb8(%rbx),%xmm14
  movapd %xmm9,%xmm12
  addsd  %xmm14,%xmm12
  subsd  %xmm15,%xmm10
  subsd  %xmm14,%xmm9
  movapd %xmm8,%xmm14
  addsd  %xmm13,%xmm14
  movsd  %xmm14,0x80(%rbx)
  movapd %xmm2,%xmm14
  addsd  %xmm12,%xmm14
  movsd  %xmm14,0x88(%rbx)
  subsd  %xmm13,%xmm8
  subsd  %xmm12,%xmm2
  movapd %xmm7,%xmm12
  mulsd  %xmm8,%xmm12
  movapd %xmm4,%xmm13
  mulsd  %xmm2,%xmm13
  subsd  %xmm13,%xmm12
  movsd  %xmm12,0xa0(%rbx)
  mulsd  %xmm7,%xmm2
  mulsd  %xmm4,%xmm8
  addsd  %xmm8,%xmm2
  movsd  %xmm2,0xa8(%rbx)
  movapd %xmm3,%xmm8
  subsd  %xmm9,%xmm8
  movapd %xmm5,%xmm2
  addsd  %xmm10,%xmm2
  movapd %xmm6,%xmm12
  mulsd  %xmm8,%xmm12
  movapd %xmm0,%xmm13
  mulsd  %xmm2,%xmm13
  subsd  %xmm13,%xmm12
  movsd  %xmm12,0x90(%rbx)
  mulsd  %xmm6,%xmm2
  mulsd  %xmm0,%xmm8
  addsd  %xmm8,%xmm2
  movsd  %xmm2,0x98(%rbx)
  addsd  %xmm9,%xmm3
  subsd  %xmm10,%xmm5
  movapd %xmm11,%xmm2
  mulsd  %xmm3,%xmm2
  movapd %xmm1,%xmm8
  mulsd  %xmm5,%xmm8
  subsd  %xmm8,%xmm2
  movsd  %xmm2,0xb0(%rbx)
  mulsd  %xmm5,%xmm11
  movapd %xmm11,%xmm9
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm9
  movsd  %xmm9,0xb8(%rbx)
  movapd %xmm6,%xmm11
  subsd  %xmm0,%xmm11
  mulsd  D43(%rip),%xmm11
  addsd  %xmm6,%xmm0
  mulsd  D43(%rip),%xmm0
  movapd %xmm7,%xmm3
  addsd  %xmm7,%xmm3
  movapd %xmm3,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm11,%xmm8
  subsd  %xmm1,%xmm8
  mulsd  %xmm11,%xmm3
  subsd  %xmm0,%xmm3
  movsd  0xc0(%rbx),%xmm5
  movsd  0xd0(%rbx),%xmm9
  movapd %xmm5,%xmm12
  addsd  %xmm9,%xmm12
  movsd  0xc8(%rbx),%xmm6
  movsd  0xd8(%rbx),%xmm2
  movapd %xmm6,%xmm1
  addsd  %xmm2,%xmm1
  subsd  %xmm9,%xmm5
  subsd  %xmm2,%xmm6
  movsd  0xe0(%rbx),%xmm9
  movsd  0xf0(%rbx),%xmm15
  movapd %xmm9,%xmm13
  addsd  %xmm15,%xmm13
  movsd  0xe8(%rbx),%xmm10
  movsd  0xf8(%rbx),%xmm14
  movapd %xmm10,%xmm2
  addsd  %xmm14,%xmm2
  subsd  %xmm15,%xmm9
  subsd  %xmm14,%xmm10
  movapd %xmm12,%xmm14
  addsd  %xmm13,%xmm14
  movsd  %xmm14,0xc0(%rbx)
  movapd %xmm1,%xmm14
  addsd  %xmm2,%xmm14
  movsd  %xmm14,0xc8(%rbx)
  subsd  %xmm13,%xmm12
  subsd  %xmm2,%xmm1
  xorpd  D40(%rip),%xmm4
  movapd %xmm4,%xmm2
  mulsd  %xmm12,%xmm4
  movapd %xmm7,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm4
  movsd  %xmm4,0xe0(%rbx)
  mulsd  %xmm1,%xmm2
  mulsd  %xmm12,%xmm7
  movapd %xmm7,%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm1,0xe8(%rbx)
  movapd %xmm5,%xmm2
  subsd  %xmm10,%xmm2
  movapd %xmm6,%xmm4
  addsd  %xmm9,%xmm4
  movapd %xmm11,%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm7
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm1
  movsd  %xmm1,0xd0(%rbx)
  mulsd  %xmm4,%xmm11
  mulsd  %xmm2,%xmm0
  movapd %xmm11,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0xd8(%rbx)
  addsd  %xmm10,%xmm5
  subsd  %xmm9,%xmm6
  movapd %xmm8,%xmm0
  mulsd  %xmm5,%xmm0
  movapd %xmm3,%xmm1
  mulsd  %xmm6,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xf0(%rbx)
  movapd %xmm8,%xmm0
  mulsd  %xmm6,%xmm0
  mulsd  %xmm5,%xmm3
  addsd  %xmm3,%xmm0
  movsd  %xmm0,0xf8(%rbx)
  cmp    %r12,%rbx
  jne    L30
L16:
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D43
data_type: f64
name: extract_symbolic_data
arguments: data_label: D6
data_type: f64
name: extract_symbolic_data
arguments: data_label: D41
data_type: byte[8]
name: extract_symbolic_data
arguments: data_label: D40
data_type: byte[16]

tool: D43: 0.7071067811865476

tool: D6: 1.5707963267948966

tool: {"D41": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D40": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void cft1st(int n, double *a) {
  int j, kj, kr;
  double ew, wn4r, wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
  double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  x0r = a[0] + a[2];
  x0i = a[1] + a[3];
  x1r = a[0] - a[2];
  x1i = a[1] - a[3];
  x2r = a[4] + a[6];
  x2i = a[5] + a[7];
  x3r = a[4] - a[6];
  x3i = a[5] - a[7];
  a[0] = x0r + x2r;
  a[1] = x0i + x2i;
  a[4] = x0r - x2r;
  a[5] = x0i - x2i;
  a[2] = x1r - x3i;
  a[3] = x1i + x3r;
  a[6] = x1r + x3i;
  a[7] = x1i - x3r;
  wn4r = 0.707106781186547524400844362104849039284835937688;
  x0r = a[8] + a[10];
  x0i = a[9] + a[11];
  x1r = a[8] - a[10];
  x1i = a[9] - a[11];
  x2r = a[12] + a[14];
  x2i = a[13] + a[15];
  x3r = a[12] - a[14];
  x3i = a[13] - a[15];
  a[8] = x0r + x2r;
  a[9] = x0i + x2i;
  a[12] = x2i - x0i;
  a[13] = x0r - x2r;
  x0r = x1r - x3i;
  x0i = x1i + x3r;
  a[10] = wn4r * (x0r - x0i);
  a[11] = wn4r * (x0r + x0i);
  x0r = x3i + x1r;
  x0i = x3r - x1i;
  a[14] = wn4r * (x0i - x0r);
  a[15] = wn4r * (x0i + x0r);
  ew = 1.570796326794896619231321691639751442098584699687 / n;
  kr = 0;
  for (j = 16; j < n; j += 16) {
    for (kj = n >> 2; kj > (kr ^= kj); kj >>= 1)
      ;
    wk1r = cos(ew * kr);
    wk1i = sin(ew * kr);
    wk2r = 1 - 2 * wk1i * wk1i;
    wk2i = 2 * wk1i * wk1r;
    wk3r = wk1r - 2 * wk2i * wk1i;
    wk3i = 2 * wk2i * wk1r - wk1i;
    x0r = a[j] + a[j + 2];
    x0i = a[j + 1] + a[j + 3];
    x1r = a[j] - a[j + 2];
    x1i = a[j + 1] - a[j + 3];
    x2r = a[j + 4] + a[j + 6];
    x2i = a[j + 5] + a[j + 7];
    x3r = a[j + 4] - a[j + 6];
    x3i = a[j + 5] - a[j + 7];
    a[j] = x0r + x2r;
    a[j + 1] = x0i + x2i;
    x0r -= x2r;
    x0i -= x2i;
    a[j + 4] = wk2r * x0r - wk2i * x0i;
    a[j + 5] = wk2r * x0i + wk2i * x0r;
    x0r = x1r - x3i;
    x0i = x1i + x3r;
    a[j + 2] = wk1r * x0r - wk1i * x0i;
    a[j + 3] = wk1r * x0i + wk1i * x0r;
    x0r = x1r + x3i;
    x0i = x1i - x3r;
    a[j + 6] = wk3r * x0r - wk3i * x0i;
    a[j + 7] = wk3r * x0i + wk3i * x0r;
    x0r = wn4r * (wk1r - wk1i);
    wk1i = wn4r * (wk1r + wk1i);
    wk1r = x0r;
    wk3r = wk1r - 2 * wk2r * wk1i;
    wk3i = 2 * wk2r * wk1r - wk1i;
    x0r = a[j + 8] + a[j + 10];
    x0i = a[j + 9] + a[j + 11];
    x1r = a[j + 8] - a[j + 10];
    x1i = a[j + 9] - a[j + 11];
    x2r = a[j + 12] + a[j + 14];
    x2i = a[j + 13] + a[j + 15];
    x3r = a[j + 12] - a[j + 14];
    x3i = a[j + 13] - a[j + 15];
    a[j + 8] = x0r + x2r;
    a[j + 9] = x0i + x2i;
    x0r -= x2r;
    x0i -= x2i;
    a[j + 12] = -wk2i * x0r - wk2r * x0i;
    a[j + 13] = -wk2i * x0i + wk2r * x0r;
    x0r = x1r - x3i;
    x0i = x1i + x3r;
    a[j + 10] = wk1r * x0r - wk1i * x0i;
    a[j + 11] = wk1r * x0i + wk1i * x0r;
    x0r = x1r + x3i;
    x0i = x1i - x3r;
    a[j + 14] = wk3r * x0r - wk3i * x0i;
    a[j + 15] = wk3r * x0i + wk3i * x0r;
  }
}
```