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

```asm
<dfct>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0x4(%rsp)
  sar    %edi
  test   %edi,%edi
  jle    L21
  mov    %rsi,%rax
  movslq 0x4(%rsp),%rsi
  lea    -0x1(%rdi),%ecx
  lea    0x4(%r13),%rbp
  mov    %edi,%r15d
  lea    0x0(%rbp,%rcx,4),%rcx
  lea    0x0(%r13,%rsi,4),%rdx
  nop
L82:
  movss  (%rax),%xmm0
  movss  (%rdx),%xmm1
  add    $0x4,%rax
  sub    $0x4,%rdx
  movaps %xmm0,%xmm2
  addss  %xmm1,%xmm0
  subss  %xmm1,%xmm2
  movss  %xmm2,-0x4(%rax)
  movss  %xmm0,0x4(%rdx)
  cmp    %rax,%rcx
  jne    L82
  lea    0x0(%r13,%rsi,4),%rax
  movss  (%rax),%xmm7
  mov    %rax,0x8(%rsp)
  movss  %xmm7,(%rsp)
  cmp    $0x1,%r15d
  jle    L34
  nopw   0x0(%rax,%rax,1)
L54:
  mov    %r13,%rdx
  mov    $0x1,%esi
  mov    %r15d,%edi
  movslq %r15d,%r14
  call   <ddct@plt>
  mov    %r15d,%r12d
  lea    0x0(%r13,%r14,4),%rbx
  sar    %r12d
  cmp    $0x2,%r15d
  jne    L65
  movss  0x0(%r13),%xmm1
  movss  (%rsp),%xmm6
  movss  (%rbx),%xmm0
  movss  %xmm1,(%rbx)
  movaps %xmm6,%xmm1
  subss  %xmm0,%xmm1
  addss  %xmm6,%xmm0
  movss  %xmm1,0x0(%r13)
  movss  %xmm0,(%rsp)
L77:
  movslq %r12d,%rax
  movss  (%rsp),%xmm5
  lea    0x0(%r13,%rax,4),%rdx
  lea    (%r15,%r12,1),%eax
  cltq
  movss  (%rdx),%xmm0
  lea    0x0(%r13,%rax,4),%rax
  movss  (%rax),%xmm1
  movss  %xmm1,(%rdx)
  movss  %xmm0,(%rax)
  movss  0x0(%r13),%xmm1
  movss  0x4(%r13),%xmm0
  mov    0x8(%rsp),%rax
  movss  %xmm1,0x4(%r13)
  movaps %xmm5,%xmm1
  subss  %xmm0,%xmm5
  addss  %xmm0,%xmm1
  movss  %xmm1,0x0(%r13)
  movss  %xmm5,(%rax)
L59:
  mov    0x4(%rsp),%edi
  add    $0x18,%rsp
  mov    %r13,%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <bitrv1@plt>
  nop
L65:
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <bitrv1@plt>
  movss  0x0(%r13),%xmm1
  movss  (%rsp),%xmm4
  movss  (%rbx),%xmm0
  movss  %xmm1,(%rbx)
  movaps %xmm4,%xmm1
  subss  %xmm0,%xmm1
  addss  %xmm4,%xmm0
  movss  %xmm1,0x0(%r13)
  movss  %xmm0,(%rsp)
  cmp    $0x1,%r12d
  je     L60
  lea    -0x2(%r12),%esi
  mov    %r13,%rax
  mov    %rbx,%rdx
  lea    0x0(%rbp,%rsi,4),%rsi
  xchg   %ax,%ax
L55:
  movss  -0x4(%rdx,%r14,4),%xmm0
  movss  -0x4(%rdx),%xmm2
  movss  0x4(%rax),%xmm3
  movss  0x4(%rax,%r14,4),%xmm1
  movss  %xmm3,0x4(%rax,%r14,4)
  add    $0x4,%rax
  movss  %xmm2,-0x4(%rdx,%r14,4)
  movaps %xmm0,%xmm2
  addss  %xmm1,%xmm0
  sub    $0x4,%rdx
  subss  %xmm1,%xmm2
  movss  %xmm2,(%rax)
  movss  %xmm0,(%rdx)
  cmp    %rax,%rsi
  jne    L55
  add    %r12d,%r15d
  movslq %r12d,%rax
  movslq %r15d,%r15
  lea    0x0(%r13,%rax,4),%rdx
  lea    0x0(%r13,%r15,4),%rax
  movss  (%rdx),%xmm0
  mov    %r12d,%r15d
  movss  (%rax),%xmm1
  movss  %xmm1,(%rdx)
  movss  %xmm0,(%rax)
  jmp    L54
L21:
  movslq 0x4(%rsp),%rax
  lea    (%rsi,%rax,4),%rax
  movss  (%rax),%xmm6
  mov    %rax,0x8(%rsp)
  movss  %xmm6,(%rsp)
L34:
  movss  0x0(%r13),%xmm1
  movss  (%rsp),%xmm7
  movss  0x4(%r13),%xmm0
  mov    0x8(%rsp),%rax
  movss  %xmm1,0x4(%r13)
  movaps %xmm7,%xmm1
  cmpl   $0x3,0x4(%rsp)
  addss  %xmm0,%xmm1
  subss  %xmm0,%xmm7
  movss  %xmm1,0x0(%r13)
  movss  %xmm7,(%rax)
  je     L59
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L60:
  mov    $0x3,%r15d
  jmp    L77
```

assistant: ```c
void dfct(int n, float *a) {
  void ddct(int n, int isgn, float *a);
  void bitrv1(int n, float *a);
  int j, k, m, mh;
  float xr, xi, yr, yi, an;
  m = n >> 1;
  for (j = 0; j < m; j++) {
    k = n - j;
    xr = a[j] + a[k];
    a[j] -= a[k];
    a[k] = xr;
  }
  an = a[n];
  while (m >= 2) {
    ddct(m, 1, a);
    if (m > 2) {
      bitrv1(m, a);
    }
    mh = m >> 1;
    xi = a[m];
    a[m] = a[0];
    a[0] = an - xi;
    an += xi;
    for (j = 1; j < mh; j++) {
      k = m - j;
      xr = a[m + k];
      xi = a[m + j];
      yr = a[j];
      yi = a[k];
      a[m + j] = yr;
      a[m + k] = yi;
      a[j] = xr - xi;
      a[k] = xr + xi;
    }
    xr = a[mh];
    a[mh] = a[m + mh];
    a[m + mh] = xr;
    m = mh;
  }
  xi = a[1];
  a[1] = a[0];
  a[0] = an + xi;
  a[n] = an - xi;
  if (n > 2) {
    bitrv1(n, a);
  }
}
```