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

; 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"

@.str = external hidden unnamed_addr constant [84 x i8], align 1
@__func__.DiscretizeOneSample = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__.DiscretizeOneSample = external hidden unnamed_addr constant [81 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i64 @DiscretizeOneSample(double noundef %0, i64 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i64, align 8
  %5 = alloca double, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  store double %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !11
  %13 = load ptr, ptr %7, align 8, !tbaa !11
  %14 = icmp ne ptr null, %13
  br i1 %14, label %17, label %15

15:                                               ; preds = %3
  call void @LogAssertFailure(i64 noundef 142, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.1)
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str, i32 noundef 142, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

16:                                               ; No predecessors!
  br label %17

17:                                               ; preds = %16, %3
  %18 = phi i1 [ true, %3 ], [ false, %16 ]
  %19 = load i64, ptr %6, align 8, !tbaa !9
  %20 = icmp sle i64 0, %19
  br i1 %20, label %23, label %21

21:                                               ; preds = %17
  call void @LogAssertFailure(i64 noundef 144, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.3)
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str, i32 noundef 144, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %17
  %24 = phi i1 [ true, %17 ], [ false, %22 ]
  %25 = load i64, ptr %6, align 8, !tbaa !9
  %26 = call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #8
  %27 = sub nsw i64 %26, 2
  %28 = icmp sle i64 %25, %27
  br i1 %28, label %31, label %29

29:                                               ; preds = %23
  call void @LogAssertFailure(i64 noundef 149, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str, i32 noundef 149, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %23
  %32 = phi i1 [ true, %23 ], [ false, %30 ]
  %33 = load i64, ptr %6, align 8, !tbaa !9
  %34 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %33) #8
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  call void @LogAssertFailure(i64 noundef 151, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.7)
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str, i32 noundef 151, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

36:                                               ; No predecessors!
  br label %37

37:                                               ; preds = %36, %31
  %38 = phi i1 [ true, %31 ], [ false, %36 ]
  %39 = load i64, ptr %6, align 8, !tbaa !9
  %40 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %39) #8
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  call void @LogAssertFailure(i64 noundef 153, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.9)
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str, i32 noundef 153, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %37
  %44 = phi i1 [ true, %37 ], [ false, %42 ]
  %45 = load i64, ptr %6, align 8, !tbaa !9
  %46 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorIllEENSt9enable_ifIXaaaaaasr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS2_EE6lowestEclsr3std14numeric_limitsIS3_EE6lowestEleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %45) #8
  br i1 %46, label %47, label %49

47:                                               ; preds = %43
  call void @LogAssertFailure(i64 noundef 158, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.11)
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str, i32 noundef 158, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %43
  %50 = phi i1 [ true, %43 ], [ false, %48 ]
  %51 = load i64, ptr %6, align 8, !tbaa !9
  %52 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #8
  %53 = icmp ult i64 %51, %52
  br i1 %53, label %56, label %54

54:                                               ; preds = %49
  call void @LogAssertFailure(i64 noundef 160, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.13)
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str, i32 noundef 160, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55, %49
  %57 = phi i1 [ true, %49 ], [ false, %55 ]
  %58 = load i64, ptr %6, align 8, !tbaa !9
  %59 = call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #8
  %60 = icmp ule i64 %58, %59
  br i1 %60, label %63, label %61

61:                                               ; preds = %56
  call void @LogAssertFailure(i64 noundef 163, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.15)
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str, i32 noundef 163, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62, %56
  %64 = phi i1 [ true, %56 ], [ false, %62 ]
  %65 = load i64, ptr %6, align 8, !tbaa !9
  %66 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #8
  %67 = udiv i64 %66, 2
  %68 = add i64 %67, 1
  %69 = icmp ule i64 %65, %68
  br i1 %69, label %72, label %70

70:                                               ; preds = %63
  call void @LogAssertFailure(i64 noundef 166, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.17)
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str, i32 noundef 166, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

71:                                               ; No predecessors!
  br label %72

72:                                               ; preds = %71, %63
  %73 = phi i1 [ true, %63 ], [ false, %71 ]
  %74 = load double, ptr %5, align 8, !tbaa !5
  %75 = call noundef zeroext i1 @_ZSt5isnand(double noundef %74)
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  store i64 0, ptr %4, align 8
  br label %249

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

85:                                               ; preds = %77
  store i64 1, ptr %4, align 8
  br label %249

86:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %87 = load i64, ptr %6, align 8, !tbaa !9
  %88 = sub nsw i64 %87, 1
  store i64 %88, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %89 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %89, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  br label %90

