user: Please show me the C implementation that matches the assembly code listed below:

```asm
<dfst>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x38,%rsp
  mov    (%rcx),%r14d
  mov    %edi,0x4(%rsp)
  lea    0x0(,%r14,8),%edx
  mov    %rcx,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  cmp    %edi,%edx
  jl     L102
L213:
  mov    0x10(%rsp),%rax
  mov    0x4(%rax),%r13d
  lea    0x0(%r13,%r13,1),%edx
  cmp    0x4(%rsp),%edx
  jl     L84
L164:
  mov    0x4(%rsp),%eax
  cmp    $0x2,%eax
  jle    L131
  mov    %eax,%r15d
  mov    %eax,%ebp
  sar    %r15d
  sar    $0x2,%ebp
  cmp    $0x7,%eax
  jle    L205
  movslq 0x4(%rsp),%r8
  movslq %r15d,%r10
  movslq %ebp,%r9
  lea    -0x8(,%r10,8),%rcx
  mov    %r8,%rdx
  sub    %r10,%rdx
  lea    (%r12,%rdx,8),%rsi
  mov    $0x1,%edx
  nopl   0x0(%rax)
L167:
  movsd  (%r12,%rdx,8),%xmm2
  movsd  (%rsi,%rcx,1),%xmm5
  movsd  (%r12,%rcx,1),%xmm1
  movsd  (%rsi,%rdx,8),%xmm4
  movapd %xmm2,%xmm0
  addsd  %xmm5,%xmm2
  subsd  %xmm5,%xmm0
  movapd %xmm1,%xmm3
  addsd  %xmm4,%xmm1
  subsd  %xmm4,%xmm3
  movsd  %xmm2,(%r12,%rdx,8)
  movsd  %xmm1,(%r12,%rcx,1)
  movapd %xmm0,%xmm1
  addsd  %xmm3,%xmm1
  subsd  %xmm3,%xmm0
  movsd  %xmm1,(%rbx,%rdx,8)
  add    $0x1,%rdx
  movsd  %xmm0,(%rbx,%rcx,1)
  sub    $0x8,%rcx
  cmp    %rdx,%r9
  jne    L167
L228:
  mov    0x4(%rsp),%ecx
  lea    (%r12,%r9,8),%rdx
  mov    0x8(%rsp),%rax
  movslq %r14d,%r14
  movsd  (%rdx),%xmm0
  mov    %r12,%rsi
  mov    %r15d,%edi
  mov    %r8,0x18(%rsp)
  sub    %ebp,%ecx
  lea    (%rax,%r14,8),%r14
  movslq %ecx,%rcx
  lea    (%r12,%rcx,8),%rcx
  subsd  (%rcx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rdx),%xmm0
  addsd  (%rcx),%xmm0
  mov    %r14,%rcx
  movsd  %xmm0,(%rdx)
  movsd  (%r12,%r10,8),%xmm0
  mov    %r13d,%edx
  movsd  %xmm0,(%r12)
  call   <dstsub@plt>
  mov    0x18(%rsp),%r8
  lea    -0x8(%r12,%r8,8),%rax
  lea    -0x2(%r15),%r8d
  cmp    $0x4,%r15d
  jg     L120
  je     L39
  movsd  0x8(%r12),%xmm0
  subsd  (%r12),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%r12),%xmm0
  addsd  (%r12),%xmm0
  movsd  %xmm0,0x8(%r12)
  cmp    $0x1,%r8d
  jle    L157
L176:
  lea    0x1(%r8,%r8,1),%ecx
  movq   D30(%rip),%xmm1
  movslq %r8d,%rdx
  movslq %ecx,%rcx
  lea    (%r12,%rcx,8),%rcx
  nopl   0x0(%rax)
L154:
  movsd  (%r12,%rdx,8),%xmm0
  subsd  0x8(%r12,%rdx,8),%xmm0
  sub    $0x20,%rcx
  movsd  %xmm0,0x20(%rcx)
  movsd  (%r12,%rdx,8),%xmm0
  xorpd  %xmm1,%xmm0
  subsd  0x8(%r12,%rdx,8),%xmm0
  sub    $0x2,%rdx
  movsd  %xmm0,0x10(%rcx)
  cmp    $0x1,%edx
  jg     L154
L157:
  mov    $0x2,%r15d
  cmp    $0x1,%ebp
  jle    L207
  nopl   0x0(%rax)
L119:
  mov    %r14,%rcx
  mov    %r13d,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <dstsub@plt>
  mov    0x4(%rsp),%eax
  movq   D30(%rip),%xmm1
  sub    %r15d,%eax
  cmp    $0x4,%ebp
  cltq
  lea    (%r12,%rax,8),%r11
  movslq %r15d,%rax
  lea    (%r12,%rax,8),%r10
  jg     L214
  je     L236
  movsd  0x8(%rbx),%xmm0
  subsd  (%rbx),%xmm0
  movsd  %xmm0,(%r11)
  movsd  (%rbx),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,(%r10)
  cmp    $0x3,%ebp
  jne    L8
L194:
  lea    0x0(,%r15,4),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rsi
  sub    %rax,%rdx
  shl    $0x4,%rax
  lea    (%r12,%rdx,8),%rcx
  mov    $0x2,%edx
  nopl   0x0(%rax,%rax,1)
L103:
  movsd  (%rbx,%rdx,8),%xmm0
  xorpd  %xmm1,%xmm0
  subsd  0x8(%rbx,%rdx,8),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  (%rbx,%rdx,8),%xmm0
  subsd  0x8(%rbx,%rdx,8),%xmm0
  add    $0x2,%rdx
  movsd  %xmm0,(%rcx,%rax,1)
  add    %rsi,%rcx
  cmp    %edx,%ebp
  jg     L103
  mov    %ebp,%edi
  add    %r15d,%r15d
  sar    %edi
  cmp    $0x1,%edi
  je     L72
  movslq %ebp,%r10
  lea    -0x2(%rdi),%esi
  mov    %r10,%rdx
  lea    0x0(,%r10,8),%rcx
  add    %r10,%rsi
  shl    $0x4,%rdx
  lea    (%rbx,%rcx,1),%rax
  lea    0x8(%rbx,%rsi,8),%rsi
  neg    %rcx
  add    %rbx,%rdx
  nopl   0x0(%rax)
L32:
  movsd  -0x8(%rdx),%xmm0
  addsd  0x8(%rax),%xmm0
  add    $0x8,%rax
  sub    $0x8,%rdx
  movsd  %xmm0,(%rax,%rcx,1)
  movsd  (%rdx),%xmm0
  subsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx,%rcx,1)
  cmp    %rax,%rsi
  jne    L32
  add    %edi,%ebp
  movslq %ebp,%rbp
  movsd  (%rbx,%rbp,8),%xmm0
  mov    %edi,%ebp
  movsd  %xmm0,(%rbx)
  jmp    L119
  cs nopw 0x0(%rax,%rax,1)
L8:
  add    %r15d,%r15d
  mov    $0x2,%ebp
L72:
  lea    0x1(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rbx,%rdx,8),%xmm0
  movslq %r15d,%rdx
  shl    $0x3,%rdx
  movsd  %xmm0,(%rbx)
L242:
  movsd  %xmm0,(%r12,%rdx,1)
L131:
  movq   $0x0,(%r12)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L214:
  mov    %rax,0x20(%rsp)
  mov    0x10(%rsp),%rax
  mov    %rbx,%rdx
  mov    %ebp,%edi
  mov    %r10,0x28(%rsp)
  lea    0x8(%rax),%rsi
  mov    %r11,0x18(%rsp)
  call   <bitrv2@plt>
  mov    0x8(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <cftfsub@plt>
  mov    %r14,%rcx
  mov    %r13d,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <rftfsub@plt>
  mov    0x18(%rsp),%r11
  mov    0x20(%rsp),%rax
  mov    0x28(%rsp),%r10
  movq   D30(%rip),%xmm1
L239:
  movsd  0x8(%rbx),%xmm0
  subsd  (%rbx),%xmm0
  movsd  %xmm0,(%r11)
  movsd  (%rbx),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,(%r10)
  jmp    L194
  nopl   0x0(%rax)
L236:
  mov    0x8(%rsp),%rdx
  mov    %rbx,%rsi
  mov    $0x4,%edi
  mov    %r10,0x28(%rsp)
  mov    %rax,0x20(%rsp)
  mov    %r11,0x18(%rsp)
  call   <cftfsub@plt>
  mov    0x18(%rsp),%r11
  mov    0x20(%rsp),%rax
  mov    0x28(%rsp),%r10
  movq   D30(%rip),%xmm1
  jmp    L239
L84:
  mov    0x4(%rsp),%r13d
  mov    0x8(%rsp),%rax
  movslq %r14d,%rdx
  mov    0x10(%rsp),%rsi
  sar    %r13d
  lea    (%rax,%rdx,8),%rdx
  mov    %r13d,%edi
  call   <makect@plt>
  jmp    L164
L102:
  mov    %edi,%r14d
  mov    %r8,%rdx
  mov    %rcx,%rsi
  sar    $0x3,%r14d
  mov    %r14d,%edi
  call   <makewt@plt>
  jmp    L213
L205:
  movslq %ebp,%r9
  movslq %r15d,%r10
  movslq %eax,%r8
  jmp    L228
L120:
  mov    %rax,0x18(%rsp)
  mov    0x10(%rsp),%rax
  mov    %r12,%rdx
  mov    %r15d,%edi
  mov    %r8d,0x20(%rsp)
  lea    0x8(%rax),%rsi
  call   <bitrv2@plt>
  mov    0x8(%rsp),%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <cftfsub@plt>
  mov    %r14,%rcx
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <rftfsub@plt>
  mov    0x18(%rsp),%rax
  mov    0x20(%rsp),%r8d
L35:
  movsd  0x8(%r12),%xmm0
  subsd  (%r12),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%r12),%xmm0
  addsd  (%r12),%xmm0
  movsd  %xmm0,0x8(%r12)
  jmp    L176
L39:
  mov    0x8(%rsp),%rdx
  mov    %r12,%rsi
  mov    $0x4,%edi
  mov    %r8d,0x20(%rsp)
  mov    %rax,0x18(%rsp)
  call   <cftfsub@plt>
  mov    0x18(%rsp),%rax
  mov    0x20(%rsp),%r8d
  jmp    L35
L207:
  movsd  (%rbx),%xmm0
  mov    $0x10,%edx
  jmp    L242
```

