user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<dstsub>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  movslq %edi,%rbx
  cvtsi2sd %ebx,%xmm0
  sub    $0x48,%rsp
  movsd  D52(%rip),%xmm1
  lea    0x38(%rsp),%r13
  lea    0x30(%rsp),%r14
  divsd  %xmm0,%xmm1
  mov    %r14,%rsi
  mov    %r13,%rdi
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm9
  mov    %ebx,%eax
  xor    %esi,%esi
  movsd  0x38(%rsp),%xmm8
  sar    %eax
  movapd %xmm9,%xmm4
  lea    -0x1(%rax),%ecx
  mov    %eax,0x2c(%rsp)
  lea    -0x2(%rax),%r12d
  movapd %xmm9,%xmm5
  subsd  %xmm8,%xmm4
  movapd %xmm8,%xmm7
  mov    %ecx,0x28(%rsp)
  addsd  %xmm8,%xmm5
  mulsd  D38(%rip),%xmm4
  addsd  %xmm8,%xmm7
  mov    D38(%rip),%rax
  mulsd  D38(%rip),%xmm5
  movq   %rax,%xmm2
  movq   %rax,%xmm3
  nopl   (%rax)
L11:
  lea    0x80(%rsi),%r15d
  cmp    0x28(%rsp),%r15d
  lea    0x2(%rsi),%eax
  cmovge %r12d,%r15d
  cmp    %eax,%r15d
  jl     L39
  movslq %eax,%rdx
  mov    %rbx,%rdi
  sub    %rdx,%rdi
  lea    0x0(%rbp,%rdx,8),%rax
  lea    0x8(%rbp,%rdi,8),%rdx
  mov    %r15d,%edi
  sub    %esi,%edi
  sub    $0x2,%edi
  shr    %edi
  lea    (%rsi,%rdi,2),%rsi
  lea    0x20(%rbp,%rsi,8),%rsi
  nopw   0x0(%rax,%rax,1)
L21:
  movsd  (%rdx),%xmm0
  movsd  -0x8(%rax),%xmm1
  add    $0x10,%rax
  sub    $0x10,%rdx
  movapd %xmm7,%xmm11
  movapd %xmm0,%xmm10
  movapd %xmm1,%xmm6
  mulsd  %xmm4,%xmm0
  mulsd  %xmm5,%xmm1
  mulsd  %xmm4,%xmm6
  mulsd  %xmm5,%xmm10
  addsd  %xmm0,%xmm1
  movapd %xmm7,%xmm0
  mulsd  %xmm5,%xmm0
  subsd  %xmm6,%xmm10
  movsd  -0x10(%rax),%xmm6
  subsd  %xmm0,%xmm3
  movapd %xmm7,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm0,%xmm2
  movsd  0x8(%rdx),%xmm0
  movsd  %xmm10,-0x18(%rax)
  movapd %xmm0,%xmm10
  mulsd  %xmm2,%xmm11
  mulsd  %xmm2,%xmm10
  mulsd  %xmm3,%xmm0
  subsd  %xmm11,%xmm4
  movapd %xmm7,%xmm11
  mulsd  %xmm3,%xmm11
  addsd  %xmm11,%xmm5
  movapd %xmm6,%xmm11
  mulsd  %xmm3,%xmm11
  mulsd  %xmm2,%xmm6
  subsd  %xmm11,%xmm10
  addsd  %xmm6,%xmm0
  movsd  %xmm10,-0x10(%rax)
  movsd  %xmm1,0x10(%rdx)
  movsd  %xmm0,0x8(%rdx)
  cmp    %rax,%rsi
  jne    L21
L39:
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm8,0x10(%rsp)
  movsd  %xmm9,0x8(%rsp)
  cmp    %r12d,%r15d
  je     L17
  pxor   %xmm0,%xmm0
  mov    %r14,%rsi
  mov    %r13,%rdi
  cvtsi2sd %r15d,%xmm0
  mulsd  0x20(%rsp),%xmm0
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm2
  movslq %r15d,%rsi
  movsd  0x38(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm9
  movsd  0x10(%rsp),%xmm8
  movapd %xmm2,%xmm3
  addsd  %xmm0,%xmm2
  movsd  0x18(%rsp),%xmm7
  subsd  %xmm0,%xmm3
  movapd %xmm9,%xmm4
  movapd %xmm8,%xmm0
  mulsd  D38(%rip),%xmm3
  movapd %xmm8,%xmm5
  mulsd  D38(%rip),%xmm2
  mulsd  %xmm3,%xmm4
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm5
  subsd  %xmm0,%xmm4
  movapd %xmm9,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm5
  jmp    L11
  nopw   0x0(%rax,%rax,1)
L17:
  mov    0x2c(%rsp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    0x0(%rbp,%rax,1),%rsi
  lea    -0x10(%rbp,%rax,1),%rdx
  movsd  (%rsi),%xmm0
  movsd  (%rdx),%xmm1
  lea    -0x8(%rbp,%rax,1),%rax
  movapd %xmm0,%xmm2
  movapd %xmm1,%xmm3
  mulsd  %xmm4,%xmm2
  mulsd  %xmm5,%xmm3
  mulsd  %xmm5,%xmm0
  mulsd  %xmm4,%xmm1
  addsd  %xmm3,%xmm2
  subsd  %xmm1,%xmm0
  movsd  %xmm2,(%rsi)
  movsd  %xmm0,(%rdx)
  movsd  D56(%rip),%xmm0
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D52
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D38
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D56
data_type: f64

tool: D52: 1.5707963267948966

tool: D38: 0.5

tool: D56: 0.7071067811865476

assistant: ```c
void dstsub(int n, double *a) {
  int i, i0, j, k, m;
  double ec, w1r, w1i, wkr, wki, wdr, wdi, ss, xr, xi, yr, yi;
  ec = 1.570796326794896619231321691639751442098584699687 / n;
  wkr = 0.5;
  wki = 0.5;
  w1r = cos(ec);
  w1i = sin(ec);
  wdr = 0.5 * (w1r - w1i);
  wdi = 0.5 * (w1r + w1i);
  ss = 2 * w1i;
  m = n >> 1;
  i = 0;
  for (;;) {
    i0 = i + 2 * 64;
    if (i0 > m - 2) {
      i0 = m - 2;
    }
    for (j = i + 2; j <= i0; j += 2) {
      k = n - j;
      xr = wdi * a[k + 1] - wdr * a[j - 1];
      xi = wdr * a[k + 1] + wdi * a[j - 1];
      wkr -= ss * wdi;
      wki += ss * wdr;
      yr = wki * a[k] - wkr * a[j];
      yi = wkr * a[k] + wki * a[j];
      wdr -= ss * wki;
      wdi += ss * wkr;
      a[j - 1] = xr;
      a[j] = yr;
      a[k + 1] = xi;
      a[k] = yi;
    }
    if (i0 == m - 2) {
      break;
    }
    wdr = cos(ec * i0);
    wdi = sin(ec * i0);
    wkr = 0.5 * (wdr - wdi);
    wki = 0.5 * (wdr + wdi);
    wdr = wkr * w1r - wki * w1i;
    wdi = wkr * w1i + wki * w1r;
    i = i0;
  }
  xr = wdi * a[m + 1] - wdr * a[m - 1];
  a[m + 1] = wdr * a[m + 1] + wdi * a[m - 1];
  a[m - 1] = xr;
  a[m] *= 0.707106781186547524400844362104849039284835937688;
}
```