#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 l;

/* Variables and functions */
double *calloc(int, int);
double sqrt(double const);
double *TM_sph2cart(double *M, int lmax, const int *const xyz,
                    const double *fac) {
  int l, m;
  int c1, c2, ijk;
  int lx, ly, lz;
  int lx1, ly1, lz1;
  int lx2, ly2, lz2;
  double s, s1, s2;
  int dim = 0;
  double *TM, *T;
  for (l = 0; l <= lmax; l++) {
    dim += ((int)((3 * (l) + 2) * fac[l + 3] / (12 * fac[l])));
  }
  T = TM = calloc(dim, sizeof(double));
  for (l = 0; l <= lmax; l++) {
    for (c1 = 0; c1 < ((l) + 1) * ((l) + 2) / 2; c1++) {
      ijk = ((((l)-1) + 1) * (((l)-1) + 2) * (((l)-1) + 3) / 6 + (c1)) * 3;
      lx1 = xyz[ijk];
      ly1 = xyz[ijk + 1];
      lz1 = xyz[ijk + 2];
      s1 = sqrt((fac[lx1] * fac[ly1] * fac[lz1]) /
                (fac[2 * lx1] * fac[2 * ly1] * fac[2 * lz1]));
      for (c2 = 0; c2 < ((l) + 1) * ((l) + 2) / 2; c2++) {
        ijk = ((((l)-1) + 1) * (((l)-1) + 2) * (((l)-1) + 3) / 6 + (c2)) * 3;
        lx2 = xyz[ijk];
        ly2 = xyz[ijk + 1];
        lz2 = xyz[ijk + 2];
        lx = lx1 + lx2;
        ly = ly1 + ly2;
        lz = lz1 + lz2;
        if ((lx % 2 == 0) && (ly % 2 == 0) && (lz % 2 == 0)) {
          s2 = sqrt((fac[lx2] * fac[ly2] * fac[lz2]) /
                    (fac[2 * lx2] * fac[2 * ly2] * fac[2 * lz2]));
          s = fac[lx] * fac[ly] * fac[lz] * s1 * s2 /
              (fac[lx / 2] * fac[ly / 2] * fac[lz / 2]);
          for (m = -l; m <= l; m++)
            *T += s * (*M);
        }
        T++;
        M++;
      }
    }
  }
  return TM;
}


