; 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::RandomDeterministic" = type { i64, i64, i64 }
%"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_MAINL18g_cLogEnterShuffleE = external hidden global i32, align 4
@_ZZ7ShuffleE13LOG__sMessage = external hidden constant [49 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_0 = external hidden constant [35 x i8], align 16
@_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE = external hidden global i32, align 4
@_ZZ7ShuffleE13LOG__sMessage_1 = external hidden constant [29 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_2 = external hidden constant [44 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_3 = external hidden constant [53 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_4 = external hidden constant [35 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_5 = external hidden constant [52 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_6 = external hidden constant [52 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_7 = external hidden constant [15 x i8], align 1

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #1 align 2

declare void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

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

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) #4

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

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) 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 #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @Shuffle(ptr noundef %0, i64 noundef %1, ptr noundef %2) #8 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %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 ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.NAMESPACE_MAIN::RandomDeterministic", align 8
  %27 = alloca i64, align 8
  %28 = alloca %"class.NAMESPACE_MAIN::RandomNondeterministic.0", align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 3, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 4, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %46 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  store i32 %46, ptr %10, align 4, !tbaa !11
  %47 = load i32, ptr %10, align 4, !tbaa !11
  %48 = icmp sle i32 3, %47
  br i1 %48, label %49, label %75

49:                                               ; preds = %45
  br label %50

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %51 = load i32, ptr %10, align 4, !tbaa !11
  %52 = icmp slt i32 %51, 4
  br i1 %52, label %53, label %64

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  store ptr @_ZN14NAMESPACE_MAINL18g_cLogEnterShuffleE, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %54 = load i32, ptr @_ZN14NAMESPACE_MAINL18g_cLogEnterShuffleE, align 4, !tbaa !11
  %55 = sub nsw i32 %54, 1
  store i32 %55, ptr %13, align 4, !tbaa !11
  %56 = load i32, ptr %13, align 4, !tbaa !11
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %53
  store i32 4, ptr %14, align 4
  br label %61

59:                                               ; preds = %53
  %60 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %60, ptr @_ZN14NAMESPACE_MAINL18g_cLogEnterShuffleE, align 4, !tbaa !11
  store i32 3, ptr %11, align 4, !tbaa !11
  store i32 0, ptr %14, align 4
  br label %61

61:                                               ; preds = %59, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  %62 = load i32, ptr %14, align 4
  switch i32 %62, label %70 [
    i32 0, label %63
  ]

63:                                               ; preds = %61
  br label %65

64:                                               ; preds = %50
  store i32 4, ptr %11, align 4, !tbaa !11
  br label %65

65:                                               ; preds = %64, %63
  %66 = load i32, ptr %11, align 4, !tbaa !11
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i64, ptr %6, align 8, !tbaa !9
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %66, ptr noundef @_ZZ7ShuffleE13LOG__sMessage, ptr noundef %67, i64 noundef %68, ptr noundef %69)
  store i32 0, ptr %14, align 4
  br label %70

70:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  %71 = load i32, ptr %14, align 4
  switch i32 %71, label %324 [
    i32 0, label %72
    i32 4, label %74
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73, %70
  br label %75

75:                                               ; preds = %74, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %76

76:                                               ; preds = %75
  %77 = load i64, ptr %6, align 8, !tbaa !9
  %78 = icmp sle i64 %77, 0
  %79 = xor i1 %78, true
  %80 = xor i1 %79, true
  %81 = zext i1 %80 to i64
  %82 = call i64 @llvm.expect.i64(i64 %81, i64 0)
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %84, label %129

84:                                               ; preds = %76
  %85 = load i64, ptr %6, align 8, !tbaa !9
  %86 = icmp slt i64 %85, 0
  %87 = xor i1 %86, true
  %88 = xor i1 %87, true
  %89 = zext i1 %88 to i64
  %90 = call i64 @llvm.expect.i64(i64 %89, i64 0)
  %91 = icmp ne i64 %90, 0
  br i1 %91, label %92, label %99

92:                                               ; preds = %84
  br label %93

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  store i32 1, ptr %15, align 4, !tbaa !11
  %94 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %95 = icmp sle i32 1, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %93
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_0)
  br label %97

97:                                               ; preds = %96, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  br label %98

98:                                               ; preds = %97
  store i32 -3, ptr %4, align 4
  br label %314

99:                                               ; preds = %84
  br label %100

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  store i32 3, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  store i32 4, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %101 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  store i32 %101, ptr %18, align 4, !tbaa !11
  %102 = load i32, ptr %18, align 4, !tbaa !11
  %103 = icmp sle i32 3, %102
  br i1 %103, label %104, label %127

104:                                              ; preds = %100
  br label %105

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %106 = load i32, ptr %18, align 4, !tbaa !11
  %107 = icmp slt i32 %106, 4
  br i1 %107, label %108, label %119

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  store ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %109 = load i32, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !11
  %110 = sub nsw i32 %109, 1
  store i32 %110, ptr %21, align 4, !tbaa !11
  %111 = load i32, ptr %21, align 4, !tbaa !11
  %112 = icmp slt i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %108
  store i32 10, ptr %14, align 4
  br label %116

114:                                              ; preds = %108
  %115 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %115, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !11
  store i32 3, ptr %19, align 4, !tbaa !11
  store i32 0, ptr %14, align 4
  br label %116

116:                                              ; preds = %114, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  %117 = load i32, ptr %14, align 4
  switch i32 %117, label %122 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  br label %120

119:                                              ; preds = %105
  store i32 4, ptr %19, align 4, !tbaa !11
  br label %120

120:                                              ; preds = %119, %118
  %121 = load i32, ptr %19, align 4, !tbaa !11
  call void @InteralLogWithoutArguments(i32 noundef %121, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_1)
  store i32 0, ptr %14, align 4
  br label %122

122:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  %123 = load i32, ptr %14, align 4
  switch i32 %123, label %324 [
    i32 0, label %124
    i32 10, label %126
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125, %122
  br label %127

127:                                              ; preds = %126, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %128

128:                                              ; preds = %127
  store i32 0, ptr %4, align 4
  br label %314

129:                                              ; preds = %76
  %130 = load i64, ptr %6, align 8, !tbaa !9
  %131 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %130) #10
  %132 = xor i1 %131, true
  %133 = xor i1 %132, true
  %134 = zext i1 %133 to i64
  %135 = call i64 @llvm.expect.i64(i64 %134, i64 0)
  %136 = icmp ne i64 %135, 0
  br i1 %136, label %137, label %144

137:                                              ; preds = %129
  br label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 1, ptr %22, align 4, !tbaa !11
  %139 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %140 = icmp sle i32 1, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %138
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_2)
  br label %142

142:                                              ; preds = %141, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %143

143:                                              ; preds = %142
  store i32 -3, ptr %4, align 4
  br label %314

144:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %145 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %145, ptr %23, align 8, !tbaa !9
  %146 = load i64, ptr %23, align 8, !tbaa !9
  %147 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %146) #10
  %148 = xor i1 %147, true
  %149 = xor i1 %148, true
  %150 = zext i1 %149 to i64
  %151 = call i64 @llvm.expect.i64(i64 %150, i64 0)
  %152 = icmp ne i64 %151, 0
  br i1 %152, label %153, label %161

153:                                              ; preds = %144
  br label %154

154:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  store i32 1, ptr %24, align 4, !tbaa !11
  %155 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %156 = icmp sle i32 1, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_3)
  br label %158

158:                                              ; preds = %157, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %313

161:                                              ; preds = %144
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = icmp eq ptr null, %162
  %164 = xor i1 %163, true
  %165 = xor i1 %164, true
  %166 = zext i1 %165 to i64
  %167 = call i64 @llvm.expect.i64(i64 %166, i64 0)
  %168 = icmp ne i64 %167, 0
  br i1 %168, label %169, label %177

169:                                              ; preds = %161
  br label %170

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  store i32 1, ptr %25, align 4, !tbaa !11
  %171 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %172 = icmp sle i32 1, %171
  br i1 %172, label %173, label %174

173:                                              ; preds = %170
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_4)
  br label %174

