user: 请将以下的汇编代码转换成C语言代码：

```asm
<genWigAllTrans>:
  endbr64
  push   %r15
  mov    %edi,%r15d
  add    %edi,%edi
  movslq %edi,%rax
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  lea    0x0(,%rax,8),%rdx
  lea    (%r12,%rdx,1),%r13
  push   %rbp
  mov    %edi,%ebp
  lea    0x0(%r13,%rdx,1),%r14
  push   %rbx
  mov    %rsi,%rbx
  lea    (%r14,%rdx,1),%rax
  mov    %rax,%rsi
  sub    $0x48,%rsp
  add    %rdx,%rsi
  mov    %rsi,0x18(%rsp)
  mov    %r12,%rsi
  mov    %rdx,0x8(%rsp)
  mov    %edi,0x30(%rsp)
  mov    %rax,0x10(%rsp)
  call   <SinEvalPts@plt>
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <CosEvalPts@plt>
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <SinEvalPts2@plt>
  mov    0x10(%rsp),%rsi
  mov    %ebp,%edi
  call   <CosEvalPts2@plt>
  sub    $0x8,%rsp
  mov    %r15d,%edx
  mov    %r14,%r9
  push   0x20(%rsp)
  mov    %r13,%r8
  mov    %r12,%rcx
  xor    %esi,%esi
  push   %rbx
  xor    %edi,%edi
  push   0x28(%rsp)
  call   <genWigTrans_L2@plt>
  mov    %ebp,%eax
  add    $0x20,%rsp
  imul   %r15d,%eax
  movslq %eax,%rdx
  lea    (%rbx,%rdx,8),%rbx
  cmp    $0x1,%r15d
  jle    L45
  sub    %ebp,%eax
  mov    $0x1,%ebp
  mov    %r14,%r9
  mov    %r12,%r14
  mov    %eax,0x34(%rsp)
  cltq
  mov    %ebp,%r12d
  mov    %rbx,%rbp
  shl    $0x3,%rax
  mov    %r15d,%ebx
  mov    %rax,0x28(%rsp)
  mov    %rax,%r15
  nopl   (%rax)
L66:
  sub    $0x8,%rsp
  mov    %r12d,%esi
  mov    %r12d,%edi
  mov    %r13,%r8
  push   0x20(%rsp)
  mov    %r14,%rcx
  mov    %ebx,%edx
  push   %rbp
  add    %r15,%rbp
  push   0x28(%rsp)
  mov    %r9,0x40(%rsp)
  call   <genWigTrans_L2@plt>
  mov    %r12d,%eax
  add    $0x1,%r12d
  sub    0x28(%rsp),%r15
  add    $0x20,%rsp
  cmp    %r12d,%ebx
  mov    0x20(%rsp),%r9
  jne    L66
  mov    $0x1,%r15d
  mov    %rbp,%rbx
  mov    %eax,0x20(%rsp)
  mov    %r12d,%ebp
  mov    %ebp,%r12d
  mov    %r15d,%ebp
  mov    0x28(%rsp),%r15
  nopl   (%rax)
L31:
  sub    $0x8,%rsp
  xor    %esi,%esi
  mov    %ebp,%edi
  mov    %r13,%r8
  push   0x20(%rsp)
  mov    %r14,%rcx
  mov    %r12d,%edx
  push   %rbx
  add    %r15,%rbx
  push   0x28(%rsp)
  mov    %r9,0x48(%rsp)
  call   <genWigTrans_L2@plt>
  sub    0x28(%rsp),%r15
  add    $0x20,%rsp
  mov    %ebp,%eax
  add    $0x1,%ebp
  cmp    %eax,0x20(%rsp)
  mov    0x28(%rsp),%r9
  jne    L31
  mov    %r12d,%ebp
  cmp    $0x2,%ebp
  je     L45
  mov    0x34(%rsp),%eax
  sub    0x30(%rsp),%eax
  mov    %ebp,0x30(%rsp)
  cltq
  movl   $0x2,0x34(%rsp)
  mov    0x34(%rsp),%r12d
  shl    $0x3,%rax
  mov    %rax,0x38(%rsp)
L2:
  lea    -0x1(%r12),%ebp
  mov    0x38(%rsp),%r15
  mov    %ebp,0x28(%rsp)
  mov    %r9,%rbp
  nopl   0x0(%rax)
L17:
  sub    $0x8,%rsp
  mov    %r12d,%esi
  mov    %rbp,%r9
  mov    %r13,%r8
  push   0x20(%rsp)
  mov    %r14,%rcx
  push   %rbx
  add    %r15,%rbx
  push   0x28(%rsp)
  mov    0x50(%rsp),%edx
  mov    0x48(%rsp),%edi
  call   <genWigTrans_L2@plt>
  sub    0x28(%rsp),%r15
  add    $0x20,%rsp
  mov    %r12d,%eax
  add    $0x1,%r12d
  cmp    %eax,0x20(%rsp)
  jg     L17
  mov    0x34(%rsp),%edx
  mov    0x8(%rsp),%rdi
  mov    %rbp,%r9
  sub    %rdi,0x38(%rsp)
  lea    0x1(%rdx),%eax
  cmp    %edx,0x20(%rsp)
  je     L45
  mov    %eax,0x34(%rsp)
  mov    %eax,%r12d
  jmp    L2
  nopw   0x0(%rax,%rax,1)
L45:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void genWigAllTrans(int bw, double *wigners, double *workspace) {
  int m1, m2, n;
  double *sinPts, *cosPts;
  double *sinPts2, *cosPts2;
  double *scratch;
  n = 2 * bw;
  sinPts = workspace;
  cosPts = sinPts + n;
  sinPts2 = cosPts + n;
  cosPts2 = sinPts2 + n;
  scratch = cosPts2 + n;
  SinEvalPts(n, sinPts);
  CosEvalPts(n, cosPts);
  SinEvalPts2(n, sinPts2);
  CosEvalPts2(n, cosPts2);
  genWigTrans_L2(0, 0, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
  wigners += bw * n;
  for (m1 = 1; m1 < bw; m1++) {
    genWigTrans_L2(m1, m1, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
    wigners += n * (bw - m1);
  }
  for (m1 = 1; m1 < bw; m1++) {
    genWigTrans_L2(m1, 0, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
    wigners += n * (bw - m1);
  }
  for (m1 = 1; m1 < bw; m1++)
    for (m2 = m1 + 1; m2 < bw; m2++) {
      genWigTrans_L2(m1, m2, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
      wigners += n * (bw - m2);
    }
}
```