user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<genWig_L2_U>:
  endbr64
  push   %r15
  mov    %edi,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  lea    0x0(,%rbx,8),%r13d
  sub    $0x88,%rsp
  mov    0xc8(%rsp),%rcx
  mov    0xc0(%rsp),%r11
  mov    %edx,0x24(%rsp)
  mov    %r13d,%edx
  mov    %r9,0x48(%rsp)
  mov    0xd0(%rsp),%r12
  mov    %rcx,0x30(%rsp)
  mov    0xd8(%rsp),%rcx
  mov    %r11,0x50(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %rcx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  neg    %r10d
  mov    %esi,%eax
  mov    %edi,0x40(%rsp)
  cmovs  %edi,%r10d
  neg    %eax
  mov    %rcx,%rdi
  mov    %esi,0x44(%rsp)
  cmovs  %esi,%eax
  cmp    %eax,%r10d
  cmovl  %eax,%r10d
  movslq %ebx,%rax
  xor    %esi,%esi
  shl    $0x3,%rax
  add    %rax,%rbp
  mov    %r10d,0x28(%rsp)
  lea    0x0(%rbp,%rax,1),%r14
  mov    %rax,0x38(%rsp)
  mov    %r14,0x8(%rsp)
  add    %rax,%r14
  lea    (%r14,%rax,1),%r15
  mov    %r15,0x10(%rsp)
  add    %rax,%r15
  call   <memset@plt>
  mov    0x30(%rsp),%rcx
  mov    %rbp,%r9
  mov    %ebx,%r8d
  mov    0x50(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    0x40(%rsp),%edi
  call   <wigSpec_L2@plt>
  mov    %r13d,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  mov    0x24(%rsp),%eax
  mov    0x28(%rsp),%r10d
  sub    %r10d,%eax
  cmp    $0x1,%eax
  jle    L6
  lea    -0x1(%r10,%rax,1),%eax
  add    0x38(%rsp),%r12
  lea    0x70(%rsp),%r9
  mov    %eax,0x50(%rsp)
  lea    0x60(%rsp),%rax
  lea    0x68(%rsp),%r8
  mov    %rax,0x58(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L21:
  mov    0x44(%rsp),%edx
  mov    0x40(%rsp),%esi
  mov    %r10d,%edi
  mov    %r9,0x30(%rsp)
  mov    0x58(%rsp),%rcx
  mov    %r8,0x28(%rsp)
  mov    %r10d,0x24(%rsp)
  call   <L2_3term_so3@plt>
  mov    0x8(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  mov    %ebx,%edx
  movsd  0x60(%rsp),%xmm0
  call   <vec_mul_so3@plt>
  mov    0x48(%rsp),%rdi
  mov    %ebx,%edx
  mov    %r14,%rsi
  movsd  0x70(%rsp),%xmm0
  call   <vec_add_scalar_so3@plt>
  movsd  0x68(%rsp),%xmm0
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <vec_mul_inplace_so3@plt>
  mov    0x10(%rsp),%rdx
  mov    %ebx,%ecx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <vec_pt_mul_so3@plt>
  mov    0x10(%rsp),%rsi
  mov    %ebx,%ecx
  mov    %r15,%rdx
  mov    0x8(%rsp),%rdi
  call   <vec_add_so3@plt>
  mov    %r12,%rdi
  mov    %r13d,%edx
  mov    %r15,%rsi
  call   <memcpy@plt>
  mov    0x18(%rsp),%rdi
  mov    %r13d,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  mov    %r13d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    0x24(%rsp),%r10d
  add    0x38(%rsp),%r12
  mov    0x28(%rsp),%r8
  mov    0x30(%rsp),%r9
  add    $0x1,%r10d
  cmp    0x50(%rsp),%r10d
  jne    L21
L6:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void genWig_L2_U(int m1, int m2, int bw, int n, double *sinEval, double *cosEval, double *sinEval2, double *cosEval2, double *result, double *workspace) {
  int i, lCtr, m;
  int tmpM1, tmpM2;
  double *prevprev, *prev;
  double *tmp0, *tmp1, *tmp2, *tmp3;
  double an, bn, cn;
  lCtr = 0;
  tmpM1 = ((m1) > 0 ? (m1) : (-m1));
  tmpM2 = ((m2) > 0 ? (m2) : (-m2));
  m = ((tmpM1) > (tmpM2) ? (tmpM1) : (tmpM2));
  prevprev = workspace;
  prev = prevprev + n;
  tmp0 = prev + n;
  tmp1 = tmp0 + n;
  tmp2 = tmp1 + n;
  tmp3 = tmp2 + n;
  memset(prevprev, 0, sizeof(double) * n);
  wigSpec_L2(m1, m2, sinEval2, cosEval2, n, prev);
  memcpy(result, prev, sizeof(double) * n);
  for (i = 0; i < bw - m - 1; i++) {
    L2_3term_so3(m + i, m1, m2, &an, &bn, &cn);
    vec_mul_so3(an, prevprev, tmp0, n);
    vec_add_scalar_so3(cn, cosEval, tmp1, n);
    vec_mul_inplace_so3(bn, tmp1, n);
    vec_pt_mul_so3(prev, tmp1, tmp2, n);
    vec_add_so3(tmp0, tmp2, tmp3, n);
    memcpy(result + (i + 1) * n, tmp3, sizeof(double) * n);
    memcpy(prevprev, prev, sizeof(double) * n);
    memcpy(prev, tmp3, sizeof(double) * n);
  }
}
```