174:                                              ; preds = %173, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %313

177:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #10
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = icmp eq ptr null, %178
  br i1 %179, label %180, label %236

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.start.p0(i64 5016, ptr %28) #10
  invoke void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %28)
          to label %181 unwind label %185

181:                                              ; preds = %180
  %182 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #10
  %183 = invoke noundef i64 @_ZN14NAMESPACE_MAIN22RandomNondeterministicImE4NextEm(ptr noundef nonnull align 8 dereferenceable(5016) %28, i64 noundef %182)
          to label %184 unwind label %189

184:                                              ; preds = %181
  store i64 %183, ptr %27, align 8, !tbaa !9
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %28) #10
  call void @llvm.lifetime.end.p0(i64 5016, ptr %28) #10
  br label %230

185:                                              ; preds = %180
  %186 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %29, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %30, align 4
  br label %193

189:                                              ; preds = %181
  %190 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %29, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %30, align 4
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %28) #10
  br label %193

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

194:                                              ; preds = %193
  %195 = load i32, ptr %30, align 4
  %196 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #10
  %197 = icmp eq i32 %195, %196
  br i1 %197, label %198, label %206

198:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %199 = load ptr, ptr %29, align 8
  %200 = call ptr @__cxa_begin_catch(ptr %199) #10
  store ptr %200, ptr %32, align 8
  br label %201

201:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  store i32 2, ptr %33, align 4, !tbaa !11
  %202 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %203 = icmp sle i32 2, %202
  br i1 %203, label %204, label %226

204:                                              ; preds = %201
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_6)
          to label %205 unwind label %222

205:                                              ; preds = %204
  br label %226

206:                                              ; preds = %194
  %207 = load ptr, ptr %29, align 8
  %208 = call ptr @__cxa_begin_catch(ptr %207) #10
  br label %209

209:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  store i32 2, ptr %31, align 4, !tbaa !11
  %210 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %211 = icmp sle i32 2, %210
  br i1 %211, label %212, label %218

212:                                              ; preds = %209
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_5)
          to label %213 unwind label %214

213:                                              ; preds = %212
  br label %218

214:                                              ; preds = %212
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %29, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  invoke void @__cxa_end_catch()
          to label %221 unwind label %321

218:                                              ; preds = %213, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %219

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %14, align 4
  call void @__cxa_end_catch()
  br label %232

221:                                              ; preds = %214
  br label %235

222:                                              ; preds = %204
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %29, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  invoke void @__cxa_end_catch()
          to label %229 unwind label %321

226:                                              ; preds = %205, %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %232

229:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %235

230:                                              ; preds = %184
  %231 = load i64, ptr %27, align 8, !tbaa !9
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %231)
  store i32 0, ptr %14, align 4
  br label %232

232:                                              ; preds = %230, %228, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  %233 = load i32, ptr %14, align 4
  switch i32 %233, label %312 [
    i32 0, label %234
  ]

234:                                              ; preds = %232
  br label %239

235:                                              ; preds = %229, %221
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %316

236:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %237, ptr %34, align 8, !tbaa !5
  %238 = load ptr, ptr %34, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %238)
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  br label %239

239:                                              ; preds = %236, %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  store i64 0, ptr %35, align 8, !tbaa !9
  br label %240

240:                                              ; preds = %247, %239
  %241 = load i64, ptr %35, align 8, !tbaa !9
  %242 = load ptr, ptr %7, align 8, !tbaa !5
  %243 = load i64, ptr %35, align 8, !tbaa !9
  %244 = getelementptr inbounds i64, ptr %242, i64 %243
  store i64 %241, ptr %244, align 8, !tbaa !9
  %245 = load i64, ptr %35, align 8, !tbaa !9
  %246 = add i64 %245, 1
  store i64 %246, ptr %35, align 8, !tbaa !9
  br label %247

