void categorizeGTRGAMMAINVAR(char *tipX1, double *x2_start, int *ex2,
                             double *pz, double *gammaRates, double *EIGN,
                             double *tipVector, int *rateCategory, int lower,
                             int upper, int *iptr, double *invariants,
                             double *frequencies) {
  double z, lz, ki, term[4];
  int i, index = 0;
  double *diagptable, *diagptable_start, allSum, min;
  double *x1, *x2;
  double freqs[4];
  double scaler = (1.0 - invariants[0]);
  freqs[0] = frequencies[0] * invariants[0];
  freqs[1] = frequencies[1] * invariants[0];
  freqs[2] = frequencies[2] * invariants[0];
  freqs[3] = frequencies[3] * invariants[0];
  z = pz[0];
  if (z < 1.0E-15)
    z = 1.0E-15;
  lz = log(z);
  diagptable = diagptable_start = (double *)malloc(sizeof(double) * 4 * 3);
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    *diagptable++ = exp(EIGN[0] * ki * lz);
    *diagptable++ = exp(EIGN[1] * ki * lz);
    *diagptable++ = exp(EIGN[2] * ki * lz);
  }
  for (i = lower; i < upper; i++) {
    x1 = &(tipVector[4 * tipX1[i]]);
    x2 = &x2_start[16 * i];
    diagptable = diagptable_start;
    term[0] = x1[0] * x2[0];
    term[0] += x1[1] * x2[1] * *diagptable++;
    term[0] += x1[2] * x2[2] * *diagptable++;
    term[0] += x1[3] * x2[3] * *diagptable++;
    if (iptr[i] < 4)
      term[0] = log(
          (scaler * term[0] + freqs[iptr[i]]) *
          pow((1.0 /
               115792089237316195423570985008687907853269984665640564039457584007913129639936.0),
              ex2[i]));
    else
      term[0] =
          log(scaler * term[0]) +
          (ex2[i]) *
              log((
                  1.0 /
                  115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
    term[1] = x1[0] * x2[4];
    term[1] += x1[1] * x2[5] * *diagptable++;
    term[1] += x1[2] * x2[6] * *diagptable++;
    term[1] += x1[3] * x2[7] * *diagptable++;
    if (iptr[i] < 4)
      term[1] = log(
          (scaler * term[1] + freqs[iptr[i]]) *
          pow((1.0 /
               115792089237316195423570985008687907853269984665640564039457584007913129639936.0),
              ex2[i]));
    else
      term[1] =
          log(scaler * term[1]) +
          (ex2[i]) *
              log((
                  1.0 /
                  115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
    term[2] = x1[0] * x2[8];
    term[2] += x1[1] * x2[9] * *diagptable++;
    term[2] += x1[2] * x2[10] * *diagptable++;
    term[2] += x1[3] * x2[11] * *diagptable++;
    if (iptr[i] < 4)
      term[2] = log(
          (scaler * term[2] + freqs[iptr[i]]) *
          pow((1.0 /
               115792089237316195423570985008687907853269984665640564039457584007913129639936.0),
              ex2[i]));
    else
      term[2] =
          log(scaler * term[2]) +
          (ex2[i]) *
              log((
                  1.0 /
                  115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
    term[3] = x1[0] * x2[12];
    term[3] += x1[1] * x2[13] * *diagptable++;
    term[3] += x1[2] * x2[14] * *diagptable++;
    term[3] += x1[3] * x2[15] * *diagptable++;
    if (iptr[i] < 4)
      term[3] = log(
          (scaler * term[3] + freqs[iptr[i]]) *
          pow((1.0 /
               115792089237316195423570985008687907853269984665640564039457584007913129639936.0),
              ex2[i]));
    else
      term[3] =
          log(scaler * term[3]) +
          (ex2[i]) *
              log((
                  1.0 /
                  115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
    allSum = 0.25 * (term[0] + term[1] + term[2] + term[3]);
    allSum = 1.0 / allSum;
    term[0] = 0.25 * term[0] * allSum;
    term[1] = 0.25 * term[1] * allSum;
    term[2] = 0.25 * term[2] * allSum;
    term[3] = 0.25 * term[3] * allSum;
    min = 1.0E300;
    if (term[0] < min) {
      min = term[0];
      index = 0;
    }
    if (term[1] < min) {
      min = term[1];
      index = 1;
    }
    if (term[2] < min) {
      min = term[2];
      index = 2;
    }
    if (term[3] < min) {
      min = term[3];
      index = 3;
    }
    rateCategory[i] = index;
  }
  free(diagptable_start);
  return;
}


x86 assembly (clang, -O0):
<categorizeGTRGAMMAINVAR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x78(%rbp)
mov    0x38(%rbp),%rax
movsd  0xe68(%rip),%xmm0
subsd  (%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xddc(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    123c <categorizeGTRGAMMAINVAR+0xec>
movsd  0xdc9(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x40(%rbp)
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x4,-0x74(%rbp)
jge    1311 <categorizeGTRGAMMAINVAR+0x1c1>
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
call   1050 <exp@plt>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  %xmm0,(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1267 <categorizeGTRGAMMAINVAR+0x117>
mov    0x20(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    1b98 <categorizeGTRGAMMAINVAR+0xa48>
mov    0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x74(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xa8(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xa0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x18(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jge    14bb <categorizeGTRGAMMAINVAR+0x36b>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
movsd  0xb78(%rip),%xmm0
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x70(%rbp)
jmp    1517 <categorizeGTRGAMMAINVAR+0x3c7>
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xb1e(%rip),%xmm0
call   1060 <log@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x28(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x30(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jge    1666 <categorizeGTRGAMMAINVAR+0x516>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm2
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
movsd  0x9cd(%rip),%xmm0
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x68(%rbp)
jmp    16c2 <categorizeGTRGAMMAINVAR+0x572>
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x68(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0x973(%rip),%xmm0
call   1060 <log@plt>
movsd  -0x108(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xa0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x48(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x50(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x58(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jge    1811 <categorizeGTRGAMMAINVAR+0x6c1>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
movsd  0x822(%rip),%xmm0
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x60(%rbp)
jmp    186d <categorizeGTRGAMMAINVAR+0x71d>
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x7c8(%rip),%xmm0
call   1060 <log@plt>
movsd  -0x120(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0xa0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x68(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x70(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0xa0(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0xa8(%rbp),%rax
mulsd  0x78(%rax),%xmm0
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jge    19bc <categorizeGTRGAMMAINVAR+0x86c>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
mov    0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
movsd  0x677(%rip),%xmm0
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x58(%rbp)
jmp    1a18 <categorizeGTRGAMMAINVAR+0x8c8>
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x138(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  0x61d(%rip),%xmm0
call   1060 <log@plt>
movsd  -0x138(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
addsd  -0x60(%rbp),%xmm1
addsd  -0x58(%rbp),%xmm1
movsd  0x5ec(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x5c0(%rip),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x5c0(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  0x5a6(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  0x58c(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  0x572(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  0x550(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1afb <categorizeGTRGAMMAINVAR+0x9ab>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b26 <categorizeGTRGAMMAINVAR+0x9d6>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x1,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b51 <categorizeGTRGAMMAINVAR+0xa01>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x2,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b7c <categorizeGTRGAMMAINVAR+0xa2c>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x3,-0x78(%rbp)
mov    -0x78(%rbp),%edx
mov    0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1317 <categorizeGTRGAMMAINVAR+0x1c7>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<categorizeGTRGAMMAINVAR>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %r9,%r12
mov    %r8,%r13
mov    %rdx,0x18(%rsp)
mov    %rsi,%rbx
mov    %rdi,0xb8(%rsp)
mov    0x138(%rsp),%ebp
mov    0x130(%rsp),%r14d
mov    0x150(%rsp),%rax
mov    0x148(%rsp),%rdx
movsd  (%rdx),%xmm1
movupd (%rax),%xmm0
movapd %xmm1,0x30(%rsp)
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm0
movapd %xmm0,0xc0(%rsp)
movupd 0x10(%rax),%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm0,0xd0(%rsp)
movsd  0xe51(%rip),%xmm0
maxsd  (%rcx),%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0x0(%r13),%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0xb0(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0xa8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0xa0(%rsp)
movsd  0x8(%r13),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x98(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x90(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x88(%rsp)
movsd  0x10(%r13),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x80(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x78(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x18(%r13),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x58(%rsp)
cmp    %ebp,%r14d
jge    17f9 <categorizeGTRGAMMAINVAR+0x6c9>
mov    %r14d,%ecx
mov    0x120(%rsp),%r13
movsd  0xc8b(%rip),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movslq %r14d,%r15
movslq %ebp,%rax
mov    %rax,0x50(%rsp)
shl    $0x4,%ecx
xor    %r12d,%r12d
jmp    148d <categorizeGTRGAMMAINVAR+0x35d>
nop
mulsd  0x8(%rsp),%xmm0
call   1040 <log@plt>
movsd  0x20(%rsp),%xmm6
movapd %xmm0,%xmm1
mov    0x18(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax,%r15,4),%xmm0
mulsd  0xc45(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    0x10(%rsp),%ecx
movsd  0x30(%rsp),%xmm4
movsd  0x28(%rsp),%xmm5
movapd %xmm4,%xmm1
addsd  %xmm5,%xmm1
addsd  %xmm6,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc29(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xc05(%rip),%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
movsd  0xc11(%rip),%xmm1
ucomisd %xmm4,%xmm1
mulsd  %xmm3,%xmm5
mov    $0x0,%eax
cmova  %eax,%r12d
mulsd  %xmm2,%xmm5
minsd  %xmm1,%xmm4
ucomisd %xmm5,%xmm4
mulsd  %xmm3,%xmm6
mov    $0x1,%eax
cmova  %eax,%r12d
mulsd  %xmm2,%xmm6
minsd  %xmm4,%xmm5
ucomisd %xmm6,%xmm5
mulsd  %xmm3,%xmm0
mov    $0x2,%eax
cmova  %eax,%r12d
mulsd  %xmm2,%xmm0
minsd  %xmm5,%xmm6
ucomisd %xmm0,%xmm6
mov    $0x3,%eax
cmova  %eax,%r12d
mov    0x128(%rsp),%rax
mov    %r12d,(%rax,%r15,4)
add    $0x1,%r15
add    $0x10,%ecx
cmp    %r15,0x50(%rsp)
je     17f9 <categorizeGTRGAMMAINVAR+0x6c9>
mov    0xb8(%rsp),%rax
movsbq (%rax,%r15,1),%rax
lea    0x0(,%rax,4),%r14
shl    $0x5,%rax
movslq %ecx,%rbp
movsd  0x0(%r13,%rax,1),%xmm0
movsd  0x8(%r13,%rax,1),%xmm1
mulsd  (%rbx,%rbp,8),%xmm0
mulsd  0x8(%rbx,%rbp,8),%xmm1
mulsd  0xb0(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13,%rax,1),%xmm2
mulsd  0x10(%rbx,%rbp,8),%xmm2
mulsd  0xa8(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0x18(%r13,%rax,1),%xmm0
mulsd  0x18(%rbx,%rbp,8),%xmm0
mulsd  0xa0(%rsp),%xmm0
addsd  %xmm2,%xmm0
mov    0x140(%rsp),%rax
movslq (%rax,%r15,4),%rax
cmp    $0x3,%rax
mov    %ecx,0x10(%rsp)
jg     1560 <categorizeGTRGAMMAINVAR+0x430>
mulsd  0x8(%rsp),%xmm0
addsd  0xc0(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    0x18(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r15,4),%xmm1
movsd  0xad4(%rip),%xmm0
call   1050 <pow@plt>
mulsd  0x30(%rsp),%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm2
jmp    1585 <categorizeGTRGAMMAINVAR+0x455>
nopw   0x0(%rax,%rax,1)
mulsd  0x8(%rsp),%xmm0
call   1040 <log@plt>
mov    0x18(%rsp),%rax
xorps  %xmm2,%xmm2
cvtsi2sdl (%rax,%r15,4),%xmm2
mulsd  0xa8f(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0x0(%r13,%r14,8),%xmm0
movsd  0x8(%r13,%r14,8),%xmm1
mulsd  0x20(%rbx,%rbp,8),%xmm0
mulsd  0x28(%rbx,%rbp,8),%xmm1
mulsd  0x98(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13,%r14,8),%xmm3
mulsd  0x30(%rbx,%rbp,8),%xmm3
mulsd  0x90(%rsp),%xmm3
addsd  %xmm1,%xmm3
movsd  0x18(%r13,%r14,8),%xmm0
mulsd  0x38(%rbx,%rbp,8),%xmm0
mulsd  0x88(%rsp),%xmm0
addsd  %xmm3,%xmm0
mov    0x140(%rsp),%rax
movslq (%rax,%r15,4),%rax
cmp    $0x3,%rax
movsd  %xmm2,0x30(%rsp)
jg     1640 <categorizeGTRGAMMAINVAR+0x510>
mulsd  0x8(%rsp),%xmm0
addsd  0xc0(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    0x18(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r15,4),%xmm1
movsd  0x9f5(%rip),%xmm0
call   1050 <pow@plt>
mulsd  0x28(%rsp),%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm2
jmp    1665 <categorizeGTRGAMMAINVAR+0x535>
nopl   0x0(%rax)
mulsd  0x8(%rsp),%xmm0
call   1040 <log@plt>
mov    0x18(%rsp),%rax
xorps  %xmm2,%xmm2
cvtsi2sdl (%rax,%r15,4),%xmm2
mulsd  0x9af(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0x0(%r13,%r14,8),%xmm0
movsd  0x8(%r13,%r14,8),%xmm1
mulsd  0x40(%rbx,%rbp,8),%xmm0
mulsd  0x48(%rbx,%rbp,8),%xmm1
mulsd  0x80(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13,%r14,8),%xmm3
mulsd  0x50(%rbx,%rbp,8),%xmm3
mulsd  0x78(%rsp),%xmm3
addsd  %xmm1,%xmm3
movsd  0x18(%r13,%r14,8),%xmm0
mulsd  0x58(%rbx,%rbp,8),%xmm0
mulsd  0x70(%rsp),%xmm0
addsd  %xmm3,%xmm0
mov    0x140(%rsp),%rax
movslq (%rax,%r15,4),%rax
cmp    $0x3,%rax
movsd  %xmm2,0x28(%rsp)
jg     1720 <categorizeGTRGAMMAINVAR+0x5f0>
mulsd  0x8(%rsp),%xmm0
addsd  0xc0(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x18(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r15,4),%xmm1
movsd  0x91b(%rip),%xmm0
call   1050 <pow@plt>
mulsd  0x20(%rsp),%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm2
jmp    1745 <categorizeGTRGAMMAINVAR+0x615>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulsd  0x8(%rsp),%xmm0
call   1040 <log@plt>
mov    0x18(%rsp),%rax
xorps  %xmm2,%xmm2
cvtsi2sdl (%rax,%r15,4),%xmm2
mulsd  0x8cf(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0x0(%r13,%r14,8),%xmm0
movsd  0x8(%r13,%r14,8),%xmm1
mulsd  0x60(%rbx,%rbp,8),%xmm0
mulsd  0x68(%rbx,%rbp,8),%xmm1
mulsd  0x68(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13,%r14,8),%xmm3
mulsd  0x70(%rbx,%rbp,8),%xmm3
mulsd  0x60(%rsp),%xmm3
addsd  %xmm1,%xmm3
movsd  0x18(%r13,%r14,8),%xmm0
mulsd  0x78(%rbx,%rbp,8),%xmm0
mulsd  0x58(%rsp),%xmm0
addsd  %xmm3,%xmm0
mov    0x140(%rsp),%rax
movslq (%rax,%r15,4),%rax
cmp    $0x3,%rax
movsd  %xmm2,0x20(%rsp)
jg     13a0 <categorizeGTRGAMMAINVAR+0x270>
mulsd  0x8(%rsp),%xmm0
addsd  0xc0(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x48(%rsp)
mov    0x18(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r15,4),%xmm1
movsd  0x83a(%rip),%xmm0
call   1050 <pow@plt>
mulsd  0x48(%rsp),%xmm0
call   1040 <log@plt>
movsd  0x20(%rsp),%xmm6
jmp    13cf <categorizeGTRGAMMAINVAR+0x29f>
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @categorizeGTRGAMMAINVAR(i8* %0, double* %1, i32* %2, double* %3, double* %4, double* %5, double* %6, i32* %7, i32 %8, i32 %9, i32* %10, double* %11, double* %12) {
%14 = alloca i8*
%15 = alloca double*
%16 = alloca i32*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca [4 x double]
%31 = alloca i32
%32 = alloca i32
%33 = alloca double*
%34 = alloca double*
%35 = alloca double
%36 = alloca double
%37 = alloca double*
%38 = alloca double*
%39 = alloca [4 x double]
%40 = alloca double
store i8* %0, i8** %14
store double* %1, double** %15
store i32* %2, i32** %16
store double* %3, double** %17
store double* %4, double** %18
store double* %5, double** %19
store double* %6, double** %20
store i32* %7, i32** %21
store i32 %8, i32* %22
store i32 %9, i32* %23
store i32* %10, i32** %24
store double* %11, double** %25
store double* %12, double** %26
store i32 0, i32* %32
%41 = load double*, double** %25
%42 = getelementptr inbounds double, double* %41, i64 0
%43 = load double, double* %42
%44 = fsub double 1.000000e+00, %43
store double %44, double* %40
%45 = load double*, double** %26
%46 = getelementptr inbounds double, double* %45, i64 0
%47 = load double, double* %46
%48 = load double*, double** %25
%49 = getelementptr inbounds double, double* %48, i64 0
%50 = load double, double* %49
%51 = fmul double %47, %50
%52 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 0
store double %51, double* %52
%53 = load double*, double** %26
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
%56 = load double*, double** %25
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = fmul double %55, %58
%60 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 1
store double %59, double* %60
%61 = load double*, double** %26
%62 = getelementptr inbounds double, double* %61, i64 2
%63 = load double, double* %62
%64 = load double*, double** %25
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = fmul double %63, %66
%68 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 2
store double %67, double* %68
%69 = load double*, double** %26
%70 = getelementptr inbounds double, double* %69, i64 3
%71 = load double, double* %70
%72 = load double*, double** %25
%73 = getelementptr inbounds double, double* %72, i64 0
%74 = load double, double* %73
%75 = fmul double %71, %74
%76 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 3
store double %75, double* %76
%77 = load double*, double** %17
%78 = getelementptr inbounds double, double* %77, i64 0
%79 = load double, double* %78
store double %79, double* %27
%80 = load double, double* %27
%81 = fcmp olt double %80, 1.000000e-15
br i1 %81, label %82, label %83
82: ; preds = %13
store double 1.000000e-15, double* %27
br label %83
83: ; preds = %82, %13
%84 = load double, double* %27
%85 = call double @log(double %84)
store double %85, double* %28
%86 = call i8* @malloc(i64 96)
%87 = bitcast i8* %86 to double*
store double* %87, double** %34
store double* %87, double** %33
store i32 0, i32* %31
br label %88
88: ; preds = %127, %83
%89 = load i32, i32* %31
%90 = icmp slt i32 %89, 4
br i1 %90, label %91, label %130
91: ; preds = %88
%92 = load double*, double** %18
%93 = load i32, i32* %31
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %92, i64 %94
%96 = load double, double* %95
store double %96, double* %29
%97 = load double*, double** %19
%98 = getelementptr inbounds double, double* %97, i64 0
%99 = load double, double* %98
%100 = load double, double* %29
%101 = fmul double %99, %100
%102 = load double, double* %28
%103 = fmul double %101, %102
%104 = call double @exp(double %103)
%105 = load double*, double** %33
%106 = getelementptr inbounds double, double* %105, i32 1
store double* %106, double** %33
store double %104, double* %105
%107 = load double*, double** %19
%108 = getelementptr inbounds double, double* %107, i64 1
%109 = load double, double* %108
%110 = load double, double* %29
%111 = fmul double %109, %110
%112 = load double, double* %28
%113 = fmul double %111, %112
%114 = call double @exp(double %113)
%115 = load double*, double** %33
%116 = getelementptr inbounds double, double* %115, i32 1
store double* %116, double** %33
store double %114, double* %115
%117 = load double*, double** %19
%118 = getelementptr inbounds double, double* %117, i64 2
%119 = load double, double* %118
%120 = load double, double* %29
%121 = fmul double %119, %120
%122 = load double, double* %28
%123 = fmul double %121, %122
%124 = call double @exp(double %123)
%125 = load double*, double** %33
%126 = getelementptr inbounds double, double* %125, i32 1
store double* %126, double** %33
store double %124, double* %125
br label %127
127: ; preds = %91
%128 = load i32, i32* %31
%129 = add nsw i32 %128, 1
store i32 %129, i32* %31
br label %88
130: ; preds = %88
%131 = load i32, i32* %22
store i32 %131, i32* %31
br label %132
132: ; preds = %596, %130
%133 = load i32, i32* %31
%134 = load i32, i32* %23
%135 = icmp slt i32 %133, %134
br i1 %135, label %136, label %599
136: ; preds = %132
%137 = load double*, double** %20
%138 = load i8*, i8** %14
%139 = load i32, i32* %31
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %138, i64 %140
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = mul nsw i32 4, %143
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %137, i64 %145
store double* %146, double** %37
%147 = load double*, double** %15
%148 = load i32, i32* %31
%149 = mul nsw i32 16, %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %147, i64 %150
store double* %151, double** %38
%152 = load double*, double** %34
store double* %152, double** %33
%153 = load double*, double** %37
%154 = getelementptr inbounds double, double* %153, i64 0
%155 = load double, double* %154
%156 = load double*, double** %38
%157 = getelementptr inbounds double, double* %156, i64 0
%158 = load double, double* %157
%159 = fmul double %155, %158
%160 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
store double %159, double* %160
%161 = load double*, double** %37
%162 = getelementptr inbounds double, double* %161, i64 1
%163 = load double, double* %162
%164 = load double*, double** %38
%165 = getelementptr inbounds double, double* %164, i64 1
%166 = load double, double* %165
%167 = fmul double %163, %166
%168 = load double*, double** %33
%169 = getelementptr inbounds double, double* %168, i32 1
store double* %169, double** %33
%170 = load double, double* %168
%171 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%172 = load double, double* %171
%173 = call double @llvm.fmuladd.f64(double %167, double %170, double %172)
store double %173, double* %171
%174 = load double*, double** %37
%175 = getelementptr inbounds double, double* %174, i64 2
%176 = load double, double* %175
%177 = load double*, double** %38
%178 = getelementptr inbounds double, double* %177, i64 2
%179 = load double, double* %178
%180 = fmul double %176, %179
%181 = load double*, double** %33
%182 = getelementptr inbounds double, double* %181, i32 1
store double* %182, double** %33
%183 = load double, double* %181
%184 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%185 = load double, double* %184
%186 = call double @llvm.fmuladd.f64(double %180, double %183, double %185)
store double %186, double* %184
%187 = load double*, double** %37
%188 = getelementptr inbounds double, double* %187, i64 3
%189 = load double, double* %188
%190 = load double*, double** %38
%191 = getelementptr inbounds double, double* %190, i64 3
%192 = load double, double* %191
%193 = fmul double %189, %192
%194 = load double*, double** %33
%195 = getelementptr inbounds double, double* %194, i32 1
store double* %195, double** %33
%196 = load double, double* %194
%197 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%198 = load double, double* %197
%199 = call double @llvm.fmuladd.f64(double %193, double %196, double %198)
store double %199, double* %197
%200 = load i32*, i32** %24
%201 = load i32, i32* %31
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds i32, i32* %200, i64 %202
%204 = load i32, i32* %203
%205 = icmp slt i32 %204, 4
br i1 %205, label %206, label %229
206: ; preds = %136
%207 = load double, double* %40
%208 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%209 = load double, double* %208
%210 = load i32*, i32** %24
%211 = load i32, i32* %31
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds i32, i32* %210, i64 %212
%214 = load i32, i32* %213
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 %215
%217 = load double, double* %216
%218 = call double @llvm.fmuladd.f64(double %207, double %209, double %217)
%219 = load i32*, i32** %16
%220 = load i32, i32* %31
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds i32, i32* %219, i64 %221
%223 = load i32, i32* %222
%224 = sitofp i32 %223 to double
%225 = call double @pow(double 0x2FF0000000000000, double %224)
%226 = fmul double %218, %225
%227 = call double @log(double %226)
%228 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
store double %227, double* %228
br label %244
229: ; preds = %136
%230 = load double, double* %40
%231 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%232 = load double, double* %231
%233 = fmul double %230, %232
%234 = call double @log(double %233)
%235 = load i32*, i32** %16
%236 = load i32, i32* %31
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds i32, i32* %235, i64 %237
%239 = load i32, i32* %238
%240 = sitofp i32 %239 to double
%241 = call double @log(double 0x2FF0000000000000)
%242 = call double @llvm.fmuladd.f64(double %240, double %241, double %234)
%243 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
store double %242, double* %243
br label %244
244: ; preds = %229, %206
%245 = load double*, double** %37
%246 = getelementptr inbounds double, double* %245, i64 0
%247 = load double, double* %246
%248 = load double*, double** %38
%249 = getelementptr inbounds double, double* %248, i64 4
%250 = load double, double* %249
%251 = fmul double %247, %250
%252 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
store double %251, double* %252
%253 = load double*, double** %37
%254 = getelementptr inbounds double, double* %253, i64 1
%255 = load double, double* %254
%256 = load double*, double** %38
%257 = getelementptr inbounds double, double* %256, i64 5
%258 = load double, double* %257
%259 = fmul double %255, %258
%260 = load double*, double** %33
%261 = getelementptr inbounds double, double* %260, i32 1
store double* %261, double** %33
%262 = load double, double* %260
%263 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%264 = load double, double* %263
%265 = call double @llvm.fmuladd.f64(double %259, double %262, double %264)
store double %265, double* %263
%266 = load double*, double** %37
%267 = getelementptr inbounds double, double* %266, i64 2
%268 = load double, double* %267
%269 = load double*, double** %38
%270 = getelementptr inbounds double, double* %269, i64 6
%271 = load double, double* %270
%272 = fmul double %268, %271
%273 = load double*, double** %33
%274 = getelementptr inbounds double, double* %273, i32 1
store double* %274, double** %33
%275 = load double, double* %273
%276 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%277 = load double, double* %276
%278 = call double @llvm.fmuladd.f64(double %272, double %275, double %277)
store double %278, double* %276
%279 = load double*, double** %37
%280 = getelementptr inbounds double, double* %279, i64 3
%281 = load double, double* %280
%282 = load double*, double** %38
%283 = getelementptr inbounds double, double* %282, i64 7
%284 = load double, double* %283
%285 = fmul double %281, %284
%286 = load double*, double** %33
%287 = getelementptr inbounds double, double* %286, i32 1
store double* %287, double** %33
%288 = load double, double* %286
%289 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%290 = load double, double* %289
%291 = call double @llvm.fmuladd.f64(double %285, double %288, double %290)
store double %291, double* %289
%292 = load i32*, i32** %24
%293 = load i32, i32* %31
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds i32, i32* %292, i64 %294
%296 = load i32, i32* %295
%297 = icmp slt i32 %296, 4
br i1 %297, label %298, label %321
298: ; preds = %244
%299 = load double, double* %40
%300 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%301 = load double, double* %300
%302 = load i32*, i32** %24
%303 = load i32, i32* %31
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds i32, i32* %302, i64 %304
%306 = load i32, i32* %305
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 %307
%309 = load double, double* %308
%310 = call double @llvm.fmuladd.f64(double %299, double %301, double %309)
%311 = load i32*, i32** %16
%312 = load i32, i32* %31
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds i32, i32* %311, i64 %313
%315 = load i32, i32* %314
%316 = sitofp i32 %315 to double
%317 = call double @pow(double 0x2FF0000000000000, double %316)
%318 = fmul double %310, %317
%319 = call double @log(double %318)
%320 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
store double %319, double* %320
br label %336
321: ; preds = %244
%322 = load double, double* %40
%323 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%324 = load double, double* %323
%325 = fmul double %322, %324
%326 = call double @log(double %325)
%327 = load i32*, i32** %16
%328 = load i32, i32* %31
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds i32, i32* %327, i64 %329
%331 = load i32, i32* %330
%332 = sitofp i32 %331 to double
%333 = call double @log(double 0x2FF0000000000000)
%334 = call double @llvm.fmuladd.f64(double %332, double %333, double %326)
%335 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
store double %334, double* %335
br label %336
336: ; preds = %321, %298
%337 = load double*, double** %37
%338 = getelementptr inbounds double, double* %337, i64 0
%339 = load double, double* %338
%340 = load double*, double** %38
%341 = getelementptr inbounds double, double* %340, i64 8
%342 = load double, double* %341
%343 = fmul double %339, %342
%344 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
store double %343, double* %344
%345 = load double*, double** %37
%346 = getelementptr inbounds double, double* %345, i64 1
%347 = load double, double* %346
%348 = load double*, double** %38
%349 = getelementptr inbounds double, double* %348, i64 9
%350 = load double, double* %349
%351 = fmul double %347, %350
%352 = load double*, double** %33
%353 = getelementptr inbounds double, double* %352, i32 1
store double* %353, double** %33
%354 = load double, double* %352
%355 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%356 = load double, double* %355
%357 = call double @llvm.fmuladd.f64(double %351, double %354, double %356)
store double %357, double* %355
%358 = load double*, double** %37
%359 = getelementptr inbounds double, double* %358, i64 2
%360 = load double, double* %359
%361 = load double*, double** %38
%362 = getelementptr inbounds double, double* %361, i64 10
%363 = load double, double* %362
%364 = fmul double %360, %363
%365 = load double*, double** %33
%366 = getelementptr inbounds double, double* %365, i32 1
store double* %366, double** %33
%367 = load double, double* %365
%368 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%369 = load double, double* %368
%370 = call double @llvm.fmuladd.f64(double %364, double %367, double %369)
store double %370, double* %368
%371 = load double*, double** %37
%372 = getelementptr inbounds double, double* %371, i64 3
%373 = load double, double* %372
%374 = load double*, double** %38
%375 = getelementptr inbounds double, double* %374, i64 11
%376 = load double, double* %375
%377 = fmul double %373, %376
%378 = load double*, double** %33
%379 = getelementptr inbounds double, double* %378, i32 1
store double* %379, double** %33
%380 = load double, double* %378
%381 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%382 = load double, double* %381
%383 = call double @llvm.fmuladd.f64(double %377, double %380, double %382)
store double %383, double* %381
%384 = load i32*, i32** %24
%385 = load i32, i32* %31
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds i32, i32* %384, i64 %386
%388 = load i32, i32* %387
%389 = icmp slt i32 %388, 4
br i1 %389, label %390, label %413
390: ; preds = %336
%391 = load double, double* %40
%392 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%393 = load double, double* %392
%394 = load i32*, i32** %24
%395 = load i32, i32* %31
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds i32, i32* %394, i64 %396
%398 = load i32, i32* %397
%399 = sext i32 %398 to i64
%400 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 %399
%401 = load double, double* %400
%402 = call double @llvm.fmuladd.f64(double %391, double %393, double %401)
%403 = load i32*, i32** %16
%404 = load i32, i32* %31
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds i32, i32* %403, i64 %405
%407 = load i32, i32* %406
%408 = sitofp i32 %407 to double
%409 = call double @pow(double 0x2FF0000000000000, double %408)
%410 = fmul double %402, %409
%411 = call double @log(double %410)
%412 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
store double %411, double* %412
br label %428
413: ; preds = %336
%414 = load double, double* %40
%415 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%416 = load double, double* %415
%417 = fmul double %414, %416
%418 = call double @log(double %417)
%419 = load i32*, i32** %16
%420 = load i32, i32* %31
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds i32, i32* %419, i64 %421
%423 = load i32, i32* %422
%424 = sitofp i32 %423 to double
%425 = call double @log(double 0x2FF0000000000000)
%426 = call double @llvm.fmuladd.f64(double %424, double %425, double %418)
%427 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
store double %426, double* %427
br label %428
428: ; preds = %413, %390
%429 = load double*, double** %37
%430 = getelementptr inbounds double, double* %429, i64 0
%431 = load double, double* %430
%432 = load double*, double** %38
%433 = getelementptr inbounds double, double* %432, i64 12
%434 = load double, double* %433
%435 = fmul double %431, %434
%436 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
store double %435, double* %436
%437 = load double*, double** %37
%438 = getelementptr inbounds double, double* %437, i64 1
%439 = load double, double* %438
%440 = load double*, double** %38
%441 = getelementptr inbounds double, double* %440, i64 13
%442 = load double, double* %441
%443 = fmul double %439, %442
%444 = load double*, double** %33
%445 = getelementptr inbounds double, double* %444, i32 1
store double* %445, double** %33
%446 = load double, double* %444
%447 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%448 = load double, double* %447
%449 = call double @llvm.fmuladd.f64(double %443, double %446, double %448)
store double %449, double* %447
%450 = load double*, double** %37
%451 = getelementptr inbounds double, double* %450, i64 2
%452 = load double, double* %451
%453 = load double*, double** %38
%454 = getelementptr inbounds double, double* %453, i64 14
%455 = load double, double* %454
%456 = fmul double %452, %455
%457 = load double*, double** %33
%458 = getelementptr inbounds double, double* %457, i32 1
store double* %458, double** %33
%459 = load double, double* %457
%460 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%461 = load double, double* %460
%462 = call double @llvm.fmuladd.f64(double %456, double %459, double %461)
store double %462, double* %460
%463 = load double*, double** %37
%464 = getelementptr inbounds double, double* %463, i64 3
%465 = load double, double* %464
%466 = load double*, double** %38
%467 = getelementptr inbounds double, double* %466, i64 15
%468 = load double, double* %467
%469 = fmul double %465, %468
%470 = load double*, double** %33
%471 = getelementptr inbounds double, double* %470, i32 1
store double* %471, double** %33
%472 = load double, double* %470
%473 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%474 = load double, double* %473
%475 = call double @llvm.fmuladd.f64(double %469, double %472, double %474)
store double %475, double* %473
%476 = load i32*, i32** %24
%477 = load i32, i32* %31
%478 = sext i32 %477 to i64
%479 = getelementptr inbounds i32, i32* %476, i64 %478
%480 = load i32, i32* %479
%481 = icmp slt i32 %480, 4
br i1 %481, label %482, label %505
482: ; preds = %428
%483 = load double, double* %40
%484 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%485 = load double, double* %484
%486 = load i32*, i32** %24
%487 = load i32, i32* %31
%488 = sext i32 %487 to i64
%489 = getelementptr inbounds i32, i32* %486, i64 %488
%490 = load i32, i32* %489
%491 = sext i32 %490 to i64
%492 = getelementptr inbounds [4 x double], [4 x double]* %39, i64 0, i64 %491
%493 = load double, double* %492
%494 = call double @llvm.fmuladd.f64(double %483, double %485, double %493)
%495 = load i32*, i32** %16
%496 = load i32, i32* %31
%497 = sext i32 %496 to i64
%498 = getelementptr inbounds i32, i32* %495, i64 %497
%499 = load i32, i32* %498
%500 = sitofp i32 %499 to double
%501 = call double @pow(double 0x2FF0000000000000, double %500)
%502 = fmul double %494, %501
%503 = call double @log(double %502)
%504 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
store double %503, double* %504
br label %520
505: ; preds = %428
%506 = load double, double* %40
%507 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%508 = load double, double* %507
%509 = fmul double %506, %508
%510 = call double @log(double %509)
%511 = load i32*, i32** %16
%512 = load i32, i32* %31
%513 = sext i32 %512 to i64
%514 = getelementptr inbounds i32, i32* %511, i64 %513
%515 = load i32, i32* %514
%516 = sitofp i32 %515 to double
%517 = call double @log(double 0x2FF0000000000000)
%518 = call double @llvm.fmuladd.f64(double %516, double %517, double %510)
%519 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
store double %518, double* %519
br label %520
520: ; preds = %505, %482
%521 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%522 = load double, double* %521
%523 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%524 = load double, double* %523
%525 = fadd double %522, %524
%526 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%527 = load double, double* %526
%528 = fadd double %525, %527
%529 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%530 = load double, double* %529
%531 = fadd double %528, %530
%532 = fmul double 2.500000e-01, %531
store double %532, double* %35
%533 = load double, double* %35
%534 = fdiv double 1.000000e+00, %533
store double %534, double* %35
%535 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%536 = load double, double* %535
%537 = fmul double 2.500000e-01, %536
%538 = load double, double* %35
%539 = fmul double %537, %538
%540 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
store double %539, double* %540
%541 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%542 = load double, double* %541
%543 = fmul double 2.500000e-01, %542
%544 = load double, double* %35
%545 = fmul double %543, %544
%546 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
store double %545, double* %546
%547 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%548 = load double, double* %547
%549 = fmul double 2.500000e-01, %548
%550 = load double, double* %35
%551 = fmul double %549, %550
%552 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
store double %551, double* %552
%553 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%554 = load double, double* %553
%555 = fmul double 2.500000e-01, %554
%556 = load double, double* %35
%557 = fmul double %555, %556
%558 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
store double %557, double* %558
store double 1.000000e+300, double* %36
%559 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%560 = load double, double* %559
%561 = load double, double* %36
%562 = fcmp olt double %560, %561
br i1 %562, label %563, label %566
563: ; preds = %520
%564 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 0
%565 = load double, double* %564
store double %565, double* %36
store i32 0, i32* %32
br label %566
566: ; preds = %563, %520
%567 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%568 = load double, double* %567
%569 = load double, double* %36
%570 = fcmp olt double %568, %569
br i1 %570, label %571, label %574
571: ; preds = %566
%572 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 1
%573 = load double, double* %572
store double %573, double* %36
store i32 1, i32* %32
br label %574
574: ; preds = %571, %566
%575 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%576 = load double, double* %575
%577 = load double, double* %36
%578 = fcmp olt double %576, %577
br i1 %578, label %579, label %582
579: ; preds = %574
%580 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 2
%581 = load double, double* %580
store double %581, double* %36
store i32 2, i32* %32
br label %582
582: ; preds = %579, %574
%583 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%584 = load double, double* %583
%585 = load double, double* %36
%586 = fcmp olt double %584, %585
br i1 %586, label %587, label %590
587: ; preds = %582
%588 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0, i64 3
%589 = load double, double* %588
store double %589, double* %36
store i32 3, i32* %32
br label %590
590: ; preds = %587, %582
%591 = load i32, i32* %32
%592 = load i32*, i32** %21
%593 = load i32, i32* %31
%594 = sext i32 %593 to i64
%595 = getelementptr inbounds i32, i32* %592, i64 %594
store i32 %591, i32* %595
br label %596
596: ; preds = %590
%597 = load i32, i32* %31
%598 = add nsw i32 %597, 1
store i32 %598, i32* %31
br label %132
599: ; preds = %132
%600 = load double*, double** %34
%601 = bitcast double* %600 to i8*
ret void
}

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