; LLVM IR from interpretml/interpret :: shared/libebm (random)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.NAMESPACE_MAIN::GaussianDistribution" = type { double }
%"class.NAMESPACE_MAIN::RandomNondeterministic.0" = type { i64, i64, %"class.std::random_device" }
%"class.std::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@g_traceLevel = external global i32, align 4
@_ZTISt9bad_alloc = external constant ptr
@_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE = external hidden global i32, align 4
@_ZZ22GenerateGaussianRandomE13LOG__sMessage = external hidden constant [76 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_0 = external hidden constant [50 x i8], align 16
@_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE = external hidden global i32, align 4
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_1 = external hidden constant [44 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_2 = external hidden constant [59 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_3 = external hidden constant [68 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_4 = external hidden constant [50 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_5 = external hidden constant [50 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_6 = external hidden constant [57 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_7 = external hidden constant [41 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_8 = external hidden constant [45 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_9 = external hidden constant [72 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage__10_ = external hidden constant [30 x i8], align 16

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local i32 @GenerateGaussianRandom(ptr noundef %0, double noundef %1, i64 noundef %2, ptr noundef %3) #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"class.NAMESPACE_MAIN::GaussianDistribution", align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca %"class.NAMESPACE_MAIN::RandomNondeterministic.0", align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !11
  store ptr %3, ptr %9, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  store i32 3, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 4, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %48 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  store i32 %48, ptr %12, align 4, !tbaa !13
  %49 = load i32, ptr %12, align 4, !tbaa !13
  %50 = icmp sle i32 3, %49
  br i1 %50, label %51, label %78

51:                                               ; preds = %47
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %53 = load i32, ptr %12, align 4, !tbaa !13
  %54 = icmp slt i32 %53, 4
  br i1 %54, label %55, label %66

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  store ptr @_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  %56 = load i32, ptr @_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE, align 4, !tbaa !13
  %57 = sub nsw i32 %56, 1
  store i32 %57, ptr %15, align 4, !tbaa !13
  %58 = load i32, ptr %15, align 4, !tbaa !13
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %55
  store i32 4, ptr %16, align 4
  br label %63

61:                                               ; preds = %55
  %62 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %62, ptr @_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE, align 4, !tbaa !13
  store i32 3, ptr %13, align 4, !tbaa !13
  store i32 0, ptr %16, align 4
  br label %63

63:                                               ; preds = %61, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  %64 = load i32, ptr %16, align 4
  switch i32 %64, label %73 [
    i32 0, label %65
  ]

65:                                               ; preds = %63
  br label %67

66:                                               ; preds = %52
  store i32 4, ptr %13, align 4, !tbaa !13
  br label %67

67:                                               ; preds = %66, %65
  %68 = load i32, ptr %13, align 4, !tbaa !13
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load double, ptr %7, align 8, !tbaa !9
  %71 = load i64, ptr %8, align 8, !tbaa !11
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %68, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage, ptr noundef %69, double noundef %70, i64 noundef %71, ptr noundef %72)
  store i32 0, ptr %16, align 4
  br label %73

73:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  %74 = load i32, ptr %16, align 4
  switch i32 %74, label %352 [
    i32 0, label %75
    i32 4, label %77
  ]

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76, %73
  br label %78

78:                                               ; preds = %77, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %8, align 8, !tbaa !11
  %81 = icmp sle i64 %80, 0
  %82 = xor i1 %81, true
  %83 = xor i1 %82, true
  %84 = zext i1 %83 to i64
  %85 = call i64 @llvm.expect.i64(i64 %84, i64 0)
  %86 = icmp ne i64 %85, 0
  br i1 %86, label %87, label %132

87:                                               ; preds = %79
  %88 = load i64, ptr %8, align 8, !tbaa !11
  %89 = icmp slt i64 %88, 0
  %90 = xor i1 %89, true
  %91 = xor i1 %90, true
  %92 = zext i1 %91 to i64
  %93 = call i64 @llvm.expect.i64(i64 %92, i64 0)
  %94 = icmp ne i64 %93, 0
  br i1 %94, label %95, label %102

95:                                               ; preds = %87
  br label %96

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  store i32 1, ptr %17, align 4, !tbaa !13
  %97 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %98 = icmp sle i32 1, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_0)
  br label %100

100:                                              ; preds = %99, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %101

101:                                              ; preds = %100
  store i32 -3, ptr %5, align 4
  br label %342

102:                                              ; preds = %87
  br label %103

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  store i32 3, ptr %18, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 4, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %104 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  store i32 %104, ptr %20, align 4, !tbaa !13
  %105 = load i32, ptr %20, align 4, !tbaa !13
  %106 = icmp sle i32 3, %105
  br i1 %106, label %107, label %130

107:                                              ; preds = %103
  br label %108

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %109 = load i32, ptr %20, align 4, !tbaa !13
  %110 = icmp slt i32 %109, 4
  br i1 %110, label %111, label %122

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  store ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %112 = load i32, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !13
  %113 = sub nsw i32 %112, 1
  store i32 %113, ptr %23, align 4, !tbaa !13
  %114 = load i32, ptr %23, align 4, !tbaa !13
  %115 = icmp slt i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %111
  store i32 10, ptr %16, align 4
  br label %119

117:                                              ; preds = %111
  %118 = load i32, ptr %23, align 4, !tbaa !13
  store i32 %118, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !13
  store i32 3, ptr %21, align 4, !tbaa !13
  store i32 0, ptr %16, align 4
  br label %119

119:                                              ; preds = %117, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  %120 = load i32, ptr %16, align 4
  switch i32 %120, label %125 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  br label %123

122:                                              ; preds = %108
  store i32 4, ptr %21, align 4, !tbaa !13
  br label %123

123:                                              ; preds = %122, %121
  %124 = load i32, ptr %21, align 4, !tbaa !13
  call void @InteralLogWithoutArguments(i32 noundef %124, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_1)
  store i32 0, ptr %16, align 4
  br label %125

125:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  %126 = load i32, ptr %16, align 4
  switch i32 %126, label %352 [
    i32 0, label %127
    i32 10, label %129
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128, %125
  br label %130

130:                                              ; preds = %129, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  br label %131

131:                                              ; preds = %130
  store i32 0, ptr %5, align 4
  br label %342

132:                                              ; preds = %79
  %133 = load i64, ptr %8, align 8, !tbaa !11
  %134 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %133) #10
  %135 = xor i1 %134, true
  %136 = xor i1 %135, true
  %137 = zext i1 %136 to i64
  %138 = call i64 @llvm.expect.i64(i64 %137, i64 0)
  %139 = icmp ne i64 %138, 0
  br i1 %139, label %140, label %147

140:                                              ; preds = %132
  br label %141

141:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  store i32 1, ptr %24, align 4, !tbaa !13
  %142 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %143 = icmp sle i32 1, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %141
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_2)
  br label %145

145:                                              ; preds = %144, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  br label %146

146:                                              ; preds = %145
  store i32 -3, ptr %5, align 4
  br label %342

147:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %148 = load i64, ptr %8, align 8, !tbaa !11
  store i64 %148, ptr %25, align 8, !tbaa !11
  %149 = load i64, ptr %25, align 8, !tbaa !11
  %150 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %149) #10
  %151 = xor i1 %150, true
  %152 = xor i1 %151, true
  %153 = zext i1 %152 to i64
  %154 = call i64 @llvm.expect.i64(i64 %153, i64 0)
  %155 = icmp ne i64 %154, 0
  br i1 %155, label %156, label %164

156:                                              ; preds = %147
  br label %157

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  store i32 1, ptr %26, align 4, !tbaa !13
  %158 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %159 = icmp sle i32 1, %158
  br i1 %159, label %160, label %161

160:                                              ; preds = %157
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_3)
  br label %161

161:                                              ; preds = %160, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %341

164:                                              ; preds = %147
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = icmp eq ptr null, %165
  %167 = xor i1 %166, true
  %168 = xor i1 %167, true
  %169 = zext i1 %168 to i64
  %170 = call i64 @llvm.expect.i64(i64 %169, i64 0)
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %172, label %180

172:                                              ; preds = %164
  br label %173

173:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 1, ptr %27, align 4, !tbaa !13
  %174 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %175 = icmp sle i32 1, %174
  br i1 %175, label %176, label %177

176:                                              ; preds = %173
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_4)
  br label %177

177:                                              ; preds = %176, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %341

180:                                              ; preds = %164
  %181 = load double, ptr %7, align 8, !tbaa !9
  %182 = call noundef zeroext i1 @_ZSt5isnand(double noundef %181)
  %183 = xor i1 %182, true
  %184 = xor i1 %183, true
  %185 = zext i1 %184 to i64
  %186 = call i64 @llvm.expect.i64(i64 %185, i64 0)
  %187 = icmp ne i64 %186, 0
  br i1 %187, label %188, label %196

188:                                              ; preds = %180
  br label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 1, ptr %28, align 4, !tbaa !13
  %190 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %191 = icmp sle i32 1, %190
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_5)
  br label %193

193:                                              ; preds = %192, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %341

196:                                              ; preds = %180
  %197 = load double, ptr %7, align 8, !tbaa !9
  %198 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %197)
  %199 = xor i1 %198, true
  %200 = xor i1 %199, true
  %201 = zext i1 %200 to i64
  %202 = call i64 @llvm.expect.i64(i64 %201, i64 0)
  %203 = icmp ne i64 %202, 0
  br i1 %203, label %204, label %212

204:                                              ; preds = %196
  br label %205

205:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  store i32 1, ptr %29, align 4, !tbaa !13
  %206 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %207 = icmp sle i32 1, %206
  br i1 %207, label %208, label %209

208:                                              ; preds = %205
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_6)
  br label %209

209:                                              ; preds = %208, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %341

212:                                              ; preds = %196
  %213 = load double, ptr %7, align 8, !tbaa !9
  %214 = fcmp olt double %213, 0.000000e+00
  %215 = xor i1 %214, true
  %216 = xor i1 %215, true
  %217 = zext i1 %216 to i64
  %218 = call i64 @llvm.expect.i64(i64 %217, i64 0)
  %219 = icmp ne i64 %218, 0
  br i1 %219, label %220, label %228

220:                                              ; preds = %212
  br label %221

221:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 1, ptr %30, align 4, !tbaa !13
  %222 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %223 = icmp sle i32 1, %222
  br i1 %223, label %224, label %225

224:                                              ; preds = %221
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_7)
  br label %225