247:                                              ; preds = %240
  %248 = load i64, ptr %23, align 8, !tbaa !9
  %249 = load i64, ptr %35, align 8, !tbaa !9
  %250 = icmp ne i64 %248, %249
  br i1 %250, label %240, label %251, !llvm.loop !13

251:                                              ; preds = %247
  br label %252

252:                                              ; preds = %255, %251
  %253 = load i64, ptr %23, align 8, !tbaa !9
  %254 = icmp ne i64 1, %253
  br i1 %254, label %255, label %275

255:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %256 = load i64, ptr %23, align 8, !tbaa !9
  %257 = call noundef i64 @_ZN14NAMESPACE_MAIN19RandomDeterministic8NextFastImEENSt9enable_ifIXaasr3std11is_unsignedIT_EE5valueltclL_ZNSt14numeric_limitsIjE3maxEvEEclsr3std14numeric_limitsIS3_EE3maxEES3_E4typeES3_(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %256)
  store i64 %257, ptr %36, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  %258 = load ptr, ptr %7, align 8, !tbaa !5
  %259 = load i64, ptr %36, align 8, !tbaa !9
  %260 = getelementptr inbounds i64, ptr %258, i64 %259
  %261 = load i64, ptr %260, align 8, !tbaa !9
  store i64 %261, ptr %37, align 8, !tbaa !9
  %262 = load i64, ptr %23, align 8, !tbaa !9
  %263 = add i64 %262, -1
  store i64 %263, ptr %23, align 8, !tbaa !9
  %264 = load ptr, ptr %7, align 8, !tbaa !5
  %265 = load i64, ptr %23, align 8, !tbaa !9
  %266 = getelementptr inbounds i64, ptr %264, i64 %265
  %267 = load i64, ptr %266, align 8, !tbaa !9
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = load i64, ptr %36, align 8, !tbaa !9
  %270 = getelementptr inbounds i64, ptr %268, i64 %269
  store i64 %267, ptr %270, align 8, !tbaa !9
  %271 = load i64, ptr %37, align 8, !tbaa !9
  %272 = load ptr, ptr %7, align 8, !tbaa !5
  %273 = load i64, ptr %23, align 8, !tbaa !9
  %274 = getelementptr inbounds i64, ptr %272, i64 %273
  store i64 %271, ptr %274, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  br label %252, !llvm.loop !15

275:                                              ; preds = %252
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = icmp ne ptr null, %276
  br i1 %277, label %278, label %281

278:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %279, ptr %38, align 8, !tbaa !5
  %280 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %280, ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  br label %281

281:                                              ; preds = %278, %275
  br label %282

282:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #10
  store i32 3, ptr %39, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #10
  store i32 4, ptr %40, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #10
  %283 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  store i32 %283, ptr %41, align 4, !tbaa !11
  %284 = load i32, ptr %41, align 4, !tbaa !11
  %285 = icmp sle i32 3, %284
  br i1 %285, label %286, label %309

286:                                              ; preds = %282
  br label %287

287:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  %288 = load i32, ptr %41, align 4, !tbaa !11
  %289 = icmp slt i32 %288, 4
  br i1 %289, label %290, label %301

290:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #10
  store ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  %291 = load i32, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !11
  %292 = sub nsw i32 %291, 1
  store i32 %292, ptr %44, align 4, !tbaa !11
  %293 = load i32, ptr %44, align 4, !tbaa !11
  %294 = icmp slt i32 %293, 0
  br i1 %294, label %295, label %296

295:                                              ; preds = %290
  store i32 28, ptr %14, align 4
  br label %298

296:                                              ; preds = %290
  %297 = load i32, ptr %44, align 4, !tbaa !11
  store i32 %297, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !11
  store i32 3, ptr %42, align 4, !tbaa !11
  store i32 0, ptr %14, align 4
  br label %298

