#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*/ fabs(double);
double log(int /*<<< orphan*/);
double evaluateCAT_FLEX(int *cptr, int *wptr, double *x1, double *x2,
                        double *tipVector, unsigned char *tipX1, int n,
                        double *diagptable_start, const int states) {
  double sum = 0.0, term, *diagptable, *left, *right;
  int i, l;
  if (tipX1) {
    for (i = 0; i < n; i++) {
      left = &(tipVector[states * tipX1[i]]);
      right = &(x2[states * i]);
      diagptable = &diagptable_start[states * cptr[i]];
      for (l = 0, term = 0.0; l < states; l++)
        term += left[l] * right[l] * diagptable[l];
      term = log(fabs(term));
      sum += wptr[i] * term;
    }
  } else {
    for (i = 0; i < n; i++) {
      left = &x1[states * i];
      right = &x2[states * i];
      diagptable = &diagptable_start[states * cptr[i]];
      for (l = 0, term = 0.0; l < states; l++)
        term += left[l] * right[l] * diagptable[l];
      term = log(fabs(term));
      sum += wptr[i] * term;
    }
  }
  return sum;
}


x86 assembly (clang, -O0):
<evaluateCAT_FLEX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     127d <evaluateCAT_FLEX+0x15d>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1278 <evaluateCAT_FLEX+0x158>
mov    -0x28(%rbp),%rax
mov    0x20(%rbp),%ecx
mov    -0x30(%rbp),%rdx
movslq -0x5c(%rbp),%rsi
movzbl (%rdx,%rsi,1),%edx
imul   %edx,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    0x20(%rbp),%ecx
imul   -0x5c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    0x18(%rbp),%rax
mov    0x20(%rbp),%ecx
mov    -0x8(%rbp),%rdx
movslq -0x5c(%rbp),%rsi
imul   (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x60(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1230 <evaluateCAT_FLEX+0x110>
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    11dd <evaluateCAT_FLEX+0xbd>
movsd  -0x40(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1164 <evaluateCAT_FLEX+0x44>
jmp    1392 <evaluateCAT_FLEX+0x272>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    138d <evaluateCAT_FLEX+0x26d>
mov    -0x18(%rbp),%rax
mov    0x20(%rbp),%ecx
imul   -0x5c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    0x20(%rbp),%ecx
imul   -0x5c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    0x18(%rbp),%rax
mov    0x20(%rbp),%ecx
mov    -0x8(%rbp),%rdx
movslq -0x5c(%rbp),%rsi
imul   (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x60(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1345 <evaluateCAT_FLEX+0x225>
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x60(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    12f2 <evaluateCAT_FLEX+0x1d2>
movsd  -0x40(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1284 <evaluateCAT_FLEX+0x164>
jmp    1392 <evaluateCAT_FLEX+0x272>
movsd  -0x38(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluateCAT_FLEX>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8,(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rsi,0x38(%rsp)
mov    %rdi,0x30(%rsp)
mov    0x80(%rsp),%eax
mov    %r9,0x20(%rsp)
test   %r9,%r9
je     12ce <evaluateCAT_FLEX+0x1ae>
test   %eax,%eax
jle    142f <evaluateCAT_FLEX+0x30f>
movslq 0x90(%rsp),%r14
mov    %eax,%r13d
mov    %r14d,%r15d
mov    %r15,0x18(%rsp)
and    $0xfffffffe,%r15d
mov    (%rsp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rsp)
mov    0x8(%rsp),%rax
lea    0x8(%rax),%rbp
lea    0x0(,%r14,8),%rbx
mov    0x88(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x40(%rsp)
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
jmp    11e8 <evaluateCAT_FLEX+0xc8>
nopl   (%rax)
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
mov    0x38(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r12,4),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%r12
add    %rbx,%rbp
cmp    %r13,%r12
je     1433 <evaluateCAT_FLEX+0x313>
movsd  %xmm0,0x28(%rsp)
xorpd  %xmm0,%xmm0
cmpl   $0x0,0x90(%rsp)
jle    11b0 <evaluateCAT_FLEX+0x90>
mov    0x20(%rsp),%rax
movzbl (%rax,%r12,1),%ecx
imul   %r14,%rcx
mov    0x30(%rsp),%rax
movslq (%rax,%r12,4),%rax
imul   %r14,%rax
cmpl   $0x1,0x90(%rsp)
01
jne    1230 <evaluateCAT_FLEX+0x110>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    1287 <evaluateCAT_FLEX+0x167>
nopl   0x0(%rax)
mov    0x10(%rsp),%rdx
lea    (%rdx,%rcx,8),%rsi
mov    0x40(%rsp),%rdx
lea    (%rdx,%rax,8),%rdi
xorpd  %xmm1,%xmm1
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rsi,%rdx,8),%xmm2
movsd  (%rsi,%rdx,8),%xmm0
mulsd  -0x8(%rbp,%rdx,8),%xmm2
mulsd  -0x8(%rdi,%rdx,8),%xmm2
mulsd  0x0(%rbp,%rdx,8),%xmm0
mulsd  (%rdi,%rdx,8),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
add    $0x2,%rdx
movapd %xmm0,%xmm1
cmp    %rdx,%r15
jne    1250 <evaluateCAT_FLEX+0x130>
testb  $0x1,0x18(%rsp)
je     11b0 <evaluateCAT_FLEX+0x90>
mov    %r12,%rsi
imul   %r14,%rsi
mov    (%rsp),%rdi
lea    (%rdi,%rcx,8),%rcx
mov    0x8(%rsp),%rdi
lea    (%rdi,%rsi,8),%rsi
movsd  (%rcx,%rdx,8),%xmm1
mulsd  (%rsi,%rdx,8),%xmm1
mov    0x88(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mulsd  (%rax,%rdx,8),%xmm1
addsd  %xmm1,%xmm0
jmp    11b0 <evaluateCAT_FLEX+0x90>
test   %eax,%eax
jle    142f <evaluateCAT_FLEX+0x30f>
mov    0x90(%rsp),%ecx
movslq %ecx,%rsi
mov    %eax,%eax
mov    %rax,0x20(%rsp)
mov    %ecx,%ebp
mov    %rbp,0x18(%rsp)
and    $0xfffffffe,%ebp
mov    %rdx,(%rsp)
lea    0x8(%rdx),%rbx
mov    %rsi,%r13
lea    0x0(,%rsi,8),%r15
mov    0x8(%rsp),%rax
lea    0x8(%rax),%r14
mov    0x88(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rsp)
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
jmp    136d <evaluateCAT_FLEX+0x24d>
nopw   0x0(%rax,%rax,1)
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
mov    0x38(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r12,4),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%r12
add    %r15,%rbx
add    %r15,%r14
cmp    0x20(%rsp),%r12
je     1433 <evaluateCAT_FLEX+0x313>
movsd  %xmm0,0x28(%rsp)
xorpd  %xmm0,%xmm0
cmpl   $0x0,0x90(%rsp)
jle    1330 <evaluateCAT_FLEX+0x210>
mov    0x30(%rsp),%rax
movslq (%rax,%r12,4),%rax
imul   %r13,%rax
cmpl   $0x1,0x90(%rsp)
01
jne    13a0 <evaluateCAT_FLEX+0x280>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    13e8 <evaluateCAT_FLEX+0x2c8>
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
nop
movsd  -0x8(%rbx,%rcx,8),%xmm2
movsd  (%rbx,%rcx,8),%xmm0
mulsd  -0x8(%r14,%rcx,8),%xmm2
mulsd  -0x8(%rdx,%rcx,8),%xmm2
mulsd  (%r14,%rcx,8),%xmm0
mulsd  (%rdx,%rcx,8),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
add    $0x2,%rcx
movapd %xmm0,%xmm1
cmp    %rcx,%rbp
jne    13b0 <evaluateCAT_FLEX+0x290>
testb  $0x1,0x18(%rsp)
je     1330 <evaluateCAT_FLEX+0x210>
mov    %r12,%rdx
imul   %r13,%rdx
mov    (%rsp),%rsi
lea    (%rsi,%rdx,8),%rsi
mov    0x8(%rsp),%rdi
lea    (%rdi,%rdx,8),%rdx
movsd  (%rsi,%rcx,8),%xmm1
mulsd  (%rdx,%rcx,8),%xmm1
mov    0x88(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
mulsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
jmp    1330 <evaluateCAT_FLEX+0x210>
xorpd  %xmm0,%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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