double evaluateGTRCATMULT(int *ex1, int *ex2, int *cptr, int *modelptr,
                          int *wptr, double *x1_start, double *x2_start,
                          double *EIGN, double *rptr, double *tipVector,
                          double *pz, char *tipX1, int lower, int n,
                          int numberOfCategories, int numberOfModels,
                          int multiBranch) {
  double sum, z, lz = 0.0, ki, lz1, lz2, lz3, term;
  double *diagptable, *diagptable_start, *x1, *x2;
  int model, modelCounter, i;
  if (!multiBranch) {
    z = pz[0];
    if (z < 1.0E-15)
      z = 1.0E-15;
    lz = log(z);
  }
  diagptable = diagptable_start = (double *)malloc(
      sizeof(double) * numberOfCategories * 3 * numberOfModels);
  for (modelCounter = 0; modelCounter < numberOfModels; modelCounter++) {
    if (multiBranch) {
      z = pz[modelCounter];
      if (z < 1.0E-15)
        z = 1.0E-15;
      lz = log(z);
    }
    lz1 = EIGN[modelCounter * 3] * lz;
    lz2 = EIGN[modelCounter * 3 + 1] * lz;
    lz3 = EIGN[modelCounter * 3 + 2] * lz;
    for (i = 0; i < numberOfCategories; i++) {
      ki = rptr[i];
      *diagptable++ = exp(ki * lz1);
      *diagptable++ = exp(ki * lz2);
      *diagptable++ = exp(ki * lz3);
    }
  }
  sum = 0.0;
  if (tipX1) {
    for (i = lower; i < n; i++) {
      model = modelptr[i];
      x1 = &(tipVector[model * 64 + 4 * tipX1[i]]);
      x2 = &x2_start[4 * i];
      diagptable =
          &diagptable_start[model * 3 * numberOfCategories + 3 * cptr[i]];
      term = x1[0] * x2[0];
      term += x1[1] * x2[1] * *diagptable++;
      term += x1[2] * x2[2] * *diagptable++;
      term += x1[3] * x2[3] * *diagptable++;
      term =
          log(term) +
          (ex2[i] *
           log((
               1.0 /
               115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
      sum += wptr[i] * term;
    }
    free(diagptable_start);
    return sum;
  }
  for (i = lower; i < n; i++) {
    model = modelptr[i];
    x1 = &x1_start[4 * i];
    x2 = &x2_start[4 * i];
    diagptable =
        &diagptable_start[model * 3 * numberOfCategories + 3 * cptr[i]];
    term = x1[0] * x2[0];
    term += x1[1] * x2[1] * *diagptable++;
    term += x1[2] * x2[2] * *diagptable++;
    term += x1[3] * x2[3] * *diagptable++;
    term =
        log(term) +
        ((ex1[i] + ex2[i]) *
         log((
             1.0 /
             115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
    sum += wptr[i] * term;
  }
  free(diagptable_start);
  return sum;
}


x86 assembly (clang, -O0):
<evaluateGTRCATMULT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x0,0x60(%rbp)
jne    11d8 <evaluateGTRCATMULT+0x98>
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe4f(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    11c9 <evaluateGTRCATMULT+0x89>
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x50(%rbp)
movslq 0x50(%rbp),%rax
shl    $0x3,%rax
imul   $0x3,%rax,%rdi
movslq 0x58(%rbp),%rax
imul   %rax,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    %rax,-0x80(%rbp)
movl   $0x0,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
cmp    0x58(%rbp),%eax
jge    1381 <evaluateGTRCATMULT+0x241>
cmpl   $0x0,0x60(%rbp)
je     1263 <evaluateGTRCATMULT+0x123>
mov    0x30(%rbp),%rax
movslq -0xa0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdc4(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    1254 <evaluateGTRCATMULT+0x114>
movsd  0xdb1(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x50(%rbp)
mov    0x18(%rbp),%rax
imul   $0x3,-0xa0(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x18(%rbp),%rax
imul   $0x3,-0xa0(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
imul   $0x3,-0xa0(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x50(%rbp),%eax
jge    1368 <evaluateGTRCATMULT+0x228>
mov    0x20(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    12ca <evaluateGTRCATMULT+0x18a>
jmp    136d <evaluateGTRCATMULT+0x22d>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    1206 <evaluateGTRCATMULT+0xc6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
cmpq   $0x0,0x38(%rbp)
je     15c0 <evaluateGTRCATMULT+0x480>
mov    0x40(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x48(%rbp),%eax
jge    15a5 <evaluateGTRCATMULT+0x465>
mov    -0x28(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x9c(%rbp)
mov    0x28(%rbp),%rax
mov    -0x9c(%rbp),%ecx
shl    $0x6,%ecx
mov    0x38(%rbp),%rdx
movslq -0xa4(%rbp),%rsi
movsbl (%rdx,%rsi,1),%edx
shl    $0x2,%edx
add    %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    0x10(%rbp),%rax
mov    -0xa4(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x98(%rbp)
mov    -0x88(%rbp),%rax
imul   $0x3,-0x9c(%rbp),%ecx
imul   0x50(%rbp),%ecx
mov    -0x20(%rbp),%rdx
movslq -0xa4(%rbp),%rsi
imul   $0x3,(%rdx,%rsi,4),%edx
add    %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x90(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x18(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0xa4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xac3(%rip),%xmm0
call   1060 <log@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xa4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    139d <evaluateGTRCATMULT+0x25d>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    17e3 <evaluateGTRCATMULT+0x6a3>
mov    0x40(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x48(%rbp),%eax
jge    17cd <evaluateGTRCATMULT+0x68d>
mov    -0x28(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x38(%rbp),%rax
mov    -0xa4(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    0x10(%rbp),%rax
mov    -0xa4(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x98(%rbp)
mov    -0x88(%rbp),%rax
imul   $0x3,-0x9c(%rbp),%ecx
imul   0x50(%rbp),%ecx
mov    -0x20(%rbp),%rdx
movslq -0xa4(%rbp),%rsi
imul   $0x3,(%rdx,%rsi,4),%edx
add    %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x90(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x98(%rbp),%rax
mulsd  0x18(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0xa4(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x89b(%rip),%xmm0
call   1060 <log@plt>
movsd  -0xc8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xa4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    15c9 <evaluateGTRCATMULT+0x489>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluateGTRCATMULT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,0x38(%rsp)
mov    %rcx,%r14
mov    %rdx,0x28(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdi,0x48(%rsp)
mov    0xe8(%rsp),%ebx
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
cmpl   $0x0,0xf0(%rsp)
jne    11a4 <evaluateGTRCATMULT+0x64>
movsd  0xe73(%rip),%xmm0
mov    0xc0(%rsp),%rax
maxsd  (%rax),%xmm0
call   1060 <log@plt>
movsd  %xmm0,0x18(%rsp)
movslq 0xe0(%rsp),%rax
movslq %ebx,%rbp
imul   %rbp,%rax
shl    $0x3,%rax
lea    (%rax,%rax,2),%rdi
call   1040 <malloc@plt>
mov    %rax,%rdi
test   %ebp,%ebp
mov    %rax,0x10(%rsp)
mov    %r14,0x40(%rsp)
jle    12f4 <evaluateGTRCATMULT+0x1b4>
mov    0xb0(%rsp),%r12
mov    %ebx,%eax
mov    %rax,0x50(%rsp)
mov    0xe0(%rsp),%r15d
xor    %ebp,%ebp
mov    %rdi,%rbx
jmp    120f <evaluateGTRCATMULT+0xcf>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
cmp    0x50(%rsp),%rbp
je     12f4 <evaluateGTRCATMULT+0x1b4>
cmpl   $0x0,0xf0(%rsp)
je     123e <evaluateGTRCATMULT+0xfe>
movsd  0xddf(%rip),%xmm0
mov    0xc0(%rsp),%rax
maxsd  (%rax,%rbp,8),%xmm0
call   1060 <log@plt>
mov    0x10(%rsp),%rdi
movsd  %xmm0,0x18(%rsp)
cmpl   $0x0,0xe0(%rsp)
jle    1200 <evaluateGTRCATMULT+0xc0>
lea    0x0(%rbp,%rbp,2),%eax
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%rcx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  0x10(%rcx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
xor    %r13d,%r13d
nopl   0x0(%rax)
movsd  (%r12,%r13,8),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  %xmm0,(%rbx)
movsd  0x60(%rsp),%xmm0
mulsd  (%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,0x8(%rbx)
movsd  (%rsp),%xmm0
mulsd  0x58(%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,0x10(%rbx)
add    $0x18,%rbx
add    $0x1,%r13
cmp    %r13,%r15
jne    1290 <evaluateGTRCATMULT+0x150>
mov    0x40(%rsp),%r14
mov    0x10(%rsp),%rdi
jmp    1200 <evaluateGTRCATMULT+0xc0>
mov    0xd8(%rsp),%eax
mov    0xd0(%rsp),%r15d
mov    0xa0(%rsp),%r12
xorpd  %xmm0,%xmm0
cmpq   $0x0,0xc8(%rsp)
je     1446 <evaluateGTRCATMULT+0x306>
cmp    %eax,%r15d
mov    0x28(%rsp),%r13
mov    0x20(%rsp),%r9
mov    0xe0(%rsp),%ebx
jge    1558 <evaluateGTRCATMULT+0x418>
movslq %r15d,%rbp
cltq
mov    %rax,0x8(%rsp)
shl    $0x2,%r15d
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movslq (%r14,%rbp,4),%rax
mov    %rax,%rcx
shl    $0x6,%rcx
mov    0xc8(%rsp),%rdx
movsbq (%rdx,%rbp,1),%rdx
lea    (%rcx,%rdx,4),%rcx
imul   %ebx,%eax
add    0x0(%r13,%rbp,4),%eax
movslq %r15d,%r15
lea    (%rax,%rax,2),%eax
mov    0xb8(%rsp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
movsd  0x8(%rdx,%rcx,8),%xmm1
mulsd  (%r12,%r15,8),%xmm0
mulsd  0x8(%r12,%r15,8),%xmm1
cltq
mulsd  (%rdi,%rax,8),%xmm1
movsd  0x10(%rdx,%rcx,8),%xmm2
mulsd  0x10(%r12,%r15,8),%xmm2
mulsd  0x8(%rdi,%rax,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x18(%rdx,%rcx,8),%xmm0
mulsd  0x18(%r12,%r15,8),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x10(%rdi,%rax,8),%xmm0
addsd  %xmm2,%xmm0
mov    %r9,%r14
call   1060 <log@plt>
mov    %r14,%r9
mov    0x38(%rsp),%rax
mov    0xa0(%rsp),%r12
mov    0x40(%rsp),%r14
mov    0x10(%rsp),%rdi
xorps  %xmm1,%xmm1
cvtsi2sdl (%r9,%rbp,4),%xmm1
mulsd  0xbfd(%rip),%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax,%rbp,4),%xmm0
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbp
add    $0x4,%r15d
cmp    %rbp,0x8(%rsp)
jne    1350 <evaluateGTRCATMULT+0x210>
jmp    1558 <evaluateGTRCATMULT+0x418>
cmp    %eax,%r15d
mov    %r14,%rbp
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r13
mov    0xe0(%rsp),%ecx
mov    0x30(%rsp),%rdx
jge    1558 <evaluateGTRCATMULT+0x418>
movslq %r15d,%rbx
cltq
mov    %rax,0x8(%rsp)
shl    $0x2,%r15d
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
mov    0x0(%rbp,%rbx,4),%eax
imul   %ecx,%eax
add    (%r14,%rbx,4),%eax
movslq %r15d,%r15
lea    (%rax,%rax,2),%eax
movsd  (%rdx,%r15,8),%xmm0
movsd  0x8(%rdx,%r15,8),%xmm1
mulsd  (%r12,%r15,8),%xmm0
mulsd  0x8(%r12,%r15,8),%xmm1
cltq
mulsd  (%rdi,%rax,8),%xmm1
movsd  0x10(%rdx,%r15,8),%xmm2
mulsd  0x10(%r12,%r15,8),%xmm2
mulsd  0x8(%rdi,%rax,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x18(%rdx,%r15,8),%xmm0
mulsd  0x18(%r12,%r15,8),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x10(%rdi,%rax,8),%xmm0
addsd  %xmm2,%xmm0
call   1060 <log@plt>
mov    0x48(%rsp),%rsi
mov    0x30(%rsp),%rdx
mov    0xe0(%rsp),%ecx
mov    0x10(%rsp),%rdi
mov    0x0(%r13,%rbx,4),%eax
add    (%rsi,%rbx,4),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xaeb(%rip),%xmm1
addsd  %xmm0,%xmm1
mov    0x38(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax,%rbx,4),%xmm0
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbx
add    $0x4,%r15d
cmp    %rbx,0x8(%rsp)
jne    1480 <evaluateGTRCATMULT+0x340>
movsd  %xmm0,(%rsp)
call   1030 <free@plt>
movsd  (%rsp),%xmm0
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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