225:                                              ; preds = %224, %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %341

228:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %229 = load double, ptr %7, align 8, !tbaa !9
  call void @_ZN14NAMESPACE_MAIN20GaussianDistributionC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %31, double noundef %229)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %230, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = load i64, ptr %8, align 8, !tbaa !11
  %233 = getelementptr inbounds double, ptr %231, i64 %232
  store ptr %233, ptr %33, align 8, !tbaa !5
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = icmp ne ptr null, %234
  br i1 %235, label %236, label %249

236:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %237, ptr %34, align 8, !tbaa !5
  br label %238

238:                                              ; preds = %244, %236
  %239 = load ptr, ptr %34, align 8, !tbaa !5
  %240 = call noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_19RandomDeterministicEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(24) %239, double noundef 1.000000e+00)
  %241 = load ptr, ptr %32, align 8, !tbaa !5
  store double %240, ptr %241, align 8, !tbaa !9
  %242 = load ptr, ptr %32, align 8, !tbaa !5
  %243 = getelementptr inbounds double, ptr %242, i32 1
  store ptr %243, ptr %32, align 8, !tbaa !5
  br label %244

244:                                              ; preds = %238
  %245 = load ptr, ptr %33, align 8, !tbaa !5
  %246 = load ptr, ptr %32, align 8, !tbaa !5
  %247 = icmp ne ptr %245, %246
  br i1 %247, label %238, label %248, !llvm.loop !15