90:                                               ; preds = %198, %86
  %91 = load i64, ptr %11, align 8, !tbaa !9
  %92 = icmp sle i64 0, %91
  br i1 %92, label %93, label %97

93:                                               ; preds = %90
  %94 = load i64, ptr %11, align 8, !tbaa !9
  %95 = load i64, ptr %6, align 8, !tbaa !9
  %96 = icmp ult i64 %94, %95
  br i1 %96, label %99, label %97

97:                                               ; preds = %93, %90
  call void @LogAssertFailure(i64 noundef 181, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.19)
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str, i32 noundef 181, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98, %93
  %100 = phi i1 [ true, %93 ], [ false, %98 ]
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = icmp sle i64 0, %101
  br i1 %102, label %103, label %107

103:                                              ; preds = %99
  %104 = load i64, ptr %10, align 8, !tbaa !9
  %105 = load i64, ptr %6, align 8, !tbaa !9
  %106 = icmp ult i64 %104, %105
  br i1 %106, label %109, label %107

107:                                              ; preds = %103, %99
  call void @LogAssertFailure(i64 noundef 182, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.21)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str, i32 noundef 182, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

108:                                              ; No predecessors!
  br label %109

109:                                              ; preds = %108, %103
  %110 = phi i1 [ true, %103 ], [ false, %108 ]
  %111 = load i64, ptr %11, align 8, !tbaa !9
  %112 = load i64, ptr %10, align 8, !tbaa !9
  %113 = icmp sle i64 %111, %112
  br i1 %113, label %116, label %114

114:                                              ; preds = %109
  call void @LogAssertFailure(i64 noundef 183, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.23)
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str, i32 noundef 183, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

115:                                              ; No predecessors!
  br label %116

116:                                              ; preds = %115, %109
  %117 = phi i1 [ true, %109 ], [ false, %115 ]
  %118 = load i64, ptr %11, align 8, !tbaa !9
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %118, i64 noundef %119) #8
  br i1 %120, label %121, label %123

121:                                              ; preds = %116
  call void @LogAssertFailure(i64 noundef 190, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.25)
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str, i32 noundef 190, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

122:                                              ; No predecessors!
  br label %123

123:                                              ; preds = %122, %116
  %124 = phi i1 [ true, %116 ], [ false, %122 ]
  %125 = load i64, ptr %11, align 8, !tbaa !9
  %126 = load i64, ptr %10, align 8, !tbaa !9
  %127 = add i64 %125, %126
  %128 = lshr i64 %127, 1
  store i64 %128, ptr %8, align 8, !tbaa !9
  %129 = load i64, ptr %8, align 8, !tbaa !9
  %130 = load i64, ptr %10, align 8, !tbaa !9
  %131 = icmp ule i64 %129, %130
  br i1 %131, label %134, label %132

132:                                              ; preds = %123
  call void @LogAssertFailure(i64 noundef 192, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.27)
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str, i32 noundef 192, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

133:                                              ; No predecessors!
  br label %134

134:                                              ; preds = %133, %123
  %135 = phi i1 [ true, %123 ], [ false, %133 ]
  %136 = load i64, ptr %8, align 8, !tbaa !9
  %137 = load i64, ptr %6, align 8, !tbaa !9
  %138 = icmp ult i64 %136, %137
  br i1 %138, label %141, label %139

139:                                              ; preds = %134
  call void @LogAssertFailure(i64 noundef 193, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.29)
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str, i32 noundef 193, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

140:                                              ; No predecessors!
  br label %141

141:                                              ; preds = %140, %134
  %142 = phi i1 [ true, %134 ], [ false, %140 ]
  %143 = load ptr, ptr %7, align 8, !tbaa !11
  %144 = load i64, ptr %8, align 8, !tbaa !9
  %145 = getelementptr inbounds double, ptr %143, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !5
  store double %146, ptr %12, align 8, !tbaa !5
  %147 = load i64, ptr %8, align 8, !tbaa !9
  %148 = call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #8
  %149 = icmp ult i64 %147, %148
  br i1 %149, label %152, label %150

150:                                              ; preds = %141
  call void @LogAssertFailure(i64 noundef 195, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.31)
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str, i32 noundef 195, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

151:                                              ; No predecessors!
  br label %152

152:                                              ; preds = %151, %141
  %153 = phi i1 [ true, %141 ], [ false, %151 ]
  %154 = load double, ptr %12, align 8, !tbaa !5
  %155 = load double, ptr %5, align 8, !tbaa !5
  %156 = fcmp ole double %154, %155
  %157 = xor i1 %156, true
  %158 = xor i1 %157, true
  br i1 %158, label %159, label %162, !unpredictable !13

