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

```asm
<cosft2>:
  endbr64
  push   %r13
  pxor   %xmm1,%xmm1
  push   %r12
  cvtsi2sd %esi,%xmm1
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x38,%rsp
  movsd  D51(%rip),%xmm0
  lea    0x28(%rsp),%rdi
  lea    0x20(%rsp),%rsi
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rsp)
  call   <sincos@plt>
  movsd  0x28(%rsp),%xmm1
  movsd  D9(%rip),%xmm2
  movsd  0x18(%rsp),%xmm0
  movsd  0x20(%rsp),%xmm4
  mulsd  %xmm1,%xmm2
  movsd  %xmm1,0x8(%rsp)
  addsd  %xmm0,%xmm0
  movsd  %xmm4,0x10(%rsp)
  mulsd  %xmm1,%xmm2
  movsd  %xmm2,(%rsp)
  call   <sin@plt>
  cmp    $0x1,%ebx
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm4
  movapd %xmm0,%xmm3
  je     L74
  cmp    $0xffffffff,%ebx
  je     L45
L51:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L45:
  movslq %r12d,%rsi
  mov    %r12d,%ebx
  lea    0x0(%rbp,%rsi,4),%r13
  shr    $0x1f,%ebx
  movss  0x0(%r13),%xmm0
  add    %r12d,%ebx
  sar    %ebx
  movaps %xmm0,%xmm6
  addss  %xmm0,%xmm6
  cmp    $0x3,%r12d
  jle    L170
  cmp    $0x7,%r12d
  jle    L43
  lea    -0x8(%r12),%eax
  lea    -0x4(%r12),%ecx
  mov    %r13,%rdx
  and    $0xfffffffc,%eax
  sub    %eax,%ecx
  mov    %r12d,%eax
L126:
  movss  -0x8(%rdx),%xmm5
  sub    $0x4,%eax
  sub    $0x10,%rdx
  movaps %xmm5,%xmm7
  subss  %xmm0,%xmm7
  movss  (%rdx),%xmm0
  movss  %xmm7,0x10(%rdx)
  movaps %xmm0,%xmm7
  subss  %xmm5,%xmm7
  movss  %xmm7,0x8(%rdx)
  cmp    %eax,%ecx
  jne    L126
L77:
  cltq
  nopw   0x0(%rax,%rax,1)
L17:
  movss  -0x8(%rbp,%rax,4),%xmm0
  subss  0x0(%rbp,%rax,4),%xmm0
  movss  %xmm0,0x0(%rbp,%rax,4)
  sub    $0x2,%rax
  cmp    $0x3,%eax
  jg     L17
  movss  %xmm6,0x8(%rbp)
L134:
  movsd  D23(%rip),%xmm7
  lea    0xc(%rbp),%rax
  pxor   %xmm6,%xmm6
  mov    $0x3,%edx
  nopl   (%rax)
L54:
  movapd %xmm2,%xmm0
  movapd %xmm3,%xmm5
  movq   (%rax),%xmm8
  add    $0x2,%edx
  mulsd  %xmm6,%xmm5
  add    $0x8,%rax
  mulsd  %xmm7,%xmm0
  cvtps2pd %xmm8,%xmm8
  subsd  %xmm5,%xmm0
  movapd %xmm7,%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm0,%xmm7
  movapd %xmm2,%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm5,%xmm0
  addsd  %xmm0,%xmm6
  movapd %xmm7,%xmm0
  unpcklpd %xmm0,%xmm0
  mulpd  %xmm8,%xmm0
  movapd %xmm6,%xmm5
  unpcklpd %xmm5,%xmm5
  mulpd  %xmm8,%xmm5
  shufpd $0x1,%xmm5,%xmm5
  movapd %xmm5,%xmm8
  addpd  %xmm0,%xmm8
  subpd  %xmm5,%xmm0
  movsd  %xmm8,%xmm0
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,-0x8(%rax)
  cmp    %edx,%r12d
  jge    L54
  mov    $0xffffffff,%edx
  mov    %rbp,%rdi
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <realft@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm1
L152:
  movss  D63(%rip),%xmm5
  mov    %r13,%rdx
  mov    $0x1,%eax
  movsd  D43(%rip),%xmm8
  nopl   0x0(%rax,%rax,1)
L138:
  movapd %xmm8,%xmm6
  movss  0x0(%rbp,%rax,4),%xmm7
  movss  (%rdx),%xmm9
  sub    $0x4,%rdx
  divsd  %xmm1,%xmm6
  movaps %xmm7,%xmm0
  subss  %xmm9,%xmm7
  addss  %xmm9,%xmm0
  cvtss2sd %xmm7,%xmm7
  mulsd  %xmm7,%xmm6
  movaps %xmm0,%xmm7
  cvtsd2ss %xmm6,%xmm6
  addss  %xmm6,%xmm7
  subss  %xmm6,%xmm0
  movapd %xmm3,%xmm6
  mulsd  %xmm1,%xmm6
  mulss  %xmm5,%xmm0
  mulss  %xmm5,%xmm7
  movss  %xmm7,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  movss  %xmm0,0x4(%rdx)
  movapd %xmm2,%xmm0
  mulsd  %xmm4,%xmm0
  subsd  %xmm6,%xmm0
  movapd %xmm4,%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm0,%xmm4
  movapd %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm6,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %eax,%ebx
  jge    L138
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L74:
  mov    %r12d,%ecx
  shr    $0x1f,%ecx
  add    %r12d,%ecx
  sar    %ecx
  cmp    $0x1,%r12d
  jle    L73
  movslq %r12d,%r13
  movss  D63(%rip),%xmm5
  mov    $0x1,%eax
  lea    0x0(%rbp,%r13,4),%rdx
  nopw   0x0(%rax,%rax,1)
L84:
  movss  0x0(%rbp,%rax,4),%xmm0
  movss  (%rdx),%xmm7
  sub    $0x4,%rdx
  movaps %xmm0,%xmm6
  subss  %xmm7,%xmm0
  addss  %xmm7,%xmm6
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  mulss  %xmm5,%xmm6
  cvtsd2ss %xmm0,%xmm0
  movaps %xmm6,%xmm7
  subss  %xmm0,%xmm6
  addss  %xmm0,%xmm7
  movapd %xmm2,%xmm0
  mulsd  %xmm4,%xmm0
  movss  %xmm7,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  movss  %xmm6,0x4(%rdx)
  movapd %xmm3,%xmm6
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm0
  movapd %xmm4,%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm0,%xmm4
  movapd %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm6,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %eax,%ecx
  jge    L84
  mov    $0x1,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  movsd  %xmm2,(%rsp)
  movss  %xmm5,0x10(%rsp)
  mov    %r13,%rbx
  movsd  %xmm3,0x8(%rsp)
  call   <realft@plt>
  cmp    $0x2,%r12d
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  movss  0x10(%rsp),%xmm5
  je     L42
  sub    $0x3,%r12d
  movsd  D23(%rip),%xmm4
  lea    0xc(%rbp),%rax
  pxor   %xmm1,%xmm1
  shr    %r12d
  lea    0x14(%rbp,%r12,8),%rdx
  nopw   0x0(%rax,%rax,1)
L163:
  movapd %xmm2,%xmm0
  movapd %xmm3,%xmm6
  movq   (%rax),%xmm7
  add    $0x8,%rax
  mulsd  %xmm1,%xmm6
  mulsd  %xmm4,%xmm0
  cvtps2pd %xmm7,%xmm7
  subsd  %xmm6,%xmm0
  movapd %xmm4,%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm0,%xmm4
  movapd %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm6,%xmm0
  movapd %xmm4,%xmm6
  unpcklpd %xmm6,%xmm6
  mulpd  %xmm7,%xmm6
  addsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  unpcklpd %xmm0,%xmm0
  mulpd  %xmm7,%xmm0
  movapd %xmm6,%xmm7
  shufpd $0x1,%xmm0,%xmm0
  subpd  %xmm0,%xmm7
  addpd  %xmm6,%xmm0
  movsd  %xmm7,%xmm0
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L163
  mulss  0x8(%rbp),%xmm5
  nopw   0x0(%rax,%rax,1)
L47:
  movaps %xmm5,%xmm0
  addss  0x0(%rbp,%rbx,4),%xmm5
  movss  %xmm0,0x0(%rbp,%rbx,4)
  sub    $0x2,%rbx
  cmp    $0x1,%ebx
  jg     L47
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L170:
  movss  %xmm6,0x8(%rbp)
  je     L134
  mov    $0xffffffff,%edx
  mov    %rbp,%rdi
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <realft@plt>
  cmp    $0x2,%r12d
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm1
  jne    L51
  jmp    L152
L73:
  add    $0x38,%rsp
  movslq %r12d,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%edx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1080 <realft@plt>
L43:
  mov    %r12d,%eax
  jmp    L77
L42:
  mulss  0x8(%rbp),%xmm5
  movss  %xmm5,0x0(%rbp,%r13,4)
  jmp    L51
```

