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

```asm
<dctsub>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movslq %edi,%rbx
  cvtsi2sd %ebx,%xmm0
  sub    $0x48,%rsp
  movsd  D35(%rip),%xmm1
  lea    0x38(%rsp),%r12
  lea    0x30(%rsp),%r13
  divsd  %xmm0,%xmm1
  mov    %r12,%rdi
  mov    %r13,%rsi
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm8
  mov    %ebx,%eax
  xor    %ecx,%ecx
  movsd  0x38(%rsp),%xmm7
  sar    %eax
  movapd %xmm8,%xmm4
  lea    -0x1(%rax),%edi
  mov    %eax,0x2c(%rsp)
  lea    -0x2(%rax),%ebp
  movapd %xmm8,%xmm5
  subsd  %xmm7,%xmm4
  movapd %xmm7,%xmm6
  mov    %edi,0x28(%rsp)
  addsd  %xmm7,%xmm5
  mulsd  D27(%rip),%xmm4
  mov    D27(%rip),%rax
  addsd  %xmm7,%xmm6
  mulsd  D27(%rip),%xmm5
  movq   %rax,%xmm2
  movq   %rax,%xmm3
  nopw   0x0(%rax,%rax,1)
L8:
  lea    0x80(%rcx),%r15d
  cmp    0x28(%rsp),%r15d
  lea    0x2(%rcx),%eax
  cmovge %ebp,%r15d
  cmp    %eax,%r15d
  jl     L4
  mov    %r15d,%esi
  cltq
  mov    %rbx,%rdx
  sub    %ecx,%esi
  sub    %rax,%rdx
  lea    -0x8(%r14,%rax,8),%rax
  sub    $0x2,%esi
  lea    (%r14,%rdx,8),%rdx
  shr    %esi
  lea    (%rcx,%rsi,2),%rcx
  lea    0x18(%r14,%rcx,8),%rcx
L32:
  movapd %xmm6,%xmm0
  movupd (%rdx),%xmm1
  add    $0x10,%rax
  sub    $0x10,%rdx
  mulsd  %xmm5,%xmm0
  movupd -0x10(%rax),%xmm10
  movupd 0x10(%rdx),%xmm12
  subsd  %xmm0,%xmm3
  movapd %xmm6,%xmm0
  mulsd  %xmm4,%xmm0
  movapd %xmm3,%xmm9
  unpcklpd %xmm4,%xmm9
  mulpd  %xmm12,%xmm9
  addsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  unpcklpd %xmm5,%xmm0
  mulpd  %xmm1,%xmm0
  movapd %xmm4,%xmm1
  unpcklpd %xmm3,%xmm1
  mulpd  %xmm10,%xmm1
  shufpd $0x1,%xmm0,%xmm0
  addpd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  unpcklpd %xmm2,%xmm1
  mulpd  %xmm10,%xmm1
  shufpd $0x1,%xmm1,%xmm1
  subpd  %xmm9,%xmm1
  movapd %xmm6,%xmm9
  mulsd  %xmm2,%xmm9
  movups %xmm1,0x10(%rdx)
  movups %xmm0,-0x10(%rax)
  subsd  %xmm9,%xmm4
  movapd %xmm6,%xmm9
  mulsd  %xmm3,%xmm9
  addsd  %xmm9,%xmm5
  cmp    %rax,%rcx
  jne    L32
L4:
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  cmp    %ebp,%r15d
  je     L21
  pxor   %xmm0,%xmm0
  mov    %r13,%rsi
  mov    %r12,%rdi
  movsd  %xmm6,0x18(%rsp)
  cvtsi2sd %r15d,%xmm0
  mulsd  0x20(%rsp),%xmm0
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm2
  movslq %r15d,%rcx
  movsd  0x38(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm8
  movsd  0x10(%rsp),%xmm7
  movapd %xmm2,%xmm3
  addsd  %xmm0,%xmm2
  movsd  0x18(%rsp),%xmm6
  mulsd  D27(%rip),%xmm2
  subsd  %xmm0,%xmm3
  movapd %xmm8,%xmm4
  mulsd  D27(%rip),%xmm3
  movapd %xmm7,%xmm0
  movapd %xmm7,%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm5
  subsd  %xmm0,%xmm4
  movapd %xmm8,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm5
  jmp    L8
  nopw   0x0(%rax,%rax,1)
L21:
  movslq 0x2c(%rsp),%rax
  mulsd  %xmm4,%xmm6
  shl    $0x3,%rax
  lea    -0x8(%r14,%rax,1),%rcx
  lea    0x8(%r14,%rax,1),%rdx
  movsd  (%rcx),%xmm0
  movsd  (%rdx),%xmm1
  lea    (%r14,%rax,1),%r8
  addsd  %xmm2,%xmm6
  movapd %xmm0,%xmm3
  movapd %xmm1,%xmm7
  mulsd  %xmm4,%xmm3
  mulsd  %xmm5,%xmm7
  mulsd  %xmm5,%xmm0
  mulsd  %xmm4,%xmm1
  addsd  %xmm7,%xmm3
  subsd  %xmm1,%xmm0
  movsd  %xmm3,(%rcx)
  movsd  %xmm0,(%rdx)
  mulsd  (%r8),%xmm6
  movsd  %xmm6,(%r8)
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D35
type: f64
name: disassemble_data
arguments: data_tag: D27
type: f64

tool: D35: 1.5707963267948966

tool: D27: 0.5

assistant: ```c
void dctsub(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[j - 1] - wdr * a[k + 1];
      xi = wdr * a[j - 1] + wdi * a[k + 1];
      wkr -= ss * wdi;
      wki += ss * wdr;
      yr = wki * a[j] - wkr * a[k];
      yi = wkr * a[j] + wki * a[k];
      wdr -= ss * wki;
      wdi += ss * wkr;
      a[k + 1] = xr;
      a[k] = yr;
      a[j - 1] = xi;
      a[j] = 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] *= wki + ss * wdr;
}
```