159:                                              ; preds = %152
  %160 = load i64, ptr %8, align 8, !tbaa !9
  %161 = add nsw i64 %160, 1
  br label %164

162:                                              ; preds = %152
  %163 = load i64, ptr %11, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %162, %159
  %165 = phi i64 [ %161, %159 ], [ %163, %162 ]
  store i64 %165, ptr %11, align 8, !tbaa !9
  %166 = load i64, ptr %11, align 8, !tbaa !9
  %167 = icmp sle i64 0, %166
  br i1 %167, label %168, label %172

168:                                              ; preds = %164
  %169 = load i64, ptr %11, align 8, !tbaa !9
  %170 = load i64, ptr %6, align 8, !tbaa !9
  %171 = icmp ule i64 %169, %170
  br i1 %171, label %174, label %172

172:                                              ; preds = %168, %164
  call void @LogAssertFailure(i64 noundef 197, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.33)
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str, i32 noundef 197, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

173:                                              ; No predecessors!
  br label %174

174:                                              ; preds = %173, %168
  %175 = phi i1 [ true, %168 ], [ false, %173 ]
  %176 = load double, ptr %12, align 8, !tbaa !5
  %177 = load double, ptr %5, align 8, !tbaa !5
  %178 = fcmp ole double %176, %177
  %179 = xor i1 %178, true
  %180 = xor i1 %179, true
  br i1 %180, label %181, label %183, !unpredictable !13

181:                                              ; preds = %174
  %182 = load i64, ptr %10, align 8, !tbaa !9
  br label %186

183:                                              ; preds = %174
  %184 = load i64, ptr %8, align 8, !tbaa !9
  %185 = sub nsw i64 %184, 1
  br label %186

186:                                              ; preds = %183, %181
  %187 = phi i64 [ %182, %181 ], [ %185, %183 ]
  store i64 %187, ptr %10, align 8, !tbaa !9
  %188 = load i64, ptr %10, align 8, !tbaa !9
  %189 = icmp sle i64 -1, %188
  br i1 %189, label %190, label %194

190:                                              ; preds = %186
  %191 = load i64, ptr %10, align 8, !tbaa !9
  %192 = load i64, ptr %9, align 8, !tbaa !9
  %193 = icmp sle i64 %191, %192
  br i1 %193, label %196, label %194

194:                                              ; preds = %190, %186
  call void @LogAssertFailure(i64 noundef 199, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.35)
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str, i32 noundef 199, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

195:                                              ; No predecessors!
  br label %196

196:                                              ; preds = %195, %190
  %197 = phi i1 [ true, %190 ], [ false, %195 ]
  br label %198

198:                                              ; preds = %196
  %199 = load i64, ptr %11, align 8, !tbaa !9
  %200 = load i64, ptr %10, align 8, !tbaa !9
  %201 = icmp sle i64 %199, %200
  %202 = xor i1 %201, true
  %203 = xor i1 %202, true
  %204 = zext i1 %203 to i64
  %205 = call i64 @llvm.expect.i64(i64 %204, i64 1)
  %206 = icmp ne i64 %205, 0
  br i1 %206, label %90, label %207, !llvm.loop !14

207:                                              ; preds = %198
  %208 = load i64, ptr %8, align 8, !tbaa !9
  %209 = icmp ule i64 0, %208
  br i1 %209, label %210, label %214

210:                                              ; preds = %207
  %211 = load i64, ptr %8, align 8, !tbaa !9
  %212 = load i64, ptr %6, align 8, !tbaa !9
  %213 = icmp ult i64 %211, %212
  br i1 %213, label %216, label %214

214:                                              ; preds = %210, %207
  call void @LogAssertFailure(i64 noundef 212, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.37)
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str, i32 noundef 212, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

215:                                              ; No predecessors!
  br label %216

216:                                              ; preds = %215, %210
  %217 = phi i1 [ true, %210 ], [ false, %215 ]
  %218 = load double, ptr %12, align 8, !tbaa !5
  %219 = load double, ptr %5, align 8, !tbaa !5
  %220 = fcmp ole double %218, %219
  %221 = xor i1 %220, true
  %222 = xor i1 %221, true
  br i1 %222, label %223, label %226, !unpredictable !13

223:                                              ; preds = %216
  %224 = load i64, ptr %8, align 8, !tbaa !9
  %225 = add i64 %224, 2
  br label %229

226:                                              ; preds = %216
  %227 = load i64, ptr %8, align 8, !tbaa !9
  %228 = add i64 %227, 1
  br label %229