tool_calls: name: parse_data
arguments: label: D51
type_infered: byte[8]
name: parse_data
arguments: label: D9
type_infered: f32[2]
name: parse_data
arguments: label: D23
type_infered: f64
name: parse_data
arguments: label: D63
type_infered: f32
name: parse_data
arguments: label: D43
type_infered: f32[2]

tool: {"D51": [0x18,0x2d,0x44,0x54,0xfb,0x21,0xf9,0x3f]}

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

tool: D23: 1

tool: D63: 0.5

tool: {"D43": [0.0,1.75]}

assistant: ```c
void cosft2(float y[], int n, int isign) {
  void realft(float data[], unsigned long n, int isign);
  int i;
  float sum, sum1, y1, y2, ytemp;
  double theta, wi = 0.0, wi1, wpi, wpr, wr = 1.0, wr1, wtemp;
  theta = 0.5 * 3.141592653589793 / n;
  wr1 = cos(theta);
  wi1 = sin(theta);
  wpr = -2.0 * wi1 * wi1;
  wpi = sin(2.0 * theta);
  if (isign == 1) {
    for (i = 1; i <= n / 2; i++) {
      y1 = 0.5 * (y[i] + y[n - i + 1]);
      y2 = wi1 * (y[i] - y[n - i + 1]);
      y[i] = y1 + y2;
      y[n - i + 1] = y1 - y2;
      wr1 = (wtemp = wr1) * wpr - wi1 * wpi + wr1;
      wi1 = wi1 * wpr + wtemp * wpi + wi1;
    }
    realft(y, n, 1);
    for (i = 3; i <= n; i += 2) {
      wr = (wtemp = wr) * wpr - wi * wpi + wr;
      wi = wi * wpr + wtemp * wpi + wi;
      y1 = y[i] * wr - y[i + 1] * wi;
      y2 = y[i + 1] * wr + y[i] * wi;
      y[i] = y1;
      y[i + 1] = y2;
    }
    sum = 0.5 * y[2];
    for (i = n; i >= 2; i -= 2) {
      sum1 = sum;
      sum += y[i];
      y[i] = sum1;
    }
  } else if (isign == -1) {
    ytemp = y[n];
    for (i = n; i >= 4; i -= 2)
      y[i] = y[i - 2] - y[i];
    y[2] = 2.0 * ytemp;
    for (i = 3; i <= n; i += 2) {
      wr = (wtemp = wr) * wpr - wi * wpi + wr;
      wi = wi * wpr + wtemp * wpi + wi;
      y1 = y[i] * wr + y[i + 1] * wi;
      y2 = y[i + 1] * wr - y[i] * wi;
      y[i] = y1;
      y[i + 1] = y2;
    }
    realft(y, n, -1);
    for (i = 1; i <= n / 2; i++) {
      y1 = y[i] + y[n - i + 1];
      y2 = (0.5 / wi1) * (y[i] - y[n - i + 1]);
      y[i] = 0.5 * (y1 + y2);
      y[n - i + 1] = 0.5 * (y1 - y2);
      wr1 = (wtemp = wr1) * wpr - wi1 * wpi + wr1;
      wi1 = wi1 * wpr + wtemp * wpi + wi1;
    }
  }
}
```