#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 */
double FABS(double);
int /*<<< orphan*/ ascertainmentBiasSequence(unsigned char *, int const);
int /*<<< orphan*/ assert(int);
double exp(double);
double log(double);
double evaluateCatAsc(int *ex1, int *ex2, double *x1, double *x2,
                      double *tipVector, unsigned char *tipX1, int n,
                      double *diagptable, const int numStates) {
  double exponent,
      logMin = log(
          115792089237316195423570985008687907853269984665640564039457584007913129639936.0),
      sum = 0.0, unobserved, term, *left, *right;
  int i, l;
  unsigned char tip[32];
  ascertainmentBiasSequence(tip, numStates);
  if (tipX1) {
    for (i = 0; i < n; i++) {
      left = &(tipVector[numStates * tip[i]]);
      right = &(x2[i * numStates]);
      term = 0.0;
      for (l = 0; l < numStates; l++)
        term += left[l] * right[l] * diagptable[l];
      exponent = ((double)ex2[i] * logMin);
      assert(exponent < 700.0);
      unobserved = FABS(term) * exp(exponent);
      sum += unobserved;
    }
  } else {
    for (i = 0; i < n; i++) {
      term = 0.0;
      left = &(x1[i * numStates]);
      right = &(x2[i * numStates]);
      for (l = 0; l < numStates; l++)
        term += left[l] * right[l] * diagptable[l];
      exponent = ((double)(ex1[i] + ex2[i]) * logMin);
      assert(exponent < 700.0);
      unobserved = FABS(term) * exp(exponent);
      sum += unobserved;
    }
  }
  return sum;
}


