#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 exp(double);
int log(double);
void gamma_wilson_3(double wilson[], double TT, double xx[], double vvij[][3],
                    double aaij[][3], double R, double T_ref) {
  int i, j;
  double Lambda[3][3];
  double sLambda[3] = {0., 0., 0.};
  double const_vect[3] = {0., 0., 0.};
  double the_sum[3] = {0., 0., 0.};
  double z[3] = {0., 0., 0.};
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++)
      Lambda[i][j] = vvij[i][j] * exp(-aaij[i][j] / (R * (TT + T_ref)));
  };
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      sLambda[i] += Lambda[i][j] * xx[j];
      const_vect[i] += Lambda[i][j] * xx[j];
    };
  };
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++)
      the_sum[i] += (Lambda[j][i] / const_vect[j]) * xx[j];
    z[i] = 1 - log(sLambda[i]) - the_sum[i];
    wilson[i] = exp(z[i]);
  };
}


x86 assembly (clang, -O0):
<gamma_wilson_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3,-0x3c(%rbp)
jge    127e <gamma_wilson_3+0x14e>
movl   $0x0,-0x40(%rbp)
cmpl   $0x3,-0x40(%rbp)
jge    126b <gamma_wilson_3+0x13b>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movslq -0x3c(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11be <gamma_wilson_3+0x8e>
jmp    1270 <gamma_wilson_3+0x140>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ad <gamma_wilson_3+0x7d>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3,-0x3c(%rbp)
jge    134d <gamma_wilson_3+0x21d>
movl   $0x0,-0x40(%rbp)
cmpl   $0x3,-0x40(%rbp)
jge    133a <gamma_wilson_3+0x20a>
movslq -0x3c(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
movslq -0x3c(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1296 <gamma_wilson_3+0x166>
jmp    133f <gamma_wilson_3+0x20f>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1285 <gamma_wilson_3+0x155>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3,-0x3c(%rbp)
jge    1436 <gamma_wilson_3+0x306>
movl   $0x0,-0x40(%rbp)
cmpl   $0x3,-0x40(%rbp)
jge    13d0 <gamma_wilson_3+0x2a0>
movslq -0x40(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x40(%rbp),%rax
divsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0xf0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp,%rax,8)
ff ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1365 <gamma_wilson_3+0x235>
movslq -0x3c(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
call   1050 <log@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movslq -0x3c(%rbp),%rax
subsd  -0xf0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x3c(%rbp),%rax
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
movslq -0x3c(%rbp),%rax
movsd  -0x110(%rbp,%rax,8),%xmm0
ff ff
call   1040 <exp@plt>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1354 <gamma_wilson_3+0x224>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_wilson_3>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r15
movapd %xmm0,%xmm3
mov    %rdi,%r14
addsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x10(%rsp)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rcx),%xmm0
xorpd  0xea1(%rip),%xmm0
divsd  %xmm3,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%r12),%xmm0
xorpd  0xe72(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%r12),%xmm0
xorpd  0xe41(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%r12),%xmm0
xorpd  0xe10(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%r12),%xmm0
xorpd  0xddf(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%r12),%xmm0
xorpd  0xdae(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x30(%r12),%xmm0
xorpd  0xd7d(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x38(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x38(%r12),%xmm0
xorpd  0xd4c(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x40(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x40(%r12),%xmm0
xorpd  0xd1b(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm11
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm2
movsd  0x8(%r15),%xmm0
movsd  0x60(%rsp),%xmm10
movapd %xmm10,%xmm1
mulsd  %xmm2,%xmm1
xorpd  %xmm3,%xmm3
addsd  %xmm3,%xmm1
xorpd  %xmm8,%xmm8
movsd  0x48(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  0x10(%r15),%xmm1
movsd  0x50(%rsp),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm4,%xmm9
movsd  0x58(%rsp),%xmm7
movapd %xmm7,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm8,%xmm3
movsd  0x38(%rsp),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movsd  0x40(%rsp),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm3
movapd %xmm3,%xmm6
movsd  %xmm3,0x28(%rsp)
movsd  0x20(%rsp),%xmm5
movapd %xmm5,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm8,%xmm3
xorpd  %xmm8,%xmm8
movsd  0x8(%rsp),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm11,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm3
movapd %xmm3,%xmm4
movsd  %xmm3,0x18(%rsp)
movapd %xmm10,%xmm3
movsd  %xmm9,0x30(%rsp)
divsd  %xmm9,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm7,%xmm2
divsd  %xmm6,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm8,%xmm3
addsd  %xmm3,%xmm2
movapd %xmm5,%xmm0
divsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd %xmm9,%xmm0
call   1040 <log@plt>
mov    $0x1,%ebx
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  0x20(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,(%r14)
movsd  0x48(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
mulsd  (%r15),%xmm0
addsd  0xbc4(%rip),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
divsd  %xmm2,%xmm1
mulsd  0x8(%r15),%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
mulsd  0x10(%r15),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
call   1040 <log@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x8(%r14)
movsd  0x50(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
mulsd  (%r15),%xmm0
addsd  0xb4d(%rip),%xmm0
movsd  0x40(%rsp),%xmm1
divsd  0x28(%rsp),%xmm1
mulsd  0x8(%r15),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm0
divsd  %xmm0,%xmm2
mulsd  0x10(%r15),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
call   1040 <log@plt>
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
subsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x10(%r14)
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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