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

```asm
<dcsqb1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%r14d
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %rcx,%rbp
  mov    %r8,%rcx
  lea    0x1(%rdi),%r13d
  sar    %r13d
  cmp    $0x2,%edi
  jle    L91
  lea    0x8(%rsi),%rax
  lea    -0x3(%rdi),%edx
  shr    %edx
  mov    %edx,%edx
  shl    $0x4,%rdx
  lea    0x18(%rsi,%rdx,1),%rdx
L108:
  movsd  (%rax),%xmm0
  movsd  0x8(%rax),%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,0x8(%rax)
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L108
L91:
  movsd  (%rbx),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rbx)
  mov    %r14d,%r15d
  and    $0x1,%r15d
  jne    L22
  movslq %r14d,%rax
  lea    -0x8(%rbx,%rax,8),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <__ogg_fdrfftb@plt>
  cmp    $0x1,%r13d
  jle    L40
L0:
  movslq %r14d,%rax
  lea    -0x8(,%rax,8),%rdx
  mov    %r13d,%ecx
  mov    $0x1,%eax
L30:
  movsd  -0x8(%r12,%rax,8),%xmm0
  mulsd  (%rbx,%rdx,1),%xmm0
  movsd  -0x8(%r12,%rdx,1),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  movsd  -0x8(%r12,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  movsd  -0x8(%r12,%rdx,1),%xmm1
  mulsd  (%rbx,%rdx,1),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rdx,1)
  add    $0x1,%rax
  sub    $0x8,%rdx
  cmp    %rcx,%rax
  jne    L30
  test   %r15d,%r15d
  je     L85
L61:
  movslq %r14d,%r14
  lea    -0x8(,%r14,8),%rdx
  mov    $0x1,%eax
L53:
  movsd  0x0(%rbp,%rax,8),%xmm0
  addsd  0x0(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  movsd  0x0(%rbp,%rax,8),%xmm0
  subsd  0x0(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rdx,1)
  add    $0x1,%rax
  sub    $0x8,%rdx
  cmp    %eax,%r13d
  jg     L53
L21:
  movsd  (%rbx),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L40:
  test   %r15d,%r15d
  jne    L21
  movslq %r13d,%rax
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rdx
  movsd  (%rdx),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x8(%r12,%rax,1),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L21
L85:
  movslq %r13d,%rax
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rdx
  movsd  (%rdx),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x8(%r12,%rax,1),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L61
L22:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <__ogg_fdrfftb@plt>
  cmp    $0x1,%r13d
  jg     L0
  jmp    L21
```

assistant: ```c
void dcsqb1(int n, double *x, double *w, double *xh, int *ifac) {
  int modn, i, k, kc;
  int np2, ns2;
  double xim1;
  ns2 = (n + 1) >> 1;
  np2 = n;
  for (i = 2; i < n; i += 2) {
    xim1 = x[i - 1] + x[i];
    x[i] -= x[i - 1];
    x[i - 1] = xim1;
  }
  x[0] += x[0];
  modn = n % 2;
  if (modn == 0)
    x[n - 1] += x[n - 1];
  __ogg_fdrfftb(n, x, xh, ifac);
  kc = np2;
  for (k = 1; k < ns2; k++) {
    kc--;
    xh[k] = w[k - 1] * x[kc] + w[kc - 1] * x[k];
    xh[kc] = w[k - 1] * x[k] - w[kc - 1] * x[kc];
  }
  if (modn == 0)
    x[ns2] = w[ns2 - 1] * (x[ns2] + x[ns2]);
  kc = np2;
  for (k = 1; k < ns2; k++) {
    kc--;
    x[k] = xh[k] + xh[kc];
    x[kc] = xh[k] - xh[kc];
  }
  x[0] += x[0];
}
```