#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);
int /*<<< orphan*/ rax_free(double *);
scalar_t__ rax_malloc(int);
void coreGTRGAMMA_BINARY(const int upper, double *sumtable, volatile double *d1,
                         volatile double *d2, double *EIGN, double *gammaRates,
                         double lz, int *wrptr) {
  int i, j;
  double *diagptable, *diagptable_start, *sum, tmp_1, inv_Li, dlnLidlz,
      d2lnLidlz2, ki, kisqr, dlnLdlz = 0.0, d2lnLdlz2 = 0.0;
  diagptable = diagptable_start = (double *)rax_malloc(sizeof(double) * 12);
  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++) {
    diagptable = diagptable_start;
    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 = 1.0 / FABS(inv_Li);
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wrptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *d1 = dlnLdlz;
  *d2 = d2lnLdlz2;
  rax_free(diagptable_start);
}


x86 assembly (clang, -O0):
<coreGTRGAMMA_BINARY>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    $0x60,%edi
call   1040 <rax_malloc@plt>
mov    %rax,-0x50(%rbp)
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    1248 <coreGTRGAMMA_BINARY+0x108>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1060 <exp@plt>
mov    -0x48(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    -0x48(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    119a <coreGTRGAMMA_BINARY+0x5a>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1422 <coreGTRGAMMA_BINARY+0x2e2>
mov    -0x50(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
shl    $0x3,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x40(%rbp)
cmpl   $0x4,-0x40(%rbp)
jge    135b <coreGTRGAMMA_BINARY+0x21b>
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x48(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x48(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x48(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    129a <coreGTRGAMMA_BINARY+0x15a>
movsd  -0x68(%rbp),%xmm0
call   1030 <FABS@plt>
movaps %xmm0,%xmm1
movsd  0xc90(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    124f <coreGTRGAMMA_BINARY+0x10f>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rdi
call   1050 <rax_free@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGTRGAMMA_BINARY>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm0,0x20(%rsp)
mov    %r9,%r14
mov    %r8,%rbp
mov    %rcx,0x40(%rsp)
mov    %rdx,0x38(%rsp)
mov    %rsi,%r12
mov    %edi,%r13d
mov    0x80(%rsp),%r15
mov    $0x60,%edi
call   1040 <rax_malloc@plt>
mov    %rax,%rbx
movsd  (%r14),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
mulsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
movsd  0x8(%r14),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,0x18(%rbx)
movsd  0x8(%rsp),%xmm0
mulsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x20(%rbx)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x28(%rbx)
movsd  0x10(%r14),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,0x30(%rbx)
movsd  0x8(%rsp),%xmm0
mulsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x38(%rbx)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x40(%rbx)
movsd  0x18(%r14),%xmm1
movapd %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
movapd 0x10(%rsp),%xmm6
movsd  %xmm0,0x48(%rbx)
mulsd  0x0(%rbp),%xmm6
movsd  %xmm6,0x50(%rbx)
movsd  0x0(%rbp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x58(%rbx)
test   %r13d,%r13d
jle    1436 <coreGTRGAMMA_BINARY+0x2f6>
movapd %xmm0,%xmm7
mov    %r13d,%r14d
add    $0x38,%r12
add    $0xffffffffffffffff,%r14
xorpd  %xmm0,%xmm0
movapd %xmm0,0x20(%rsp)
xor    %ebp,%ebp
nopl   (%rax)
movsd  -0x38(%r12),%xmm0
xorpd  %xmm5,%xmm5
addsd  %xmm5,%xmm0
movsd  (%rbx),%xmm3
mulsd  -0x30(%r12),%xmm3
movsd  0x18(%rbx),%xmm2
addsd  %xmm3,%xmm0
movsd  0x8(%rbx),%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
mulsd  0x10(%rbx),%xmm3
addsd  %xmm5,%xmm3
addsd  -0x28(%r12),%xmm0
mulsd  -0x20(%r12),%xmm2
addsd  %xmm2,%xmm0
movsd  0x20(%rbx),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
mulsd  0x28(%rbx),%xmm2
addsd  -0x18(%r12),%xmm0
addsd  %xmm3,%xmm2
movsd  0x30(%rbx),%xmm3
mulsd  -0x10(%r12),%xmm3
addsd  %xmm3,%xmm0
movsd  0x38(%rbx),%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
mulsd  0x40(%rbx),%xmm3
addsd  -0x8(%r12),%xmm0
addsd  %xmm2,%xmm3
mulsd  (%r12),%xmm7
addsd  %xmm7,%xmm0
mulsd  %xmm7,%xmm6
addsd  %xmm4,%xmm6
movapd %xmm6,0x10(%rsp)
mulsd  %xmm1,%xmm7
addsd  %xmm3,%xmm7
movsd  %xmm7,0x8(%rsp)
call   1030 <FABS@plt>
movapd 0x10(%rsp),%xmm3
movsd  0xc32(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm3
mulsd  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl (%r15,%rbp,4),%xmm0
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
unpcklpd %xmm0,%xmm0
unpcklpd %xmm1,%xmm3
mulpd  %xmm3,%xmm0
cmp    %rbp,%r14
je     142e <coreGTRGAMMA_BINARY+0x2ee>
movapd 0x20(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x48(%rbx),%xmm7
movsd  0x50(%rbx),%xmm6
movsd  0x58(%rbx),%xmm1
add    $0x40,%r12
add    $0x1,%rbp
jmp    1300 <coreGTRGAMMA_BINARY+0x1c0>
addpd  0x20(%rsp),%xmm0
jmp    143a <coreGTRGAMMA_BINARY+0x2fa>
xorpd  %xmm0,%xmm0
mov    0x38(%rsp),%rax
movlpd %xmm0,(%rax)
mov    0x40(%rsp),%rax
movhpd %xmm0,(%rax)
mov    %rbx,%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <rax_free@plt>

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

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