298:                                              ; preds = %296, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #10
  %299 = load i32, ptr %14, align 4
  switch i32 %299, label %304 [
    i32 0, label %300
  ]

300:                                              ; preds = %298
  br label %302

301:                                              ; preds = %287
  store i32 4, ptr %42, align 4, !tbaa !11
  br label %302

302:                                              ; preds = %301, %300
  %303 = load i32, ptr %42, align 4, !tbaa !11
  call void @InteralLogWithoutArguments(i32 noundef %303, ptr noundef @_ZZ7ShuffleE13LOG__sMessage_7)
  store i32 0, ptr %14, align 4
  br label %304

304:                                              ; preds = %302, %298
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  %305 = load i32, ptr %14, align 4
  switch i32 %305, label %324 [
    i32 0, label %306
    i32 28, label %308
  ]

306:                                              ; preds = %304
  br label %307

307:                                              ; preds = %306
  br label %308

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

309:                                              ; preds = %308, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #10
  br label %310

310:                                              ; preds = %309
  br label %311

311:                                              ; preds = %310
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  br label %312

312:                                              ; preds = %311, %232
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #10
  br label %313

313:                                              ; preds = %312, %176, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %314

314:                                              ; preds = %313, %143, %128, %98
  %315 = load i32, ptr %4, align 4
  ret i32 %315

316:                                              ; preds = %235
  %317 = load ptr, ptr %29, align 8
  %318 = load i32, ptr %30, align 4
  %319 = insertvalue { ptr, i32 } poison, ptr %317, 0
  %320 = insertvalue { ptr, i32 } %319, i32 %318, 1
  resume { ptr, i32 } %320

321:                                              ; preds = %222, %214
  %322 = landingpad { ptr, i32 }
          catch ptr null
  %323 = extractvalue { ptr, i32 } %322, 0
  call void @__clang_call_terminate(ptr %323) #11
  unreachable

324:                                              ; preds = %304, %122, %70
  unreachable
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN22RandomNondeterministicImE4NextEm(ptr noundef nonnull align 8 dereferenceable(5016), i64 noundef) #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #9 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN19RandomDeterministic8NextFastImEENSt9enable_ifIXaasr3std11is_unsignedIT_EE5valueltclL_ZNSt14numeric_limitsIjE3maxEvEEclsr3std14numeric_limitsIS3_EE3maxEES3_E4typeES3_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 #3 = { nounwind memory(none) }
attributes #4 = { 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 #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 = { 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 #8 = { 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 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 #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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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::RandomDeterministic" = type { i64, i64, i64 }
%"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_MAINL18g_cLogEnterShuffleE = external hidden local_unnamed_addr global i32, align 4
@_ZZ7ShuffleE13LOG__sMessage = external hidden constant [49 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_0 = external hidden constant [35 x i8], align 16
@_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE = external hidden local_unnamed_addr global i32, align 4
@_ZZ7ShuffleE13LOG__sMessage_1 = external hidden constant [29 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_2 = external hidden constant [44 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_3 = external hidden constant [53 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_4 = external hidden constant [35 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_5 = external hidden constant [52 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_6 = external hidden constant [52 x i8], align 16
@_ZZ7ShuffleE13LOG__sMessage_7 = external hidden constant [15 x i8], align 1

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() local_unnamed_addr #1 align 2

declare void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

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

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 #4

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

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016)) unnamed_addr #6 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

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

8:                                                ; preds = %3
  %9 = icmp eq i32 %6, 3
  br i1 %9, label %10, label %15

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

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

15:                                               ; preds = %13, %8
  %.162 = phi i32 [ 3, %13 ], [ 4, %8 ]
  tail call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %.162, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage, ptr noundef %0, i64 noundef %1, ptr noundef %2)
  br label %.critedge

.critedge:                                        ; preds = %15, %10, %3
  %16 = icmp slt i64 %1, 1
  br i1 %16, label %17, label %33, !prof !9

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

20:                                               ; preds = %17
  %21 = icmp sgt i32 %19, 0
  br i1 %21, label %22, label %.critedge94

22:                                               ; preds = %20
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_0)
  br label %.critedge94

23:                                               ; preds = %17
  %24 = icmp sgt i32 %19, 2
  br i1 %24, label %25, label %.critedge94

25:                                               ; preds = %23
  %26 = icmp eq i32 %19, 3
  br i1 %26, label %27, label %32

27:                                               ; preds = %25
  %28 = load i32, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %30, label %.critedge94

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

32:                                               ; preds = %30, %25
  %.170 = phi i32 [ 3, %30 ], [ 4, %25 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.170, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_1)
  br label %.critedge94

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

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

38:                                               ; preds = %35
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_2)
  br label %.critedge94

39:                                               ; preds = %33
  %40 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %1) #9
  br i1 %40, label %41, label %45, !prof !9

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