248:                                              ; preds = %244
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  br label %308

249:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 5016, ptr %35) #10
  invoke void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %35)
          to label %250 unwind label %262

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %257, %250
  %252 = invoke noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_22RandomNondeterministicImEEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(5016) %35, double noundef 1.000000e+00)
          to label %253 unwind label %266

253:                                              ; preds = %251
  %254 = load ptr, ptr %32, align 8, !tbaa !5
  store double %252, ptr %254, align 8, !tbaa !9
  %255 = load ptr, ptr %32, align 8, !tbaa !5
  %256 = getelementptr inbounds double, ptr %255, i32 1
  store ptr %256, ptr %32, align 8, !tbaa !5
  br label %257

257:                                              ; preds = %253
  %258 = load ptr, ptr %33, align 8, !tbaa !5
  %259 = load ptr, ptr %32, align 8, !tbaa !5
  %260 = icmp ne ptr %258, %259
  br i1 %260, label %251, label %261, !llvm.loop !17

261:                                              ; preds = %257
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %35) #10
  call void @llvm.lifetime.end.p0(i64 5016, ptr %35) #10
  br label %307

262:                                              ; preds = %249
  %263 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %36, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %37, align 4
  br label %270

266:                                              ; preds = %251
  %267 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %36, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %37, align 4
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %35) #10
  br label %270

