#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 exp(double);
double log(double);
void computeLogDensity(double *pX, int F, int N, double *pMu, double *pSigma,
                       int K, double *plogdens, double *pdens) {
  double SXku;
  int n, k, f;
  for (n = 0; n < N; n++) {
    for (k = 0; k < K; k++) {
      plogdens[k + K * n] = -F * 0.5 * log((double)6.28318530717959);
    }
    for (f = 0; f < F; f++) {
      for (k = 0; k < K; k++) {
        SXku = pSigma[f + F * k] < 10E-9 ? 10E-9 : pSigma[f + F * k];
        plogdens[k + K * n] = plogdens[k + K * n] - 0.5 * log(SXku) -
                              0.5 * (pX[f + F * n] - pMu[f + F * k]) *
                                  (pX[f + F * n] - pMu[f + F * k]) / SXku;
      }
    }
    for (k = 0; k < K; k++) {
      pdens[k + K * n] = exp(plogdens[k + K * n]);
    }
  }
}


x86 assembly (clang, -O0):
<computeLogDensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13a1 <computeLogDensity+0x281>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11c5 <computeLogDensity+0xa5>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe8a(%rip),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1160 <computeLogDensity+0x40>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1338 <computeLogDensity+0x218>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1325 <computeLogDensity+0x205>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xdfa(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1223 <computeLogDensity+0x103>
movsd  0xde7(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1240 <computeLogDensity+0x120>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <log@plt>
movsd  -0x58(%rbp),%xmm1
movsd  0xd92(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm2
movsd  0xd4a(%rip),%xmm1
mulsd  %xmm2,%xmm1
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
divsd  -0x30(%rbp),%xmm1
subsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11df <computeLogDensity+0xbf>
jmp    132a <computeLogDensity+0x20a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11cc <computeLogDensity+0xac>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    138e <computeLogDensity+0x26e>
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    133f <computeLogDensity+0x21f>
jmp    1393 <computeLogDensity+0x273>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    114d <computeLogDensity+0x2d>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeLogDensity>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9d,0x8(%rsp)
mov    %r8,0x60(%rsp)
mov    %rcx,0x58(%rsp)
mov    %esi,0xc(%rsp)
test   %edx,%edx
jle    14ef <computeLogDensity+0x3cf>
mov    0x138(%rsp),%r14
mov    0xc(%rsp),%ecx
mov    %ecx,%eax
neg    %eax
cvtsi2sd %eax,%xmm0
mulsd  0xe98(%rip),%xmm0
mulsd  0xe98(%rip),%xmm0
mov    0x130(%rsp),%rbp
movslq %ecx,%r9
movslq 0x8(%rsp),%r8
mov    %edx,%ecx
mov    %rcx,0x70(%rsp)
mov    %r8d,%r15d
mov    %r9d,%ecx
mov    %rcx,0xa0(%rsp)
mov    %r15d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x50(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,0x48(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mov    %ecx,%eax
and    $0x3,%eax
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x38(%rsp)
lea    0x70(%rbp),%rbx
shl    $0x3,%r8
mov    %r8,0x78(%rsp)
lea    0x10(%rbp),%rdx
mov    %rax,0x40(%rsp)
mov    %rax,%rsi
shl    $0x5,%rsi
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %r9,0x30(%rsp)
mov    %rdi,0xa8(%rsp)
movapd %xmm0,0xe0(%rsp)
mov    %r15,0x20(%rsp)
movapd %xmm1,0xd0(%rsp)
mov    %rsi,0x68(%rsp)
jmp    1279 <computeLogDensity+0x159>
cs nopw 0x0(%rax,%rax,1)
mov    0x10(%rsp),%rcx
add    $0x1,%rcx
mov    0x78(%rsp),%rax
mov    0x88(%rsp),%rbx
add    %rax,%rbx
mov    0x80(%rsp),%rdx
add    %rax,%rdx
add    %rax,%rbp
add    %rax,%r14
mov    %rcx,%rax
mov    %rcx,0x10(%rsp)
cmp    0x70(%rsp),%rcx
movapd 0xe0(%rsp),%xmm0
mov    0x30(%rsp),%r9
movapd 0xd0(%rsp),%xmm1
mov    0x68(%rsp),%rsi
je     14ef <computeLogDensity+0x3cf>
cmpl   $0x0,0x8(%rsp)
jle    134f <computeLogDensity+0x22f>
cmpl   $0x4,0x8(%rsp)
jae    12a0 <computeLogDensity+0x180>
xor    %eax,%eax
jmp    1340 <computeLogDensity+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpq   $0xc,0x48(%rsp)
jae    12ac <computeLogDensity+0x18c>
xor    %eax,%eax
jmp    12f9 <computeLogDensity+0x1d9>
mov    0x38(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd %xmm1,-0x70(%rbx,%rax,8)
movupd %xmm1,-0x60(%rbx,%rax,8)
movupd %xmm1,-0x50(%rbx,%rax,8)
movupd %xmm1,-0x40(%rbx,%rax,8)
movupd %xmm1,-0x30(%rbx,%rax,8)
movupd %xmm1,-0x20(%rbx,%rax,8)
movupd %xmm1,-0x10(%rbx,%rax,8)
movupd %xmm1,(%rbx,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    12c0 <computeLogDensity+0x1a0>
cmpq   $0x0,0x40(%rsp)
je     1324 <computeLogDensity+0x204>
lea    (%rdx,%rax,8),%rax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movupd %xmm1,-0x10(%rax,%rcx,1)
movupd %xmm1,(%rax,%rcx,1)
add    $0x20,%rcx
cmp    %rcx,%rsi
jne    1310 <computeLogDensity+0x1f0>
mov    0x50(%rsp),%rcx
mov    %rcx,%rax
cmp    %r15,%rcx
je     134f <computeLogDensity+0x22f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x0(%rbp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r15
jne    1340 <computeLogDensity+0x220>
mov    %rdx,0x80(%rsp)
mov    %rbx,0x88(%rsp)
mov    %rbp,0x28(%rsp)
mov    %r14,0x90(%rsp)
cmpl   $0x0,0xc(%rsp)
jle    14b0 <computeLogDensity+0x390>
mov    0x10(%rsp),%rax
imul   %r9,%rax
mov    %rax,0x98(%rsp)
mov    0x58(%rsp),%r14
mov    0x60(%rsp),%rdx
xor    %eax,%eax
mov    %rax,0x18(%rsp)
jmp    13c7 <computeLogDensity+0x2a7>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rsi
add    $0x1,%rsi
add    $0x8,%rdx
add    $0x8,%r14
mov    %rsi,%rax
mov    %rsi,0x18(%rsp)
cmp    0xa0(%rsp),%rsi
je     14b0 <computeLogDensity+0x390>
cmpl   $0x0,0x8(%rsp)
mov    0xa8(%rsp),%r15
mov    0x28(%rsp),%r13
mov    0x20(%rsp),%rbx
movsd  0xc2a(%rip),%xmm1
jle    13a0 <computeLogDensity+0x280>
mov    0x98(%rsp),%rax
mov    0x18(%rsp),%rsi
add    %rsi,%rax
mov    %rax,0xb0(%rsp)
xor    %r12d,%r12d
xor    %ebp,%ebp
mov    %rdx,0xb8(%rsp)
nopl   (%rax)
movapd %xmm1,%xmm0
maxsd  (%rdx,%r12,8),%xmm0
movsd  %xmm0,0xc8(%rsp)
movsd  0x0(%r13,%rbp,8),%xmm1
movsd  %xmm1,0xc0(%rsp)
call   1040 <log@plt>
movsd  0xbd8(%rip),%xmm3
mov    0xb8(%rsp),%rdx
mulsd  %xmm3,%xmm0
mov    0xb0(%rsp),%rax
movsd  (%r15,%rax,8),%xmm1
subsd  (%r14,%r12,8),%xmm1
addsd  0xc0(%rsp),%xmm0
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
movsd  0xb93(%rip),%xmm1
divsd  0xc8(%rsp),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x0(%r13,%rbp,8)
add    $0x1,%rbp
add    0x30(%rsp),%r12
cmp    %rbp,%rbx
jne    1410 <computeLogDensity+0x2f0>
jmp    13a0 <computeLogDensity+0x280>
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0x8(%rsp)
mov    0x90(%rsp),%r14
mov    0x28(%rsp),%rbp
mov    0x20(%rsp),%r15
jle    1220 <computeLogDensity+0x100>
xor    %ebx,%ebx
nop
movsd  0x0(%rbp,%rbx,8),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    14d0 <computeLogDensity+0x3b0>
jmp    1220 <computeLogDensity+0x100>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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