229:                                              ; preds = %226, %223
  %230 = phi i64 [ %225, %223 ], [ %228, %226 ]
  store i64 %230, ptr %8, align 8, !tbaa !9
  %231 = load i64, ptr %8, align 8, !tbaa !9
  %232 = icmp ule i64 1, %231
  br i1 %232, label %233, label %238

233:                                              ; preds = %229
  %234 = load i64, ptr %8, align 8, !tbaa !9
  %235 = load i64, ptr %6, align 8, !tbaa !9
  %236 = add i64 1, %235
  %237 = icmp ule i64 %234, %236
  br i1 %237, label %240, label %238

238:                                              ; preds = %233, %229
  call void @LogAssertFailure(i64 noundef 214, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.39)
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str, i32 noundef 214, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

239:                                              ; No predecessors!
  br label %240

240:                                              ; preds = %239, %233
  %241 = phi i1 [ true, %233 ], [ false, %239 ]
  %242 = load i64, ptr %8, align 8, !tbaa !9
  %243 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorIlmEENSt9enable_ifIXaaaasr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueltclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS3_EE3maxEEbE4typeES3_(i64 noundef %242) #8
  br i1 %243, label %244, label %246

244:                                              ; preds = %240
  call void @LogAssertFailure(i64 noundef 215, ptr noundef @.str, ptr noundef @__func__.DiscretizeOneSample, ptr noundef @.str.41)
  call void @__assert_fail(ptr noundef @.str.42, ptr noundef @.str, i32 noundef 215, ptr noundef @__PRETTY_FUNCTION__.DiscretizeOneSample) #7
  unreachable

245:                                              ; No predecessors!
  br label %246

246:                                              ; preds = %245, %240
  %247 = phi i1 [ true, %240 ], [ false, %245 ]
  %248 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %248, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %249

249:                                              ; preds = %246, %85, %76
  %250 = load i64, ptr %4, align 8
  ret i64 %250
}

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #3 align 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) #4

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #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 = { noreturn nounwind "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 = { 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"double", !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 = !{!"any pointer", !7, i64 0}
!13 = !{}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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"

@.str = external hidden unnamed_addr constant [84 x i8], align 1
@__func__.DiscretizeOneSample = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__.DiscretizeOneSample = external hidden unnamed_addr constant [81 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i64 @DiscretizeOneSample(double noundef %0, i64 noundef %1, ptr noundef readonly %2) local_unnamed_addr #0 {
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %3
  tail call void @LogAssertFailure(i64 noundef 142, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.1)
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 142, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

5:                                                ; preds = %3
  %6 = icmp sgt i64 %1, -1
  br i1 %6, label %8, label %7

7:                                                ; preds = %5
  tail call void @LogAssertFailure(i64 noundef 144, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str, i32 noundef 144, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

8:                                                ; preds = %5
  %9 = tail call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #6
  %10 = add nsw i64 %9, -2
  %.not68 = icmp slt i64 %10, %1
  br i1 %.not68, label %11, label %12

11:                                               ; preds = %8
  tail call void @LogAssertFailure(i64 noundef 149, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.5)
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str, i32 noundef 149, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

12:                                               ; preds = %8
  %13 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %1) #6
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  tail call void @LogAssertFailure(i64 noundef 151, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.7)
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str, i32 noundef 151, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

15:                                               ; preds = %12
  %16 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %1) #6
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  tail call void @LogAssertFailure(i64 noundef 153, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.9)
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str, i32 noundef 153, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

18:                                               ; preds = %15
  %19 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorIllEENSt9enable_ifIXaaaaaasr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS2_EE6lowestEclsr3std14numeric_limitsIS3_EE6lowestEleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %1) #6
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  tail call void @LogAssertFailure(i64 noundef 158, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.11)
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str, i32 noundef 158, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

21:                                               ; preds = %18
  %22 = tail call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #6
  %23 = icmp ugt i64 %22, %1
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  tail call void @LogAssertFailure(i64 noundef 160, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.13)
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str, i32 noundef 160, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

25:                                               ; preds = %21
  %26 = tail call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #6
  %.not69 = icmp ult i64 %26, %1
  br i1 %.not69, label %27, label %28

27:                                               ; preds = %25
  tail call void @LogAssertFailure(i64 noundef 163, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.15)
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str, i32 noundef 163, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

28:                                               ; preds = %25
  %29 = tail call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #6
  %30 = lshr i64 %29, 1
  %31 = add nuw i64 %30, 1
  %.not70 = icmp ult i64 %31, %1
  br i1 %.not70, label %32, label %33

32:                                               ; preds = %28
  tail call void @LogAssertFailure(i64 noundef 166, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.17)
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str, i32 noundef 166, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