270:                                              ; preds = %266, %262
  call void @llvm.lifetime.end.p0(i64 5016, ptr %35) #10
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %37, align 4
  %273 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #10
  %274 = icmp eq i32 %272, %273
  br i1 %274, label %275, label %283

275:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %276 = load ptr, ptr %36, align 8
  %277 = call ptr @__cxa_begin_catch(ptr %276) #10
  store ptr %277, ptr %39, align 8
  br label %278

278:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #10
  store i32 2, ptr %40, align 4, !tbaa !13
  %279 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %280 = icmp sle i32 2, %279
  br i1 %280, label %281, label %303

281:                                              ; preds = %278
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_9)
          to label %282 unwind label %299

282:                                              ; preds = %281
  br label %303

283:                                              ; preds = %271
  %284 = load ptr, ptr %36, align 8
  %285 = call ptr @__cxa_begin_catch(ptr %284) #10
  br label %286

286:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  store i32 2, ptr %38, align 4, !tbaa !13
  %287 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  %288 = icmp sle i32 2, %287
  br i1 %288, label %289, label %295

289:                                              ; preds = %286
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage_8)
          to label %290 unwind label %291

290:                                              ; preds = %289
  br label %295

291:                                              ; preds = %289
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %36, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %37, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  invoke void @__cxa_end_catch()
          to label %298 unwind label %349

295:                                              ; preds = %290, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  br label %296

296:                                              ; preds = %295
  br label %297

297:                                              ; preds = %296
  store i32 -2, ptr %5, align 4
  store i32 1, ptr %16, align 4
  call void @__cxa_end_catch()
  br label %339

298:                                              ; preds = %291
  br label %340

299:                                              ; preds = %281
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %36, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %37, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  invoke void @__cxa_end_catch()
          to label %306 unwind label %349

303:                                              ; preds = %282, %278
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  br label %304

304:                                              ; preds = %303
  br label %305

305:                                              ; preds = %304
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %16, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  br label %339

306:                                              ; preds = %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  br label %340

307:                                              ; preds = %261
  br label %308

308:                                              ; preds = %307, %248
  br label %309

309:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #10
  store i32 3, ptr %41, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  store i32 4, ptr %42, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #10
  %310 = load i32, ptr @g_traceLevel, align 4, !tbaa !13
  store i32 %310, ptr %43, align 4, !tbaa !13
  %311 = load i32, ptr %43, align 4, !tbaa !13
  %312 = icmp sle i32 3, %311
  br i1 %312, label %313, label %336

313:                                              ; preds = %309
  br label %314

314:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  %315 = load i32, ptr %43, align 4, !tbaa !13
  %316 = icmp slt i32 %315, 4
  br i1 %316, label %317, label %328

317:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #10
  store ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #10
  %318 = load i32, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !13
  %319 = sub nsw i32 %318, 1
  store i32 %319, ptr %46, align 4, !tbaa !13
  %320 = load i32, ptr %46, align 4, !tbaa !13
  %321 = icmp slt i32 %320, 0
  br i1 %321, label %322, label %323

322:                                              ; preds = %317
  store i32 34, ptr %16, align 4
  br label %325

