#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 */
double FABS(double);
double exp(double);
void coreGTRGAMMAINVAR_BINARY(double propInvar, double *frequencies,
                              double *gammaRates, double *EIGN,
                              double *sumtable, volatile double *ext_dlnLdlz,
                              volatile double *ext_d2lnLdlz2, int *iptr,
                              int *wrptr, int upper, double lz) {
  double *sum, diagptable[12];
  int i, j;
  double dlnLdlz = 0;
  double d2lnLdlz2 = 0;
  double ki, kisqr;
  double freqs[4];
  double scaler = 0.25 * (1.0 - propInvar);
  double tmp_1;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  freqs[0] = frequencies[0] * propInvar;
  freqs[1] = frequencies[1] * propInvar;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    diagptable[i * 3] = exp(EIGN[0] * ki * lz);
    diagptable[i * 3 + 1] = EIGN[0] * ki;
    diagptable[i * 3 + 2] = EIGN[0] * EIGN[0] * kisqr;
  }
  for (i = 0; i < upper; i++) {
    sum = &(sumtable[i * 8]);
    inv_Li = 0.0;
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (j = 0; j < 4; j++) {
      inv_Li += sum[2 * j];
      tmp_1 = diagptable[3 * j] * sum[2 * j + 1];
      inv_Li += tmp_1;
      dlnLidlz += tmp_1 * diagptable[3 * j + 1];
      d2lnLidlz2 += tmp_1 * diagptable[3 * j + 2];
    }
    inv_Li = FABS(inv_Li) * scaler;
    if (iptr[i] < 2)
      inv_Li += freqs[iptr[i]];
    inv_Li = 1.0 / inv_Li;
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLidlz *= scaler;
    d2lnLidlz2 *= scaler;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wrptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
}