x86 assembly (clang, -O0):
<evaluateCatAsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  0xe7b(%rip),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    -0x90(%rbp),%rdi
mov    0x20(%rbp),%esi
call   1070 <ascertainmentBiasSequence@plt>
cmpq   $0x0,-0x30(%rbp)
je     12e6 <evaluateCatAsc+0x196>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    12e1 <evaluateCatAsc+0x191>
mov    -0x28(%rbp),%rax
mov    0x20(%rbp),%ecx
movslq -0x6c(%rbp),%rdx
movzbl -0x90(%rbp,%rdx,1),%edx
ff
imul   %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1263 <evaluateCatAsc+0x113>
mov    -0x60(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x70(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1210 <evaluateCatAsc+0xc0>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd86(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x58(%rbp),%xmm0
call   1030 <FABS@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11b8 <evaluateCatAsc+0x68>
jmp    141d <evaluateCatAsc+0x2cd>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1418 <evaluateCatAsc+0x2c8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    138d <evaluateCatAsc+0x23d>
mov    -0x60(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x70(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    133a <evaluateCatAsc+0x1ea>
mov    -0x8(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x6c(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xc4f(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x58(%rbp),%xmm0
call   1030 <FABS@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12ed <evaluateCatAsc+0x19d>
jmp    141d <evaluateCatAsc+0x2cd>
movsd  -0x48(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluateCatAsc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,%r15
mov    %r8,0x8(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,%r12
mov    %rsi,0x40(%rsp)
mov    %rdi,%rbp
mov    0xc0(%rsp),%esi
mov    0xb8(%rsp),%r14
mov    0xb0(%rsp),%ebx
lea    0x50(%rsp),%rdi
call   1060 <ascertainmentBiasSequence@plt>
test   %r15,%r15
je     1318 <evaluateCatAsc+0x1d8>
test   %ebx,%ebx
jle    14ab <evaluateCatAsc+0x36b>
mov    0xc0(%rsp),%eax
movslq %eax,%rcx
mov    %ebx,%edx
mov    %rdx,0x28(%rsp)
mov    %eax,%r15d
mov    %r15,0x20(%rsp)
and    $0xfffffffe,%r15d
mov    0x8(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x18(%rsp)
mov    0x10(%rsp),%rax
lea    0x8(%rax),%r13
mov    %rcx,%rbx
lea    0x0(,%rcx,8),%rbp
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
jmp    1257 <evaluateCatAsc+0x117>
nop
movsd  %xmm2,(%rsp)
mov    0x40(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r12,4),%xmm1
mulsd  0xe05(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
xor    %edi,%edi
movsd  0xdfd(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %dil
call   1040 <assert@plt>
movsd  (%rsp),%xmm0
call   1030 <FABS@plt>
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x1,%r12
add    %rbp,%r13
cmp    0x28(%rsp),%r12
je     14af <evaluateCatAsc+0x36f>
movsd  %xmm0,0x38(%rsp)
xorpd  %xmm2,%xmm2
cmpl   $0x0,0xc0(%rsp)
jle    11e0 <evaluateCatAsc+0xa0>
movzbl 0x50(%rsp,%r12,1),%eax
imul   %rbx,%rax
cmpl   $0x1,0xc0(%rsp)
01
jne    1290 <evaluateCatAsc+0x150>
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
jmp    12db <evaluateCatAsc+0x19b>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nop
movsd  -0x8(%rdx,%rcx,8),%xmm1
movsd  (%rdx,%rcx,8),%xmm2
mulsd  -0x8(%r13,%rcx,8),%xmm1
mulsd  (%r14,%rcx,8),%xmm1
mulsd  0x0(%r13,%rcx,8),%xmm2
mulsd  0x8(%r14,%rcx,8),%xmm2
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
add    $0x2,%rcx
movapd %xmm2,%xmm0
cmp    %rcx,%r15
jne    12a0 <evaluateCatAsc+0x160>
testb  $0x1,0x20(%rsp)
je     11e0 <evaluateCatAsc+0xa0>
mov    %r12,%rdx
imul   %rbx,%rdx
mov    0x8(%rsp),%rsi
lea    (%rsi,%rax,8),%rax
mov    0x10(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
movsd  (%rax,%rcx,8),%xmm0
mulsd  (%rdx,%rcx,8),%xmm0
mulsd  (%r14,%rcx,8),%xmm0
addsd  %xmm0,%xmm2
jmp    11e0 <evaluateCatAsc+0xa0>
test   %ebx,%ebx
jle    14ab <evaluateCatAsc+0x36b>
mov    %rbp,0x28(%rsp)
mov    0xc0(%rsp),%eax
movslq %eax,%rcx
mov    %ebx,%edx
mov    %rdx,0x20(%rsp)
mov    %eax,%r15d
mov    %r15,0x8(%rsp)
and    $0xfffffffe,%r15d
mov    %r12,0x18(%rsp)
lea    0x8(%r12),%rbp
mov    %rcx,0x48(%rsp)
lea    0x0(,%rcx,8),%rbx
mov    0x10(%rsp),%rax
lea    0x8(%rax),%r13
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
jmp    13f5 <evaluateCatAsc+0x2b5>
xchg   %ax,%ax
movsd  %xmm2,(%rsp)
mov    0x40(%rsp),%rax
mov    (%rax,%r12,4),%eax
mov    0x28(%rsp),%rcx
add    (%rcx,%r12,4),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xc6a(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
xor    %edi,%edi
movsd  0xc62(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %dil
call   1040 <assert@plt>
movsd  (%rsp),%xmm0
call   1030 <FABS@plt>
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x1,%r12
add    %rbx,%rbp
add    %rbx,%r13
cmp    0x20(%rsp),%r12
je     14af <evaluateCatAsc+0x36f>
movsd  %xmm0,0x38(%rsp)
xorpd  %xmm2,%xmm2
cmpl   $0x0,0xc0(%rsp)
jle    1370 <evaluateCatAsc+0x230>
cmpl   $0x1,0xc0(%rsp)
01
jne    1420 <evaluateCatAsc+0x2e0>
xorpd  %xmm2,%xmm2
xor    %eax,%eax
jmp    146c <evaluateCatAsc+0x32c>
nop
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  -0x8(%rbp,%rax,8),%xmm1
movsd  0x0(%rbp,%rax,8),%xmm2
mulsd  -0x8(%r13,%rax,8),%xmm1
mulsd  (%r14,%rax,8),%xmm1
mulsd  0x0(%r13,%rax,8),%xmm2
mulsd  0x8(%r14,%rax,8),%xmm2
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
add    $0x2,%rax
movapd %xmm2,%xmm0
cmp    %rax,%r15
jne    1430 <evaluateCatAsc+0x2f0>
testb  $0x1,0x8(%rsp)
je     1370 <evaluateCatAsc+0x230>
mov    %r12,%rcx
imul   0x48(%rsp),%rcx
mov    0x18(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    0x10(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
movsd  (%rdx,%rax,8),%xmm0
mulsd  (%rcx,%rax,8),%xmm0
mulsd  (%r14,%rax,8),%xmm0
addsd  %xmm0,%xmm2
jmp    1370 <evaluateCatAsc+0x230>
xorpd  %xmm0,%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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