323:                                              ; preds = %317
  %324 = load i32, ptr %46, align 4, !tbaa !13
  store i32 %324, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !13
  store i32 3, ptr %44, align 4, !tbaa !13
  store i32 0, ptr %16, align 4
  br label %325

325:                                              ; preds = %323, %322
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #10
  %326 = load i32, ptr %16, align 4
  switch i32 %326, label %331 [
    i32 0, label %327
  ]

327:                                              ; preds = %325
  br label %329

328:                                              ; preds = %314
  store i32 4, ptr %44, align 4, !tbaa !13
  br label %329

329:                                              ; preds = %328, %327
  %330 = load i32, ptr %44, align 4, !tbaa !13
  call void @InteralLogWithoutArguments(i32 noundef %330, ptr noundef @_ZZ22GenerateGaussianRandomE13LOG__sMessage__10_)
  store i32 0, ptr %16, align 4
  br label %331

331:                                              ; preds = %329, %325
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  %332 = load i32, ptr %16, align 4
  switch i32 %332, label %352 [
    i32 0, label %333
    i32 34, label %335
  ]

333:                                              ; preds = %331
  br label %334

334:                                              ; preds = %333
  br label %335

335:                                              ; preds = %334, %331
  br label %336

336:                                              ; preds = %335, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #10
  br label %337

337:                                              ; preds = %336
  br label %338

338:                                              ; preds = %337
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %339

339:                                              ; preds = %338, %305, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %341

340:                                              ; preds = %306, %298
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %344

341:                                              ; preds = %339, %227, %211, %195, %179, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %342

342:                                              ; preds = %341, %146, %131, %101
  %343 = load i32, ptr %5, align 4
  ret i32 %343

344:                                              ; preds = %340
  %345 = load ptr, ptr %36, align 8
  %346 = load i32, ptr %37, align 4
  %347 = insertvalue { ptr, i32 } poison, ptr %345, 0
  %348 = insertvalue { ptr, i32 } %347, i32 %346, 1
  resume { ptr, i32 } %348

349:                                              ; preds = %299, %291
  %350 = landingpad { ptr, i32 }
          catch ptr null
  %351 = extractvalue { ptr, i32 } %350, 0
  call void @__clang_call_terminate(ptr %351) #11
  unreachable