x86 assembly (clang, -O0):
<coreGTRGAMMAINVAR_BINARY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xe92(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xe7d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movl   $0x0,-0xb4(%rbp)
cmpl   $0x4,-0xb4(%rbp)
jge    1293 <coreGTRGAMMAINVAR_BINARY+0x173>
mov    -0x18(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
call   1040 <exp@plt>
imul   $0x3,-0xb4(%rbp),%eax
cltq
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
imul   $0x3,-0xb4(%rbp),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
imul   $0x3,-0xb4(%rbp),%eax
add    $0x2,%eax
cltq
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11c4 <coreGTRGAMMAINVAR_BINARY+0xa4>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1561 <coreGTRGAMMAINVAR_BINARY+0x441>
mov    -0x28(%rbp),%rax
mov    -0xb4(%rbp),%ecx
shl    $0x3,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movl   $0x0,-0xb8(%rbp)
cmpl   $0x4,-0xb8(%rbp)
jge    13ec <coreGTRGAMMAINVAR_BINARY+0x2cc>
mov    -0x48(%rbp),%rax
mov    -0xb8(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
imul   $0x3,-0xb8(%rbp),%eax
cltq
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x48(%rbp),%rax
mov    -0xb8(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
imul   $0x3,-0xb8(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0xb0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x120(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
imul   $0x3,-0xb8(%rbp),%eax
add    $0x2,%eax
cltq
movsd  -0xb0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x128(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    12f2 <coreGTRGAMMAINVAR_BINARY+0x1d2>
movsd  -0x118(%rbp),%xmm0
ff
call   1030 <FABS@plt>
mulsd  -0x108(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0xb4(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
jge    1446 <coreGTRGAMMAINVAR_BINARY+0x326>
mov    0x10(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
movsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xbba(%rip),%xmm0
divsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
mulsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
mulsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0xb4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x120(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0xb4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x128(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm2
ff
movsd  -0x120(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    129d <coreGTRGAMMAINVAR_BINARY+0x17d>
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGTRGAMMAINVAR_BINARY>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
movsd  %xmm1,0x40(%rsp)
mov    %r9,%r14
mov    %r8,%rbp
mov    %rcx,%rbx
mov    %rdx,%r12
mov    %rsi,%r13
mov    0x130(%rsp),%r15d
movupd (%rdi),%xmm2
movapd %xmm0,0x50(%rsp)
unpcklpd %xmm0,%xmm0
mulpd  %xmm2,%xmm0
movapd %xmm0,0xc0(%rsp)
movsd  (%rsi),%xmm2
movsd  (%rdx),%xmm0
movsd  %xmm2,0x38(%rsp)
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0xa0(%rsp)
movsd  (%r12),%xmm1
movsd  0x8(%r13),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  %xmm1,0x30(%rsp)
mulsd  %xmm1,%xmm0
mulsd  0x40(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x98(%rsp)
movsd  (%r12),%xmm1
movsd  0x10(%r13),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  %xmm1,0x20(%rsp)
mulsd  %xmm1,%xmm0
mulsd  0x40(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x90(%rsp)
movsd  (%r12),%xmm1
movsd  0x18(%r13),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm0
mulsd  0x40(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x88(%rsp)
test   %r15d,%r15d
jle    1522 <coreGTRGAMMAINVAR_BINARY+0x402>
mov    %rbp,0x68(%rsp)
mov    %r14,0x70(%rsp)
mov    0x128(%rsp),%r13
mov    0x120(%rsp),%r14
movsd  0xdb7(%rip),%xmm11
subsd  0x50(%rsp),%xmm11
movsd  0x38(%rsp),%xmm8
movapd %xmm8,%xmm0
mulsd  %xmm8,%xmm0
movsd  0x30(%rsp),%xmm9
mulsd  %xmm9,%xmm8
mulsd  %xmm9,%xmm9
mulsd  %xmm0,%xmm9
movsd  0x28(%rsp),%xmm10
movapd %xmm10,%xmm0
mulsd  %xmm10,%xmm0
movsd  0x20(%rsp),%xmm7
mulsd  %xmm7,%xmm10
mulsd  %xmm7,%xmm7
mulsd  %xmm0,%xmm7
movsd  0x18(%rsp),%xmm12
movapd %xmm12,%xmm0
mulsd  %xmm12,%xmm0
movsd  0x10(%rsp),%xmm5
mulsd  %xmm5,%xmm12
mulsd  %xmm5,%xmm5
mulsd  %xmm0,%xmm5
movsd  0x8(%rsp),%xmm6
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
movsd  (%r12),%xmm1
mulsd  %xmm1,%xmm6
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x78(%rsp)
mulsd  0xd1a(%rip),%xmm11
mov    %r15d,%r12d
add    $0x38,%rbx
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
xorpd  %xmm4,%xmm4
movapd %xmm7,%xmm13
movapd %xmm5,%xmm14
movsd  %xmm8,0x38(%rsp)
movsd  %xmm9,0x30(%rsp)
movsd  %xmm10,0x28(%rsp)
movsd  %xmm7,0x20(%rsp)
movsd  %xmm12,0x18(%rsp)
movsd  %xmm5,0x10(%rsp)
movsd  %xmm6,0x8(%rsp)
movsd  %xmm11,0x80(%rsp)
jmp    145c <coreGTRGAMMAINVAR_BINARY+0x33c>
cs nopw 0x0(%rax,%rax,1)
movsd  0x38(%rsp),%xmm8
movsd  0x30(%rsp),%xmm9
movsd  0x28(%rsp),%xmm10
movsd  0x20(%rsp),%xmm13
movsd  0x18(%rsp),%xmm12
movsd  0x10(%rsp),%xmm14
movsd  0x8(%rsp),%xmm6
movsd  0xa8(%rsp),%xmm5
movapd %xmm5,%xmm1
mulsd  %xmm8,%xmm1
xorpd  %xmm4,%xmm4
addsd  %xmm4,%xmm1
movsd  0xb8(%rsp),%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm10,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm9,%xmm5
addsd  %xmm4,%xmm5
mulsd  %xmm13,%xmm3
addsd  %xmm5,%xmm3
movsd  0x50(%rsp),%xmm1
movapd %xmm1,%xmm7
mulsd  %xmm12,%xmm7
addsd  %xmm2,%xmm7
mulsd  %xmm14,%xmm1
addsd  %xmm3,%xmm1
movsd  0xb0(%rsp),%xmm5
movapd %xmm5,%xmm3
mulsd  %xmm6,%xmm3
addsd  %xmm7,%xmm3
mulsd  0x78(%rsp),%xmm5
addsd  %xmm1,%xmm5
movsd  0xbfb(%rip),%xmm2
divsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm3
mulsd  %xmm5,%xmm2
mulsd  %xmm11,%xmm3
mulsd  %xmm11,%xmm2
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
subsd  %xmm0,%xmm2
unpcklpd %xmm3,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sdl 0x0(%r13,%rbp,4),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm2
movapd %xmm2,%xmm1
movapd 0x40(%rsp),%xmm0
addpd  %xmm0,%xmm1
add    $0x1,%rbp
add    $0x40,%rbx
cmp    %rbp,%r12
je     1512 <coreGTRGAMMAINVAR_BINARY+0x3f2>
movsd  -0x38(%rbx),%xmm0
addsd  %xmm4,%xmm0
movsd  -0x30(%rbx),%xmm2
mulsd  0xa0(%rsp),%xmm2
movsd  %xmm2,0xa8(%rsp)
addsd  %xmm2,%xmm0
addsd  -0x28(%rbx),%xmm0
movsd  -0x20(%rbx),%xmm2
mulsd  0x98(%rsp),%xmm2
movsd  %xmm2,0xb8(%rsp)
addsd  %xmm2,%xmm0
addsd  -0x18(%rbx),%xmm0
movsd  -0x10(%rbx),%xmm2
mulsd  0x90(%rsp),%xmm2
movsd  %xmm2,0x50(%rsp)
addsd  %xmm2,%xmm0
addsd  -0x8(%rbx),%xmm0
movapd %xmm1,0x40(%rsp)
movsd  (%rbx),%xmm1
mulsd  0x88(%rsp),%xmm1
movsd  %xmm1,0xb0(%rsp)
addsd  %xmm1,%xmm0
call   1030 <FABS@plt>
movsd  0x80(%rsp),%xmm11
mulsd  %xmm11,%xmm0
movslq (%r14,%rbp,4),%rax
cmp    $0x1,%rax
jg     1350 <coreGTRGAMMAINVAR_BINARY+0x230>
addsd  0xc0(%rsp,%rax,8),%xmm0
jmp    1350 <coreGTRGAMMAINVAR_BINARY+0x230>
addpd  %xmm0,%xmm2
mov    0x70(%rsp),%r14
mov    0x68(%rsp),%rbp
jmp    1526 <coreGTRGAMMAINVAR_BINARY+0x406>
xorpd  %xmm2,%xmm2
movhpd %xmm2,0x0(%rbp)
movlpd %xmm2,(%r14)
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @coreGTRGAMMAINVAR_BINARY(double %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* %5, double* %6, i32* nocapture %7, i32* nocapture %8, i32 %9, double %10) {
%12 = alloca [4 x double]
%13 = bitcast [4 x double]* %12 to i8*
%14 = fsub double 1.000000e+00, %0
%15 = bitcast double* %1 to <2 x double>*
%16 = load <2 x double>, <2 x double>* %15
%17 = insertelement <2 x double> poison, double %0, i64 0
%18 = shufflevector <2 x double> %17, <2 x double> poison, <2 x i32> zeroinitializer
%19 = fmul <2 x double> %16, %18
%20 = bitcast [4 x double]* %12 to <2 x double>*
store <2 x double> %19, <2 x double>* %20
%21 = load double, double* %2
%22 = fmul double %21, %21
%23 = load double, double* %3
%24 = fmul double %21, %23
%25 = fmul double %24, %10
%26 = tail call double @exp(double %25)
%27 = load double, double* %3
%28 = fmul double %21, %27
%29 = fmul double %27, %27
%30 = fmul double %22, %29
%31 = getelementptr inbounds double, double* %2, i64 1
%32 = load double, double* %31
%33 = fmul double %32, %32
%34 = fmul double %32, %27
%35 = fmul double %34, %10
%36 = tail call double @exp(double %35)
%37 = load double, double* %3
%38 = fmul double %32, %37
%39 = fmul double %37, %37
%40 = fmul double %33, %39
%41 = getelementptr inbounds double, double* %2, i64 2
%42 = load double, double* %41
%43 = fmul double %42, %42
%44 = fmul double %42, %37
%45 = fmul double %44, %10
%46 = tail call double @exp(double %45)
%47 = load double, double* %3
%48 = fmul double %42, %47
%49 = fmul double %47, %47
%50 = fmul double %43, %49
%51 = getelementptr inbounds double, double* %2, i64 3
%52 = load double, double* %51
%53 = fmul double %52, %52
%54 = fmul double %52, %47
%55 = fmul double %54, %10
%56 = tail call double @exp(double %55)
%57 = load double, double* %3
%58 = fmul double %52, %57
%59 = fmul double %57, %57
%60 = fmul double %53, %59
%61 = fmul double %14, 2.500000e-01
%62 = icmp sgt i32 %9, 0
br i1 %62, label %63, label %136
63: ; preds = %11
%64 = zext i32 %9 to i64
br label %65
65: ; preds = %63, %115
%66 = phi i64 [ 0, %63 ], [ %132, %115 ]
%67 = phi <2 x double> [ zeroinitializer, %63 ], [ %131, %115 ]
%68 = shl nsw i64 %66, 3
%69 = getelementptr inbounds double, double* %4, i64 %68
%70 = load double, double* %69
%71 = fadd double %70, 0.000000e+00
%72 = getelementptr inbounds double, double* %69, i64 1
%73 = load double, double* %72
%74 = fmul double %26, %73
%75 = fadd double %71, %74
%76 = tail call double @llvm.fmuladd.f64(double %74, double %28, double 0.000000e+00)
%77 = tail call double @llvm.fmuladd.f64(double %74, double %30, double 0.000000e+00)
%78 = getelementptr inbounds double, double* %69, i64 2
%79 = load double, double* %78
%80 = fadd double %75, %79
%81 = getelementptr inbounds double, double* %69, i64 3
%82 = load double, double* %81
%83 = fmul double %36, %82
%84 = fadd double %80, %83
%85 = tail call double @llvm.fmuladd.f64(double %83, double %38, double %76)
%86 = tail call double @llvm.fmuladd.f64(double %83, double %40, double %77)
%87 = getelementptr inbounds double, double* %69, i64 4
%88 = load double, double* %87
%89 = fadd double %84, %88
%90 = getelementptr inbounds double, double* %69, i64 5
%91 = load double, double* %90
%92 = fmul double %46, %91
%93 = fadd double %89, %92
%94 = tail call double @llvm.fmuladd.f64(double %92, double %48, double %85)
%95 = tail call double @llvm.fmuladd.f64(double %92, double %50, double %86)
%96 = getelementptr inbounds double, double* %69, i64 6
%97 = load double, double* %96
%98 = fadd double %93, %97
%99 = getelementptr inbounds double, double* %69, i64 7
%100 = load double, double* %99
%101 = fmul double %56, %100
%102 = fadd double %98, %101
%103 = tail call double @llvm.fmuladd.f64(double %101, double %58, double %94)
%104 = tail call double @llvm.fmuladd.f64(double %101, double %60, double %95)
%105 = tail call double @FABS(double %102)
%106 = fmul double %61, %105
%107 = getelementptr inbounds i32, i32* %7, i64 %66
%108 = load i32, i32* %107
%109 = icmp slt i32 %108, 2
br i1 %109, label %110, label %115
110: ; preds = %65
%111 = sext i32 %108 to i64
%112 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 %111
%113 = load double, double* %112
%114 = fadd double %106, %113
br label %115
115: ; preds = %110, %65
%116 = phi double [ %114, %110 ], [ %106, %65 ]
%117 = fdiv double 1.000000e+00, %116
%118 = fmul double %103, %117
%119 = fmul double %104, %117
%120 = fmul double %61, %118
%121 = fmul double %61, %119
%122 = getelementptr inbounds i32, i32* %8, i64 %66
%123 = load i32, i32* %122
%124 = sitofp i32 %123 to double
%125 = fneg double %120
%126 = tail call double @llvm.fmuladd.f64(double %125, double %120, double %121)
%127 = insertelement <2 x double> poison, double %124, i64 0
%128 = shufflevector <2 x double> %127, <2 x double> poison, <2 x i32> zeroinitializer
%129 = insertelement <2 x double> poison, double %126, i64 0
%130 = insertelement <2 x double> %129, double %120, i64 1
%131 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %128, <2 x double> %130, <2 x double> %67)
%132 = add nuw nsw i64 %66, 1
%133 = icmp eq i64 %132, %64
br i1 %133, label %134, label %65
134: ; preds = %115
%135 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %128, <2 x double> %130, <2 x double> %67)
br label %136
136: ; preds = %134, %11
%137 = phi <2 x double> [ zeroinitializer, %11 ], [ %135, %134 ]
%138 = extractelement <2 x double> %137, i64 1
store volatile double %138, double* %5
%139 = extractelement <2 x double> %137, i64 0
store volatile double %139, double* %6
ret void
}