#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);
void fnMH_C(double *theta, int *N, int *k, double *lnw, double *u,
            double *draws, int *ns) {
  int m, s;
  double e;
  double tmp[*k];
  for (int j = 0; j < *k; j++) {
    tmp[j] = theta[j];
    draws[j] = theta[j];
  }
  s = 0;
  for (int i = 1; i < *N; i++) {
    e = exp(lnw[i] - lnw[s]);
    if (e > 1) {
      e = 1;
    }
    m = i * (*k);
    if (u[i] <= e) {
      for (int j = 0; j < *k; j++) {
        tmp[j] = theta[m + j];
      }
      s = i;
      *ns = *ns + 1;
    }
    for (int j = 0; j < *k; j++)
      draws[m + j] = tmp[j];
  }
}


x86 assembly (clang, -O0):
<fnMH_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    11b6 <fnMH_C+0xa6>
mov    -0x68(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x54(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1165 <fnMH_C+0x55>
movl   $0x0,-0x38(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    12f2 <fnMH_C+0x1e2>
mov    -0x20(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdfc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    121b <fnMH_C+0x10b>
movsd  0xdea(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x18(%rbp),%rcx
imul   (%rcx),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     129c <fnMH_C+0x18c>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1287 <fnMH_C+0x177>
mov    -0x68(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    -0x5c(%rbp),%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    124b <fnMH_C+0x13b>
mov    -0x58(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    12df <fnMH_C+0x1cf>
mov    -0x68(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    12a3 <fnMH_C+0x193>
jmp    12e4 <fnMH_C+0x1d4>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11c4 <fnMH_C+0xb4>
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnMH_C>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%rbx
mov    %r8,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    (%rdx),%eax
mov    %rsp,%r13
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r13
mov    %r13,%rsp
test   %eax,%eax
jle    12d1 <fnMH_C+0x1b1>
cmp    $0x4,%eax
jb     1182 <fnMH_C+0x62>
lea    (%rdi,%rax,8),%rcx
cmp    %rbx,%rcx
jbe    1228 <fnMH_C+0x108>
lea    (%rbx,%rax,8),%rcx
cmp    %rdi,%rcx
jbe    1228 <fnMH_C+0x108>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     11bb <fnMH_C+0x9b>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    11a0 <fnMH_C+0x80>
cmp    $0x3,%rdx
jb     12d1 <fnMH_C+0x1b1>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r13,%rcx,8)
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x10(%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r13,%rcx,8)
movsd  %xmm0,0x10(%rbx,%rcx,8)
movsd  0x18(%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r13,%rcx,8)
movsd  %xmm0,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    11d0 <fnMH_C+0xb0>
jmp    12d1 <fnMH_C+0x1b1>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rsi
mov    %rsi,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rsi,%rsi
je     13a8 <fnMH_C+0x288>
mov    %r8,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %esi,%esi
xchg   %ax,%ax
movups (%rdi,%rsi,8),%xmm0
movups 0x10(%rdi,%rsi,8),%xmm1
movaps %xmm0,0x0(%r13,%rsi,8)
movaps %xmm1,0x10(%r13,%rsi,8)
movups %xmm0,(%rbx,%rsi,8)
movups %xmm1,0x10(%rbx,%rsi,8)
movupd 0x20(%rdi,%rsi,8),%xmm0
movupd 0x30(%rdi,%rsi,8),%xmm1
movapd %xmm0,0x20(%r13,%rsi,8)
movapd %xmm1,0x30(%r13,%rsi,8)
movupd %xmm0,0x20(%rbx,%rsi,8)
movupd %xmm1,0x30(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdx
jne    1250 <fnMH_C+0x130>
test   $0x1,%r8b
je     12c8 <fnMH_C+0x1a8>
movupd (%rdi,%rsi,8),%xmm0
movupd 0x10(%rdi,%rsi,8),%xmm1
movapd %xmm0,0x0(%r13,%rsi,8)
movapd %xmm1,0x10(%r13,%rsi,8)
movupd %xmm0,(%rbx,%rsi,8)
movupd %xmm1,0x10(%rbx,%rsi,8)
cmp    %rax,%rcx
jne    1184 <fnMH_C+0x64>
mov    %rdi,-0x40(%rbp)
mov    -0x30(%rbp),%rax
cmpl   $0x2,(%rax)
jl     1399 <fnMH_C+0x279>
xor    %r15d,%r15d
mov    $0x1,%r12d
jmp    1304 <fnMH_C+0x1e4>
nopl   (%rax)
add    $0x1,%r12
mov    -0x30(%rbp),%rax
movslq (%rax),%rax
cmp    %rax,%r12
jge    1399 <fnMH_C+0x279>
mov    -0x48(%rbp),%rcx
movsd  (%rcx,%r12,8),%xmm0
movslq %r15d,%rax
subsd  (%rcx,%rax,8),%xmm0
call   1040 <exp@plt>
movsd  0xcdd(%rip),%xmm1
minsd  %xmm0,%xmm1
mov    -0x38(%rbp),%rax
mov    (%rax),%r14d
mov    -0x50(%rbp),%rax
ucomisd (%rax,%r12,8),%xmm1
mov    %r14d,%eax
jb     1373 <fnMH_C+0x253>
test   %r14d,%r14d
jle    1363 <fnMH_C+0x243>
mov    %r12d,%eax
imul   %r14d,%eax
cltq
mov    -0x40(%rbp),%rcx
lea    (%rcx,%rax,8),%rsi
lea    0x0(,%r14,8),%rdx
mov    %r13,%rdi
call   1030 <memcpy@plt>
mov    0x10(%rbp),%rax
addl   $0x1,(%rax)
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %r12d,%r15d
test   %eax,%eax
jle    12f0 <fnMH_C+0x1d0>
imul   %r12d,%r14d
movslq %r14d,%rcx
lea    (%rbx,%rcx,8),%rdi
mov    %eax,%edx
shl    $0x3,%rdx
mov    %r13,%rsi
call   1030 <memcpy@plt>
jmp    12f0 <fnMH_C+0x1d0>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %esi,%esi
test   $0x1,%r8b
jne    12a4 <fnMH_C+0x184>
jmp    12c8 <fnMH_C+0x1a8>

LLVM IR (-O0):
define void @fnMH_C(double* %0, i32* %1, i32* %2, double* %3, double* %4, double* %5, i32* %6) {
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca i8*
%19 = alloca i64
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store double* %0, double** %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store i32* %6, i32** %14
%24 = load i32*, i32** %10
%25 = load i32, i32* %24
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %18
%28 = alloca double, i64 %26
store i64 %26, i64* %19
store i32 0, i32* %20
br label %29
29: ; preds = %52, %7
%30 = load i32, i32* %20
%31 = load i32*, i32** %10
%32 = load i32, i32* %31
%33 = icmp slt i32 %30, %32
br i1 %33, label %34, label %55
34: ; preds = %29
%35 = load double*, double** %8
%36 = load i32, i32* %20
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %35, i64 %37
%39 = load double, double* %38
%40 = load i32, i32* %20
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %28, i64 %41
store double %39, double* %42
%43 = load double*, double** %8
%44 = load i32, i32* %20
%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* %20
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
store double %47, double* %51
br label %52
52: ; preds = %34
%53 = load i32, i32* %20
%54 = add nsw i32 %53, 1
store i32 %54, i32* %20
br label %29
55: ; preds = %29
store i32 0, i32* %16
store i32 1, i32* %21
br label %56
56: ; preds = %136, %55
%57 = load i32, i32* %21
%58 = load i32*, i32** %9
%59 = load i32, i32* %58
%60 = icmp slt i32 %57, %59
br i1 %60, label %61, label %139
61: ; preds = %56
%62 = load double*, double** %11
%63 = load i32, i32* %21
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
%66 = load double, double* %65
%67 = load double*, double** %11
%68 = load i32, i32* %16
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = fsub double %66, %71
%73 = call double @exp(double %72)
store double %73, double* %17
%74 = load double, double* %17
%75 = fcmp ogt double %74, 1.000000e+00
br i1 %75, label %76, label %77
76: ; preds = %61
store double 1.000000e+00, double* %17
br label %77
77: ; preds = %76, %61
%78 = load i32, i32* %21
%79 = load i32*, i32** %10
%80 = load i32, i32* %79
%81 = mul nsw i32 %78, %80
store i32 %81, i32* %15
%82 = load double*, double** %12
%83 = load i32, i32* %21
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
%86 = load double, double* %85
%87 = load double, double* %17
%88 = fcmp ole double %86, %87
br i1 %88, label %89, label %115
89: ; preds = %77
store i32 0, i32* %22
br label %90
90: ; preds = %106, %89
%91 = load i32, i32* %22
%92 = load i32*, i32** %10
%93 = load i32, i32* %92
%94 = icmp slt i32 %91, %93
br i1 %94, label %95, label %109
95: ; preds = %90
%96 = load double*, double** %8
%97 = load i32, i32* %15
%98 = load i32, i32* %22
%99 = add nsw i32 %97, %98
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %96, i64 %100
%102 = load double, double* %101
%103 = load i32, i32* %22
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %28, i64 %104
store double %102, double* %105
br label %106
106: ; preds = %95
%107 = load i32, i32* %22
%108 = add nsw i32 %107, 1
store i32 %108, i32* %22
br label %90
109: ; preds = %90
%110 = load i32, i32* %21
store i32 %110, i32* %16
%111 = load i32*, i32** %14
%112 = load i32, i32* %111
%113 = add nsw i32 %112, 1
%114 = load i32*, i32** %14
store i32 %113, i32* %114
br label %115
115: ; preds = %109, %77
store i32 0, i32* %23
br label %116
116: ; preds = %132, %115
%117 = load i32, i32* %23
%118 = load i32*, i32** %10
%119 = load i32, i32* %118
%120 = icmp slt i32 %117, %119
br i1 %120, label %121, label %135
121: ; preds = %116
%122 = load i32, i32* %23
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %28, i64 %123
%125 = load double, double* %124
%126 = load double*, double** %13
%127 = load i32, i32* %15
%128 = load i32, i32* %23
%129 = add nsw i32 %127, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %126, i64 %130
store double %125, double* %131
br label %132
132: ; preds = %121
%133 = load i32, i32* %23
%134 = add nsw i32 %133, 1
store i32 %134, i32* %23
br label %116
135: ; preds = %116
br label %136
136: ; preds = %135
%137 = load i32, i32* %21
%138 = add nsw i32 %137, 1
store i32 %138, i32* %21
br label %56
139: ; preds = %56
%140 = load i8*, i8** %18
ret void
}

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