user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rotateFct>:
  endbr64
  push   %r15
  mov    %rcx,%r10
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x68,%rsp
  mov    0xa0(%rsp),%rax
  mov    %edx,0x4(%rsp)
  mov    %edi,%edx
  imul   %edi,%edx
  mov    0xa8(%rsp),%r14
  mov    %r8,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  mov    0xb0(%rsp),%rax
  mov    %r9,0x10(%rsp)
  mov    %rax,0x28(%rsp)
  mov    0xb8(%rsp),%rax
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rsi
  movsd  %xmm0,0x20(%rsp)
  mov    %rax,0x30(%rsp)
  mov    %ebx,%eax
  lea    (%r14,%rsi,1),%rcx
  imul   %ebx,%eax
  lea    (%rcx,%rsi,1),%r15
  movslq %eax,%rdi
  lea    0x0(,%rdi,8),%r12
  lea    (%r15,%r12,1),%r13
  add    %r13,%r12
  test   %eax,%eax
  je     L45
  lea    -0x1(%rax),%r8d
  lea    0x1(%rdx,%r8,1),%r9
  lea    (%rsi,%r9,8),%r11
  lea    (%rdx,%rdi,1),%r9
  lea    (%rsi,%r9,8),%r9
  cmp    %r9,%r11
  jle    L29
  lea    0x1(%rdx,%rdi,1),%rdi
  shl    $0x4,%rdx
  add    %r8,%rdi
  lea    (%rsi,%rdi,8),%rsi
  cmp    %rdx,%rsi
  jg     L21
L29:
  mov    %eax,%eax
  xor    %esi,%esi
  mov    %r15,%rdi
  mov    %r10,0x48(%rsp)
  lea    0x0(,%rax,8),%rdx
  mov    %rcx,0x40(%rsp)
  movsd  %xmm2,0x58(%rsp)
  movsd  %xmm1,0x50(%rsp)
  mov    %rdx,0x38(%rsp)
  call   <memset@plt>
  mov    0x38(%rsp),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    0x40(%rsp),%rcx
  mov    0x48(%rsp),%r10
  movsd  0x50(%rsp),%xmm1
  movsd  0x58(%rsp),%xmm2
L45:
  movsd  %xmm2,0x40(%rsp)
  sub    $0x8,%rsp
  mov    %r14,%rdx
  mov    %r10,%rdi
  movsd  %xmm1,0x40(%rsp)
  lea    0x0(%rbp,%rbp,1),%r8d
  push   %rbp
  push   $0x1
  push   %r12
  mov    0x48(%rsp),%r9
  mov    0x28(%rsp),%rsi
  mov    %rcx,0x48(%rsp)
  call   <FST_semi_memo@plt>
  add    $0x20,%rsp
  mov    %r15,%r9
  mov    %r14,%rcx
  push   %r12
  mov    %ebx,%esi
  mov    %ebp,%edi
  push   %r13
  mov    0x38(%rsp),%r8
  mov    0x14(%rsp),%edx
  movsd  0x50(%rsp),%xmm2
  movsd  0x48(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm0
  call   <rotateCoefAll@plt>
  mov    0x40(%rsp),%r9
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %ebx,0xc0(%rsp)
  mov    0x28(%rsp),%rcx
  lea    (%rbx,%rbx,1),%r8d
  mov    %r12,0xb0(%rsp)
  mov    0x20(%rsp),%rdx
  movl   $0x1,0xb8(%rsp)
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <InvFST_semi_memo@plt>
L21:
  mov    %eax,%eax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L25:
  movq   $0x0,(%r15,%rdx,8)
  movq   $0x0,0x0(%r13,%rdx,8)
  add    $0x1,%rdx
  cmp    %rdx,%rax
  jne    L25
  jmp    L45
```

assistant: ```c
void rotateFct(int bwIn, int bwOut, int degOut, double *sigInR, double *sigInI, double *sigOutR, double *sigOutI, double alpha, double beta, double gamma, double *scratch, double **spharmonic_pml_table, double **transpose_spharmonic_pml_table) {
  double *rcoeffs, *icoeffs, *workspace;
  double *coefOutR, *coefOutI;
  int i;
  rcoeffs = scratch;
  icoeffs = rcoeffs + (bwIn * bwIn);
  coefOutR = icoeffs + (bwIn * bwIn);
  coefOutI = coefOutR + (bwOut * bwOut);
  workspace = coefOutI + (bwOut * bwOut);
  for (i = 0; i < (bwOut * bwOut); i++) {
    coefOutR[i] = 0.;
    coefOutI[i] = 0.;
  }
  FST_semi_memo(sigInR, sigInI, rcoeffs, icoeffs, 2 * bwIn, spharmonic_pml_table, workspace, 1, bwIn);
  rotateCoefAll(bwIn, bwOut, degOut, alpha, beta, gamma, rcoeffs, icoeffs, coefOutR, coefOutI, workspace);
  InvFST_semi_memo(coefOutR, coefOutI, sigOutR, sigOutI, 2 * bwOut, transpose_spharmonic_pml_table, workspace, 1, bwOut);
}
```