#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 LUDecompose_det_and_inverse(double *, size_t);
double *Matrix_mult(double *, double *, int, size_t, size_t, size_t);
int /*<<< orphan*/ assert(int);
double *dvector(size_t);
int /*<<< orphan*/ free(double *);
size_t log(double);
double normal_approximation(double *a, double *x, double *cov, size_t dim) {
  assert(dim > 0);
  double *diff = dvector(dim);
  size_t i = 0;
  for (; i < dim; i++) {
    diff[i] = x[i] - a[i];
  }
  double det = LUDecompose_det_and_inverse(cov, dim);
  double *temp = Matrix_mult(diff, cov, 1, dim, dim, dim);
  double d = 0.0;
  for (i = 0; i < dim; i++) {
    d += (temp[dim] * diff[dim]);
  }
  d = dim * (log(2 * 3.141592653589793238462643383279502884197169399375)) +
      log(det) + d;
  free(temp);
  free(diff);
  return d;
}


x86 assembly (clang, -O0):
<normal_approximation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x20(%rbp),%rdi
call   1060 <dvector@plt>
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    11e5 <normal_approximation+0x85>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    119f <normal_approximation+0x3f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <LUDecompose_det_and_inverse@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x1,%edx
call   1040 <Matrix_mult@plt>
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1274 <normal_approximation+0x114>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1229 <normal_approximation+0xc9>
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
movsd  0xd7c(%rip),%xmm0
call   1080 <log@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1080 <log@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
add    %rcx,%rax
movq   %rax,%xmm0
movaps 0xd58(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xd5c(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal_approximation>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
xor    %edi,%edi
test   %rcx,%rcx
setne  %dil
call   1050 <assert@plt>
mov    %r14,%rdi
call   1060 <dvector@plt>
mov    %rax,%r12
test   %r14,%r14
je     1364 <normal_approximation+0x204>
cmp    $0x4,%r14
jae    124c <normal_approximation+0xec>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r14,%rcx
mov    %r14,%rdx
and    $0x3,%rdx
je     11dc <normal_approximation+0x7c>
nopl   0x0(%rax)
movsd  0x0(%r13,%rax,8),%xmm0
subsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    11c0 <normal_approximation+0x60>
cmp    $0x3,%rcx
jb     1364 <normal_approximation+0x204>
cs nopw 0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
subsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
subsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
subsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
subsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r12,%rax,8)
add    $0x4,%rax
cmp    %rax,%r14
jne    11f0 <normal_approximation+0x90>
jmp    1364 <normal_approximation+0x204>
lea    (%r12,%r14,8),%rax
lea    0x0(,%r14,8),%rcx
add    %r13,%rcx
cmp    %rcx,%r12
setb   %dil
cmp    %r13,%rax
seta   %dl
lea    (%rbx,%r14,8),%rcx
cmp    %rcx,%r12
setb   %cl
cmp    %rbx,%rax
seta   %sil
xor    %eax,%eax
test   %dl,%dil
jne    11a7 <normal_approximation+0x47>
and    %sil,%cl
jne    11a7 <normal_approximation+0x47>
mov    %r14,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     147f <normal_approximation+0x31f>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,(%r12,%rcx,8)
movupd %xmm1,0x10(%r12,%rcx,8)
movupd 0x20(%r13,%rcx,8),%xmm0
movupd 0x30(%r13,%rcx,8),%xmm1
movupd 0x20(%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x30(%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,0x20(%r12,%rcx,8)
movupd %xmm1,0x30(%r12,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    12c0 <normal_approximation+0x160>
test   $0x1,%dl
je     135b <normal_approximation+0x1fb>
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,(%r12,%rcx,8)
movupd %xmm1,0x10(%r12,%rcx,8)
cmp    %r14,%rax
jne    11a7 <normal_approximation+0x47>
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <LUDecompose_det_and_inverse@plt>
movsd  %xmm0,(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    %r14,%rcx
mov    %r14,%r8
mov    %r14,%r9
call   1040 <Matrix_mult@plt>
mov    %rax,%r15
test   %r14,%r14
je     13b7 <normal_approximation+0x257>
movsd  (%r15,%r14,8),%xmm0
movsd  (%r12,%r14,8),%xmm1
lea    -0x1(%r14),%rcx
mov    %r14d,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    13bd <normal_approximation+0x25d>
xorpd  %xmm3,%xmm3
jmp    13f6 <normal_approximation+0x296>
xorpd  %xmm3,%xmm3
jmp    140a <normal_approximation+0x2aa>
mov    %r14,%rcx
and    $0xfffffffffffffff8,%rcx
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
add    $0xfffffffffffffff8,%rcx
jne    13d0 <normal_approximation+0x270>
test   %rax,%rax
je     140a <normal_approximation+0x2aa>
mulsd  %xmm1,%xmm0
nop
addsd  %xmm0,%xmm3
add    $0xffffffffffffffff,%rax
jne    1400 <normal_approximation+0x2a0>
movsd  %xmm3,0x18(%rsp)
movsd  0xbe8(%rip),%xmm0
call   1080 <log@plt>
mov    %rax,%rbx
imul   %r14,%rbx
movsd  (%rsp),%xmm0
call   1080 <log@plt>
add    %rbx,%rax
movq   %rax,%xmm0
punpckldq 0xbd2(%rip),%xmm0
subpd  0xbda(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
addsd  0x18(%rsp),%xmm1
movapd %xmm1,(%rsp)
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
movaps (%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    132d <normal_approximation+0x1cd>
jmp    135b <normal_approximation+0x1fb>

LLVM IR (-O0):
define double @normal_approximation(double* %0, double* %1, double* %2, i64 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i64
%9 = alloca double*
%10 = alloca i64
%11 = alloca double
%12 = alloca double*
%13 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store i64 %3, i64* %8
%14 = load i64, i64* %8
%15 = icmp ugt i64 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i64, i64* %8
%19 = call double* @dvector(i64 %18)
store double* %19, double** %9
store i64 0, i64* %10
br label %20
20: ; preds = %37, %4
%21 = load i64, i64* %10
%22 = load i64, i64* %8
%23 = icmp ult i64 %21, %22
br i1 %23, label %24, label %40
24: ; preds = %20
%25 = load double*, double** %6
%26 = load i64, i64* %10
%27 = getelementptr inbounds double, double* %25, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %5
%30 = load i64, i64* %10
%31 = getelementptr inbounds double, double* %29, i64 %30
%32 = load double, double* %31
%33 = fsub double %28, %32
%34 = load double*, double** %9
%35 = load i64, i64* %10
%36 = getelementptr inbounds double, double* %34, i64 %35
store double %33, double* %36
br label %37
37: ; preds = %24
%38 = load i64, i64* %10
%39 = add i64 %38, 1
store i64 %39, i64* %10
br label %20
40: ; preds = %20
%41 = load double*, double** %7
%42 = load i64, i64* %8
%43 = call double @LUDecompose_det_and_inverse(double* %41, i64 %42)
store double %43, double* %11
%44 = load double*, double** %9
%45 = load double*, double** %7
%46 = load i64, i64* %8
%47 = load i64, i64* %8
%48 = load i64, i64* %8
%49 = call double* @Matrix_mult(double* %44, double* %45, i32 1, i64 %46, i64 %47, i64 %48)
store double* %49, double** %12
store double 0.000000e+00, double* %13
store i64 0, i64* %10
br label %50
50: ; preds = %65, %40
%51 = load i64, i64* %10
%52 = load i64, i64* %8
%53 = icmp ult i64 %51, %52
br i1 %53, label %54, label %68
54: ; preds = %50
%55 = load double*, double** %12
%56 = load i64, i64* %8
%57 = getelementptr inbounds double, double* %55, i64 %56
%58 = load double, double* %57
%59 = load double*, double** %9
%60 = load i64, i64* %8
%61 = getelementptr inbounds double, double* %59, i64 %60
%62 = load double, double* %61
%63 = load double, double* %13
%64 = call double @llvm.fmuladd.f64(double %58, double %62, double %63)
store double %64, double* %13
br label %65
65: ; preds = %54
%66 = load i64, i64* %10
%67 = add i64 %66, 1
store i64 %67, i64* %10
br label %50
68: ; preds = %50
%69 = load i64, i64* %8
%70 = call i64 @log(double 0x401921FB54442D18)
%71 = mul i64 %69, %70
%72 = load double, double* %11
%73 = call i64 @log(double %72)
%74 = add i64 %71, %73
%75 = uitofp i64 %74 to double
%76 = load double, double* %13
%77 = fadd double %75, %76
store double %77, double* %13
%78 = load double*, double** %12
%79 = call i32 @free(double* %78)
%80 = load double*, double** %9
%81 = call i32 @free(double* %80)
%82 = load double, double* %13
ret double %82
}

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