void coreGTRCATMULT(int lower, int upper, int numberOfCategories,
                    int numberOfModels, double *sum, double *d1, double *d2,
                    double *wrptr, double *wr2ptr, double *rptr, double *EIGN,
                    int *cptr, int *modelptr, double lz) {
  int i, model;
  double *d, *d_start, tmp_0, tmp_1, tmp_2, inv_Li, dlnLidlz, d2lnLidlz2,
      dlnLdlz = 0.0, d2lnLdlz2 = 0.0;
  double *e1, *e2, *e3, *s1, *s2, *s3;
  d = d_start = (double *)malloc(numberOfModels * numberOfCategories * 3 *
                                 sizeof(double));
  e1 = (double *)malloc(numberOfModels * sizeof(double));
  e2 = (double *)malloc(numberOfModels * sizeof(double));
  e3 = (double *)malloc(numberOfModels * sizeof(double));
  s1 = (double *)malloc(numberOfModels * sizeof(double));
  s2 = (double *)malloc(numberOfModels * sizeof(double));
  s3 = (double *)malloc(numberOfModels * sizeof(double));
  for (model = 0; model < numberOfModels; model++) {
    double dd1, dd2, dd3;
    e1[model] = EIGN[model * 3] * EIGN[model * 3];
    e2[model] = EIGN[model * 3 + 1] * EIGN[model * 3 + 1];
    e3[model] = EIGN[model * 3 + 2] * EIGN[model * 3 + 2];
    s1[model] = EIGN[model * 3];
    s2[model] = EIGN[model * 3 + 1];
    s3[model] = EIGN[model * 3 + 2];
    dd1 = EIGN[model * 3] * lz;
    dd2 = EIGN[model * 3 + 1] * lz;
    dd3 = EIGN[model * 3 + 2] * lz;
    for (i = 0; i < numberOfCategories; i++) {
      *d++ = exp(dd1 * rptr[i]);
      *d++ = exp(dd2 * rptr[i]);
      *d++ = exp(dd3 * rptr[i]);
    }
  }
  for (i = lower; i < upper; i++) {
    model = modelptr[i];
    d = &d_start[model * numberOfCategories * 3 + 3 * cptr[i]];
    inv_Li = sum[4 * i];
    inv_Li += (tmp_0 = d[0] * sum[4 * i + 1]);
    inv_Li += (tmp_1 = d[1] * sum[4 * i + 2]);
    inv_Li += (tmp_2 = d[2] * sum[4 * i + 3]);
    inv_Li = 1.0 / inv_Li;
    dlnLidlz = tmp_0 * s1[model];
    d2lnLidlz2 = tmp_0 * e1[model];
    dlnLidlz += tmp_1 * s2[model];
    d2lnLidlz2 += tmp_1 * e2[model];
    dlnLidlz += tmp_2 * s3[model];
    d2lnLidlz2 += tmp_2 * e3[model];
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wr2ptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *d1 = dlnLdlz;
  *d2 = d2lnLdlz2;
  free(d_start);
  free(e1);
  free(e2);
  free(e3);
  free(s1);
  free(s2);
  free(s3);
}


x86 assembly (clang, -O0):
<coreGTRCATMULT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
imul   $0x3,%eax,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    %rax,-0x38(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x90(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1443 <coreGTRCATMULT+0x313>
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xa0(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xa8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xb0(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x30(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1430 <coreGTRCATMULT+0x300>
movsd  -0xb8(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
movsd  %xmm0,(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
movsd  %xmm0,(%rax)
movsd  -0xc8(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
movsd  %xmm0,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    138f <coreGTRCATMULT+0x25f>
jmp    1435 <coreGTRCATMULT+0x305>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    121d <coreGTRCATMULT+0xed>
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    16a9 <coreGTRCATMULT+0x579>
mov    0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x30(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   $0x3,%ecx,%ecx
mov    0x38(%rbp),%rdx
movslq -0x2c(%rbp),%rsi
imul   $0x3,(%rdx,%rsi,4),%edx
add    %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xace(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0xa0(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0xa8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0xb0(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1449 <coreGTRCATMULT+0x319>
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGTRCATMULT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
movsd  %xmm0,0xa8(%rsp)
mov    %r9,0xa0(%rsp)
mov    %r8,0x90(%rsp)
mov    %ecx,%ebx
mov    %esi,0x5c(%rsp)
mov    %rdi,0x40(%rsp)
mov    0x120(%rsp),%rax
mov    %rax,0x80(%rsp)
mov    0x118(%rsp),%rax
mov    %rax,0x88(%rsp)
mov    0x110(%rsp),%rax
mov    %rax,0x48(%rsp)
mov    0x108(%rsp),%r15
mov    0x100(%rsp),%rax
mov    %rax,0x78(%rsp)
mov    0xf8(%rsp),%rax
mov    %rax,0x70(%rsp)
mov    0xf0(%rsp),%rax
mov    %rax,0x98(%rsp)
mov    %edx,0xc(%rsp)
mov    %edx,%eax
imul   %ecx,%eax
lea    (%rax,%rax,2),%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    %ebx,(%rsp)
movslq %ebx,%r14
lea    0x0(,%r14,8),%rbp
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,0x68(%rsp)
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,%r13
mov    %rbp,%rdi
call   1040 <malloc@plt>
test   %r14d,%r14d
mov    0x68(%rsp),%r14
mov    %rbx,0x38(%rsp)
mov    %r12,0x30(%rsp)
mov    %r13,0x28(%rsp)
mov    %rax,0x20(%rsp)
jle    13c1 <coreGTRCATMULT+0x291>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%r8
mov    (%rsp),%ecx
mov    %rcx,0xb0(%rsp)
mov    0xc(%rsp),%r13d
xor    %ebp,%ebp
mov    0x60(%rsp),%r12
jmp    1292 <coreGTRCATMULT+0x162>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    0xb0(%rsp),%rbp
je     13c1 <coreGTRCATMULT+0x291>
lea    0x0(,%rbp,2),%rbx
add    %rbp,%rbx
mov    0x48(%rsp),%rdx
movsd  (%rdx,%rbx,8),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    0x50(%rsp),%rcx
movsd  %xmm0,(%rcx,%rbp,8)
movsd  0x8(%rdx,%rbx,8),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%r14,%rbp,8)
movsd  0x10(%rdx,%rbx,8),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r8,%rbp,8)
movsd  %xmm1,(%rsp)
movsd  %xmm1,(%rsi,%rbp,8)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm2,(%rdi,%rbp,8)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm3,(%rax,%rbp,8)
cmpl   $0x0,0xc(%rsp)
jle    1280 <coreGTRCATMULT+0x150>
movsd  0xa8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r15,%rbx,8),%xmm0
mulsd  (%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,(%r12)
movsd  (%r15,%rbx,8),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,0x8(%r12)
movsd  (%r15,%rbx,8),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,0x10(%r12)
add    $0x18,%r12
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1350 <coreGTRCATMULT+0x220>
mov    0x68(%rsp),%r14
mov    0x38(%rsp),%r8
mov    0x30(%rsp),%rsi
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%rax
jmp    1280 <coreGTRCATMULT+0x150>
xorpd  %xmm3,%xmm3
mov    0x40(%rsp),%rdx
mov    0x5c(%rsp),%eax
cmp    %eax,%edx
mov    0x60(%rsp),%rdi
jge    1588 <coreGTRCATMULT+0x458>
mov    %rdx,%rcx
movslq %edx,%rcx
cltq
shl    $0x2,%edx
mov    %rdx,0x40(%rsp)
mov    0x80(%rsp),%rdx
lea    (%rdx,%rcx,4),%rdx
mov    %rdx,(%rsp)
mov    0x88(%rsp),%rdx
lea    (%rdx,%rcx,4),%rdx
mov    %rdx,0x18(%rsp)
mov    0x70(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    %rdx,0x10(%rsp)
mov    0x78(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    %rdx,0x48(%rsp)
sub    %rcx,%rax
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
movsd  0xbc6(%rip),%xmm8
mov    0x90(%rsp),%r12
mov    0xc(%rsp),%r15d
mov    %r14,%r13
mov    0x38(%rsp),%r8
mov    0x30(%rsp),%r9
mov    0x28(%rsp),%r10
mov    0x20(%rsp),%r11
mov    0x50(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rsp),%rdx
movslq (%rdx,%rcx,1),%rbx
mov    %ebx,%ebp
imul   %r15d,%ebp
mov    0x18(%rsp),%rdx
add    (%rdx,%rcx,1),%ebp
lea    0x0(%rbp,%rbp,2),%ebp
movslq %ebp,%rbp
mov    0x40(%rsp),%rdx
add    %rcx,%rdx
movslq %edx,%rdx
movsd  (%rdi,%rbp,8),%xmm2
lea    0x1(%rdx),%esi
movslq %esi,%rsi
mulsd  (%r12,%rsi,8),%xmm2
movupd 0x8(%rdi,%rbp,8),%xmm9
lea    0x2(%rdx),%esi
movslq %esi,%rsi
movsd  (%r12,%rsi,8),%xmm6
movsd  (%r12,%rdx,8),%xmm4
lea    0x3(%rdx),%edx
movslq %edx,%rdx
movhpd (%r12,%rdx,8),%xmm6
movsd  (%r9,%rbx,8),%xmm10
addsd  %xmm2,%xmm4
mulsd  %xmm2,%xmm10
movsd  (%r10,%rbx,8),%xmm1
mulsd  (%r14,%rbx,8),%xmm2
movsd  0x0(%r13,%rbx,8),%xmm5
movsd  (%r11,%rbx,8),%xmm7
movsd  (%r8,%rbx,8),%xmm3
mulpd  %xmm9,%xmm6
addsd  %xmm6,%xmm4
mulsd  %xmm6,%xmm1
mulsd  %xmm6,%xmm5
unpckhpd %xmm6,%xmm6
mulsd  %xmm6,%xmm7
mulsd  %xmm6,%xmm3
addsd  %xmm4,%xmm6
movapd %xmm8,%xmm4
divsd  %xmm6,%xmm4
addsd  %xmm10,%xmm1
addsd  %xmm2,%xmm5
addsd  %xmm1,%xmm7
addsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm7
mulsd  %xmm4,%xmm3
movapd %xmm7,%xmm1
mulsd  %xmm7,%xmm1
subsd  %xmm1,%xmm3
mov    0x48(%rsp),%rdx
movsd  (%rdx,%rcx,2),%xmm1
mov    0x10(%rsp),%rdx
movhpd (%rdx,%rcx,2),%xmm1
unpcklpd %xmm7,%xmm3
movapd %xmm0,%xmm2
mulpd  %xmm1,%xmm3
movapd %xmm3,%xmm0
addpd  %xmm2,%xmm0
add    $0x4,%rcx
add    $0xffffffffffffffff,%rax
jne    1470 <coreGTRCATMULT+0x340>
addpd  %xmm2,%xmm3
mov    %r13,%r14
mov    0xa0(%rsp),%rax
movhpd %xmm3,(%rax)
mov    0x98(%rsp),%rax
movlpd %xmm3,(%rax)
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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