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

```asm
<ddst>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%ebx
  mov    %esi,0xc(%rsp)
  mov    %rdx,%rbp
  mov    %rcx,%r12
  mov    %r8,%r14
  mov    (%rcx),%r13d
  lea    0x0(,%r13,4),%eax
  cmp    %edi,%eax
  jl     L57
L70:
  mov    0x4(%r12),%r15d
  cmp    %r15d,%ebx
  jg     L74
L22:
  cmpl   $0x0,0xc(%rsp)
  js     L162
  movslq %r13d,%r13
  lea    (%r14,%r13,8),%r13
  mov    %r13,%rcx
  mov    %r15d,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <dstsub@plt>
  cmp    $0x4,%ebx
  jg     L151
  je     L166
  movsd  0x0(%rbp),%xmm0
  movsd  0x8(%rbp),%xmm1
  movapd %xmm0,%xmm4
  subsd  %xmm1,%xmm4
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x2,%ebx
  jg     L87
  jmp    L160
L57:
  mov    %edi,%r13d
  sar    $0x2,%r13d
  mov    %r8,%rdx
  mov    %rcx,%rsi
  mov    %r13d,%edi
  call   <makewt@plt>
  jmp    L70
L74:
  movslq %r13d,%rax
  lea    (%r14,%rax,8),%rdx
  mov    %r12,%rsi
  mov    %ebx,%edi
  call   <makect@plt>
  mov    %ebx,%r15d
  jmp    L22
L162:
  movslq %ebx,%rax
  movsd  -0x8(%rbp,%rax,8),%xmm4
  lea    -0x2(%rbx),%eax
  cmp    $0x1,%eax
  jle    L81
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    0x0(%rbp,%rdx,1),%rax
  lea    -0x10(%rbp,%rdx,1),%rdx
  lea    -0x4(%rbx),%ecx
  shr    %ecx
  mov    %ecx,%ecx
  shl    $0x4,%rcx
  sub    %rcx,%rdx
  movq   D11(%rip),%xmm3
L122:
  movsd  (%rax),%xmm0
  movsd  -0x8(%rax),%xmm2
  movapd %xmm0,%xmm1
  xorpd  %xmm3,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x8(%rax)
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  sub    $0x10,%rax
  cmp    %rdx,%rax
  jne    L122
L81:
  movsd  0x0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm4,%xmm1
  movsd  %xmm1,0x8(%rbp)
  subsd  %xmm4,%xmm0
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x4,%ebx
  jg     L54
  je     L164
L23:
  movslq %r13d,%r13
  lea    (%r14,%r13,8),%rcx
  mov    %r15d,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <dstsub@plt>
  jmp    L83
L54:
  movslq %r13d,%rax
  lea    (%r14,%rax,8),%rcx
  mov    %r15d,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <rftbsub@plt>
  lea    0x8(%r12),%rsi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  call   <bitrv2@plt>
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <cftbsub@plt>
  jmp    L23
L164:
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    $0x4,%edi
  call   <cftfsub@plt>
  jmp    L23
L151:
  lea    0x8(%r12),%rsi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  call   <bitrv2@plt>
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <cftfsub@plt>
  mov    %r13,%rcx
  mov    %r15d,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <rftfsub@plt>
L29:
  movsd  0x0(%rbp),%xmm0
  movsd  0x8(%rbp),%xmm1
  movapd %xmm0,%xmm4
  subsd  %xmm1,%xmm4
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp)
L87:
  lea    0x8(%rbp),%rax
  mov    $0x2,%edx
  movq   D11(%rip),%xmm3
L111:
  movsd  0x8(%rax),%xmm0
  movsd  0x10(%rax),%xmm2
  movapd %xmm0,%xmm1
  xorpd  %xmm3,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rax)
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x8(%rax)
  add    $0x2,%edx
  add    $0x10,%rax
  cmp    %edx,%ebx
  jg     L111
L160:
  movslq %ebx,%rbx
  xorpd  D11(%rip),%xmm4
  movsd  %xmm4,-0x8(%rbp,%rbx,8)
L83:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L166:
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    $0x4,%edi
  call   <cftfsub@plt>
  jmp    L29
```

tool_calls: name: read_data
arguments: data_label: D11
type: byte[16]

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

assistant: ```c
void ddst(int n, int isgn, double *a, int *ip, double *w) {
  int j, nw, nc;
  double xr;
  nw = ip[0];
  if (n > (nw << 2)) {
    nw = n >> 2;
    makewt(nw, ip, w);
  }
  nc = ip[1];
  if (n > nc) {
    nc = n;
    makect(nc, ip, w + nw);
  }
  if (isgn < 0) {
    xr = a[n - 1];
    for (j = n - 2; j >= 2; j -= 2) {
      a[j + 1] = -a[j] - a[j - 1];
      a[j] -= a[j - 1];
    }
    a[1] = a[0] + xr;
    a[0] -= xr;
    if (n > 4) {
      rftbsub(n, a, nc, w + nw);
      bitrv2(n, ip + 2, a);
      cftbsub(n, a, w);
    } else if (n == 4) {
      cftfsub(n, a, w);
    }
  }
  dstsub(n, a, nc, w + nw);
  if (isgn >= 0) {
    if (n > 4) {
      bitrv2(n, ip + 2, a);
      cftfsub(n, a, w);
      rftfsub(n, a, nc, w + nw);
    } else if (n == 4) {
      cftfsub(n, a, w);
    }
    xr = a[0] - a[1];
    a[0] += a[1];
    for (j = 2; j < n; j += 2) {
      a[j - 1] = -a[j] - a[j + 1];
      a[j] -= a[j + 1];
    }
    a[n - 1] = -xr;
  }
}
```