#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exp(double);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
void coreGTRCATPROT(double *EIGN, double lz, int numberOfCategories,
                    double *rptr, int *cptr, int lower, int upper,
                    double *wrptr, double *wr2ptr, double *ext_dlnLdlz,
                    double *ext_d2lnLdlz2, double *sumtable) {
  int i, l;
  double *d1, *d_start, *sum;
  double e[19], s[19];
  double tmp;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  double dd[19];
  double dlnLdlz = 0.0;
  double d2lnLdlz2 = 0.0;
  for (l = 0; l < 19; l++) {
    e[l] = EIGN[l] * EIGN[l];
    s[l] = EIGN[l];
  }
  d1 = d_start = (double *)malloc(numberOfCategories * 19 * sizeof(double));
  for (l = 0; l < 19; l++)
    dd[l] = s[l] * lz;
  for (i = 0; i < numberOfCategories; i++) {
    for (l = 0; l < 19; l++)
      *d1++ = exp(dd[l] * rptr[i]);
  }
  for (i = lower; i < upper; i++) {
    d1 = &d_start[19 * cptr[i]];
    sum = &sumtable[20 * i];
    inv_Li = sum[0];
    inv_Li += (tmp = d1[0] * sum[1]);
    dlnLidlz = tmp * s[0];
    d2lnLidlz2 = tmp * e[0];
    for (l = 1; l < 19; l++) {
      inv_Li += (tmp = d1[l] * sum[l + 1]);
      dlnLidlz += tmp * s[l];
      d2lnLidlz2 += tmp * e[l];
    }
    inv_Li = 1.0 / inv_Li;
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wr2ptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
  free(d_start);
}


x86 assembly (clang, -O0):
<coreGTRCATPROT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x258(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x260(%rbp)
ff
movl   $0x0,-0x38(%rbp)
cmpl   $0x13,-0x38(%rbp)
jge    11e1 <coreGTRCATPROT+0xb1>
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0xf0(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0x190(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1188 <coreGTRCATPROT+0x58>
imul   $0x13,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x13,-0x38(%rbp)
jge    1238 <coreGTRCATPROT+0x108>
movslq -0x38(%rbp),%rax
movsd  -0x190(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x10(%rbp),%xmm0
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0x250(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1201 <coreGTRCATPROT+0xd1>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12b3 <coreGTRCATPROT+0x183>
movl   $0x0,-0x38(%rbp)
cmpl   $0x13,-0x38(%rbp)
jge    12a0 <coreGTRCATPROT+0x170>
movslq -0x38(%rbp),%rax
movsd  -0x250(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
cvtsi2sd %eax,%xmm0
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1252 <coreGTRCATPROT+0x122>
jmp    12a5 <coreGTRCATPROT+0x175>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    123f <coreGTRCATPROT+0x10f>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    14f1 <coreGTRCATPROT+0x3c1>
mov    -0x48(%rbp),%rax
mov    -0x28(%rbp),%rcx
movslq -0x34(%rbp),%rdx
imul   $0x13,(%rcx,%rdx,4),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    0x30(%rbp),%rax
imul   $0x14,-0x34(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x50(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
addsd  -0x1a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
mulsd  -0x190(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
mulsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1b0(%rbp)
ff
movl   $0x1,-0x38(%rbp)
cmpl   $0x13,-0x38(%rbp)
jge    1412 <coreGTRCATPROT+0x2e2>
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
addsd  -0x1a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movslq -0x38(%rbp),%rax
movsd  -0x190(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x1a8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movslq -0x38(%rbp),%rax
movsd  -0xf0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x1b0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1b0(%rbp)
ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1369 <coreGTRCATPROT+0x239>
movsd  0xbe6(%rip),%xmm0
divsd  -0x1a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x1a0(%rbp),%xmm0
ff
mulsd  -0x1a8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x1a0(%rbp),%xmm0
ff
mulsd  -0x1b0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1b0(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x1a8(%rbp),%xmm2
ff
movsd  -0x258(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x258(%rbp)
ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x1b0(%rbp),%xmm1
ff
movsd  -0x1a8(%rbp),%xmm2
ff
movsd  -0x1a8(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x260(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x260(%rbp)
ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b9 <coreGTRCATPROT+0x189>
movsd  -0x258(%rbp),%xmm0
ff
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x260(%rbp),%xmm0
ff
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGTRCATPROT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
mov    %r9d,0xc(%rsp)
mov    %r8d,0x8(%rsp)
mov    %rcx,0x28(%rsp)
mov    %rdx,%rbp
mov    %esi,%r14d
movaps %xmm0,0x40(%rsp)
mov    %rdi,%rbx
mov    0x280(%rsp),%r15
mov    0x278(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x270(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0x268(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x260(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x50(%rsp),%rdi
mov    $0x98,%edx
mov    %rbx,%rsi
call   1040 <memcpy@plt>
movupd (%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0xf0(%rsp)
movupd 0x10(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x100(%rsp)
movupd 0x20(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x110(%rsp)
movupd 0x30(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x120(%rsp)
movupd 0x40(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x130(%rsp)
movupd 0x50(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x140(%rsp)
movupd 0x60(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x150(%rsp)
movupd 0x70(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x160(%rsp)
movupd 0x80(%rbx),%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x170(%rsp)
movsd  0x90(%rbx),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x180(%rsp)
imul   $0x98,%r14d,%edi
call   1050 <malloc@plt>
mov    %rax,0x10(%rsp)
movapd 0x40(%rsp),%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
movapd 0x50(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x190(%rsp)
movapd 0x60(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1a0(%rsp)
movapd 0x70(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1b0(%rsp)
movapd 0x80(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1c0(%rsp)
movapd 0x90(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1d0(%rsp)
movapd 0xa0(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1e0(%rsp)
movapd 0xb0(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x1f0(%rsp)
movapd 0xc0(%rsp),%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,0x200(%rsp)
mulpd  0xd0(%rsp),%xmm0
movapd %xmm0,0x210(%rsp)
movapd %xmm2,%xmm0
mulsd  0xe0(%rsp),%xmm0
movsd  %xmm0,0x220(%rsp)
test   %r14d,%r14d
jle    13cc <coreGTRCATPROT+0x28c>
mov    %r14d,%r14d
xor    %r12d,%r12d
mov    0x10(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x190(%rsp,%r13,1),%xmm0
mulsd  0x0(%rbp,%r12,8),%xmm0
call   1060 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx,%r13,1)
add    $0x8,%r13
cmp    $0x98,%r13
jne    1390 <coreGTRCATPROT+0x250>
add    $0x1,%r12
add    %r13,%rbx
cmp    %r14,%r12
jne    1380 <coreGTRCATPROT+0x240>
xorpd  %xmm3,%xmm3
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
cmp    %ecx,%eax
mov    0x10(%rsp),%rdi
jge    1527 <coreGTRCATPROT+0x3e7>
movapd 0xf0(%rsp),%xmm0
cltq
movslq %ecx,%r8
movhpd 0x50(%rsp),%xmm0
lea    (%rax,%rax,4),%rdx
shl    $0x5,%rdx
add    %r15,%rdx
add    $0x18,%rdx
mov    %rdi,%r10
add    $0x10,%r10
xorpd  %xmm4,%xmm4
movsd  0xbe5(%rip),%xmm1
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%rcx
mov    0x18(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movapd %xmm4,%xmm2
movslq (%r9,%rax,4),%rsi
imul   $0x98,%rsi,%rsi
lea    (%rax,%rax,4),%rbp
shl    $0x5,%rbp
movsd  (%rdi,%rsi,1),%xmm4
mulsd  0x8(%r15,%rbp,1),%xmm4
movsd  (%r15,%rbp,1),%xmm3
addsd  %xmm4,%xmm3
unpcklpd %xmm4,%xmm4
mulpd  %xmm0,%xmm4
add    %r10,%rsi
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%rsi,%rbp,1),%xmm5
movsd  (%rsi,%rbp,1),%xmm6
mulsd  -0x8(%rdx,%rbp,1),%xmm5
addsd  %xmm5,%xmm3
unpcklpd %xmm5,%xmm5
movsd  0xf8(%rsp,%rbp,1),%xmm7
movhpd 0x58(%rsp,%rbp,1),%xmm7
mulpd  %xmm5,%xmm7
addpd  %xmm4,%xmm7
movsd  0x100(%rsp,%rbp,1),%xmm4
mulsd  (%rdx,%rbp,1),%xmm6
addsd  %xmm6,%xmm3
unpcklpd %xmm6,%xmm6
movhpd 0x60(%rsp,%rbp,1),%xmm4
mulpd  %xmm6,%xmm4
addpd  %xmm7,%xmm4
add    $0x10,%rbp
cmp    $0x90,%rbp
jne    1470 <coreGTRCATPROT+0x330>
movapd %xmm1,%xmm5
divsd  %xmm3,%xmm5
movapd %xmm4,%xmm3
unpckhpd %xmm4,%xmm3
mulsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm5
movapd %xmm3,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm4,%xmm5
movsd  (%rbx,%rax,8),%xmm4
movhpd (%rcx,%rax,8),%xmm4
unpcklpd %xmm5,%xmm3
mulpd  %xmm4,%xmm3
movapd %xmm3,%xmm4
addpd  %xmm2,%xmm4
add    $0x1,%rax
add    $0xa0,%rdx
cmp    %r8,%rax
jne    1430 <coreGTRCATPROT+0x2f0>
addpd  %xmm2,%xmm3
mov    0x30(%rsp),%rax
movlpd %xmm3,(%rax)
mov    0x38(%rsp),%rax
movhpd %xmm3,(%rax)
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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