x86 assembly (clang, -O0):
<TM_sph2cart>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11a2 <TM_sph2cart+0x82>
imul   $0x3,-0x24(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  0xe7f(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    -0x74(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1148 <TM_sph2cart+0x28>
mov    -0x74(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x80(%rbp)
mov    %rax,-0x88(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1580 <TM_sph2cart+0x460>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8c(%rbp),%eax
cmp    %ecx,%eax
jge    156d <TM_sph2cart+0x44d>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
add    $0x3,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
add    -0x2c(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x4c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
cmp    %ecx,%eax
jge    155a <TM_sph2cart+0x43a>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
add    $0x3,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
add    -0x30(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x54(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x58(%rbp)
mov    -0x44(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x48(%rbp),%eax
add    -0x54(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x4c(%rbp),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    152e <TM_sph2cart+0x40e>
mov    -0x3c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    152e <TM_sph2cart+0x40e>
mov    -0x40(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    152e <TM_sph2cart+0x40e>
mov    -0x20(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x58(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x50(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x54(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xa8(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xa0(%rbp),%rax
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x40(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x98(%rbp),%rax
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
xor    %eax,%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1529 <TM_sph2cart+0x409>
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x88(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    14eb <TM_sph2cart+0x3cb>
jmp    152e <TM_sph2cart+0x40e>
mov    -0x88(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x88(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12dc <TM_sph2cart+0x1bc>
jmp    155f <TM_sph2cart+0x43f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d4 <TM_sph2cart+0xb4>
jmp    1572 <TM_sph2cart+0x452>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c1 <TM_sph2cart+0xa1>
mov    -0x80(%rbp),%rax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TM_sph2cart>:
test   %esi,%esi
js     114d <TM_sph2cart+0x2d>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %esi,%ebx
lea    0x1(%rbx),%ebp
cmp    $0x3,%esi
mov    %rdx,0x8(%rsp)
jae    1159 <TM_sph2cart+0x39>
mov    %rdi,%r14
xor    %eax,%eax
xor    %edi,%edi
jmp    122a <TM_sph2cart+0x10a>
xor    %edi,%edi
mov    $0x8,%esi
jmp    1030 <calloc@plt>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    0x0(,%rbp,8),%rdx
and    $0xffffffffffffffe0,%rdx
movdqa 0xe8e(%rip),%xmm1
pxor   %xmm0,%xmm0
xor    %esi,%esi
movdqa 0xe8f(%rip),%xmm8
movdqa 0xe96(%rip),%xmm9
movapd 0xe9d(%rip),%xmm11
movdqa 0xea4(%rip),%xmm10
pxor   %xmm3,%xmm3
movdqa %xmm1,%xmm7
paddd  %xmm1,%xmm7
paddd  %xmm1,%xmm7
movdqa %xmm7,%xmm2
paddd  %xmm8,%xmm2
paddd  %xmm9,%xmm7
cvtdq2pd %xmm2,%xmm2
cvtdq2pd %xmm7,%xmm7
movupd (%rcx,%rsi,1),%xmm4
movupd 0x10(%rcx,%rsi,1),%xmm6
movupd 0x18(%rcx,%rsi,1),%xmm5
mulpd  %xmm2,%xmm5
movupd 0x28(%rcx,%rsi,1),%xmm2
mulpd  %xmm7,%xmm2
mulpd  %xmm11,%xmm4
divpd  %xmm4,%xmm5
mulpd  %xmm11,%xmm6
cvttpd2dq %xmm5,%xmm4
divpd  %xmm6,%xmm2
paddd  %xmm4,%xmm0
cvttpd2dq %xmm2,%xmm2
paddd  %xmm2,%xmm3
paddd  %xmm10,%xmm1
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    11a0 <TM_sph2cart+0x80>
mov    %rdi,%r14
paddd  %xmm0,%xmm3
pshufd $0x55,%xmm3,%xmm0
paddd  %xmm3,%xmm0
movd   %xmm0,%edi
cmp    %rbp,%rax
je     126c <TM_sph2cart+0x14c>
lea    (%rax,%rax,2),%edx
add    $0x2,%edx
movsd  0xe18(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  0x18(%rcx,%rax,8),%xmm1
movsd  (%rcx,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%esi
add    %esi,%edi
add    $0x1,%rax
add    $0x3,%edx
cmp    %rax,%rbp
jne    1240 <TM_sph2cart+0x120>
mov    $0x8,%esi
mov    %rcx,0x10(%rsp)
call   1030 <calloc@plt>
mov    0x10(%rsp),%r9
mov    %rax,0x20(%rsp)
mov    %rbx,0x38(%rsp)
test   %ebx,%ebx
mov    0x8(%rsp),%r8
js     159a <TM_sph2cart+0x47a>
mov    %r14,%rdi
xor    %eax,%eax
mov    %rax,(%rsp)
xorpd  %xmm4,%xmm4
mov    0x20(%rsp),%r13
xor    %eax,%eax
jmp    12ce <TM_sph2cart+0x1ae>
nopl   (%rax)
mov    (%rsp),%rax
add    $0x2,%eax
mov    %rax,(%rsp)
mov    0x40(%rsp),%rax
cmp    0x38(%rsp),%eax
mov    0x18(%rsp),%eax
je     159a <TM_sph2cart+0x47a>
mov    %eax,%ecx
lea    0x1(%rcx),%eax
lea    0x2(%rcx),%r10d
imul   %eax,%r10d
cmp    $0x2,%r10d
mov    %eax,0x18(%rsp)
mov    %rcx,0x40(%rsp)
jb     12b0 <TM_sph2cart+0x190>
mov    %ecx,%eax
and    $0x3,%eax
lea    (%rax,%rax,1),%ebp
add    $0x1,%ebp
lea    (%rcx,%rcx,1),%eax
mov    %eax,0x1c(%rsp)
mov    %r10d,%r11d
shr    %r11d
imul   %ecx,%r10d
mov    $0xaaaaaaab,%eax
imul   %rax,%r10
shr    $0x22,%r10
xor    %ecx,%ecx
mov    %r10,0x30(%rsp)
mov    %r11,0x28(%rsp)
jmp    1342 <TM_sph2cart+0x222>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x48(%rsp),%rcx
add    $0x1,%rcx
cmp    %r11,%rcx
jae    12b0 <TM_sph2cart+0x190>
lea    (%rcx,%r10,1),%rax
lea    (%rax,%rax,2),%rax
movslq (%r8,%rax,4),%rdx
movslq 0x4(%r8,%rax,4),%rsi
movsd  (%r9,%rdx,8),%xmm0
mulsd  (%r9,%rsi,8),%xmm0
movslq 0x8(%r8,%rax,4),%rbx
mulsd  (%r9,%rbx,8),%xmm0
mov    %rdx,0x70(%rsp)
mov    %rdx,%rax
shl    $0x4,%rax
movsd  (%r9,%rax,1),%xmm1
mov    %rsi,0x68(%rsp)
mov    %rsi,%rax
shl    $0x4,%rax
mulsd  (%r9,%rax,1),%xmm1
mov    %rbx,0x60(%rsp)
mov    %rbx,%rax
shl    $0x4,%rax
mulsd  (%r9,%rax,1),%xmm1
divsd  %xmm1,%xmm0
ucomisd %xmm4,%xmm0
mov    %rcx,0x48(%rsp)
jb     13c0 <TM_sph2cart+0x2a0>
xorps  %xmm5,%xmm5
sqrtsd %xmm0,%xmm5
jmp    13e7 <TM_sph2cart+0x2c7>
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rbx
call   1040 <sqrt@plt>
mov    0x28(%rsp),%r11
mov    0x30(%rsp),%r10
xorpd  %xmm4,%xmm4
mov    %rbx,%rdi
mov    0x8(%rsp),%r8
mov    0x10(%rsp),%r9
movapd %xmm0,%xmm5
xor    %r15d,%r15d
movsd  %xmm5,0x50(%rsp)
jmp    141b <TM_sph2cart+0x2fb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm0,0x0(%r13)
add    $0x8,%r13
add    $0x8,%rdi
add    $0x1,%r15
cmp    %r11,%r15
jae    1330 <TM_sph2cart+0x210>
lea    (%r15,%r10,1),%rax
lea    (%rax,%rax,2),%rdx
movslq (%r8,%rdx,4),%rax
mov    0x70(%rsp),%rcx
lea    (%rax,%rcx,1),%rbx
test   $0x1,%bl
jne    1406 <TM_sph2cart+0x2e6>
movslq 0x4(%r8,%rdx,4),%rcx
mov    0x68(%rsp),%rsi
lea    (%rcx,%rsi,1),%r12
mov    %r12d,%esi
and    $0x1,%esi
jne    1406 <TM_sph2cart+0x2e6>
movslq 0x8(%r8,%rdx,4),%rdx
mov    0x60(%rsp),%rsi
lea    (%rdx,%rsi,1),%r14
mov    %r14d,%esi
and    $0x1,%esi
jne    1406 <TM_sph2cart+0x2e6>
movsd  (%r9,%rax,8),%xmm0
mulsd  (%r9,%rcx,8),%xmm0
mulsd  (%r9,%rdx,8),%xmm0
add    %eax,%eax
cltq
movsd  (%r9,%rax,8),%xmm1
lea    (%rcx,%rcx,1),%eax
cltq
mulsd  (%r9,%rax,8),%xmm1
lea    (%rdx,%rdx,1),%eax
cltq
mulsd  (%r9,%rax,8),%xmm1
divsd  %xmm1,%xmm0
ucomisd %xmm4,%xmm0
jb     14b0 <TM_sph2cart+0x390>
sqrtsd %xmm0,%xmm0
jmp    14dd <TM_sph2cart+0x3bd>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rdi,0x58(%rsp)
call   1040 <sqrt@plt>
movsd  0x50(%rsp),%xmm5
mov    0x28(%rsp),%r11
mov    0x30(%rsp),%r10
xorpd  %xmm4,%xmm4
mov    0x58(%rsp),%rdi
mov    0x8(%rsp),%r8
mov    0x10(%rsp),%r9
movsd  (%r9,%rbx,8),%xmm1
mulsd  (%r9,%r12,8),%xmm1
mulsd  (%r9,%r14,8),%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm0,%xmm1
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
cltq
movsd  (%r9,%rax,8),%xmm0
mov    %r12d,%eax
shr    $0x1f,%eax
add    %r12d,%eax
sar    %eax
cltq
mulsd  (%r9,%rax,8),%xmm0
mov    %r14d,%eax
shr    $0x1f,%eax
add    %r14d,%eax
sar    %eax
cltq
mulsd  (%r9,%rax,8),%xmm0
divsd  %xmm0,%xmm1
movsd  (%rdi),%xmm3
movsd  0x0(%r13),%xmm0
xor    %eax,%eax
xchg   %ax,%ax
mov    %eax,%ecx
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
lea    0x1(%rcx),%eax
cmp    %eax,%ebp
jne    1540 <TM_sph2cart+0x420>
cmpl   $0x7,0x1c(%rsp)
jb     1400 <TM_sph2cart+0x2e0>
mov    (%rsp),%rax
sub    %ecx,%eax
cs nopw 0x0(%rax,%rax,1)
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
add    $0xfffffff8,%eax
jne    1570 <TM_sph2cart+0x450>
jmp    1400 <TM_sph2cart+0x2e0>
mov    0x20(%rsp),%rax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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