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

```asm
<Forward_SO3_Naive>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %rdx,-0xa8(%rbp)
  mov    %rcx,-0xb0(%rbp)
  mov    %r8,-0xb8(%rbp)
  mov    %r9,-0xc0(%rbp)
  mov    -0x94(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x78(%rbp)
  mov    -0xc0(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  imul   -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  imul   -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  imul   -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0xb0(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0xb8(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x94(%rbp),%eax
  imul   -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <SinEvalPts@plt>
  mov    -0x30(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <CosEvalPts@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <SinEvalPts2@plt>
  mov    -0x20(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <CosEvalPts2@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x94(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <makeweights2@plt>
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edi
  mov    -0x78(%rbp),%r8d
  mov    -0x58(%rbp),%rcx
  mov    -0x60(%rbp),%rdx
  mov    -0xa8(%rbp),%rsi
  mov    -0xa0(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <grid_invfourier_so3@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%ecx
  mov    -0x70(%rbp),%rsi
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <transpose_so3@plt>
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%ecx
  mov    -0x68(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <transpose_so3@plt>
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edi
  mov    -0x78(%rbp),%r8d
  mov    -0x58(%rbp),%rcx
  mov    -0x60(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <grid_invfourier_so3@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%ecx
  mov    -0x70(%rbp),%rsi
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <transpose_so3@plt>
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%ecx
  mov    -0x68(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <transpose_so3@plt>
  movl   $0x0,-0x80(%rbp)
  jmp    L47
L37:
  movl   $0x0,-0x7c(%rbp)
  jmp    L106
L97:
  mov    -0x28(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  push   -0x18(%rbp)
  push   -0x20(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <genWig_L2@plt>
  add    $0x20,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x70(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb0(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x68(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb8(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb0(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb8(%rbp)
  addl   $0x1,-0x7c(%rbp)
L106:
  mov    -0x7c(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L97
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    $0x1,%eax
  sub    -0x94(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L129
L128:
  mov    -0x28(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  push   -0x18(%rbp)
  push   -0x20(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <genWig_L2@plt>
  add    $0x20,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x70(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb0(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x68(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb8(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb0(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb8(%rbp)
  addl   $0x1,-0x7c(%rbp)
L129:
  cmpl   $0x0,-0x7c(%rbp)
  js     L128
  addl   $0x1,-0x80(%rbp)
L47:
  mov    -0x80(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L37
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    $0x1,%eax
  sub    -0x94(%rbp),%eax
  mov    %eax,-0x80(%rbp)
  jmp    L34
L127:
  movl   $0x0,-0x7c(%rbp)
  jmp    L27
L30:
  mov    -0x28(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  push   -0x18(%rbp)
  push   -0x20(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <genWig_L2@plt>
  add    $0x20,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x70(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb0(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x68(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb8(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb0(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb8(%rbp)
  addl   $0x1,-0x7c(%rbp)
L27:
  mov    -0x7c(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L30
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    $0x1,%eax
  sub    -0x94(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L11
L38:
  mov    -0x28(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x10(%rbp)
  push   -0x18(%rbp)
  push   -0x20(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <genWig_L2@plt>
  add    $0x20,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x70(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb0(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x40(%rbp),%r8
  mov    -0x18(%rbp),%rdi
  mov    -0x68(%rbp),%rcx
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x80(%rbp),%eax
  push   -0x10(%rbp)
  push   -0xb8(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <wigNaiveAnalysis@plt>
  add    $0x10,%rsp
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x68(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb0(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x7c(%rbp),%ecx
  mov    -0x80(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <howMany_so3@plt>
  cltq
  shl    $0x3,%rax
  add    %rax,-0xb8(%rbp)
  addl   $0x1,-0x7c(%rbp)
L11:
  cmpl   $0x0,-0x7c(%rbp)
  js     L38
  addl   $0x1,-0x80(%rbp)
L34:
  cmpl   $0x0,-0x80(%rbp)
  js     L127
  mov    -0x94(%rbp),%eax
  mov    %eax,%edi
  call   <totalCoeffs_so3@plt>
  mov    %eax,-0x74(%rbp)
  mov    -0x94(%rbp),%eax
  imul   -0x78(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D2(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x84(%rbp)
  jmp    L79
L39:
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x84(%rbp)
L79:
  mov    -0x84(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L39
  nop
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D2
type: f64

tool: D2: 3.141592653589793

assistant: ```c
void Forward_SO3_Naive(int bw, double *rdata, double *idata, double *rcoeffs, double *icoeffs, double *workspace1, double *workspace2) {
  int j, n;
  int m1, m2;
  double *t1r, *t1i, *t2r, *t2i;
  double *sinPts, *cosPts, *sinPts2, *cosPts2;
  double *wigners, *scratch;
  double *weights;
  double *rcoeffsPtr, *icoeffsPtr;
  double scalar;
  int tmpInt;
  n = 2 * bw;
  t1r = workspace1;
  t1i = workspace1 + (n * n * n);
  t2r = t1i + (n * n * n);
  t2i = t2r + (n * n * n);
  rcoeffsPtr = rcoeffs;
  icoeffsPtr = icoeffs;
  weights = workspace2;
  sinPts = weights + n;
  cosPts = sinPts + n;
  sinPts2 = cosPts + n;
  cosPts2 = sinPts2 + n;
  wigners = cosPts2 + n;
  scratch = wigners + (bw * n);
  SinEvalPts(n, sinPts);
  CosEvalPts(n, cosPts);
  SinEvalPts2(n, sinPts2);
  CosEvalPts2(n, cosPts2);
  makeweights2(bw, weights);
  grid_invfourier_so3(rdata, idata, t1r, t1i, n * n, n, scratch);
  transpose_so3(t1r, t2r, n * n, n);
  transpose_so3(t1i, t2i, n * n, n);
  grid_invfourier_so3(t2r, t2i, t1r, t1i, n * n, n, scratch);
  transpose_so3(t1r, t2r, n * n, n);
  transpose_so3(t1i, t2i, n * n, n);
  for (m1 = 0; m1 < bw; m1++) {
    for (m2 = 0; m2 < bw; m2++) {
      genWig_L2(m1, m2, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2r, wigners, weights, rcoeffs, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2i, wigners, weights, icoeffs, scratch);
      t2r += n;
      t2i += n;
      rcoeffs += howMany_so3(m1, m2, bw);
      icoeffs += howMany_so3(m1, m2, bw);
    }
    t2r += n;
    t2i += n;
    for (m2 = -(bw - 1); m2 < 0; m2++) {
      genWig_L2(m1, m2, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2r, wigners, weights, rcoeffs, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2i, wigners, weights, icoeffs, scratch);
      t2r += n;
      t2i += n;
      rcoeffs += howMany_so3(m1, m2, bw);
      icoeffs += howMany_so3(m1, m2, bw);
    }
  }
  t2r += n * n;
  t2i += n * n;
  for (m1 = -(bw - 1); m1 < 0; m1++) {
    for (m2 = 0; m2 < bw; m2++) {
      genWig_L2(m1, m2, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2r, wigners, weights, rcoeffs, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2i, wigners, weights, icoeffs, scratch);
      t2r += n;
      t2i += n;
      rcoeffs += howMany_so3(m1, m2, bw);
      icoeffs += howMany_so3(m1, m2, bw);
    }
    t2r += n;
    t2i += n;
    for (m2 = -(bw - 1); m2 < 0; m2++) {
      genWig_L2(m1, m2, bw, sinPts, cosPts, sinPts2, cosPts2, wigners, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2r, wigners, weights, rcoeffs, scratch);
      wigNaiveAnalysis(m1, m2, bw, t2i, wigners, weights, icoeffs, scratch);
      t2r += n;
      t2i += n;
      rcoeffs += howMany_so3(m1, m2, bw);
      icoeffs += howMany_so3(m1, m2, bw);
    }
  }
  tmpInt = totalCoeffs_so3(bw);
  scalar = 3.14159265358979323846 / ((double)(bw * n));
  for (j = 0; j < tmpInt; j++) {
    rcoeffsPtr[j] *= scalar;
    icoeffsPtr[j] *= scalar;
  }
}
```