33:                                               ; preds = %28
  %34 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %0)
  br i1 %34, label %77, label %35

35:                                               ; preds = %33
  %36 = icmp eq i64 %1, 0
  br i1 %36, label %77, label %.split, !prof !5

.split:                                           ; preds = %35
  %37 = add nsw i64 %1, -1
  br label %38

38:                                               ; preds = %68, %.split
  %.061 = phi i64 [ %37, %.split ], [ %66, %68 ]
  %.060 = phi i64 [ 0, %.split ], [ %62, %68 ]
  %39 = icmp ult i64 %.060, %1
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  tail call void @LogAssertFailure(i64 noundef 181, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.19)
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str, i32 noundef 181, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

41:                                               ; preds = %38
  %42 = icmp ult i64 %.061, %1
  br i1 %42, label %44, label %43

43:                                               ; preds = %41
  tail call void @LogAssertFailure(i64 noundef 182, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.21)
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str, i32 noundef 182, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

44:                                               ; preds = %41
  %.not71 = icmp sgt i64 %.060, %.061
  br i1 %.not71, label %45, label %46

45:                                               ; preds = %44
  tail call void @LogAssertFailure(i64 noundef 183, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.23)
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str, i32 noundef 183, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

46:                                               ; preds = %44
  %47 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %.060, i64 noundef %.061) #6
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  tail call void @LogAssertFailure(i64 noundef 190, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.25)
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str, i32 noundef 190, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

49:                                               ; preds = %46
  %50 = add nuw i64 %.060, %.061
  %51 = lshr i64 %50, 1
  %.not72 = icmp ugt i64 %51, %.061
  br i1 %.not72, label %52, label %53

52:                                               ; preds = %49
  tail call void @LogAssertFailure(i64 noundef 192, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.27)
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str, i32 noundef 192, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

53:                                               ; preds = %49
  %54 = getelementptr inbounds double, ptr %2, i64 %51
  %55 = load double, ptr %54, align 8, !tbaa !6
  %56 = tail call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #6
  %57 = icmp ult i64 %51, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %53
  tail call void @LogAssertFailure(i64 noundef 195, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.31)
  tail call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str, i32 noundef 195, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

59:                                               ; preds = %53
  %60 = fcmp ole double %55, %0
  %61 = add nuw nsw i64 %51, 1
  %62 = select i1 %60, i64 %61, i64 %.060, !unpredictable !10
  %.not73 = icmp ugt i64 %62, %1
  br i1 %.not73, label %63, label %64

63:                                               ; preds = %59
  tail call void @LogAssertFailure(i64 noundef 197, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.33)
  tail call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str, i32 noundef 197, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

64:                                               ; preds = %59
  %65 = add nsw i64 %51, -1
  %66 = select i1 %60, i64 %.061, i64 %65, !unpredictable !10
  %.not74.not = icmp slt i64 %66, %1
  br i1 %.not74.not, label %68, label %67

67:                                               ; preds = %64
  tail call void @LogAssertFailure(i64 noundef 199, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.35)
  tail call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str, i32 noundef 199, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

68:                                               ; preds = %64
  %.not75 = icmp sgt i64 %62, %66
  br i1 %.not75, label %69, label %38, !prof !5, !llvm.loop !11

69:                                               ; preds = %68
  %70 = add nuw nsw i64 %51, 2
  %71 = select i1 %60, i64 %70, i64 %61, !unpredictable !10
  %72 = add nuw nsw i64 %1, 1
  %.not76 = icmp ugt i64 %71, %72
  br i1 %.not76, label %73, label %74

73:                                               ; preds = %69
  tail call void @LogAssertFailure(i64 noundef 214, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.39)
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str, i32 noundef 214, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

74:                                               ; preds = %69
  %75 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorIlmEENSt9enable_ifIXaaaasr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueltclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS3_EE3maxEEbE4typeES3_(i64 noundef %71) #6
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  tail call void @LogAssertFailure(i64 noundef 215, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.DiscretizeOneSample, ptr noundef nonnull @.str.41)
  tail call void @__assert_fail(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str, i32 noundef 215, ptr noundef nonnull @__PRETTY_FUNCTION__.DiscretizeOneSample) #5
  unreachable

77:                                               ; preds = %74, %35, %33
  %.0 = phi i64 [ 0, %33 ], [ 1, %35 ], [ %71, %74 ]
  ret i64 %.0
}

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() local_unnamed_addr #3 align 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 #4

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

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

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

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

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

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

attributes #0 = { 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 #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 = { noreturn nounwind "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 = { 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 #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!7, !7, i64 0}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyCFGPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass