user: Translate the below assembly code into C programming language:

```asm
<dctsub>:
  endbr64
  mov    %edx,%eax
  push   %r15
  mov    %rsi,%r8
  mov    %edx,%esi
  push   %r14
  cltd
  idiv   %edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sar    %ebx
  cmp    $0x3,%edi
  jle    L15
  movslq %eax,%rdx
  xor    %r13d,%r13d
  mov    %rdx,%r10
  movslq %esi,%rdx
  sub    %r10,%rdx
  mov    %r10,-0x58(%rsp)
  lea    -0x1(%rbx),%r10d
  lea    0x0(,%rdx,8),%r15
  mov    %eax,%edx
  lea    -0x1(%r10),%r9
  mov    %r10,%r14
  neg    %edx
  mov    %r15,-0x40(%rsp)
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%r11
  mov    %r13,%rdx
  mov    %r11,-0x10(%rsp)
  imul   %r9,%r11
  test   %eax,%eax
  cmovle %r11,%rdx
  neg    %r10
  shl    $0x3,%r10
  add    %r15,%rdx
  lea    (%rcx,%rdx,1),%rbp
  mov    %rbp,-0x48(%rsp)
  movslq %edi,%rbp
  shl    $0x3,%rbp
  test   %eax,%eax
  cmovle %r13,%r11
  lea    (%r10,%rbp,1),%r12
  lea    (%r8,%r12,1),%rdx
  add    %r15,%r11
  mov    %r8,%r15
  mov    %rdx,-0x28(%rsp)
  lea    -0x8(%r8,%rbp,1),%rdx
  sub    %r10,%r15
  mov    -0x58(%rsp),%r10
  add    %rcx,%r11
  mov    %rdx,-0x50(%rsp)
  mov    %r15,-0x38(%rsp)
  mov    %r13,%r15
  lea    0x8(%r8),%rdx
  shl    $0x3,%r10
  imul   %r10,%r9
  test   %eax,%eax
  cmovns %r9,%r15
  add    %r10,%r15
  add    %rcx,%r15
  test   %eax,%eax
  cmovns %r13,%r9
  mov    %r15,-0x20(%rsp)
  add    %r10,%r9
  lea    (%r9,%rcx,1),%r13
  mov    %r13,-0x30(%rsp)
  lea    (%r8,%rbp,1),%r13
  mov    %r13,%r9
  mov    %r13,-0x18(%rsp)
  mov    %ebx,%r13d
  shl    $0x3,%r13
  cmp    %r12,%r13
  setle  %r12b
  cmp    %r9,%rdx
  mov    -0x28(%rsp),%r9
  setae  %r13b
  or     %r12d,%r13d
  cmp    $0x2,%ebx
  setne  %r12b
  and    %r12d,%r13d
  cmp    -0x50(%rsp),%r11
  seta   %r12b
  cmp    -0x48(%rsp),%r9
  seta   %r15b
  or     %r15d,%r12d
  and    %r12d,%r13d
  cmp    %rdx,-0x48(%rsp)
  mov    %r13d,%r15d
  setb   %r13b
  cmp    -0x38(%rsp),%r11
  seta   %r12b
  or     %r13d,%r12d
  mov    -0x30(%rsp),%r13
  and    %r15d,%r12d
  mov    -0x20(%rsp),%r15
  cmp    %r15,%r9
  seta   %r11b
  cmp    %r13,-0x50(%rsp)
  setb   %r13b
  or     %r13d,%r11d
  test   %r11b,%r12b
  je     L42
  cmp    %r15,%rdx
  mov    -0x30(%rsp),%r9
  seta   %r11b
  cmp    %r9,-0x38(%rsp)
  setb   %r9b
  or     %r11b,%r9b
  je     L42
  mov    %r14d,%r15d
  mov    -0x58(%rsp),%r11
  mov    -0x40(%rsp),%r13
  mov    %r10,%r12
  shr    %r15d
  lea    (%rcx,%r10,1),%r9
  lea    -0x10(%r8,%rbp,1),%rbp
  neg    %r12
  sub    $0x1,%r15d
  shl    $0x4,%r11
  add    %rcx,%r13
  shl    $0x4,%r15
  lea    0x18(%r8,%r15,1),%r15
  xchg   %ax,%ax
L45:
  movsd  (%r9),%xmm0
  movupd (%rdx),%xmm7
  add    $0x10,%rdx
  sub    $0x10,%rbp
  movsd  0x0(%r13),%xmm1
  movupd 0x10(%rbp),%xmm3
  movhpd (%r9,%r10,1),%xmm0
  add    %r11,%r9
  movhpd 0x0(%r13,%r12,1),%xmm1
  movapd %xmm0,%xmm2
  shufpd $0x1,%xmm3,%xmm3
  sub    %r11,%r13
  subpd  %xmm1,%xmm2
  addpd  %xmm1,%xmm0
  movupd -0x10(%rdx),%xmm1
  mulpd  %xmm0,%xmm1
  movapd %xmm2,%xmm4
  mulpd  %xmm3,%xmm0
  mulpd  %xmm7,%xmm2
  mulpd  %xmm3,%xmm4
  addpd  %xmm0,%xmm2
  subpd  %xmm4,%xmm1
  movups %xmm2,-0x10(%rdx)
  shufpd $0x1,%xmm1,%xmm1
  movups %xmm1,0x10(%rbp)
  cmp    %r15,%rdx
  jne    L45
  mov    %r14d,%edx
  or     $0x1,%edx
  and    $0x1,%r14d
  je     L15
  imul   %edx,%eax
  sub    %edx,%edi
  movslq %edi,%rdi
  movslq %eax,%r9
  sub    %eax,%esi
  movslq %edx,%rax
  movsd  (%rcx,%r9,8),%xmm0
  movslq %esi,%rsi
  movsd  (%rcx,%rsi,8),%xmm2
  lea    (%r8,%rax,8),%rsi
  lea    (%r8,%rdi,8),%rax
  movapd %xmm0,%xmm1
  movsd  (%rsi),%xmm4
  movsd  (%rax),%xmm3
  addsd  %xmm2,%xmm0
  subsd  %xmm2,%xmm1
  movapd %xmm0,%xmm5
  movapd %xmm1,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  %xmm3,%xmm5
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm2
  subsd  %xmm1,%xmm0
  movsd  %xmm2,(%rsi)
  movsd  %xmm0,(%rax)
L15:
  movslq %ebx,%rbx
  lea    (%r8,%rbx,8),%rax
  movsd  (%rax),%xmm0
  mulsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L42:
  mov    -0x40(%rsp),%rsi
  lea    -0x2(%rbx),%r9d
  mov    -0x18(%rsp),%rax
  lea    (%rcx,%r10,1),%rdi
  mov    -0x10(%rsp),%r11
  lea    0x10(%r8,%r9,8),%r9
  add    %rcx,%rsi
  nop
L23:
  movsd  (%rdi),%xmm0
  movsd  (%rsi),%xmm2
  add    $0x8,%rdx
  add    %r10,%rdi
  movsd  -0x8(%rax),%xmm3
  movsd  -0x8(%rdx),%xmm4
  add    %r11,%rsi
  sub    $0x8,%rax
  movapd %xmm0,%xmm1
  addsd  %xmm2,%xmm0
  subsd  %xmm2,%xmm1
  movapd %xmm0,%xmm5
  mulsd  %xmm3,%xmm5
  movapd %xmm1,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm2
  subsd  %xmm1,%xmm0
  movsd  %xmm2,-0x8(%rdx)
  movsd  %xmm0,(%rax)
  cmp    %rdx,%r9
  jne    L23
  jmp    L15
```

assistant: ```c
void dctsub(int n, double *a, int nc, double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr;
  m = n >> 1;
  ks = nc / n;
  kk = 0;
  for (j = 1; j < m; j++) {
    k = n - j;
    kk += ks;
    wkr = c[kk] - c[nc - kk];
    wki = c[kk] + c[nc - kk];
    xr = wki * a[j] - wkr * a[k];
    a[j] = wkr * a[j] + wki * a[k];
    a[k] = xr;
  }
  a[m] *= c[0];
}
```