#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ CosEvalPts(int, double *);
int /*<<< orphan*/ CosEvalPts2(int, double *);
int /*<<< orphan*/ SinEvalPts(int, double *);
int /*<<< orphan*/ SinEvalPts2(int, double *);
int /*<<< orphan*/ genWig_L2(int, int, int, double *, double *, double *,
                             double *, double *, double *);
int /*<<< orphan*/ grid_invfourier_so3(double *, double *, double *, double *,
                                       int, int, double *);
int /*<<< orphan*/ howMany_so3(int, int, int);
int /*<<< orphan*/ makeweights2(int, double *);
int totalCoeffs_so3(int);
int /*<<< orphan*/ transpose_so3(double *, double *, int, int);
int /*<<< orphan*/ wigNaiveAnalysis(int, int, int, double *, double *, double *,
                                    double *, double *);
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;
  }
}


x86 assembly (clang, -O0):
<Forward_SO3_Naive>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
movslq -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movslq -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
movslq -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x68(%rbp),%rsi
call   1080 <SinEvalPts@plt>
mov    -0x38(%rbp),%edi
mov    -0x70(%rbp),%rsi
call   10a0 <CosEvalPts@plt>
mov    -0x38(%rbp),%edi
mov    -0x78(%rbp),%rsi
call   1060 <SinEvalPts2@plt>
mov    -0x38(%rbp),%edi
mov    -0x80(%rbp),%rsi
call   1050 <CosEvalPts2@plt>
mov    -0x4(%rbp),%edi
mov    -0x98(%rbp),%rsi
call   1070 <makeweights2@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%r8d
imul   -0x38(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x90(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <grid_invfourier_so3@plt>
mov    -0x48(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x38(%rbp),%edx
imul   -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
call   10b0 <transpose_so3@plt>
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x38(%rbp),%edx
imul   -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
call   10b0 <transpose_so3@plt>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%r8d
imul   -0x38(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x90(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <grid_invfourier_so3@plt>
mov    -0x48(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x38(%rbp),%edx
imul   -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
call   10b0 <transpose_so3@plt>
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x38(%rbp),%edx
imul   -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
call   10b0 <transpose_so3@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    168e <Forward_SO3_Naive+0x4de>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    151c <Forward_SO3_Naive+0x36c>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <genWig_L2@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x60(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x28(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13f2 <Forward_SO3_Naive+0x242>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jge    167b <Forward_SO3_Naive+0x4cb>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <genWig_L2@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x60(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x28(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1553 <Forward_SO3_Naive+0x3a3>
jmp    1680 <Forward_SO3_Naive+0x4d0>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13df <Forward_SO3_Naive+0x22f>
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jge    197a <Forward_SO3_Naive+0x7ca>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1808 <Forward_SO3_Naive+0x658>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <genWig_L2@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x60(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x28(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    16de <Forward_SO3_Naive+0x52e>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jge    1967 <Forward_SO3_Naive+0x7b7>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <genWig_L2@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x60(%rbp),%rcx
mov    -0x88(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x28(%rbp),%r10
mov    -0x90(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <wigNaiveAnalysis@plt>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x4(%rbp),%edx
call   10c0 <howMany_so3@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    183f <Forward_SO3_Naive+0x68f>
jmp    196c <Forward_SO3_Naive+0x7bc>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    16cd <Forward_SO3_Naive+0x51d>
mov    -0x4(%rbp),%edi
call   10d0 <totalCoeffs_so3@plt>
mov    %eax,-0xb4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0x665(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xb4(%rbp),%eax
jge    1a05 <Forward_SO3_Naive+0x855>
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0xa0(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0xa8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    19ae <Forward_SO3_Naive+0x7fe>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Forward_SO3_Naive>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,0x80(%rsp)
mov    %rcx,0x78(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,(%rsp)
mov    0xe0(%rsp),%rsi
lea    (%rdi,%rdi,1),%eax
mov    %rdi,0x28(%rsp)
mov    %eax,%r12d
imul   %eax,%r12d
mov    %r12d,%ecx
imul   %eax,%ecx
movslq %ecx,%rcx
lea    (%r9,%rcx,8),%rdx
mov    %rdx,0x8(%rsp)
lea    (%rdx,%rcx,8),%rbp
lea    0x0(%rbp,%rcx,8),%rcx
mov    %rcx,0x30(%rsp)
movslq %eax,%r14
lea    (%rsi,%r14,8),%rsi
lea    (%rsi,%r14,8),%r15
mov    %r14d,%eax
imul   %edi,%eax
lea    (%r15,%r14,8),%r13
lea    0x0(,%r14,8),%rbx
add    %r13,%rbx
lea    (%rbx,%r14,8),%rcx
mov    %eax,0x8c(%rsp)
cltq
mov    %rcx,0x68(%rsp)
lea    (%rcx,%rax,8),%rax
mov    %rax,0x10(%rsp)
mov    %r14d,%edi
mov    %rsi,0x70(%rsp)
call   1080 <SinEvalPts@plt>
mov    %r14d,%edi
mov    %r15,0x58(%rsp)
mov    %r15,%rsi
mov    %rbp,%r15
mov    0x30(%rsp),%rbp
call   10a0 <CosEvalPts@plt>
mov    %r14d,%edi
mov    %r13,0x50(%rsp)
mov    %r13,%rsi
call   1060 <SinEvalPts2@plt>
mov    %r14d,%edi
mov    %rbx,0x48(%rsp)
mov    %rbx,%rsi
call   1050 <CosEvalPts2@plt>
mov    0x28(%rsp),%rdi
mov    0xe0(%rsp),%rsi
call   1070 <makeweights2@plt>
sub    $0x8,%rsp
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    0x40(%rsp),%rbx
mov    %rbx,%rdx
mov    0x10(%rsp),%r13
mov    %r13,%rcx
mov    %r12d,%r8d
mov    %r14d,%r9d
push   0x18(%rsp)
call   1030 <grid_invfourier_so3@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
call   10b0 <transpose_so3@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
call   10b0 <transpose_so3@plt>
sub    $0x8,%rsp
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    %r12d,%r8d
mov    %r14d,%r9d
push   0x18(%rsp)
call   1030 <grid_invfourier_so3@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
call   10b0 <transpose_so3@plt>
mov    %r13,%rdi
mov    0x28(%rsp),%rbx
mov    %rbp,%rsi
mov    %r12d,0x88(%rsp)
mov    %r12d,%edx
mov    %r14d,%ecx
call   10b0 <transpose_so3@plt>
mov    $0x1,%eax
sub    %ebx,%eax
mov    %eax,0x24(%rsp)
test   %ebx,%ebx
mov    %r14,0x90(%rsp)
jle    1620 <Forward_SO3_Naive+0x470>
lea    0x0(,%r14,8),%rsi
lea    (%r14,%r14,1),%rax
mov    %rax,0xa0(%rsp)
xor    %eax,%eax
mov    0x78(%rsp),%r10
mov    0x80(%rsp),%rbx
mov    %rsi,0x98(%rsp)
jmp    13d2 <Forward_SO3_Naive+0x222>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %rsi,%rbp
add    %rsi,%rdi
mov    %rbp,0x60(%rsp)
mov    %rdi,0x30(%rsp)
mov    %rcx,%rbx
mov    0x44(%rsp),%eax
add    $0x1,%eax
cmp    0x28(%rsp),%eax
mov    0x60(%rsp),%r15
mov    0x30(%rsp),%rbp
mov    (%rsp),%r10
je     162d <Forward_SO3_Naive+0x47d>
mov    %r10,(%rsp)
mov    %eax,0x44(%rsp)
mov    0xa0(%rsp),%rcx
lea    0x0(,%rcx,8),%rax
add    %rbp,%rax
lea    (%r15,%rcx,8),%rcx
mov    %rbp,%rdi
mov    %r15,%rbp
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
mov    %rbx,0x18(%rsp)
mov    %rbp,0x38(%rsp)
mov    %rdi,0x8(%rsp)
mov    %rax,0x30(%rsp)
mov    %rcx,0x60(%rsp)
sub    $0x8,%rsp
mov    0x4c(%rsp),%r14d
mov    %r14d,%edi
mov    %r15d,%esi
mov    0x30(%rsp),%r13
mov    %r13d,%edx
mov    0x78(%rsp),%rcx
mov    0x60(%rsp),%r8
mov    0x58(%rsp),%r9
mov    0x18(%rsp),%rbx
push   %rbx
mov    0x78(%rsp),%rbp
push   %rbp
push   0x60(%rsp)
call   1040 <genWig_L2@plt>
add    $0x20,%rsp
mov    %r14d,%edi
mov    %r15d,%esi
mov    %r13d,%edx
mov    0x38(%rsp),%rcx
mov    %rbp,%r8
mov    0xe0(%rsp),%r9
push   %rbx
mov    0x8(%rsp),%r12
push   %r12
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r14d,%edi
mov    %r15d,%esi
mov    %r13d,%edx
mov    0x8(%rsp),%rcx
mov    %rbp,%r8
mov    0xe0(%rsp),%r9
push   %rbx
mov    0x20(%rsp),%rbx
push   %rbx
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r14d,%edi
mov    %r15d,%esi
mov    %r13d,%edx
call   10c0 <howMany_so3@plt>
cltq
lea    (%r12,%rax,8),%r12
mov    %r12,(%rsp)
mov    0x60(%rsp),%r12
mov    %r14d,%edi
mov    %r15d,%esi
mov    %r13d,%edx
call   10c0 <howMany_so3@plt>
mov    0x30(%rsp),%r8
mov    0x38(%rsp),%rbp
mov    0x8(%rsp),%rdi
mov    0x98(%rsp),%rsi
cltq
lea    (%rbx,%rax,8),%rbx
add    $0x1,%r15d
add    %rsi,%rbp
add    %rsi,%rdi
lea    (%r8,%rsi,1),%rax
lea    (%r12,%rsi,1),%rcx
cmp    %r15d,%r13d
jne    1400 <Forward_SO3_Naive+0x250>
mov    %rbx,%rcx
mov    0x24(%rsp),%r12d
test   %r12d,%r12d
jns    13a0 <Forward_SO3_Naive+0x1f0>
mov    %rcx,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,0x18(%rsp)
sub    $0x8,%rsp
mov    0x4c(%rsp),%r15d
mov    %r15d,%edi
mov    %r12d,%esi
mov    0x30(%rsp),%rbx
mov    %ebx,%edx
mov    0x78(%rsp),%rcx
mov    0x60(%rsp),%r8
mov    0x58(%rsp),%r9
mov    0x18(%rsp),%rbp
push   %rbp
mov    0x78(%rsp),%r14
push   %r14
push   0x60(%rsp)
call   1040 <genWig_L2@plt>
add    $0x20,%rsp
mov    %r15d,%edi
mov    %r12d,%esi
mov    %ebx,%edx
mov    0x60(%rsp),%rcx
mov    %r14,%r8
mov    0xe0(%rsp),%r9
push   %rbp
mov    0x8(%rsp),%r13
push   %r13
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r15d,%edi
mov    %r12d,%esi
mov    %ebx,%edx
mov    0x30(%rsp),%rbp
mov    %rbp,%rcx
mov    %r14,%r8
mov    0x18(%rsp),%rbx
mov    0xe0(%rsp),%r9
push   0x10(%rsp)
push   %rbx
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r15d,%edi
mov    %r12d,%esi
mov    0x28(%rsp),%r14
mov    %r14d,%edx
call   10c0 <howMany_so3@plt>
cltq
lea    0x0(%r13,%rax,8),%r13
mov    %r13,(%rsp)
mov    %r15d,%edi
mov    %r12d,%esi
mov    %r14d,%edx
call   10c0 <howMany_so3@plt>
mov    0x98(%rsp),%rsi
cltq
lea    (%rbx,%rax,8),%rbx
add    %rsi,%rbp
mov    %rbp,0x30(%rsp)
add    %rsi,0x60(%rsp)
inc    %r12d
jne    1530 <Forward_SO3_Naive+0x380>
jmp    13b3 <Forward_SO3_Naive+0x203>
mov    0x80(%rsp),%rbx
mov    0x78(%rsp),%r10
cmpl   $0x0,0x24(%rsp)
mov    0x28(%rsp),%r12
jns    18a4 <Forward_SO3_Naive+0x6f4>
mov    %rbx,%r13
mov    0x88(%rsp),%eax
lea    0x0(,%rax,8),%rdx
add    %rbp,%rdx
lea    (%r15,%rax,8),%rsi
mov    0x90(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x38(%rsp)
mov    0x24(%rsp),%ebx
nop
test   %r12d,%r12d
mov    %rsi,0x8(%rsp)
mov    %r10,(%rsp)
jle    1780 <Forward_SO3_Naive+0x5d0>
mov    %rdx,%r15
xor    %ebp,%ebp
mov    0x58(%rsp),%r8
mov    0x50(%rsp),%r9
mov    0x48(%rsp),%r11
mov    0x10(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %r13,0x18(%rsp)
sub    $0x8,%rsp
mov    %ebx,%r13d
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12,%rbx
mov    %ebx,%edx
mov    0x78(%rsp),%rcx
push   %r14
mov    0x78(%rsp),%r14
push   %r14
push   %r11
call   1040 <genWig_L2@plt>
add    $0x20,%rsp
mov    %r13d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    0x8(%rsp),%rcx
mov    %r14,%r8
mov    0xe0(%rsp),%r9
push   0x10(%rsp)
mov    0x8(%rsp),%r12
push   %r12
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r13d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15,%rcx
mov    %r14,%r8
mov    0x10(%rsp),%r14
mov    0xe0(%rsp),%r9
push   %r14
push   0x20(%rsp)
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %r13d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <howMany_so3@plt>
cltq
lea    (%r12,%rax,8),%r12
mov    %r12,(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <howMany_so3@plt>
mov    0x48(%rsp),%r11
mov    0x50(%rsp),%r9
mov    0x58(%rsp),%r8
mov    %rbx,%r12
mov    %r13d,%ebx
mov    0x18(%rsp),%r13
mov    0x38(%rsp),%rcx
cltq
lea    0x0(%r13,%rax,8),%r13
add    $0x1,%ebp
add    %rcx,0x8(%rsp)
add    %rcx,%r15
cmp    %ebp,%r12d
jne    16a0 <Forward_SO3_Naive+0x4f0>
jmp    1797 <Forward_SO3_Naive+0x5e7>
mov    0x58(%rsp),%r8
mov    0x50(%rsp),%r9
mov    0x48(%rsp),%r11
mov    0x10(%rsp),%r14
mov    %rdx,%r15
mov    0x90(%rsp),%rax
lea    (%r15,%rax,8),%r15
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    %rcx,0x8(%rsp)
mov    0x24(%rsp),%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,0x18(%rsp)
sub    $0x8,%rsp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    0x78(%rsp),%rcx
push   %r14
mov    0x78(%rsp),%r14
push   %r14
push   %r11
call   1040 <genWig_L2@plt>
add    $0x20,%rsp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    0x8(%rsp),%rcx
mov    %r14,%r8
mov    0xe0(%rsp),%r9
push   0x10(%rsp)
mov    0x8(%rsp),%r13
push   %r13
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r15,%rcx
mov    %r14,%r8
mov    0xe0(%rsp),%r9
mov    0x10(%rsp),%r14
push   %r14
push   0x20(%rsp)
call   1090 <wigNaiveAnalysis@plt>
add    $0x10,%rsp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
call   10c0 <howMany_so3@plt>
cltq
lea    0x0(%r13,%rax,8),%r13
mov    %r13,(%rsp)
mov    0x18(%rsp),%r13
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
call   10c0 <howMany_so3@plt>
mov    0x48(%rsp),%r11
mov    0x50(%rsp),%r9
mov    0x58(%rsp),%r8
mov    0x38(%rsp),%rcx
cltq
lea    0x0(%r13,%rax,8),%r13
add    %rcx,%r15
add    %rcx,0x8(%rsp)
inc    %ebp
jne    17c0 <Forward_SO3_Naive+0x610>
mov    (%rsp),%r10
inc    %ebx
mov    %r15,%rdx
mov    0x8(%rsp),%rsi
jne    1670 <Forward_SO3_Naive+0x4c0>
mov    %r12d,%edi
call   10d0 <totalCoeffs_so3@plt>
test   %eax,%eax
mov    0x80(%rsp),%rbp
mov    0x78(%rsp),%rbx
jle    1a99 <Forward_SO3_Naive+0x8e9>
cvtsi2sdl 0x8c(%rsp),%xmm1
movsd  0x72e(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    %eax,%ecx
cmp    $0x4,%eax
jb     18fe <Forward_SO3_Naive+0x74e>
lea    0x0(,%rcx,8),%rax
add    %rbp,%rax
cmp    %rbx,%rax
jbe    198c <Forward_SO3_Naive+0x7dc>
lea    (%rbx,%rcx,8),%rax
cmp    %rbp,%rax
jbe    198c <Forward_SO3_Naive+0x7dc>
xor    %eax,%eax
mov    %rax,%rdx
not    %rdx
test   $0x1,%cl
je     192d <Forward_SO3_Naive+0x77d>
movsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  0x0(%rbp,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
or     $0x1,%rax
add    %rcx,%rdx
je     1a99 <Forward_SO3_Naive+0x8e9>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  0x0(%rbp,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbx,%rax,8)
movsd  0x8(%rbp,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbp,%rax,8)
add    $0x2,%rax
cmp    %rax,%rcx
jne    1940 <Forward_SO3_Naive+0x790>
jmp    1a99 <Forward_SO3_Naive+0x8e9>
mov    %ecx,%eax
and    $0xfffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     1aab <Forward_SO3_Naive+0x8fb>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
movupd 0x0(%rbp,%rdx,8),%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm2
movupd 0x30(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x20(%rbx,%rdx,8)
movupd %xmm3,0x30(%rbx,%rdx,8)
movupd 0x20(%rbp,%rdx,8),%xmm2
movupd 0x30(%rbp,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x20(%rbp,%rdx,8)
movupd %xmm3,0x30(%rbp,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    19c0 <Forward_SO3_Naive+0x810>
test   $0x1,%sil
je     1a90 <Forward_SO3_Naive+0x8e0>
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
movupd 0x0(%rbp,%rdx,8),%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
cmp    %rcx,%rax
jne    1900 <Forward_SO3_Naive+0x750>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    1a52 <Forward_SO3_Naive+0x8a2>
jmp    1a90 <Forward_SO3_Naive+0x8e0>

LLVM IR (-O0):
define void @Forward_SO3_Naive(i32 %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
%32 = alloca double
%33 = alloca i32
store i32 %0, i32* %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%34 = load i32, i32* %8
%35 = mul nsw i32 2, %34
store i32 %35, i32* %16
%36 = load double*, double** %13
store double* %36, double** %19
%37 = load double*, double** %13
%38 = load i32, i32* %16
%39 = load i32, i32* %16
%40 = mul nsw i32 %38, %39
%41 = load i32, i32* %16
%42 = mul nsw i32 %40, %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %37, i64 %43
store double* %44, double** %20
%45 = load double*, double** %20
%46 = load i32, i32* %16
%47 = load i32, i32* %16
%48 = mul nsw i32 %46, %47
%49 = load i32, i32* %16
%50 = mul nsw i32 %48, %49
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %45, i64 %51
store double* %52, double** %21
%53 = load double*, double** %21
%54 = load i32, i32* %16
%55 = load i32, i32* %16
%56 = mul nsw i32 %54, %55
%57 = load i32, i32* %16
%58 = mul nsw i32 %56, %57
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %53, i64 %59
store double* %60, double** %22
%61 = load double*, double** %11
store double* %61, double** %30
%62 = load double*, double** %12
store double* %62, double** %31
%63 = load double*, double** %14
store double* %63, double** %29
%64 = load double*, double** %29
%65 = load i32, i32* %16
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
store double* %67, double** %23
%68 = load double*, double** %23
%69 = load i32, i32* %16
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double* %71, double** %24
%72 = load double*, double** %24
%73 = load i32, i32* %16
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double* %75, double** %25
%76 = load double*, double** %25
%77 = load i32, i32* %16
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
store double* %79, double** %26
%80 = load double*, double** %26
%81 = load i32, i32* %16
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %80, i64 %82
store double* %83, double** %27
%84 = load double*, double** %27
%85 = load i32, i32* %8
%86 = load i32, i32* %16
%87 = mul nsw i32 %85, %86
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %84, i64 %88
store double* %89, double** %28
%90 = load i32, i32* %16
%91 = load double*, double** %23
%92 = call i32 @SinEvalPts(i32 %90, double* %91)
%93 = load i32, i32* %16
%94 = load double*, double** %24
%95 = call i32 @CosEvalPts(i32 %93, double* %94)
%96 = load i32, i32* %16
%97 = load double*, double** %25
%98 = call i32 @SinEvalPts2(i32 %96, double* %97)
%99 = load i32, i32* %16
%100 = load double*, double** %26
%101 = call i32 @CosEvalPts2(i32 %99, double* %100)
%102 = load i32, i32* %8
%103 = load double*, double** %29
%104 = call i32 @makeweights2(i32 %102, double* %103)
%105 = load double*, double** %9
%106 = load double*, double** %10
%107 = load double*, double** %19
%108 = load double*, double** %20
%109 = load i32, i32* %16
%110 = load i32, i32* %16
%111 = mul nsw i32 %109, %110
%112 = load i32, i32* %16
%113 = load double*, double** %28
%114 = call i32 @grid_invfourier_so3(double* %105, double* %106, double* %107, double* %108, i32 %111, i32 %112, double* %113)
%115 = load double*, double** %19
%116 = load double*, double** %21
%117 = load i32, i32* %16
%118 = load i32, i32* %16
%119 = mul nsw i32 %117, %118
%120 = load i32, i32* %16
%121 = call i32 @transpose_so3(double* %115, double* %116, i32 %119, i32 %120)
%122 = load double*, double** %20
%123 = load double*, double** %22
%124 = load i32, i32* %16
%125 = load i32, i32* %16
%126 = mul nsw i32 %124, %125
%127 = load i32, i32* %16
%128 = call i32 @transpose_so3(double* %122, double* %123, i32 %126, i32 %127)
%129 = load double*, double** %21
%130 = load double*, double** %22
%131 = load double*, double** %19
%132 = load double*, double** %20
%133 = load i32, i32* %16
%134 = load i32, i32* %16
%135 = mul nsw i32 %133, %134
%136 = load i32, i32* %16
%137 = load double*, double** %28
%138 = call i32 @grid_invfourier_so3(double* %129, double* %130, double* %131, double* %132, i32 %135, i32 %136, double* %137)
%139 = load double*, double** %19
%140 = load double*, double** %21
%141 = load i32, i32* %16
%142 = load i32, i32* %16
%143 = mul nsw i32 %141, %142
%144 = load i32, i32* %16
%145 = call i32 @transpose_so3(double* %139, double* %140, i32 %143, i32 %144)
%146 = load double*, double** %20
%147 = load double*, double** %22
%148 = load i32, i32* %16
%149 = load i32, i32* %16
%150 = mul nsw i32 %148, %149
%151 = load i32, i32* %16
%152 = call i32 @transpose_so3(double* %146, double* %147, i32 %150, i32 %151)
store i32 0, i32* %17
br label %153
153: ; preds = %286, %7
%154 = load i32, i32* %17
%155 = load i32, i32* %8
%156 = icmp slt i32 %154, %155
br i1 %156, label %157, label %289
157: ; preds = %153
store i32 0, i32* %18
br label %158
158: ; preds = %213, %157
%159 = load i32, i32* %18
%160 = load i32, i32* %8
%161 = icmp slt i32 %159, %160
br i1 %161, label %162, label %216
162: ; preds = %158
%163 = load i32, i32* %17
%164 = load i32, i32* %18
%165 = load i32, i32* %8
%166 = load double*, double** %23
%167 = load double*, double** %24
%168 = load double*, double** %25
%169 = load double*, double** %26
%170 = load double*, double** %27
%171 = load double*, double** %28
%172 = call i32 @genWig_L2(i32 %163, i32 %164, i32 %165, double* %166, double* %167, double* %168, double* %169, double* %170, double* %171)
%173 = load i32, i32* %17
%174 = load i32, i32* %18
%175 = load i32, i32* %8
%176 = load double*, double** %21
%177 = load double*, double** %27
%178 = load double*, double** %29
%179 = load double*, double** %11
%180 = load double*, double** %28
%181 = call i32 @wigNaiveAnalysis(i32 %173, i32 %174, i32 %175, double* %176, double* %177, double* %178, double* %179, double* %180)
%182 = load i32, i32* %17
%183 = load i32, i32* %18
%184 = load i32, i32* %8
%185 = load double*, double** %22
%186 = load double*, double** %27
%187 = load double*, double** %29
%188 = load double*, double** %12
%189 = load double*, double** %28
%190 = call i32 @wigNaiveAnalysis(i32 %182, i32 %183, i32 %184, double* %185, double* %186, double* %187, double* %188, double* %189)
%191 = load i32, i32* %16
%192 = load double*, double** %21
%193 = sext i32 %191 to i64
%194 = getelementptr inbounds double, double* %192, i64 %193
store double* %194, double** %21
%195 = load i32, i32* %16
%196 = load double*, double** %22
%197 = sext i32 %195 to i64
%198 = getelementptr inbounds double, double* %196, i64 %197
store double* %198, double** %22
%199 = load i32, i32* %17
%200 = load i32, i32* %18
%201 = load i32, i32* %8
%202 = call i32 @howMany_so3(i32 %199, i32 %200, i32 %201)
%203 = load double*, double** %11
%204 = sext i32 %202 to i64
%205 = getelementptr inbounds double, double* %203, i64 %204
store double* %205, double** %11
%206 = load i32, i32* %17
%207 = load i32, i32* %18
%208 = load i32, i32* %8
%209 = call i32 @howMany_so3(i32 %206, i32 %207, i32 %208)
%210 = load double*, double** %12
%211 = sext i32 %209 to i64
%212 = getelementptr inbounds double, double* %210, i64 %211
store double* %212, double** %12
br label %213
213: ; preds = %162
%214 = load i32, i32* %18
%215 = add nsw i32 %214, 1
store i32 %215, i32* %18
br label %158
216: ; preds = %158
%217 = load i32, i32* %16
%218 = load double*, double** %21
%219 = sext i32 %217 to i64
%220 = getelementptr inbounds double, double* %218, i64 %219
store double* %220, double** %21
%221 = load i32, i32* %16
%222 = load double*, double** %22
%223 = sext i32 %221 to i64
%224 = getelementptr inbounds double, double* %222, i64 %223
store double* %224, double** %22
%225 = load i32, i32* %8
%226 = sub nsw i32 %225, 1
%227 = sub nsw i32 0, %226
store i32 %227, i32* %18
br label %228
228: ; preds = %282, %216
%229 = load i32, i32* %18
%230 = icmp slt i32 %229, 0
br i1 %230, label %231, label %285
231: ; preds = %228
%232 = load i32, i32* %17
%233 = load i32, i32* %18
%234 = load i32, i32* %8
%235 = load double*, double** %23
%236 = load double*, double** %24
%237 = load double*, double** %25
%238 = load double*, double** %26
%239 = load double*, double** %27
%240 = load double*, double** %28
%241 = call i32 @genWig_L2(i32 %232, i32 %233, i32 %234, double* %235, double* %236, double* %237, double* %238, double* %239, double* %240)
%242 = load i32, i32* %17
%243 = load i32, i32* %18
%244 = load i32, i32* %8
%245 = load double*, double** %21
%246 = load double*, double** %27
%247 = load double*, double** %29
%248 = load double*, double** %11
%249 = load double*, double** %28
%250 = call i32 @wigNaiveAnalysis(i32 %242, i32 %243, i32 %244, double* %245, double* %246, double* %247, double* %248, double* %249)
%251 = load i32, i32* %17
%252 = load i32, i32* %18
%253 = load i32, i32* %8
%254 = load double*, double** %22
%255 = load double*, double** %27
%256 = load double*, double** %29
%257 = load double*, double** %12
%258 = load double*, double** %28
%259 = call i32 @wigNaiveAnalysis(i32 %251, i32 %252, i32 %253, double* %254, double* %255, double* %256, double* %257, double* %258)
%260 = load i32, i32* %16
%261 = load double*, double** %21
%262 = sext i32 %260 to i64
%263 = getelementptr inbounds double, double* %261, i64 %262
store double* %263, double** %21
%264 = load i32, i32* %16
%265 = load double*, double** %22
%266 = sext i32 %264 to i64
%267 = getelementptr inbounds double, double* %265, i64 %266
store double* %267, double** %22
%268 = load i32, i32* %17
%269 = load i32, i32* %18
%270 = load i32, i32* %8
%271 = call i32 @howMany_so3(i32 %268, i32 %269, i32 %270)
%272 = load double*, double** %11
%273 = sext i32 %271 to i64
%274 = getelementptr inbounds double, double* %272, i64 %273
store double* %274, double** %11
%275 = load i32, i32* %17
%276 = load i32, i32* %18
%277 = load i32, i32* %8
%278 = call i32 @howMany_so3(i32 %275, i32 %276, i32 %277)
%279 = load double*, double** %12
%280 = sext i32 %278 to i64
%281 = getelementptr inbounds double, double* %279, i64 %280
store double* %281, double** %12
br label %282
282: ; preds = %231
%283 = load i32, i32* %18
%284 = add nsw i32 %283, 1
store i32 %284, i32* %18
br label %228
285: ; preds = %228
br label %286
286: ; preds = %285
%287 = load i32, i32* %17
%288 = add nsw i32 %287, 1
store i32 %288, i32* %17
br label %153
289: ; preds = %153
%290 = load i32, i32* %16
%291 = load i32, i32* %16
%292 = mul nsw i32 %290, %291
%293 = load double*, double** %21
%294 = sext i32 %292 to i64
%295 = getelementptr inbounds double, double* %293, i64 %294
store double* %295, double** %21
%296 = load i32, i32* %16
%297 = load i32, i32* %16
%298 = mul nsw i32 %296, %297
%299 = load double*, double** %22
%300 = sext i32 %298 to i64
%301 = getelementptr inbounds double, double* %299, i64 %300
store double* %301, double** %22
%302 = load i32, i32* %8
%303 = sub nsw i32 %302, 1
%304 = sub nsw i32 0, %303
store i32 %304, i32* %17
br label %305
305: ; preds = %437, %289
%306 = load i32, i32* %17
%307 = icmp slt i32 %306, 0
br i1 %307, label %308, label %440
308: ; preds = %305
store i32 0, i32* %18
br label %309
309: ; preds = %364, %308
%310 = load i32, i32* %18
%311 = load i32, i32* %8
%312 = icmp slt i32 %310, %311
br i1 %312, label %313, label %367
313: ; preds = %309
%314 = load i32, i32* %17
%315 = load i32, i32* %18
%316 = load i32, i32* %8
%317 = load double*, double** %23
%318 = load double*, double** %24
%319 = load double*, double** %25
%320 = load double*, double** %26
%321 = load double*, double** %27
%322 = load double*, double** %28
%323 = call i32 @genWig_L2(i32 %314, i32 %315, i32 %316, double* %317, double* %318, double* %319, double* %320, double* %321, double* %322)
%324 = load i32, i32* %17
%325 = load i32, i32* %18
%326 = load i32, i32* %8
%327 = load double*, double** %21
%328 = load double*, double** %27
%329 = load double*, double** %29
%330 = load double*, double** %11
%331 = load double*, double** %28
%332 = call i32 @wigNaiveAnalysis(i32 %324, i32 %325, i32 %326, double* %327, double* %328, double* %329, double* %330, double* %331)
%333 = load i32, i32* %17
%334 = load i32, i32* %18
%335 = load i32, i32* %8
%336 = load double*, double** %22
%337 = load double*, double** %27
%338 = load double*, double** %29
%339 = load double*, double** %12
%340 = load double*, double** %28
%341 = call i32 @wigNaiveAnalysis(i32 %333, i32 %334, i32 %335, double* %336, double* %337, double* %338, double* %339, double* %340)
%342 = load i32, i32* %16
%343 = load double*, double** %21
%344 = sext i32 %342 to i64
%345 = getelementptr inbounds double, double* %343, i64 %344
store double* %345, double** %21
%346 = load i32, i32* %16
%347 = load double*, double** %22
%348 = sext i32 %346 to i64
%349 = getelementptr inbounds double, double* %347, i64 %348
store double* %349, double** %22
%350 = load i32, i32* %17
%351 = load i32, i32* %18
%352 = load i32, i32* %8
%353 = call i32 @howMany_so3(i32 %350, i32 %351, i32 %352)
%354 = load double*, double** %11
%355 = sext i32 %353 to i64
%356 = getelementptr inbounds double, double* %354, i64 %355
store double* %356, double** %11
%357 = load i32, i32* %17
%358 = load i32, i32* %18
%359 = load i32, i32* %8
%360 = call i32 @howMany_so3(i32 %357, i32 %358, i32 %359)
%361 = load double*, double** %12
%362 = sext i32 %360 to i64
%363 = getelementptr inbounds double, double* %361, i64 %362
store double* %363, double** %12
br label %364
364: ; preds = %313
%365 = load i32, i32* %18
%366 = add nsw i32 %365, 1
store i32 %366, i32* %18
br label %309
367: ; preds = %309
%368 = load i32, i32* %16
%369 = load double*, double** %21
%370 = sext i32 %368 to i64
%371 = getelementptr inbounds double, double* %369, i64 %370
store double* %371, double** %21
%372 = load i32, i32* %16
%373 = load double*, double** %22
%374 = sext i32 %372 to i64
%375 = getelementptr inbounds double, double* %373, i64 %374
store double* %375, double** %22
%376 = load i32, i32* %8
%377 = sub nsw i32 %376, 1
%378 = sub nsw i32 0, %377
store i32 %378, i32* %18
br label %379
379: ; preds = %433, %367
%380 = load i32, i32* %18
%381 = icmp slt i32 %380, 0
br i1 %381, label %382, label %436
382: ; preds = %379
%383 = load i32, i32* %17
%384 = load i32, i32* %18
%385 = load i32, i32* %8
%386 = load double*, double** %23
%387 = load double*, double** %24
%388 = load double*, double** %25
%389 = load double*, double** %26
%390 = load double*, double** %27
%391 = load double*, double** %28
%392 = call i32 @genWig_L2(i32 %383, i32 %384, i32 %385, double* %386, double* %387, double* %388, double* %389, double* %390, double* %391)
%393 = load i32, i32* %17
%394 = load i32, i32* %18
%395 = load i32, i32* %8
%396 = load double*, double** %21
%397 = load double*, double** %27
%398 = load double*, double** %29
%399 = load double*, double** %11
%400 = load double*, double** %28
%401 = call i32 @wigNaiveAnalysis(i32 %393, i32 %394, i32 %395, double* %396, double* %397, double* %398, double* %399, double* %400)
%402 = load i32, i32* %17
%403 = load i32, i32* %18
%404 = load i32, i32* %8
%405 = load double*, double** %22
%406 = load double*, double** %27
%407 = load double*, double** %29
%408 = load double*, double** %12
%409 = load double*, double** %28
%410 = call i32 @wigNaiveAnalysis(i32 %402, i32 %403, i32 %404, double* %405, double* %406, double* %407, double* %408, double* %409)
%411 = load i32, i32* %16
%412 = load double*, double** %21
%413 = sext i32 %411 to i64
%414 = getelementptr inbounds double, double* %412, i64 %413
store double* %414, double** %21
%415 = load i32, i32* %16
%416 = load double*, double** %22
%417 = sext i32 %415 to i64
%418 = getelementptr inbounds double, double* %416, i64 %417
store double* %418, double** %22
%419 = load i32, i32* %17
%420 = load i32, i32* %18
%421 = load i32, i32* %8
%422 = call i32 @howMany_so3(i32 %419, i32 %420, i32 %421)
%423 = load double*, double** %11
%424 = sext i32 %422 to i64
%425 = getelementptr inbounds double, double* %423, i64 %424
store double* %425, double** %11
%426 = load i32, i32* %17
%427 = load i32, i32* %18
%428 = load i32, i32* %8
%429 = call i32 @howMany_so3(i32 %426, i32 %427, i32 %428)
%430 = load double*, double** %12
%431 = sext i32 %429 to i64
%432 = getelementptr inbounds double, double* %430, i64 %431
store double* %432, double** %12
br label %433
433: ; preds = %382
%434 = load i32, i32* %18
%435 = add nsw i32 %434, 1
store i32 %435, i32* %18
br label %379
436: ; preds = %379
br label %437
437: ; preds = %436
%438 = load i32, i32* %17
%439 = add nsw i32 %438, 1
store i32 %439, i32* %17
br label %305
440: ; preds = %305
%441 = load i32, i32* %8
%442 = call i32 @totalCoeffs_so3(i32 %441)
store i32 %442, i32* %33
%443 = load i32, i32* %8
%444 = load i32, i32* %16
%445 = mul nsw i32 %443, %444
%446 = sitofp i32 %445 to double
%447 = fdiv double 0x400921FB54442D18, %446
store double %447, double* %32
store i32 0, i32* %15
br label %448
448: ; preds = %467, %440
%449 = load i32, i32* %15
%450 = load i32, i32* %33
%451 = icmp slt i32 %449, %450
br i1 %451, label %452, label %470
452: ; preds = %448
%453 = load double, double* %32
%454 = load double*, double** %30
%455 = load i32, i32* %15
%456 = sext i32 %455 to i64
%457 = getelementptr inbounds double, double* %454, i64 %456
%458 = load double, double* %457
%459 = fmul double %458, %453
store double %459, double* %457
%460 = load double, double* %32
%461 = load double*, double** %31
%462 = load i32, i32* %15
%463 = sext i32 %462 to i64
%464 = getelementptr inbounds double, double* %461, i64 %463
%465 = load double, double* %464
%466 = fmul double %465, %460
store double %466, double* %464
br label %467
467: ; preds = %452
%468 = load i32, i32* %15
%469 = add nsw i32 %468, 1
store i32 %469, i32* %15
br label %448
470: ; preds = %448
ret void
}

LLVM IR (-O2):
define void @Forward_SO3_Naive(i32 %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6) {
%8 = shl nsw i32 %0, 1
%9 = mul nsw i32 %8, %8
%10 = mul nsw i32 %9, %8
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds double, double* %5, i64 %11
%13 = getelementptr inbounds double, double* %12, i64 %11
%14 = getelementptr inbounds double, double* %13, i64 %11
%15 = sext i32 %8 to i64
%16 = getelementptr inbounds double, double* %6, i64 %15
%17 = getelementptr inbounds double, double* %16, i64 %15
%18 = getelementptr inbounds double, double* %17, i64 %15
%19 = getelementptr inbounds double, double* %18, i64 %15
%20 = getelementptr inbounds double, double* %19, i64 %15
%21 = mul nsw i32 %8, %0
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = tail call i32 @SinEvalPts(i32 %8, double* %16)
%25 = tail call i32 @CosEvalPts(i32 %8, double* %17)
%26 = tail call i32 @SinEvalPts2(i32 %8, double* %18)
%27 = tail call i32 @CosEvalPts2(i32 %8, double* %19)
%28 = tail call i32 @makeweights2(i32 %0, double* %6)
%29 = tail call i32 @grid_invfourier_so3(double* %1, double* %2, double* %5, double* %12, i32 %9, i32 %8, double* %23)
%30 = tail call i32 @transpose_so3(double* %5, double* %13, i32 %9, i32 %8)
%31 = tail call i32 @transpose_so3(double* %12, double* %14, i32 %9, i32 %8)
%32 = tail call i32 @grid_invfourier_so3(double* %13, double* %14, double* %5, double* %12, i32 %9, i32 %8, double* %23)
%33 = tail call i32 @transpose_so3(double* %5, double* %13, i32 %9, i32 %8)
%34 = tail call i32 @transpose_so3(double* %12, double* %14, i32 %9, i32 %8)
%35 = icmp sgt i32 %0, 0
%36 = sub i32 1, %0
br i1 %35, label %37, label %93
37: ; preds = %7
%38 = icmp slt i32 %36, 0
br label %39
39: ; preds = %86, %37
%40 = phi double* [ %3, %37 ], [ %88, %86 ]
%41 = phi double* [ %4, %37 ], [ %87, %86 ]
%42 = phi i32 [ 0, %37 ], [ %91, %86 ]
%43 = phi double* [ %13, %37 ], [ %89, %86 ]
%44 = phi double* [ %14, %37 ], [ %90, %86 ]
br label %45
45: ; preds = %39, %45
%46 = phi double* [ %58, %45 ], [ %40, %39 ]
%47 = phi double* [ %61, %45 ], [ %41, %39 ]
%48 = phi i32 [ %62, %45 ], [ 0, %39 ]
%49 = phi double* [ %54, %45 ], [ %43, %39 ]
%50 = phi double* [ %55, %45 ], [ %44, %39 ]
%51 = tail call i32 @genWig_L2(i32 %42, i32 %48, i32 %0, double* %16, double* %17, double* %18, double* %19, double* %20, double* %23)
%52 = tail call i32 @wigNaiveAnalysis(i32 %42, i32 %48, i32 %0, double* %49, double* %20, double* %6, double* %46, double* %23)
%53 = tail call i32 @wigNaiveAnalysis(i32 %42, i32 %48, i32 %0, double* %50, double* %20, double* %6, double* %47, double* %23)
%54 = getelementptr inbounds double, double* %49, i64 %15
%55 = getelementptr inbounds double, double* %50, i64 %15
%56 = tail call i32 @howMany_so3(i32 %42, i32 %48, i32 %0)
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %46, i64 %57
%59 = tail call i32 @howMany_so3(i32 %42, i32 %48, i32 %0)
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %47, i64 %60
%62 = add nuw nsw i32 %48, 1
%63 = icmp eq i32 %62, %0
br i1 %63, label %64, label %45
64: ; preds = %45
%65 = getelementptr inbounds double, double* %54, i64 %15
%66 = getelementptr inbounds double, double* %55, i64 %15
br i1 %38, label %67, label %86
67: ; preds = %64, %67
%68 = phi double* [ %84, %67 ], [ %66, %64 ]
%69 = phi double* [ %83, %67 ], [ %65, %64 ]
%70 = phi double* [ %78, %67 ], [ %58, %64 ]
%71 = phi double* [ %81, %67 ], [ %61, %64 ]
%72 = phi i32 [ %82, %67 ], [ %36, %64 ]
%73 = tail call i32 @genWig_L2(i32 %42, i32 %72, i32 %0, double* %16, double* %17, double* %18, double* %19, double* %20, double* %23)
%74 = tail call i32 @wigNaiveAnalysis(i32 %42, i32 %72, i32 %0, double* %69, double* %20, double* %6, double* %70, double* %23)
%75 = tail call i32 @wigNaiveAnalysis(i32 %42, i32 %72, i32 %0, double* %68, double* %20, double* %6, double* %71, double* %23)
%76 = tail call i32 @howMany_so3(i32 %42, i32 %72, i32 %0)
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %70, i64 %77
%79 = tail call i32 @howMany_so3(i32 %42, i32 %72, i32 %0)
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %71, i64 %80
%82 = add i32 %72, 1
%83 = getelementptr inbounds double, double* %69, i64 %15
%84 = getelementptr inbounds double, double* %68, i64 %15
%85 = icmp eq i32 %82, 0
br i1 %85, label %86, label %67
86: ; preds = %67, %64
%87 = phi double* [ %61, %64 ], [ %81, %67 ]
%88 = phi double* [ %58, %64 ], [ %78, %67 ]
%89 = phi double* [ %65, %64 ], [ %83, %67 ]
%90 = phi double* [ %66, %64 ], [ %84, %67 ]
%91 = add nuw nsw i32 %42, 1
%92 = icmp eq i32 %91, %0
br i1 %92, label %93, label %39
93: ; preds = %86, %7
%94 = phi double* [ %14, %7 ], [ %90, %86 ]
%95 = phi double* [ %13, %7 ], [ %89, %86 ]
%96 = phi double* [ %4, %7 ], [ %87, %86 ]
%97 = phi double* [ %3, %7 ], [ %88, %86 ]
%98 = zext i32 %9 to i64
%99 = icmp slt i32 %36, 0
br i1 %99, label %100, label %157
100: ; preds = %93
%101 = getelementptr inbounds double, double* %94, i64 %98
%102 = getelementptr inbounds double, double* %95, i64 %98
br label %103
103: ; preds = %100, %154
%104 = phi double* [ %97, %100 ], [ %146, %154 ]
%105 = phi double* [ %96, %100 ], [ %149, %154 ]
%106 = phi i32 [ %36, %100 ], [ %155, %154 ]
%107 = phi double* [ %102, %100 ], [ %151, %154 ]
%108 = phi double* [ %101, %100 ], [ %152, %154 ]
br i1 %35, label %116, label %109
109: ; preds = %116, %103
%110 = phi double* [ %108, %103 ], [ %126, %116 ]
%111 = phi double* [ %107, %103 ], [ %125, %116 ]
%112 = phi double* [ %105, %103 ], [ %132, %116 ]
%113 = phi double* [ %104, %103 ], [ %129, %116 ]
%114 = getelementptr inbounds double, double* %110, i64 %15
%115 = getelementptr inbounds double, double* %111, i64 %15
br label %135
116: ; preds = %103, %116
%117 = phi double* [ %129, %116 ], [ %104, %103 ]
%118 = phi double* [ %132, %116 ], [ %105, %103 ]
%119 = phi i32 [ %133, %116 ], [ 0, %103 ]
%120 = phi double* [ %125, %116 ], [ %107, %103 ]
%121 = phi double* [ %126, %116 ], [ %108, %103 ]
%122 = tail call i32 @genWig_L2(i32 %106, i32 %119, i32 %0, double* %16, double* %17, double* %18, double* %19, double* %20, double* %23)
%123 = tail call i32 @wigNaiveAnalysis(i32 %106, i32 %119, i32 %0, double* %120, double* %20, double* %6, double* %117, double* %23)
%124 = tail call i32 @wigNaiveAnalysis(i32 %106, i32 %119, i32 %0, double* %121, double* %20, double* %6, double* %118, double* %23)
%125 = getelementptr inbounds double, double* %120, i64 %15
%126 = getelementptr inbounds double, double* %121, i64 %15
%127 = tail call i32 @howMany_so3(i32 %106, i32 %119, i32 %0)
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %117, i64 %128
%130 = tail call i32 @howMany_so3(i32 %106, i32 %119, i32 %0)
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %118, i64 %131
%133 = add nuw nsw i32 %119, 1
%134 = icmp eq i32 %133, %0
br i1 %134, label %109, label %116
135: ; preds = %109, %135
%136 = phi double* [ %152, %135 ], [ %114, %109 ]
%137 = phi double* [ %151, %135 ], [ %115, %109 ]
%138 = phi double* [ %146, %135 ], [ %113, %109 ]
%139 = phi double* [ %149, %135 ], [ %112, %109 ]
%140 = phi i32 [ %150, %135 ], [ %36, %109 ]
%141 = tail call i32 @genWig_L2(i32 %106, i32 %140, i32 %0, double* %16, double* %17, double* %18, double* %19, double* %20, double* %23)
%142 = tail call i32 @wigNaiveAnalysis(i32 %106, i32 %140, i32 %0, double* %137, double* %20, double* %6, double* %138, double* %23)
%143 = tail call i32 @wigNaiveAnalysis(i32 %106, i32 %140, i32 %0, double* %136, double* %20, double* %6, double* %139, double* %23)
%144 = tail call i32 @howMany_so3(i32 %106, i32 %140, i32 %0)
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %138, i64 %145
%147 = tail call i32 @howMany_so3(i32 %106, i32 %140, i32 %0)
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %139, i64 %148
%150 = add i32 %140, 1
%151 = getelementptr inbounds double, double* %137, i64 %15
%152 = getelementptr inbounds double, double* %136, i64 %15
%153 = icmp eq i32 %150, 0
br i1 %153, label %154, label %135
154: ; preds = %135
%155 = add i32 %106, 1
%156 = icmp eq i32 %155, 0
br i1 %156, label %157, label %103
157: ; preds = %154, %93
%158 = tail call i32 @totalCoeffs_so3(i32 %0)
%159 = sitofp i32 %21 to double
%160 = fdiv double 0x400921FB54442D18, %159
%161 = icmp sgt i32 %158, 0
br i1 %161, label %162, label %291
162: ; preds = %157
%163 = zext i32 %158 to i64
%164 = icmp ult i32 %158, 4
br i1 %164, label %257, label %165
165: ; preds = %162
%166 = getelementptr double, double* %3, i64 %163
%167 = getelementptr double, double* %4, i64 %163
%168 = icmp ugt double* %167, %3
%169 = icmp ugt double* %166, %4
%170 = and i1 %168, %169
br i1 %170, label %257, label %171
171: ; preds = %165
%172 = and i64 %163, 4294967292
%173 = insertelement <2 x double> poison, double %160, i64 0
%174 = shufflevector <2 x double> %173, <2 x double> poison, <2 x i32> zeroinitializer
%175 = insertelement <2 x double> poison, double %160, i64 0
%176 = shufflevector <2 x double> %175, <2 x double> poison, <2 x i32> zeroinitializer
%177 = add nsw i64 %172, -4
%178 = lshr exact i64 %177, 2
%179 = add nuw nsw i64 %178, 1
%180 = and i64 %179, 1
%181 = icmp eq i64 %177, 0
br i1 %181, label %231, label %182
182: ; preds = %171
%183 = and i64 %179, 9223372036854775806
br label %184
184: ; preds = %184, %182
%185 = phi i64 [ 0, %182 ], [ %228, %184 ]
%186 = phi i64 [ 0, %182 ], [ %229, %184 ]
%187 = getelementptr inbounds double, double* %3, i64 %185
%188 = bitcast double* %187 to <2 x double>*
%189 = load <2 x double>, <2 x double>* %188
%190 = getelementptr inbounds double, double* %187, i64 2
%191 = bitcast double* %190 to <2 x double>*
%192 = load <2 x double>, <2 x double>* %191
%193 = fmul <2 x double> %174, %189
%194 = fmul <2 x double> %176, %192
%195 = bitcast double* %187 to <2 x double>*
store <2 x double> %193, <2 x double>* %195
%196 = bitcast double* %190 to <2 x double>*
store <2 x double> %194, <2 x double>* %196
%197 = getelementptr inbounds double, double* %4, i64 %185
%198 = bitcast double* %197 to <2 x double>*
%199 = load <2 x double>, <2 x double>* %198
%200 = getelementptr inbounds double, double* %197, i64 2
%201 = bitcast double* %200 to <2 x double>*
%202 = load <2 x double>, <2 x double>* %201
%203 = fmul <2 x double> %174, %199
%204 = fmul <2 x double> %176, %202
%205 = bitcast double* %197 to <2 x double>*
store <2 x double> %203, <2 x double>* %205
%206 = bitcast double* %200 to <2 x double>*
store <2 x double> %204, <2 x double>* %206
%207 = or i64 %185, 4
%208 = getelementptr inbounds double, double* %3, i64 %207
%209 = bitcast double* %208 to <2 x double>*
%210 = load <2 x double>, <2 x double>* %209
%211 = getelementptr inbounds double, double* %208, i64 2
%212 = bitcast double* %211 to <2 x double>*
%213 = load <2 x double>, <2 x double>* %212
%214 = fmul <2 x double> %174, %210
%215 = fmul <2 x double> %176, %213
%216 = bitcast double* %208 to <2 x double>*
store <2 x double> %214, <2 x double>* %216
%217 = bitcast double* %211 to <2 x double>*
store <2 x double> %215, <2 x double>* %217
%218 = getelementptr inbounds double, double* %4, i64 %207
%219 = bitcast double* %218 to <2 x double>*
%220 = load <2 x double>, <2 x double>* %219
%221 = getelementptr inbounds double, double* %218, i64 2
%222 = bitcast double* %221 to <2 x double>*
%223 = load <2 x double>, <2 x double>* %222
%224 = fmul <2 x double> %174, %220
%225 = fmul <2 x double> %176, %223
%226 = bitcast double* %218 to <2 x double>*
store <2 x double> %224, <2 x double>* %226
%227 = bitcast double* %221 to <2 x double>*
store <2 x double> %225, <2 x double>* %227
%228 = add nuw i64 %185, 8
%229 = add i64 %186, 2
%230 = icmp eq i64 %229, %183
br i1 %230, label %231, label %184
231: ; preds = %184, %171
%232 = phi i64 [ 0, %171 ], [ %228, %184 ]
%233 = icmp eq i64 %180, 0
br i1 %233, label %255, label %234
234: ; preds = %231
%235 = getelementptr inbounds double, double* %3, i64 %232
%236 = bitcast double* %235 to <2 x double>*
%237 = load <2 x double>, <2 x double>* %236
%238 = getelementptr inbounds double, double* %235, i64 2
%239 = bitcast double* %238 to <2 x double>*
%240 = load <2 x double>, <2 x double>* %239
%241 = fmul <2 x double> %174, %237
%242 = fmul <2 x double> %176, %240
%243 = bitcast double* %235 to <2 x double>*
store <2 x double> %241, <2 x double>* %243
%244 = bitcast double* %238 to <2 x double>*
store <2 x double> %242, <2 x double>* %244
%245 = getelementptr inbounds double, double* %4, i64 %232
%246 = bitcast double* %245 to <2 x double>*
%247 = load <2 x double>, <2 x double>* %246
%248 = getelementptr inbounds double, double* %245, i64 2
%249 = bitcast double* %248 to <2 x double>*
%250 = load <2 x double>, <2 x double>* %249
%251 = fmul <2 x double> %174, %247
%252 = fmul <2 x double> %176, %250
%253 = bitcast double* %245 to <2 x double>*
store <2 x double> %251, <2 x double>* %253
%254 = bitcast double* %248 to <2 x double>*
store <2 x double> %252, <2 x double>* %254
br label %255
255: ; preds = %231, %234
%256 = icmp eq i64 %172, %163
br i1 %256, label %291, label %257
257: ; preds = %165, %162, %255
%258 = phi i64 [ 0, %165 ], [ 0, %162 ], [ %172, %255 ]
%259 = xor i64 %258, -1
%260 = and i64 %163, 1
%261 = icmp eq i64 %260, 0
br i1 %261, label %270, label %262
262: ; preds = %257
%263 = getelementptr inbounds double, double* %3, i64 %258
%264 = load double, double* %263
%265 = fmul double %160, %264
store double %265, double* %263
%266 = getelementptr inbounds double, double* %4, i64 %258
%267 = load double, double* %266
%268 = fmul double %160, %267
store double %268, double* %266
%269 = or i64 %258, 1
br label %270
270: ; preds = %262, %257
%271 = phi i64 [ %258, %257 ], [ %269, %262 ]
%272 = sub nsw i64 0, %163
%273 = icmp eq i64 %259, %272
br i1 %273, label %291, label %274
274: ; preds = %270, %274
%275 = phi i64 [ %289, %274 ], [ %271, %270 ]
%276 = getelementptr inbounds double, double* %3, i64 %275
%277 = load double, double* %276
%278 = fmul double %160, %277
store double %278, double* %276
%279 = getelementptr inbounds double, double* %4, i64 %275
%280 = load double, double* %279
%281 = fmul double %160, %280
store double %281, double* %279
%282 = add nuw nsw i64 %275, 1
%283 = getelementptr inbounds double, double* %3, i64 %282
%284 = load double, double* %283
%285 = fmul double %160, %284
store double %285, double* %283
%286 = getelementptr inbounds double, double* %4, i64 %282
%287 = load double, double* %286
%288 = fmul double %160, %287
store double %288, double* %286
%289 = add nuw nsw i64 %275, 2
%290 = icmp eq i64 %289, %163
br i1 %290, label %291, label %274
291: ; preds = %270, %274, %255, %157
ret void
}