void categorizeGTRGAMMA(char *tipX1, double *x2_start, int *ex2, double *EIGN,
                        double *pz, double *gammaRates, double *tipVector,
                        int *rateCategory, int lower, int upper) {
  double z, lz, ki, term[4];
  int i, index = 0;
  double *diagptable, *diagptable_start, allSum, min;
  double *x1, *x2;
  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++;
    term[0] =
        log(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++;
    term[1] =
        log(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++;
    term[2] =
        log(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++;
    term[3] =
        log(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):
<categorizeGTRGAMMA>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
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    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe73(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11a5 <categorizeGTRGAMMA+0x65>
movsd  0xe60(%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    127a <categorizeGTRGAMMA+0x13a>
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%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    -0x20(%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    -0x20(%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    11d0 <categorizeGTRGAMMA+0x90>
mov    0x20(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    18f1 <categorizeGTRGAMMA+0x7b1>
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)
movsd  -0x70(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xc49(%rip),%xmm0
call   1060 <log@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe0(%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)
movsd  -0x68(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xb22(%rip),%xmm0
call   1060 <log@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%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)
movsd  -0x60(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x9fb(%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,-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)
movsd  -0x58(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x8d4(%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,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
addsd  -0x60(%rbp),%xmm1
addsd  -0x58(%rbp),%xmm1
movsd  0x883(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x877(%rip),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x857(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  0x83d(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  0x823(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  0x809(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  0x7e7(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1854 <categorizeGTRGAMMA+0x714>
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    187f <categorizeGTRGAMMA+0x73f>
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    18aa <categorizeGTRGAMMA+0x76a>
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    18d5 <categorizeGTRGAMMA+0x795>
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    1280 <categorizeGTRGAMMA+0x140>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<categorizeGTRGAMMA>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%r13
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,0x90(%rsp)
mov    0xe8(%rsp),%r15d
mov    0xe0(%rsp),%ebp
movsd  0xea4(%rip),%xmm0
maxsd  (%r8),%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%r13),%xmm2
movsd  %xmm2,(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x88(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x80(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x78(%rsp)
movsd  0x8(%r13),%xmm1
movsd  %xmm1,(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x68(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x10(%r13),%xmm1
movsd  %xmm1,(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x50(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x18(%r13),%xmm1
movsd  %xmm1,(%rsp)
movsd  (%r12),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%r12),%xmm0
mulsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x38(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x30(%rsp)
cmp    %r15d,%ebp
jge    15e6 <categorizeGTRGAMMA+0x4c6>
movslq %ebp,%r12
movslq %r15d,%rax
mov    %rax,0x28(%rsp)
shl    $0x4,%ebp
xor    %r15d,%r15d
mov    %r14,0x20(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x90(%rsp),%rax
movsbq (%rax,%r12,1),%r14
shl    $0x5,%r14
movslq %ebp,%rbp
mov    0xd0(%rsp),%r13
movsd  0x0(%r13,%r14,1),%xmm0
movsd  0x8(%r13,%r14,1),%xmm1
mulsd  (%rbx,%rbp,8),%xmm0
mulsd  0x8(%rbx,%rbp,8),%xmm1
mulsd  0x88(%rsp),%xmm1
movsd  0x10(%r13,%r14,1),%xmm2
mulsd  0x10(%rbx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
mulsd  0x80(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0x18(%r13,%r14,1),%xmm0
mulsd  0x18(%rbx,%rbp,8),%xmm0
mulsd  0x78(%rsp),%xmm0
addsd  %xmm2,%xmm0
call   1040 <log@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x0(%r13,%r14,1),%xmm0
mulsd  0x20(%rbx,%rbp,8),%xmm0
movsd  0x8(%r13,%r14,1),%xmm1
mulsd  0x28(%rbx,%rbp,8),%xmm1
mulsd  0x70(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13,%r14,1),%xmm2
mulsd  0x30(%rbx,%rbp,8),%xmm2
mulsd  0x68(%rsp),%xmm2
movsd  0x18(%r13,%r14,1),%xmm0
mulsd  0x38(%rbx,%rbp,8),%xmm0
addsd  %xmm1,%xmm2
mulsd  0x60(%rsp),%xmm0
addsd  %xmm2,%xmm0
mov    0x20(%rsp),%rax
movss  (%rax,%r12,4),%xmm1
movaps %xmm1,(%rsp)
call   1040 <log@plt>
mov    0x20(%rsp),%rax
movss  (%rax,%r12,4),%xmm1
movaps (%rsp),%xmm2
unpcklps %xmm1,%xmm2
cvtdq2pd %xmm2,%xmm1
movapd 0x10(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  0xc04(%rip),%xmm1
addpd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x0(%r13,%r14,1),%xmm0
movsd  0x8(%r13,%r14,1),%xmm1
mulsd  0x40(%rbx,%rbp,8),%xmm0
mulsd  0x48(%rbx,%rbp,8),%xmm1
mulsd  0x58(%rsp),%xmm1
movsd  0x10(%r13,%r14,1),%xmm2
mulsd  0x50(%rbx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
mulsd  0x50(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0x18(%r13,%r14,1),%xmm0
mulsd  0x58(%rbx,%rbp,8),%xmm0
mulsd  0x48(%rsp),%xmm0
addsd  %xmm2,%xmm0
call   1040 <log@plt>
mov    0x20(%rsp),%rax
xorps  %xmm2,%xmm2
cvtsi2sdl (%rax,%r12,4),%xmm2
movsd  0xb65(%rip),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movsd  0x0(%r13,%r14,1),%xmm0
movsd  0x8(%r13,%r14,1),%xmm1
mulsd  0x60(%rbx,%rbp,8),%xmm0
mulsd  0x68(%rbx,%rbp,8),%xmm1
mulsd  0x40(%rsp),%xmm1
movsd  0x10(%r13,%r14,1),%xmm2
mulsd  0x70(%rbx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
mulsd  0x38(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0x18(%r13,%r14,1),%xmm0
mov    0x20(%rsp),%r14
mulsd  0x78(%rbx,%rbp,8),%xmm0
mulsd  0x30(%rsp),%xmm0
addsd  %xmm2,%xmm0
call   1040 <log@plt>
xorps  %xmm1,%xmm1
cvtsi2sdl (%r14,%r12,4),%xmm1
mulsd  0xaeb(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd 0x10(%rsp),%xmm5
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
movapd %xmm5,%xmm2
addsd  %xmm0,%xmm2
movsd  (%rsp),%xmm6
addsd  %xmm6,%xmm2
addsd  %xmm1,%xmm2
movsd  0xac4(%rip),%xmm4
mulsd  %xmm4,%xmm2
movsd  0xac0(%rip),%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm4,%xmm5
mulsd  %xmm3,%xmm5
movsd  0xab4(%rip),%xmm2
ucomisd %xmm5,%xmm2
mulsd  %xmm4,%xmm0
mov    $0x0,%eax
cmova  %eax,%r15d
mulsd  %xmm3,%xmm0
minsd  %xmm2,%xmm5
ucomisd %xmm0,%xmm5
movapd %xmm6,%xmm2
mulsd  %xmm4,%xmm2
mov    $0x1,%eax
cmova  %eax,%r15d
mulsd  %xmm3,%xmm2
minsd  %xmm5,%xmm0
ucomisd %xmm2,%xmm0
mulsd  %xmm4,%xmm1
mov    $0x2,%eax
cmova  %eax,%r15d
mulsd  %xmm3,%xmm1
minsd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
mov    $0x3,%eax
cmova  %eax,%r15d
mov    0xd8(%rsp),%rax
mov    %r15d,(%rax,%r12,4)
add    $0x1,%r12
add    $0x10,%ebp
cmp    %r12,0x28(%rsp)
jne    1320 <categorizeGTRGAMMA+0x200>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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