44:                                               ; preds = %41
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_3)
  br label %.critedge94

45:                                               ; preds = %39
  %46 = icmp eq ptr %2, null
  br i1 %46, label %47, label %51, !prof !9

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

50:                                               ; preds = %47
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_4)
  br label %.critedge94

51:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  %52 = icmp eq ptr %0, null
  br i1 %52, label %53, label %79

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 5016, ptr nonnull %5) #9
  invoke void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImEC2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %5)
          to label %54 unwind label %57

54:                                               ; preds = %53
  %55 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #9
  %56 = invoke noundef i64 @_ZN14NAMESPACE_MAIN22RandomNondeterministicImE4NextEm(ptr noundef nonnull align 8 dereferenceable(5016) %5, i64 noundef %55)
          to label %77 unwind label %59

57:                                               ; preds = %53
  %58 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  br label %61

59:                                               ; preds = %54
  %60 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %5) #9
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  %.072 = extractvalue { ptr, i32 } %.pn, 0
  %.074 = extractvalue { ptr, i32 } %.pn, 1
  call void @llvm.lifetime.end.p0(i64 5016, ptr nonnull %5) #9
  %62 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #9
  %63 = icmp eq i32 %.074, %62
  %64 = call ptr @__cxa_begin_catch(ptr %.072) #9
  %65 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %66 = icmp sgt i32 %65, 1
  br i1 %63, label %67, label %69

67:                                               ; preds = %61
  br i1 %66, label %68, label %76

68:                                               ; preds = %67
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_6)
          to label %76 unwind label %74

69:                                               ; preds = %61
  br i1 %66, label %70, label %73

70:                                               ; preds = %69
  invoke void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_5)
          to label %73 unwind label %71

71:                                               ; preds = %70
  %72 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %78 unwind label %104

73:                                               ; preds = %70, %69
  call void @__cxa_end_catch()
  br label %.critedge96

74:                                               ; preds = %68
  %75 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %78 unwind label %104

76:                                               ; preds = %68, %67
  call void @__cxa_end_catch()
  br label %.critedge96

77:                                               ; preds = %54
  call void @_ZN14NAMESPACE_MAIN22RandomNondeterministicImED2Ev(ptr noundef nonnull align 8 dereferenceable(5016) %5) #9
  call void @llvm.lifetime.end.p0(i64 5016, ptr nonnull %5) #9
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %56)
  br label %80