tool_calls: name: retrieve_data
arguments: label: D30
type_guessed: byte[8]

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

assistant: ```c
void dfst(int n, double *a, double *t, int *ip, double *w) {
  void makewt(int nw, int *ip, double *w);
  void makect(int nc, int *ip, double *c);
  void bitrv2(int n, int *ip, double *a);
  void cftfsub(int n, double *a, double *w);
  void rftfsub(int n, double *a, int nc, double *c);
  void dstsub(int n, double *a, int nc, double *c);
  int j, k, l, m, mh, nw, nc;
  double xr, xi, yr, yi;
  nw = ip[0];
  if (n > (nw << 3)) {
    nw = n >> 3;
    makewt(nw, ip, w);
  }
  nc = ip[1];
  if (n > (nc << 1)) {
    nc = n >> 1;
    makect(nc, ip, w + nw);
  }
  if (n > 2) {
    m = n >> 1;
    mh = m >> 1;
    for (j = 1; j < mh; j++) {
      k = m - j;
      xr = a[j] + a[n - j];
      xi = a[j] - a[n - j];
      yr = a[k] + a[n - k];
      yi = a[k] - a[n - k];
      a[j] = xr;
      a[k] = yr;
      t[j] = xi + yi;
      t[k] = xi - yi;
    }
    t[0] = a[mh] - a[n - mh];
    a[mh] += a[n - mh];
    a[0] = a[m];
    dstsub(m, a, nc, w + nw);
    if (m > 4) {
      bitrv2(m, ip + 2, a);
      cftfsub(m, a, w);
      rftfsub(m, a, nc, w + nw);
    } else if (m == 4) {
      cftfsub(m, a, w);
    }
    a[n - 1] = a[1] - a[0];
    a[1] = a[0] + a[1];
    for (j = m - 2; j >= 2; j -= 2) {
      a[2 * j + 1] = a[j] - a[j + 1];
      a[2 * j - 1] = -a[j] - a[j + 1];
    }
    l = 2;
    m = mh;
    while (m >= 2) {
      dstsub(m, t, nc, w + nw);
      if (m > 4) {
        bitrv2(m, ip + 2, t);
        cftfsub(m, t, w);
        rftfsub(m, t, nc, w + nw);
      } else if (m == 4) {
        cftfsub(m, t, w);
      }
      a[n - l] = t[1] - t[0];
      a[l] = t[0] + t[1];
      k = 0;
      for (j = 2; j < m; j += 2) {
        k += l << 2;
        a[k - l] = -t[j] - t[j + 1];
        a[k + l] = t[j] - t[j + 1];
      }
      l <<= 1;
      mh = m >> 1;
      for (j = 1; j < mh; j++) {
        k = m - j;
        t[j] = t[m + k] + t[m + j];
        t[k] = t[m + k] - t[m + j];
      }
      t[0] = t[m + mh];
      m = mh;
    }
    a[l] = t[0];
  }
  a[0] = 0;
}
```