user: Demonstrate the C code that generates the assembly output below:

```asm
<cosqb1>:
  endbr64
  lea    0x1(%rdi),%eax
  push   %r15
  push   %r14
  mov    %eax,%r14d
  push   %r13
  shr    $0x1f,%r14d
  mov    %rdx,%r13
  push   %r12
  add    %eax,%r14d
  push   %rbp
  sar    %r14d
  mov    %rcx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  cmp    $0x2,%edi
  jle    L45
  lea    -0x3(%rdi),%edx
  lea    0x8(%rsi),%rax
  shr    %edx
  shl    $0x4,%rdx
  lea    0x18(%rsi,%rdx,1),%rdx
  nopw   0x0(%rax,%rax,1)
L14:
  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    L14
L45:
  movsd  (%rbx),%xmm0
  mov    %edi,%r12d
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rbx)
  and    $0x1,%r12d
  jne    L70
  movslq %edi,%r15
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %edi,0xc(%rsp)
  lea    -0x8(%rbx,%r15,8),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  call   <rfftb@plt>
  mov    0xc(%rsp),%edi
  cmp    $0x2,%edi
  jle    L50
L8:
  lea    -0x8(,%r15,8),%rdx
  mov    $0x1,%eax
  cs nopw 0x0(%rax,%rax,1)
L87:
  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    %eax,%r14d
  jg     L87
  test   %r12d,%r12d
  je     L64
L18:
  lea    -0x8(,%r15,8),%rdx
  mov    $0x1,%eax
  nopw   0x0(%rax,%rax,1)
L22:
  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     L22
L2:
  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)
L70:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %edi,0xc(%rsp)
  call   <rfftb@plt>
  movslq 0xc(%rsp),%r15
  cmp    $0x2,%r15d
  jg     L8
  jmp    L2
L64:
  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    L18
L50:
  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    L2
```

assistant: ```c
void cosqb1(int n, double x[], double w[], double xh[]) {
  int modn, i, k;
  int kc, ns2;
  double xim1;
  ns2 = (n + 1) / 2;
  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];
  rfftb(n, x, xh);
  for (k = 1; k < ns2; k++) {
    kc = n - k;
    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]);
  for (k = 1; k < ns2; k++) {
    kc = n - k;
    x[k] = xh[k] + xh[kc];
    x[kc] = xh[k] - xh[kc];
  }
  x[0] += x[0];
}
```