78:                                               ; preds = %74, %71
  %.pn89 = phi { ptr, i32 } [ %72, %71 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn89

79:                                               ; preds = %51
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %80

80:                                               ; preds = %77, %79
  %min.iters.check = icmp ult i64 %1, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %80
  %n.vec = and i64 %1, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %81 = getelementptr inbounds i64, ptr %2, i64 %index
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  store <2 x i64> %vec.ind, ptr %81, align 8, !tbaa !10
  store <2 x i64> %step.add, ptr %82, align 8, !tbaa !10
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %1
  br i1 %cmp.n, label %.preheader, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %80
  %.076.ph = phi i64 [ 0, %80 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.076 = phi i64 [ %85, %scalar.ph ], [ %.076.ph, %scalar.ph.preheader ]
  %84 = getelementptr inbounds i64, ptr %2, i64 %.076
  store i64 %.076, ptr %84, align 8, !tbaa !10
  %85 = add i64 %.076, 1
  %.not = icmp eq i64 %85, %1
  br i1 %.not, label %.preheader, label %scalar.ph, !llvm.loop !16

.preheader:                                       ; preds = %scalar.ph, %middle.block
  %.not9199 = icmp eq i64 %1, 1
  br i1 %.not9199, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.071100 = phi i64 [ %89, %.lr.ph ], [ %1, %.preheader ]
  %86 = call noundef i64 @_ZN14NAMESPACE_MAIN19RandomDeterministic8NextFastImEENSt9enable_ifIXaasr3std11is_unsignedIT_EE5valueltclL_ZNSt14numeric_limitsIjE3maxEvEEclsr3std14numeric_limitsIS3_EE3maxEES3_E4typeES3_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.071100)
  %87 = getelementptr inbounds i64, ptr %2, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !10
  %89 = add i64 %.071100, -1
  %90 = getelementptr inbounds i64, ptr %2, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !10
  store i64 %91, ptr %87, align 8, !tbaa !10
  store i64 %88, ptr %90, align 8, !tbaa !10
  %.not91 = icmp eq i64 %89, 1
  br i1 %.not91, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  br i1 %52, label %93, label %92

92:                                               ; preds = %._crit_edge
  call void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
  br label %93

93:                                               ; preds = %._crit_edge, %92
  %94 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %95 = icmp sgt i32 %94, 2
  br i1 %95, label %96, label %.critedge96

96:                                               ; preds = %93
  %97 = icmp eq i32 %94, 3
  br i1 %97, label %98, label %103

98:                                               ; preds = %96
  %99 = load i32, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %101, label %.critedge96

101:                                              ; preds = %98
  %102 = add nsw i32 %99, -1
  store i32 %102, ptr @_ZN14NAMESPACE_MAINL17g_cLogExitShuffleE, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %101, %96
  %.164 = phi i32 [ 3, %101 ], [ 4, %96 ]
  call void @InteralLogWithoutArguments(i32 noundef %.164, ptr noundef nonnull @_ZZ7ShuffleE13LOG__sMessage_7)
  br label %.critedge96

.critedge96:                                      ; preds = %73, %76, %93, %98, %103
  %.1 = phi i32 [ 0, %103 ], [ 0, %98 ], [ 0, %93 ], [ -2, %73 ], [ -1, %76 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  br label %.critedge94

.critedge94:                                      ; preds = %.critedge96, %44, %41, %50, %47, %35, %38, %23, %27, %32, %20, %22
  %.3 = phi i32 [ -3, %22 ], [ -3, %20 ], [ 0, %32 ], [ 0, %27 ], [ 0, %23 ], [ -3, %38 ], [ -3, %35 ], [ %.1, %.critedge96 ], [ -3, %44 ], [ -3, %41 ], [ -3, %50 ], [ -3, %47 ]
  ret i32 %.3

104:                                              ; preds = %74, %71
  %105 = landingpad { ptr, i32 }
          catch ptr null
  %106 = extractvalue { ptr, i32 } %105, 0
  call void @__clang_call_terminate(ptr %106) #10
  unreachable
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN22RandomNondeterministicImE4NextEm(ptr noundef nonnull align 8 dereferenceable(5016), i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN19RandomDeterministic10InitializeERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN19RandomDeterministic8NextFastImEENSt9enable_ifIXaasr3std11is_unsignedIT_EE5valueltclL_ZNSt14numeric_limitsIjE3maxEvEEclsr3std14numeric_limitsIS3_EE3maxEES3_E4typeES3_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 #3 = { nofree nosync nounwind memory(none) }
attributes #4 = { 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 #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 = { 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 #7 = { 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 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 #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 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !13, !15, !14}
!17 = distinct !{!17, !13}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass