#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 */
typedef int lmax;
typedef int l;

/* Variables and functions */
int abs(int);
double *calloc(int, int);
double const n_over_k(int, int, double const *);
double const pow(double, int);
int sqrt(double const);
double *TM_cart2sph(const int lmax, const int *const xyz, const double *fac) {
  int l, m, mm;
  int lx, ly, lz;
  int ijk, c, i, j, k, exponent;
  double s, s1, s2;
  double *TM, *T;
  int cnt = 0;
  T = TM = calloc(((int)((3 * (lmax) + 2) * fac[lmax + 3] / (12 * fac[lmax]))),
                  sizeof(double));
  for (l = 0; l <= lmax; l++) {
    for (m = -l; m <= l; m++) {
      mm = abs(m);
      for (c = 0; c < ((l) + 1) * ((l) + 2) / 2; c++) {
        ijk = ((((l)-1) + 1) * (((l)-1) + 2) * (((l)-1) + 3) / 6 + (c)) * 3;
        lx = xyz[ijk];
        ly = xyz[ijk + 1];
        lz = xyz[ijk + 2];
        j = lx + ly - mm;
        if (j < 0 || j % 2 == 1)
          *T = 0.0;
        else {
          j = j / 2;
          s1 = 0.0;
          for (i = 0; i <= (l - mm) / 2; i++) {
            s2 = 0.0;
            for (k = 0; k <= j; k++) {
              s = 0.0;
              if ((m < 0 && abs(mm - lx) % 2 == 1) ||
                  (m > 0 && abs(mm - lx) % 2 == 0)) {
                exponent = (mm - lx + 2 * k) / 2;
                s = pow(-1.0, exponent) * sqrt(2.0);
              } else if (m == 0 && lx % 2 == 0) {
                exponent = -lx / 2 + k;
                s = pow(-1.0, exponent);
              }
              s2 += n_over_k(j, k, fac) * n_over_k(mm, (lx - 2 * k), fac) * s;
            }
            s1 += n_over_k(l, i, fac) * n_over_k(i, j, fac) * pow(-1.0, i) *
                  fac[2 * l - 2 * i] / fac[l - mm - 2 * i] * s2;
          }
          *T = sqrt((fac[2 * lx] * fac[2 * ly] * fac[2 * lz] * fac[l] *
                     fac[l - mm]) /
                    (fac[2 * l] * fac[lx] * fac[ly] * fac[lz] * fac[l + mm])) *
               1 / (pow(2.0, l) * fac[l]) * s1;
        }
        T++;
        cnt++;
      }
    }
  }
  return TM;
}


x86 assembly (clang, -O0):
<TM_cart2sph>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x74(%rbp)
imul   $0x3,-0x4(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  0xe66(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x68(%rbp)
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     165d <TM_cart2sph+0x50d>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     164a <TM_cart2sph+0x4fa>
mov    -0x20(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
cmp    %ecx,%eax
jge    1637 <TM_cart2sph+0x4e7>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
add    $0x3,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
add    -0x38(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jl     12ac <TM_cart2sph+0x15c>
mov    -0x40(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    12bc <TM_cart2sph+0x16c>
mov    -0x70(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1614 <TM_cart2sph+0x4c4>
mov    -0x40(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
cmp    %ecx,%eax
jg     1523 <TM_cart2sph+0x3d3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     146e <TM_cart2sph+0x31e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1343 <TM_cart2sph+0x1f3>
mov    -0x24(%rbp),%edi
sub    -0x28(%rbp),%edi
call   1030 <abs@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
je     1369 <TM_cart2sph+0x219>
cmpl   $0x0,-0x20(%rbp)
jle    13c1 <TM_cart2sph+0x271>
mov    -0x24(%rbp),%edi
sub    -0x28(%rbp),%edi
call   1030 <abs@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13c1 <TM_cart2sph+0x271>
mov    -0x24(%rbp),%eax
sub    -0x28(%rbp),%eax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
movsd  0xc83(%rip),%xmm0
call   1060 <pow@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xc66(%rip),%xmm0
call   1070 <sqrt@plt>
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    140c <TM_cart2sph+0x2bc>
cmpl   $0x0,-0x20(%rbp)
jne    1407 <TM_cart2sph+0x2b7>
mov    -0x28(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1407 <TM_cart2sph+0x2b7>
xor    %eax,%eax
sub    -0x28(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
movsd  0xc13(%rip),%xmm0
call   1060 <pow@plt>
movsd  %xmm0,-0x50(%rbp)
jmp    140c <TM_cart2sph+0x2bc>
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <n_over_k@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1040 <n_over_k@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1309 <TM_cart2sph+0x1b9>
mov    -0x1c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <n_over_k@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <n_over_k@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x3c(%rbp),%edi
movsd  0xb5a(%rip),%xmm0
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x3c(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    -0x24(%rbp),%ecx
mov    -0x3c(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12d9 <TM_cart2sph+0x189>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
shl    $0x0,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x1c(%rbp),%edi
movsd  0xa22(%rip),%xmm0
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x70(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x70(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11f2 <TM_cart2sph+0xa2>
jmp    163c <TM_cart2sph+0x4ec>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11d4 <TM_cart2sph+0x84>
jmp    164f <TM_cart2sph+0x4ff>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11c0 <TM_cart2sph+0x70>
mov    -0x68(%rbp),%rax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TM_cart2sph>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
lea    0x2(%rdi,%rdi,2),%eax
cvtsi2sd %eax,%xmm0
mov    %rdi,0x28(%rsp)
movslq %edi,%r14
mulsd  0x18(%rdx,%r14,8),%xmm0
mov    %rdx,0x40(%rsp)
movsd  (%rdx,%r14,8),%xmm1
mulsd  0xe85(%rip),%xmm1
mov    %rsi,%r15
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,0x60(%rsp)
test   %r14d,%r14d
js     1679 <TM_cart2sph+0x539>
mov    0x28(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x28(%rsp)
movl   $0x1,0x10(%rsp)
xor    %r14d,%r14d
mov    0x60(%rsp),%rsi
mov    %r15,0x80(%rsp)
jmp    11e8 <TM_cart2sph+0xa8>
cs nopw 0x0(%rax,%rax,1)
nop
addl   $0x1,0x10(%rsp)
mov    0x70(%rsp),%rax
mov    %rax,%r14
cmp    0x28(%rsp),%rax
je     1679 <TM_cart2sph+0x539>
lea    0x1(%r14),%rcx
lea    0x2(%r14),%eax
mov    %rcx,0x70(%rsp)
imul   %eax,%ecx
mov    %ecx,%r8d
shr    %r8d
mov    %ecx,0x4c(%rsp)
mov    %ecx,%r9d
imul   %r14d,%r9d
mov    $0xaaaaaaab,%eax
imul   %rax,%r9
shr    $0x22,%r9
lea    (%r14,%r14,1),%rax
mov    %rax,0x88(%rsp)
mov    %r14d,%eax
neg    %eax
mov    %r14d,%ecx
mov    %r14,0xc8(%rsp)
mov    %r8,0x98(%rsp)
mov    %r9,0x90(%rsp)
jmp    1268 <TM_cart2sph+0x128>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x1c(%rsp),%eax
add    $0x1,%eax
mov    0x50(%rsp),%ecx
add    $0xffffffff,%ecx
cmp    0x10(%rsp),%eax
je     11d0 <TM_cart2sph+0x90>
mov    %eax,0x1c(%rsp)
cmp    %ecx,%eax
mov    %ecx,%edx
cmovg  %eax,%edx
mov    %eax,%r10d
neg    %r10d
cmovs  %eax,%r10d
cmpl   $0x2,0x4c(%rsp)
mov    %ecx,0x50(%rsp)
jb     1250 <TM_cart2sph+0x110>
mov    %edx,0x54(%rsp)
mov    %edx,%eax
neg    %eax
mov    %rax,0x78(%rsp)
mov    %r14d,%eax
sub    %r10d,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %eax,0x14(%rsp)
cltq
mov    %rax,0xa8(%rsp)
lea    (%r10,%r14,1),%eax
mov    %rax,0xa0(%rsp)
add    $0x1,%ecx
mov    %rcx,0xd0(%rsp)
xor    %ebp,%ebp
mov    %r10,0x38(%rsp)
jmp    13f4 <TM_cart2sph+0x2b4>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm1,0x30(%rsp)
movslq 0x20(%rsp),%rax
mov    0x68(%rsp),%rdx
mov    %rdx,%rcx
shl    $0x4,%rcx
mov    0x40(%rsp),%rbx
movsd  (%rbx,%rcx,1),%xmm0
movhpd (%rbx,%rax,8),%xmm0
shl    $0x4,%rax
mov    0xb0(%rsp),%rsi
mov    %rsi,%rcx
movsd  (%rbx,%rax,1),%xmm1
mov    0x88(%rsp),%rax
movhpd (%rbx,%rax,8),%xmm1
shl    $0x4,%rcx
movsd  (%rbx,%rcx,1),%xmm2
movhpd (%rbx,%rdx,8),%xmm2
mulpd  %xmm1,%xmm0
movsd  (%rbx,%r14,8),%xmm1
movhpd (%rbx,%rsi,8),%xmm1
mulpd  %xmm0,%xmm2
mov    0xa8(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm0
mov    0xa0(%rsp),%rax
movhpd (%rbx,%rax,8),%xmm0
mulpd  %xmm2,%xmm1
mulpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xc80(%rip),%xmm0
mov    %r14d,%edi
call   1050 <pow@plt>
mulsd  (%rbx,%r14,8),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  0x30(%rsp),%xmm0
mov    0x80(%rsp),%r15
mov    0xc0(%rsp),%rsi
mov    0x98(%rsp),%r8
mov    0x90(%rsp),%r9
mov    0x38(%rsp),%r10
mov    0xb8(%rsp),%rbp
movsd  %xmm0,(%rsi)
add    $0x8,%rsi
add    $0x1,%rbp
cmp    %r8,%rbp
jae    1250 <TM_cart2sph+0x110>
lea    (%r9,%rbp,1),%rax
lea    (%rax,%rax,2),%rax
mov    (%r15,%rax,4),%ecx
movslq 0x4(%r15,%rax,4),%rdi
mov    %rcx,0x20(%rsp)
mov    %ecx,%r12d
sub    %r10d,%r12d
add    %edi,%r12d
xorpd  %xmm0,%xmm0
js     13df <TM_cart2sph+0x29f>
mov    %r12d,%ecx
shr    $0x1f,%ecx
add    %r12d,%ecx
and    $0xfffffffe,%ecx
mov    %r12d,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
je     13df <TM_cart2sph+0x29f>
mov    %rdi,0x68(%rsp)
mov    %rbp,0xb8(%rsp)
mov    %rsi,0xc0(%rsp)
movslq 0x8(%r15,%rax,4),%rax
mov    %rax,0xb0(%rsp)
xorpd  %xmm1,%xmm1
cmpl   $0xffffffff,0x14(%rsp)
jl     12e0 <TM_cart2sph+0x1a0>
shr    %r12d
mov    0x38(%rsp),%rax
mov    0x20(%rsp),%rdx
sub    %edx,%eax
mov    %eax,0x18(%rsp)
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
neg    %eax
mov    %rax,0xd8(%rsp)
mov    0x78(%rsp),%rax
add    %edx,%eax
mov    0x68(%rsp),%rcx
add    %ecx,%eax
shr    %eax
add    $0x1,%eax
mov    %eax,0x5c(%rsp)
mov    0x54(%rsp),%eax
sub    %edx,%eax
mov    %eax,0x58(%rsp)
xorpd  %xmm1,%xmm1
xor    %ebx,%ebx
jmp    1552 <TM_cart2sph+0x412>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xc8(%rsp),%r14
mov    %r14d,%edi
mov    %ebx,%esi
mov    0x40(%rsp),%r15
mov    %r15,%rdx
movsd  %xmm0,0x8(%rsp)
call   1030 <n_over_k@plt>
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
mov    %r12d,%esi
mov    %r15,%rdx
call   1030 <n_over_k@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xb04(%rip),%xmm0
mov    %ebx,%edi
call   1050 <pow@plt>
mulsd  (%rsp),%xmm0
mov    %r14d,%eax
sub    %ebx,%eax
add    %eax,%eax
cltq
mulsd  (%r15,%rax,8),%xmm0
mov    0x14(%rsp),%ecx
sub    %ebx,%ecx
sub    %ebx,%ecx
movslq %ecx,%rax
divsd  (%r15,%rax,8),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
addsd  %xmm0,%xmm1
add    $0x1,%rbx
cmp    0xd0(%rsp),%rbx
je     12e0 <TM_cart2sph+0x1a0>
movsd  %xmm1,0x30(%rsp)
xor    %r15d,%r15d
mov    0x20(%rsp),%rax
mov    %eax,%r13d
mov    0x58(%rsp),%r14d
xorpd  %xmm0,%xmm0
jmp    161a <TM_cart2sph+0x4da>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
shr    $0x1f,%edi
add    %r14d,%edi
sar    %edi
movsd  0xa75(%rip),%xmm0
call   1050 <pow@plt>
movsd  %xmm0,(%rsp)
movsd  0xa6b(%rip),%xmm0
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r12d,%edi
mov    %r15d,%esi
mov    0x40(%rsp),%rbp
mov    %rbp,%rdx
call   1030 <n_over_k@plt>
movsd  %xmm0,0xe0(%rsp)
mov    0x38(%rsp),%rdi
mov    %r13d,%esi
mov    %rbp,%rdx
call   1030 <n_over_k@plt>
mulsd  0xe0(%rsp),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x1,%r15d
add    $0x2,%r14d
add    $0xfffffffe,%r13d
cmp    %r15d,0x5c(%rsp)
je     14c0 <TM_cart2sph+0x380>
cmpl   $0x0,0x1c(%rsp)
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
js     1640 <TM_cart2sph+0x500>
je     1650 <TM_cart2sph+0x510>
testb  $0x1,0x18(%rsp)
je     1580 <TM_cart2sph+0x440>
jmp    15b6 <TM_cart2sph+0x476>
nopl   (%rax)
testb  $0x1,0x18(%rsp)
jne    1580 <TM_cart2sph+0x440>
jmp    15b6 <TM_cart2sph+0x476>
testb  $0x1,0x20(%rsp)
jne    15b6 <TM_cart2sph+0x476>
mov    0xd8(%rsp),%rax
lea    (%rax,%r15,1),%edi
movsd  0x999(%rip),%xmm0
call   1050 <pow@plt>
jmp    15b6 <TM_cart2sph+0x476>
mov    0x60(%rsp),%rax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double* @TM_cart2sph(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%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 i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store double* %2, double** %6
store i32 0, i32* %24
%25 = load i32, i32* %4
%26 = mul nsw i32 3, %25
%27 = add nsw i32 %26, 2
%28 = sitofp i32 %27 to double
%29 = load double*, double** %6
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
%34 = load double, double* %33
%35 = fmul double %28, %34
%36 = load double*, double** %6
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
%40 = load double, double* %39
%41 = fmul double 1.200000e+01, %40
%42 = fdiv double %35, %41
%43 = fptosi double %42 to i32
%44 = call double* @calloc(i32 %43, i32 8)
store double* %44, double** %22
store double* %44, double** %23
store i32 0, i32* %7
br label %45
45: ; preds = %333, %3
%46 = load i32, i32* %7
%47 = load i32, i32* %4
%48 = icmp sle i32 %46, %47
br i1 %48, label %49, label %336
49: ; preds = %45
%50 = load i32, i32* %7
%51 = sub nsw i32 0, %50
store i32 %51, i32* %8
br label %52
52: ; preds = %329, %49
%53 = load i32, i32* %8
%54 = load i32, i32* %7
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %332
56: ; preds = %52
%57 = load i32, i32* %8
%58 = call i32 @abs(i32 %57)
store i32 %58, i32* %9
store i32 0, i32* %14
br label %59
59: ; preds = %325, %56
%60 = load i32, i32* %14
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
%63 = load i32, i32* %7
%64 = add nsw i32 %63, 2
%65 = mul nsw i32 %62, %64
%66 = sdiv i32 %65, 2
%67 = icmp slt i32 %60, %66
br i1 %67, label %68, label %328
68: ; preds = %59
%69 = load i32, i32* %7
%70 = sub nsw i32 %69, 1
%71 = add nsw i32 %70, 1
%72 = load i32, i32* %7
%73 = sub nsw i32 %72, 1
%74 = add nsw i32 %73, 2
%75 = mul nsw i32 %71, %74
%76 = load i32, i32* %7
%77 = sub nsw i32 %76, 1
%78 = add nsw i32 %77, 3
%79 = mul nsw i32 %75, %78
%80 = sdiv i32 %79, 6
%81 = load i32, i32* %14
%82 = add nsw i32 %80, %81
%83 = mul nsw i32 %82, 3
store i32 %83, i32* %13
%84 = load i32*, i32** %5
%85 = load i32, i32* %13
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %84, i64 %86
%88 = load i32, i32* %87
store i32 %88, i32* %10
%89 = load i32*, i32** %5
%90 = load i32, i32* %13
%91 = add nsw i32 %90, 1
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %89, i64 %92
%94 = load i32, i32* %93
store i32 %94, i32* %11
%95 = load i32*, i32** %5
%96 = load i32, i32* %13
%97 = add nsw i32 %96, 2
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32, i32* %95, i64 %98
%100 = load i32, i32* %99
store i32 %100, i32* %12
%101 = load i32, i32* %10
%102 = load i32, i32* %11
%103 = add nsw i32 %101, %102
%104 = load i32, i32* %9
%105 = sub nsw i32 %103, %104
store i32 %105, i32* %16
%106 = load i32, i32* %16
%107 = icmp slt i32 %106, 0
br i1 %107, label %112, label %108
108: ; preds = %68
%109 = load i32, i32* %16
%110 = srem i32 %109, 2
%111 = icmp eq i32 %110, 1
br i1 %111, label %112, label %114
112: ; preds = %108, %68
%113 = load double*, double** %23
store double 0.000000e+00, double* %113
br label %320
114: ; preds = %108
%115 = load i32, i32* %16
%116 = sdiv i32 %115, 2
store i32 %116, i32* %16
store double 0.000000e+00, double* %20
store i32 0, i32* %15
br label %117
117: ; preds = %234, %114
%118 = load i32, i32* %15
%119 = load i32, i32* %7
%120 = load i32, i32* %9
%121 = sub nsw i32 %119, %120
%122 = sdiv i32 %121, 2
%123 = icmp sle i32 %118, %122
br i1 %123, label %124, label %237
124: ; preds = %117
store double 0.000000e+00, double* %21
store i32 0, i32* %17
br label %125
125: ; preds = %194, %124
%126 = load i32, i32* %17
%127 = load i32, i32* %16
%128 = icmp sle i32 %126, %127
br i1 %128, label %129, label %197
129: ; preds = %125
store double 0.000000e+00, double* %19
%130 = load i32, i32* %8
%131 = icmp slt i32 %130, 0
br i1 %131, label %132, label %139
132: ; preds = %129
%133 = load i32, i32* %9
%134 = load i32, i32* %10
%135 = sub nsw i32 %133, %134
%136 = call i32 @abs(i32 %135)
%137 = srem i32 %136, 2
%138 = icmp eq i32 %137, 1
br i1 %138, label %149, label %139
139: ; preds = %132, %129
%140 = load i32, i32* %8
%141 = icmp sgt i32 %140, 0
br i1 %141, label %142, label %162
142: ; preds = %139
%143 = load i32, i32* %9
%144 = load i32, i32* %10
%145 = sub nsw i32 %143, %144
%146 = call i32 @abs(i32 %145)
%147 = srem i32 %146, 2
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %162
149: ; preds = %142, %132
%150 = load i32, i32* %9
%151 = load i32, i32* %10
%152 = sub nsw i32 %150, %151
%153 = load i32, i32* %17
%154 = mul nsw i32 2, %153
%155 = add nsw i32 %152, %154
%156 = sdiv i32 %155, 2
store i32 %156, i32* %18
%157 = load i32, i32* %18
%158 = call double @pow(double -1.000000e+00, i32 %157)
%159 = call i32 @sqrt(double 2.000000e+00)
%160 = sitofp i32 %159 to double
%161 = fmul double %158, %160
store double %161, double* %19
br label %178
162: ; preds = %142, %139
%163 = load i32, i32* %8
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %177
165: ; preds = %162
%166 = load i32, i32* %10
%167 = srem i32 %166, 2
%168 = icmp eq i32 %167, 0
br i1 %168, label %169, label %177
169: ; preds = %165
%170 = load i32, i32* %10
%171 = sub nsw i32 0, %170
%172 = sdiv i32 %171, 2
%173 = load i32, i32* %17
%174 = add nsw i32 %172, %173
store i32 %174, i32* %18
%175 = load i32, i32* %18
%176 = call double @pow(double -1.000000e+00, i32 %175)
store double %176, double* %19
br label %177
177: ; preds = %169, %165, %162
br label %178
178: ; preds = %177, %149
%179 = load i32, i32* %16
%180 = load i32, i32* %17
%181 = load double*, double** %6
%182 = call double @n_over_k(i32 %179, i32 %180, double* %181)
%183 = load i32, i32* %9
%184 = load i32, i32* %10
%185 = load i32, i32* %17
%186 = mul nsw i32 2, %185
%187 = sub nsw i32 %184, %186
%188 = load double*, double** %6
%189 = call double @n_over_k(i32 %183, i32 %187, double* %188)
%190 = fmul double %182, %189
%191 = load double, double* %19
%192 = load double, double* %21
%193 = call double @llvm.fmuladd.f64(double %190, double %191, double %192)
store double %193, double* %21
br label %194
194: ; preds = %178
%195 = load i32, i32* %17
%196 = add nsw i32 %195, 1
store i32 %196, i32* %17
br label %125
197: ; preds = %125
%198 = load i32, i32* %7
%199 = load i32, i32* %15
%200 = load double*, double** %6
%201 = call double @n_over_k(i32 %198, i32 %199, double* %200)
%202 = load i32, i32* %15
%203 = load i32, i32* %16
%204 = load double*, double** %6
%205 = call double @n_over_k(i32 %202, i32 %203, double* %204)
%206 = fmul double %201, %205
%207 = load i32, i32* %15
%208 = call double @pow(double -1.000000e+00, i32 %207)
%209 = fmul double %206, %208
%210 = load double*, double** %6
%211 = load i32, i32* %7
%212 = mul nsw i32 2, %211
%213 = load i32, i32* %15
%214 = mul nsw i32 2, %213
%215 = sub nsw i32 %212, %214
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %210, i64 %216
%218 = load double, double* %217
%219 = fmul double %209, %218
%220 = load double*, double** %6
%221 = load i32, i32* %7
%222 = load i32, i32* %9
%223 = sub nsw i32 %221, %222
%224 = load i32, i32* %15
%225 = mul nsw i32 2, %224
%226 = sub nsw i32 %223, %225
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double, double* %220, i64 %227
%229 = load double, double* %228
%230 = fdiv double %219, %229
%231 = load double, double* %21
%232 = load double, double* %20
%233 = call double @llvm.fmuladd.f64(double %230, double %231, double %232)
store double %233, double* %20
br label %234
234: ; preds = %197
%235 = load i32, i32* %15
%236 = add nsw i32 %235, 1
store i32 %236, i32* %15
br label %117
237: ; preds = %117
%238 = load double*, double** %6
%239 = load i32, i32* %10
%240 = mul nsw i32 2, %239
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %238, i64 %241
%243 = load double, double* %242
%244 = load double*, double** %6
%245 = load i32, i32* %11
%246 = mul nsw i32 2, %245
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds double, double* %244, i64 %247
%249 = load double, double* %248
%250 = fmul double %243, %249
%251 = load double*, double** %6
%252 = load i32, i32* %12
%253 = mul nsw i32 2, %252
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %251, i64 %254
%256 = load double, double* %255
%257 = fmul double %250, %256
%258 = load double*, double** %6
%259 = load i32, i32* %7
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double, double* %258, i64 %260
%262 = load double, double* %261
%263 = fmul double %257, %262
%264 = load double*, double** %6
%265 = load i32, i32* %7
%266 = load i32, i32* %9
%267 = sub nsw i32 %265, %266
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds double, double* %264, i64 %268
%270 = load double, double* %269
%271 = fmul double %263, %270
%272 = load double*, double** %6
%273 = load i32, i32* %7
%274 = mul nsw i32 2, %273
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds double, double* %272, i64 %275
%277 = load double, double* %276
%278 = load double*, double** %6
%279 = load i32, i32* %10
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double, double* %278, i64 %280
%282 = load double, double* %281
%283 = fmul double %277, %282
%284 = load double*, double** %6
%285 = load i32, i32* %11
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds double, double* %284, i64 %286
%288 = load double, double* %287
%289 = fmul double %283, %288
%290 = load double*, double** %6
%291 = load i32, i32* %12
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds double, double* %290, i64 %292
%294 = load double, double* %293
%295 = fmul double %289, %294
%296 = load double*, double** %6
%297 = load i32, i32* %7
%298 = load i32, i32* %9
%299 = add nsw i32 %297, %298
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %296, i64 %300
%302 = load double, double* %301
%303 = fmul double %295, %302
%304 = fdiv double %271, %303
%305 = call i32 @sqrt(double %304)
%306 = mul nsw i32 %305, 1
%307 = sitofp i32 %306 to double
%308 = load i32, i32* %7
%309 = call double @pow(double 2.000000e+00, i32 %308)
%310 = load double*, double** %6
%311 = load i32, i32* %7
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds double, double* %310, i64 %312
%314 = load double, double* %313
%315 = fmul double %309, %314
%316 = fdiv double %307, %315
%317 = load double, double* %20
%318 = fmul double %316, %317
%319 = load double*, double** %23
store double %318, double* %319
br label %320
320: ; preds = %237, %112
%321 = load double*, double** %23
%322 = getelementptr inbounds double, double* %321, i32 1
store double* %322, double** %23
%323 = load i32, i32* %24
%324 = add nsw i32 %323, 1
store i32 %324, i32* %24
br label %325
325: ; preds = %320
%326 = load i32, i32* %14
%327 = add nsw i32 %326, 1
store i32 %327, i32* %14
br label %59
328: ; preds = %59
br label %329
329: ; preds = %328
%330 = load i32, i32* %8
%331 = add nsw i32 %330, 1
store i32 %331, i32* %8
br label %52
332: ; preds = %52
br label %333
333: ; preds = %332
%334 = load i32, i32* %7
%335 = add nsw i32 %334, 1
store i32 %335, i32* %7
br label %45
336: ; preds = %45
%337 = load double*, double** %22
ret double* %337
}

LLVM IR (-O2):
define noalias double* @TM_cart2sph(i32 %0, i32* nocapture %1, double* %2) {
%4 = mul nsw i32 %0, 3
%5 = add nsw i32 %4, 2
%6 = sitofp i32 %5 to double
%7 = add nsw i32 %0, 3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %2, i64 %8
%10 = load double, double* %9
%11 = fmul double %10, %6
%12 = sext i32 %0 to i64
%13 = getelementptr inbounds double, double* %2, i64 %12
%14 = load double, double* %13
%15 = fmul double %14, 1.200000e+01
%16 = fdiv double %11, %15
%17 = fptosi double %16 to i32
%18 = tail call double* @calloc(i32 %17, i32 8)
%19 = icmp slt i32 %0, 0
br i1 %19, label %212, label %20
20: ; preds = %3
%21 = add nuw i32 %0, 1
%22 = zext i32 %21 to i64
br label %23
23: ; preds = %209, %20
%24 = phi i64 [ 0, %20 ], [ %28, %209 ]
%25 = phi i32 [ 1, %20 ], [ %210, %209 ]
%26 = phi double* [ %18, %20 ], [ %205, %209 ]
%27 = trunc i64 %24 to i32
%28 = add nuw nsw i64 %24, 1
%29 = add nuw nsw i32 %27, 2
%30 = trunc i64 %28 to i32
%31 = mul i32 %29, %30
%32 = lshr i32 %31, 1
%33 = icmp ult i32 %31, 2
%34 = mul i32 %31, %27
%35 = udiv i32 %34, 6
%36 = getelementptr inbounds double, double* %2, i64 %24
%37 = shl nuw nsw i64 %24, 1
%38 = getelementptr inbounds double, double* %2, i64 %37
%39 = zext i32 %35 to i64
%40 = zext i32 %32 to i64
%41 = trunc i64 %24 to i32
%42 = sub i32 0, %41
br label %43
43: ; preds = %23, %204
%44 = phi i32 [ %27, %23 ], [ %207, %204 ]
%45 = phi double* [ %26, %23 ], [ %205, %204 ]
%46 = phi i32 [ %42, %23 ], [ %206, %204 ]
%47 = call i32 @llvm.smax.i32(i32 %46, i32 %44)
%48 = tail call i32 @llvm.abs.i32(i32 %46, i1 true)
br i1 %33, label %204, label %49
49: ; preds = %43
%50 = sub nsw i32 %27, %48
%51 = sdiv i32 %50, 2
%52 = icmp slt i32 %50, -1
%53 = icmp slt i32 %46, 0
%54 = icmp eq i32 %46, 0
%55 = sext i32 %50 to i64
%56 = getelementptr inbounds double, double* %2, i64 %55
%57 = add nuw nsw i32 %48, %27
%58 = zext i32 %57 to i64
%59 = getelementptr inbounds double, double* %2, i64 %58
%60 = add nsw i32 %51, 1
%61 = zext i32 %60 to i64
br label %62
62: ; preds = %49, %199
%63 = phi i64 [ 0, %49 ], [ %202, %199 ]
%64 = phi double* [ %45, %49 ], [ %201, %199 ]
%65 = add nuw nsw i64 %63, %39
%66 = mul nuw nsw i64 %65, 3
%67 = getelementptr inbounds i32, i32* %1, i64 %66
%68 = load i32, i32* %67
%69 = add nuw nsw i64 %66, 1
%70 = getelementptr inbounds i32, i32* %1, i64 %69
%71 = load i32, i32* %70
%72 = add nuw nsw i64 %66, 2
%73 = getelementptr inbounds i32, i32* %1, i64 %72
%74 = load i32, i32* %73
%75 = sub i32 %68, %48
%76 = add i32 %75, %71
%77 = icmp slt i32 %76, 0
%78 = srem i32 %76, 2
%79 = icmp eq i32 %78, 1
%80 = or i1 %77, %79
br i1 %80, label %199, label %81
81: ; preds = %62
%82 = lshr i32 %76, 1
br i1 %52, label %148, label %83
83: ; preds = %81
%84 = sub i32 %48, %68
%85 = and i32 %84, 1
%86 = icmp eq i32 %85, 0
%87 = and i32 %68, 1
%88 = icmp eq i32 %87, 0
%89 = sdiv i32 %68, -2
%90 = sub i32 %68, %47
%91 = add i32 %90, %71
%92 = lshr i32 %91, 1
br label %93
93: ; preds = %83, %124
%94 = phi i64 [ 0, %83 ], [ %146, %124 ]
%95 = phi double [ 0.000000e+00, %83 ], [ %145, %124 ]
br label %96
96: ; preds = %93, %114
%97 = phi double [ 0.000000e+00, %93 ], [ %121, %114 ]
%98 = phi i32 [ 0, %93 ], [ %122, %114 ]
br i1 %53, label %99, label %100
99: ; preds = %96
br i1 %86, label %114, label %102
100: ; preds = %96
br i1 %54, label %110, label %101
101: ; preds = %100
br i1 %86, label %102, label %114
102: ; preds = %101, %99
%103 = shl nuw nsw i32 %98, 1
%104 = add nsw i32 %84, %103
%105 = sdiv i32 %104, 2
%106 = tail call double @pow(double -1.000000e+00, i32 %105)
%107 = tail call i32 @sqrt(double 2.000000e+00)
%108 = sitofp i32 %107 to double
%109 = fmul double %106, %108
br label %114
110: ; preds = %100
br i1 %88, label %111, label %114
111: ; preds = %110
%112 = add nsw i32 %98, %89
%113 = tail call double @pow(double -1.000000e+00, i32 %112)
br label %114
114: ; preds = %99, %101, %110, %111, %102
%115 = phi double [ %109, %102 ], [ %113, %111 ], [ 0.000000e+00, %110 ], [ 0.000000e+00, %101 ], [ 0.000000e+00, %99 ]
%116 = tail call double @n_over_k(i32 %82, i32 %98, double* %2)
%117 = mul i32 %98, -2
%118 = add i32 %117, %68
%119 = tail call double @n_over_k(i32 %48, i32 %118, double* %2)
%120 = fmul double %116, %119
%121 = tail call double @llvm.fmuladd.f64(double %120, double %115, double %97)
%122 = add nuw i32 %98, 1
%123 = icmp eq i32 %98, %92
br i1 %123, label %124, label %96
124: ; preds = %114
%125 = trunc i64 %94 to i32
%126 = tail call double @n_over_k(i32 %27, i32 %125, double* %2)
%127 = tail call double @n_over_k(i32 %125, i32 %82, double* %2)
%128 = fmul double %126, %127
%129 = tail call double @pow(double -1.000000e+00, i32 %125)
%130 = fmul double %128, %129
%131 = sub nsw i64 %24, %94
%132 = trunc i64 %131 to i32
%133 = shl nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %2, i64 %134
%136 = load double, double* %135
%137 = fmul double %130, %136
%138 = trunc i64 %94 to i32
%139 = mul i32 %138, -2
%140 = add i32 %139, %50
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %2, i64 %141
%143 = load double, double* %142
%144 = fdiv double %137, %143
%145 = tail call double @llvm.fmuladd.f64(double %144, double %121, double %95)
%146 = add nuw nsw i64 %94, 1
%147 = icmp eq i64 %146, %61
br i1 %147, label %148, label %93
148: ; preds = %124, %81
%149 = phi double [ 0.000000e+00, %81 ], [ %145, %124 ]
%150 = shl nsw i32 %68, 1
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %2, i64 %151
%153 = load double, double* %152
%154 = shl nsw i32 %71, 1
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %2, i64 %155
%157 = load double, double* %156
%158 = shl nsw i32 %74, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %2, i64 %159
%161 = load double, double* %160
%162 = load double, double* %36
%163 = load double, double* %56
%164 = load double, double* %38
%165 = sext i32 %68 to i64
%166 = getelementptr inbounds double, double* %2, i64 %165
%167 = load double, double* %166
%168 = insertelement <2 x double> poison, double %153, i64 0
%169 = insertelement <2 x double> %168, double %164, i64 1
%170 = insertelement <2 x double> poison, double %157, i64 0
%171 = insertelement <2 x double> %170, double %167, i64 1
%172 = fmul <2 x double> %169, %171
%173 = sext i32 %71 to i64
%174 = getelementptr inbounds double, double* %2, i64 %173
%175 = load double, double* %174
%176 = insertelement <2 x double> poison, double %161, i64 0
%177 = insertelement <2 x double> %176, double %175, i64 1
%178 = fmul <2 x double> %172, %177
%179 = sext i32 %74 to i64
%180 = getelementptr inbounds double, double* %2, i64 %179
%181 = load double, double* %180
%182 = insertelement <2 x double> poison, double %162, i64 0
%183 = insertelement <2 x double> %182, double %181, i64 1
%184 = fmul <2 x double> %178, %183
%185 = load double, double* %59
%186 = insertelement <2 x double> poison, double %163, i64 0
%187 = insertelement <2 x double> %186, double %185, i64 1
%188 = fmul <2 x double> %184, %187
%189 = extractelement <2 x double> %188, i64 0
%190 = extractelement <2 x double> %188, i64 1
%191 = fdiv double %189, %190
%192 = tail call i32 @sqrt(double %191)
%193 = sitofp i32 %192 to double
%194 = tail call double @pow(double 2.000000e+00, i32 %27)
%195 = load double, double* %36
%196 = fmul double %194, %195
%197 = fdiv double %193, %196
%198 = fmul double %149, %197
br label %199
199: ; preds = %62, %148
%200 = phi double [ %198, %148 ], [ 0.000000e+00, %62 ]
store double %200, double* %64
%201 = getelementptr inbounds double, double* %64, i64 1
%202 = add nuw nsw i64 %63, 1
%203 = icmp ult i64 %202, %40
br i1 %203, label %62, label %204
204: ; preds = %199, %43
%205 = phi double* [ %45, %43 ], [ %201, %199 ]
%206 = add i32 %46, 1
%207 = add i32 %44, -1
%208 = icmp eq i32 %206, %25
br i1 %208, label %209, label %43
209: ; preds = %204
%210 = add nuw i32 %25, 1
%211 = icmp eq i64 %28, %22
br i1 %211, label %212, label %23
212: ; preds = %209, %3
ret double* %18
}