352:                                              ; preds = %331, %125, %73
  unreachable
}

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef, i64 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN20GaussianDistributionC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_19RandomDeterministicEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), double noundef) #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) unnamed_addr #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_22RandomNondeterministicImEEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5016), double noundef) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.NAMESPACE_MAIN::GaussianDistribution" = type { double }
%"class.NAMESPACE_MAIN::RandomNondeterministic.0" = type { i64, i64, %"class.std::random_device" }
%"class.std::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZTISt9bad_alloc = external constant ptr
@_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE = external hidden local_unnamed_addr global i32, align 4
@_ZZ22GenerateGaussianRandomE13LOG__sMessage = external hidden constant [76 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_0 = external hidden constant [50 x i8], align 16
@_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE = external hidden local_unnamed_addr global i32, align 4
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_1 = external hidden constant [44 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_2 = external hidden constant [59 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_3 = external hidden constant [68 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_4 = external hidden constant [50 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_5 = external hidden constant [50 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_6 = external hidden constant [57 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_7 = external hidden constant [41 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_8 = external hidden constant [45 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage_9 = external hidden constant [72 x i8], align 16
@_ZZ22GenerateGaussianRandomE13LOG__sMessage__10_ = external hidden constant [30 x i8], align 16

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -3, 1) i32 @GenerateGaussianRandom(ptr noundef %0, double noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.NAMESPACE_MAIN::GaussianDistribution", align 8
  %6 = alloca %"class.NAMESPACE_MAIN::RandomNondeterministic.0", align 8
  %7 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 2
  br i1 %8, label %9, label %.critedge

9:                                                ; preds = %4
  %10 = icmp eq i32 %7, 3
  br i1 %10, label %11, label %16

11:                                               ; preds = %9
  %12 = load i32, ptr @_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %14, label %.critedge

14:                                               ; preds = %11
  %15 = add nsw i32 %12, -1
  store i32 %15, ptr @_ZN14NAMESPACE_MAINL33g_cLogEnterGenerateGaussianRandomE, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %14, %9
  %.154 = phi i32 [ 3, %14 ], [ 4, %9 ]
  tail call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %.154, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage, ptr noundef %0, double noundef %1, i64 noundef %2, ptr noundef %3)
  br label %.critedge

.critedge:                                        ; preds = %16, %11, %4
  %17 = icmp slt i64 %2, 1
  br i1 %17, label %18, label %34, !prof !9

18:                                               ; preds = %.critedge
  %19 = icmp slt i64 %2, 0
  %20 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  br i1 %19, label %21, label %24, !prof !9

21:                                               ; preds = %18
  %22 = icmp sgt i32 %20, 0
  br i1 %22, label %23, label %.critedge86

23:                                               ; preds = %21
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_0)
  br label %.critedge86

24:                                               ; preds = %18
  %25 = icmp sgt i32 %20, 2
  br i1 %25, label %26, label %.critedge86

26:                                               ; preds = %24
  %27 = icmp eq i32 %20, 3
  br i1 %27, label %28, label %33

28:                                               ; preds = %26
  %29 = load i32, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %.critedge86

31:                                               ; preds = %28
  %32 = add nsw i32 %29, -1
  store i32 %32, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %31, %26
  %.161 = phi i32 [ 3, %31 ], [ 4, %26 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.161, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_1)
  br label %.critedge86

34:                                               ; preds = %.critedge
  %35 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %2) #9
  br i1 %35, label %36, label %40, !prof !9

36:                                               ; preds = %34
  %37 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %39, label %.critedge86

39:                                               ; preds = %36
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_2)
  br label %.critedge86

40:                                               ; preds = %34
  %41 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %2) #9
  br i1 %41, label %42, label %46, !prof !9

42:                                               ; preds = %40
  %43 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %45, label %.critedge86

45:                                               ; preds = %42
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_3)
  br label %.critedge86

46:                                               ; preds = %40
  %47 = icmp eq ptr %3, null
  br i1 %47, label %48, label %52, !prof !9

48:                                               ; preds = %46
  %49 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %.critedge86

51:                                               ; preds = %48
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_4)
  br label %.critedge86

52:                                               ; preds = %46
  %53 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %1)
  br i1 %53, label %54, label %58, !prof !9

54:                                               ; preds = %52
  %55 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %57, label %.critedge86

57:                                               ; preds = %54
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_5)
  br label %.critedge86

58:                                               ; preds = %52
  %59 = tail call noundef zeroext i1 @_ZSt5isinfd(double noundef %1)
  br i1 %59, label %60, label %64, !prof !9

60:                                               ; preds = %58
  %61 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %63, label %.critedge86

63:                                               ; preds = %60
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_6)
  br label %.critedge86

64:                                               ; preds = %58
  %65 = fcmp olt double %1, 0.000000e+00
  br i1 %65, label %66, label %70, !prof !9

66:                                               ; preds = %64
  %67 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %.critedge86

69:                                               ; preds = %66
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_7)
  br label %.critedge86

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @_ZN14NAMESPACE_MAIN20GaussianDistributionC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %5, double noundef %1)
  %71 = getelementptr inbounds double, ptr %3, i64 %2
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %74, label %.preheader89

.preheader89:                                     ; preds = %70, %.preheader89
  %.062 = phi ptr [ %73, %.preheader89 ], [ %3, %70 ]
  %72 = call noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_19RandomDeterministicEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef 1.000000e+00)
  store double %72, ptr %.062, align 8, !tbaa !10
  %73 = getelementptr inbounds i8, ptr %.062, i64 8
  %.not84 = icmp eq ptr %71, %73
  br i1 %.not84, label %.loopexit, label %.preheader89, !llvm.loop !12

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 5016, ptr nonnull %6) #9
  invoke void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %6)
          to label %.preheader unwind label %79

.preheader:                                       ; preds = %74, %76
  %.163 = phi ptr [ %77, %76 ], [ %3, %74 ]
  %75 = invoke noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_22RandomNondeterministicImEEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5016) %6, double noundef 1.000000e+00)
          to label %76 unwind label %81

76:                                               ; preds = %.preheader
  store double %75, ptr %.163, align 8, !tbaa !10
  %77 = getelementptr inbounds i8, ptr %.163, i64 8
  %.not83 = icmp eq ptr %71, %77
  br i1 %.not83, label %78, label %.preheader, !llvm.loop !14

78:                                               ; preds = %76
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %6) #9
  call void @llvm.lifetime.end.p0(i64 5016, ptr nonnull %6) #9
  br label %.loopexit

79:                                               ; preds = %74
  %80 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  br label %83

81:                                               ; preds = %.preheader
  %82 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %6) #9
  br label %83

83:                                               ; preds = %81, %79
  %.pn = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  %.064 = extractvalue { ptr, i32 } %.pn, 0
  %.066 = extractvalue { ptr, i32 } %.pn, 1
  call void @llvm.lifetime.end.p0(i64 5016, ptr nonnull %6) #9
  %84 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #9
  %85 = icmp eq i32 %.066, %84
  %86 = call ptr @__cxa_begin_catch(ptr %.064) #9
  %87 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %88 = icmp sgt i32 %87, 1
  br i1 %85, label %89, label %91

89:                                               ; preds = %83
  br i1 %88, label %90, label %98

90:                                               ; preds = %89
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_9)
          to label %98 unwind label %96

91:                                               ; preds = %83
  br i1 %88, label %92, label %95

92:                                               ; preds = %91
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage_8)
          to label %95 unwind label %93

93:                                               ; preds = %92
  %94 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %109 unwind label %110

95:                                               ; preds = %92, %91
  call void @__cxa_end_catch()
  br label %.critedge88

96:                                               ; preds = %90
  %97 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %109 unwind label %110

98:                                               ; preds = %90, %89
  call void @__cxa_end_catch()
  br label %.critedge88

.loopexit:                                        ; preds = %.preheader89, %78
  %99 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 2
  br i1 %100, label %101, label %.critedge88

101:                                              ; preds = %.loopexit
  %102 = icmp eq i32 %99, 3
  br i1 %102, label %103, label %108

103:                                              ; preds = %101
  %104 = load i32, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !5
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %106, label %.critedge88

106:                                              ; preds = %103
  %107 = add nsw i32 %104, -1
  store i32 %107, ptr @_ZN14NAMESPACE_MAINL32g_cLogExitGenerateGaussianRandomE, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %106, %101
  %.156 = phi i32 [ 3, %106 ], [ 4, %101 ]
  call void @InteralLogWithoutArguments(i32 noundef %.156, ptr noundef nonnull @_ZZ22GenerateGaussianRandomE13LOG__sMessage__10_)
  br label %.critedge88

.critedge88:                                      ; preds = %.loopexit, %103, %108, %98, %95
  %.0 = phi i32 [ -1, %98 ], [ -2, %95 ], [ 0, %108 ], [ 0, %103 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %.critedge86

109:                                              ; preds = %96, %93
  %.pn81 = phi { ptr, i32 } [ %94, %93 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  resume { ptr, i32 } %.pn81

.critedge86:                                      ; preds = %.critedge88, %45, %42, %51, %48, %57, %54, %63, %60, %69, %66, %36, %39, %24, %28, %33, %21, %23
  %.2 = phi i32 [ -3, %23 ], [ -3, %21 ], [ 0, %33 ], [ 0, %28 ], [ 0, %24 ], [ -3, %39 ], [ -3, %36 ], [ %.0, %.critedge88 ], [ -3, %45 ], [ -3, %42 ], [ -3, %51 ], [ -3, %48 ], [ -3, %57 ], [ -3, %54 ], [ -3, %63 ], [ -3, %60 ], [ -3, %69 ], [ -3, %66 ]
  ret i32 %.2

110:                                              ; preds = %96, %93
  %111 = landingpad { ptr, i32 }
          catch ptr null
  %112 = extractvalue { ptr, i32 } %111, 0
  call void @__clang_call_terminate(ptr %112) #10
  unreachable
}

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN20GaussianDistributionC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_19RandomDeterministicEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN20GaussianDistribution6SampleINS_22RandomNondeterministicImEEEEdRT_d(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5016), double noundef) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nosync nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass