user: Converte this assembly snippet into its equivalent C code:

```asm
<dcsqb1>:
  endbr64
  push   %r15
  push   %r14
  lea    0x1(%rdi),%r14d
  push   %r13
  sar    %r14d
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  mov    %r8,%rcx
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  cmp    $0x2,%edi
  jle    L57
  lea    -0x3(%rdi),%edx
  lea    0x8(%rsi),%rax
  shr    %edx
  shl    $0x4,%rdx
  lea    0x18(%rsi,%rdx,1),%rdx
  nopl   0x0(%rax)
L60:
  movsd  0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  add    $0x10,%rax
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  addsd  %xmm1,%xmm0
  movsd  %xmm2,-0x8(%rax)
  movsd  %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L60
L57:
  movsd  (%rbx),%xmm0
  mov    %edi,%r12d
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rbx)
  and    $0x1,%r12d
  jne    L28
  movslq %edi,%r15
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  lea    -0x8(%rbx,%r15,8),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  call   <__ogg_fdrfftb@plt>
  cmp    $0x1,%r14d
  jle    L25
L89:
  lea    -0x8(,%r15,8),%rdx
  movslq %r14d,%rcx
  mov    $0x1,%eax
  nopw   0x0(%rax,%rax,1)
L2:
  movsd  -0x8(%r13,%rax,8),%xmm0
  movsd  -0x8(%r13,%rdx,1),%xmm1
  mulsd  (%rbx,%rdx,1),%xmm0
  mulsd  (%rbx,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  movsd  -0x8(%r13,%rax,8),%xmm0
  movsd  -0x8(%r13,%rdx,1),%xmm1
  mulsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  mulsd  (%rbx,%rdx,1),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rdx,1)
  sub    $0x8,%rdx
  cmp    %rax,%rcx
  jne    L2
  test   %r12d,%r12d
  je     L95
L98:
  lea    -0x8(,%r15,8),%rdx
  mov    $0x1,%eax
  nopw   0x0(%rax,%rax,1)
L14:
  movsd  0x0(%rbp,%rax,8),%xmm0
  addsd  0x0(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  movsd  0x0(%rbp,%rax,8),%xmm0
  add    $0x1,%rax
  subsd  0x0(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rdx,1)
  sub    $0x8,%rdx
  cmp    %eax,%r14d
  jg     L14
L66:
  movsd  (%rbx),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %edi,0xc(%rsp)
  call   <__ogg_fdrfftb@plt>
  movslq 0xc(%rsp),%r15
  cmp    $0x1,%r14d
  jg     L89
  jmp    L66
L95:
  shl    $0x3,%rcx
  lea    (%rbx,%rcx,1),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x8(%r13,%rcx,1),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L98
L25:
  movslq %r14d,%rax
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rdx
  movsd  (%rdx),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x8(%r13,%rax,1),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L66
```

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];
}
```