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

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

@g_traceLevel = external global i32, align 4
@_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE = external hidden global i32, align 4
@_ZZ7SafeSumE13LOG__sMessage = external hidden constant [80 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_0 = external hidden constant [28 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_1 = external hidden constant [29 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_2 = external hidden constant [39 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_3 = external hidden constant [51 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_4 = external hidden constant [37 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_5 = external hidden constant [49 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_6 = external hidden constant [54 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_7 = external hidden constant [53 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_8 = external hidden constant [36 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_9 = external hidden constant [48 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage__10_ = external hidden constant [52 x i8], align 16
@_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE = external hidden global i32, align 4
@_ZZ7SafeSumE13LOG__sMessage__11_ = 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

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

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

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

53:                                               ; preds = %49
  br label %54

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %55 = load i32, ptr %14, align 4, !tbaa !11
  %56 = icmp slt i32 %55, 4
  br i1 %56, label %57, label %68

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store ptr @_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %58 = load i32, ptr @_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE, align 4, !tbaa !11
  %59 = sub nsw i32 %58, 1
  store i32 %59, ptr %17, align 4, !tbaa !11
  %60 = load i32, ptr %17, align 4, !tbaa !11
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %57
  store i32 4, ptr %18, align 4
  br label %65

63:                                               ; preds = %57
  %64 = load i32, ptr %17, align 4, !tbaa !11
  store i32 %64, ptr @_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE, align 4, !tbaa !11
  store i32 3, ptr %15, align 4, !tbaa !11
  store i32 0, ptr %18, align 4
  br label %65

65:                                               ; preds = %63, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %66 = load i32, ptr %18, align 4
  switch i32 %66, label %76 [
    i32 0, label %67
  ]

67:                                               ; preds = %65
  br label %69

68:                                               ; preds = %54
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %68, %67
  %70 = load i32, ptr %15, align 4, !tbaa !11
  %71 = load i64, ptr %7, align 8, !tbaa !5
  %72 = load i64, ptr %8, align 8, !tbaa !5
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = load ptr, ptr %10, align 8, !tbaa !9
  %75 = load ptr, ptr %11, align 8, !tbaa !9
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %70, ptr noundef @_ZZ7SafeSumE13LOG__sMessage, i64 noundef %71, i64 noundef %72, i64 noundef %73, ptr noundef %74, ptr noundef %75)
  store i32 0, ptr %18, align 4
  br label %76

76:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  %77 = load i32, ptr %18, align 4
  switch i32 %77, label %328 [
    i32 0, label %78
    i32 4, label %80
  ]

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79, %76
  br label %81

81:                                               ; preds = %80, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %10, align 8, !tbaa !9
  %84 = icmp eq ptr null, %83
  br i1 %84, label %85, label %92

85:                                               ; preds = %82
  br label %86

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 1, ptr %19, align 4, !tbaa !11
  %87 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %88 = icmp sle i32 1, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_0)
  br label %90

90:                                               ; preds = %89, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %91

91:                                               ; preds = %90
  store i32 -3, ptr %6, align 4
  br label %326

92:                                               ; preds = %82
  %93 = load ptr, ptr %11, align 8, !tbaa !9
  %94 = icmp eq ptr null, %93
  br i1 %94, label %95, label %102

95:                                               ; preds = %92
  br label %96

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

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

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

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

102:                                              ; preds = %92
  %103 = load i64, ptr %7, align 8, !tbaa !5
  %104 = icmp sle i64 %103, 0
  br i1 %104, label %105, label %116

105:                                              ; preds = %102
  %106 = load i64, ptr %7, align 8, !tbaa !5
  %107 = icmp slt i64 %106, 0
  br i1 %107, label %108, label %115

108:                                              ; preds = %105
  br label %109

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 1, ptr %21, align 4, !tbaa !11
  %110 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %111 = icmp sle i32 1, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %109
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_2)
  br label %113

113:                                              ; preds = %112, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %114

114:                                              ; preds = %113
  store i32 -3, ptr %6, align 4
  br label %326

115:                                              ; preds = %105
  store i32 0, ptr %6, align 4
  br label %326

116:                                              ; preds = %102
  %117 = load i64, ptr %7, align 8, !tbaa !5
  %118 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %117) #5
  br i1 %118, label %119, label %126

119:                                              ; preds = %116
  br label %120

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 1, ptr %22, align 4, !tbaa !11
  %121 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %122 = icmp sle i32 1, %121
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_3)
  br label %124

124:                                              ; preds = %123, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %125

125:                                              ; preds = %124
  store i32 -3, ptr %6, align 4
  br label %326

126:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %127 = load i64, ptr %7, align 8, !tbaa !5
  store i64 %127, ptr %23, align 8, !tbaa !5
  %128 = load i64, ptr %9, align 8, !tbaa !5
  %129 = icmp sle i64 %128, 0
  br i1 %129, label %130, label %142

130:                                              ; preds = %126
  %131 = load i64, ptr %9, align 8, !tbaa !5
  %132 = icmp slt i64 %131, 0
  br i1 %132, label %133, label %141

133:                                              ; preds = %130
  br label %134

134:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 1, ptr %24, align 4, !tbaa !11
  %135 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %136 = icmp sle i32 1, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_4)
  br label %138

138:                                              ; preds = %137, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %325

141:                                              ; preds = %130
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %325

142:                                              ; preds = %126
  %143 = load i64, ptr %9, align 8, !tbaa !5
  %144 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %143) #5
  br i1 %144, label %145, label %153

145:                                              ; preds = %142
  br label %146

146:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 1, ptr %25, align 4, !tbaa !11
  %147 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %148 = icmp sle i32 1, %147
  br i1 %148, label %149, label %150

149:                                              ; preds = %146
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_5)
  br label %150

150:                                              ; preds = %149, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %325

153:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %154 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %154, ptr %26, align 8, !tbaa !5
  %155 = load i64, ptr %26, align 8, !tbaa !5
  %156 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %155) #5
  br i1 %156, label %157, label %165

157:                                              ; preds = %153
  br label %158

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

161:                                              ; preds = %158
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_6)
  br label %162

162:                                              ; preds = %161, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %324

165:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %166 = load i64, ptr %26, align 8, !tbaa !5
  %167 = mul i64 8, %166
  store i64 %167, ptr %28, align 8, !tbaa !5
  %168 = load i64, ptr %28, align 8, !tbaa !5
  %169 = load i64, ptr %23, align 8, !tbaa !5
  %170 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %168, i64 noundef %169) #5
  br i1 %170, label %171, label %179

171:                                              ; preds = %165
  br label %172

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

175:                                              ; preds = %172
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_7)
  br label %176

176:                                              ; preds = %175, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %323

179:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %180 = load i64, ptr %28, align 8, !tbaa !5
  %181 = load i64, ptr %23, align 8, !tbaa !5
  %182 = mul i64 %180, %181
  store i64 %182, ptr %30, align 8, !tbaa !5
  %183 = load i64, ptr %8, align 8, !tbaa !5
  %184 = icmp sle i64 %183, 1
  br i1 %184, label %185, label %205

185:                                              ; preds = %179
  %186 = load i64, ptr %8, align 8, !tbaa !5
  %187 = icmp eq i64 1, %186
  br i1 %187, label %188, label %192

188:                                              ; preds = %185
  %189 = load ptr, ptr %11, align 8, !tbaa !9
  %190 = load ptr, ptr %10, align 8, !tbaa !9
  %191 = load i64, ptr %30, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %189, ptr align 8 %190, i64 %191, i1 false)
  br label %204

192:                                              ; preds = %185
  %193 = load i64, ptr %8, align 8, !tbaa !5
  %194 = icmp slt i64 %193, 0
  br i1 %194, label %195, label %203

195:                                              ; preds = %192
  br label %196

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 1, ptr %31, align 4, !tbaa !11
  %197 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %198 = icmp sle i32 1, %197
  br i1 %198, label %199, label %200

199:                                              ; preds = %196
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_8)
  br label %200

200:                                              ; preds = %199, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %322

203:                                              ; preds = %192
  br label %204

204:                                              ; preds = %203, %188
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %322

205:                                              ; preds = %179
  %206 = load i64, ptr %8, align 8, !tbaa !5
  %207 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %206) #5
  br i1 %207, label %208, label %216

208:                                              ; preds = %205
  br label %209

209:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store i32 1, ptr %32, align 4, !tbaa !11
  %210 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %211 = icmp sle i32 1, %210
  br i1 %211, label %212, label %213

212:                                              ; preds = %209
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage_9)
  br label %213

213:                                              ; preds = %212, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %322

216:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %217 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %217, ptr %33, align 8, !tbaa !5
  %218 = load i64, ptr %30, align 8, !tbaa !5
  %219 = load i64, ptr %33, align 8, !tbaa !5
  %220 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %218, i64 noundef %219) #5
  br i1 %220, label %221, label %229

221:                                              ; preds = %216
  br label %222

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

225:                                              ; preds = %222
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ7SafeSumE13LOG__sMessage__10_)
  br label %226

226:                                              ; preds = %225, %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  store i32 -3, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %321

229:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %230 = load ptr, ptr %11, align 8, !tbaa !9
  %231 = load i64, ptr %30, align 8, !tbaa !5
  %232 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef %230, i64 noundef %231) #5
  store ptr %232, ptr %35, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %233 = load i64, ptr %28, align 8, !tbaa !5
  %234 = load i64, ptr %33, align 8, !tbaa !5
  %235 = mul i64 %233, %234
  store i64 %235, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %236 = load i64, ptr %36, align 8, !tbaa !5
  %237 = sub i64 8, %236
  store i64 %237, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  %238 = load i64, ptr %36, align 8, !tbaa !5
  %239 = load i64, ptr %28, align 8, !tbaa !5
  %240 = sub i64 %238, %239
  store i64 %240, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  store i64 0, ptr %39, align 8, !tbaa !5
  br label %241

241:                                              ; preds = %286, %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %242 = load ptr, ptr %11, align 8, !tbaa !9
  %243 = load i64, ptr %28, align 8, !tbaa !5
  %244 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef %242, i64 noundef %243) #5
  store ptr %244, ptr %40, align 8, !tbaa !9
  br label %245

245:                                              ; preds = %278, %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %246 = load i64, ptr %39, align 8, !tbaa !5
  %247 = load i64, ptr %36, align 8, !tbaa !5
  %248 = add i64 %246, %247
  store i64 %248, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %249 = load ptr, ptr %10, align 8, !tbaa !9
  %250 = load i64, ptr %39, align 8, !tbaa !5
  %251 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef %249, i64 noundef %250) #5
  %252 = load double, ptr %251, align 8, !tbaa !13
  store double %252, ptr %42, align 8, !tbaa !13
  %253 = load i64, ptr %28, align 8, !tbaa !5
  %254 = load i64, ptr %39, align 8, !tbaa !5
  %255 = add i64 %254, %253
  store i64 %255, ptr %39, align 8, !tbaa !5
  br label %256

256:                                              ; preds = %266, %245
  %257 = load ptr, ptr %10, align 8, !tbaa !9
  %258 = load i64, ptr %39, align 8, !tbaa !5
  %259 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef %257, i64 noundef %258) #5
  %260 = load double, ptr %259, align 8, !tbaa !13
  %261 = load double, ptr %42, align 8, !tbaa !13
  %262 = fadd double %261, %260
  store double %262, ptr %42, align 8, !tbaa !13
  %263 = load i64, ptr %28, align 8, !tbaa !5
  %264 = load i64, ptr %39, align 8, !tbaa !5
  %265 = add i64 %264, %263
  store i64 %265, ptr %39, align 8, !tbaa !5
  br label %266

266:                                              ; preds = %256
  %267 = load i64, ptr %41, align 8, !tbaa !5
  %268 = load i64, ptr %39, align 8, !tbaa !5
  %269 = icmp ne i64 %267, %268
  br i1 %269, label %256, label %270, !llvm.loop !15

270:                                              ; preds = %266
  %271 = load i64, ptr %37, align 8, !tbaa !5
  %272 = load i64, ptr %39, align 8, !tbaa !5
  %273 = add i64 %272, %271
  store i64 %273, ptr %39, align 8, !tbaa !5
  %274 = load double, ptr %42, align 8, !tbaa !13
  %275 = load ptr, ptr %11, align 8, !tbaa !9
  store double %274, ptr %275, align 8, !tbaa !13
  %276 = load ptr, ptr %11, align 8, !tbaa !9
  %277 = getelementptr inbounds double, ptr %276, i32 1
  store ptr %277, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  br label %278

278:                                              ; preds = %270
  %279 = load ptr, ptr %40, align 8, !tbaa !9
  %280 = load ptr, ptr %11, align 8, !tbaa !9
  %281 = icmp ne ptr %279, %280
  br i1 %281, label %245, label %282, !llvm.loop !17

282:                                              ; preds = %278
  %283 = load i64, ptr %38, align 8, !tbaa !5
  %284 = load i64, ptr %39, align 8, !tbaa !5
  %285 = add i64 %284, %283
  store i64 %285, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  br label %286

286:                                              ; preds = %282
  %287 = load ptr, ptr %35, align 8, !tbaa !9
  %288 = load ptr, ptr %11, align 8, !tbaa !9
  %289 = icmp ne ptr %287, %288
  br i1 %289, label %241, label %290, !llvm.loop !18

290:                                              ; preds = %286
  br label %291

291:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #5
  store i32 3, ptr %43, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #5
  store i32 4, ptr %44, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #5
  %292 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  store i32 %292, ptr %45, align 4, !tbaa !11
  %293 = load i32, ptr %45, align 4, !tbaa !11
  %294 = icmp sle i32 3, %293
  br i1 %294, label %295, label %318

295:                                              ; preds = %291
  br label %296

296:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #5
  %297 = load i32, ptr %45, align 4, !tbaa !11
  %298 = icmp slt i32 %297, 4
  br i1 %298, label %299, label %310

299:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #5
  store ptr @_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE, ptr %47, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #5
  %300 = load i32, ptr @_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE, align 4, !tbaa !11
  %301 = sub nsw i32 %300, 1
  store i32 %301, ptr %48, align 4, !tbaa !11
  %302 = load i32, ptr %48, align 4, !tbaa !11
  %303 = icmp slt i32 %302, 0
  br i1 %303, label %304, label %305

304:                                              ; preds = %299
  store i32 36, ptr %18, align 4
  br label %307

305:                                              ; preds = %299
  %306 = load i32, ptr %48, align 4, !tbaa !11
  store i32 %306, ptr @_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE, align 4, !tbaa !11
  store i32 3, ptr %46, align 4, !tbaa !11
  store i32 0, ptr %18, align 4
  br label %307

307:                                              ; preds = %305, %304
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #5
  %308 = load i32, ptr %18, align 4
  switch i32 %308, label %313 [
    i32 0, label %309
  ]

309:                                              ; preds = %307
  br label %311

310:                                              ; preds = %296
  store i32 4, ptr %46, align 4, !tbaa !11
  br label %311

311:                                              ; preds = %310, %309
  %312 = load i32, ptr %46, align 4, !tbaa !11
  call void @InteralLogWithoutArguments(i32 noundef %312, ptr noundef @_ZZ7SafeSumE13LOG__sMessage__11_)
  store i32 0, ptr %18, align 4
  br label %313

313:                                              ; preds = %311, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  %314 = load i32, ptr %18, align 4
  switch i32 %314, label %328 [
    i32 0, label %315
    i32 36, label %317
  ]

315:                                              ; preds = %313
  br label %316

316:                                              ; preds = %315
  br label %317

317:                                              ; preds = %316, %313
  br label %318

318:                                              ; preds = %317, %291
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %319

319:                                              ; preds = %318
  br label %320

320:                                              ; preds = %319
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %321

321:                                              ; preds = %320, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %322

322:                                              ; preds = %321, %215, %204, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %323

323:                                              ; preds = %322, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %324

324:                                              ; preds = %323, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %325

325:                                              ; preds = %324, %152, %141, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %326

326:                                              ; preds = %325, %125, %115, %114, %101, %91
  %327 = load i32, ptr %6, align 4
  ret i32 %327

328:                                              ; preds = %313, %76
  unreachable
}

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef, i64 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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

@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE = external hidden local_unnamed_addr global i32, align 4
@_ZZ7SafeSumE13LOG__sMessage = external hidden constant [80 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_0 = external hidden constant [28 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_1 = external hidden constant [29 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_2 = external hidden constant [39 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_3 = external hidden constant [51 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_4 = external hidden constant [37 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_5 = external hidden constant [49 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_6 = external hidden constant [54 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_7 = external hidden constant [53 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_8 = external hidden constant [36 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage_9 = external hidden constant [48 x i8], align 16
@_ZZ7SafeSumE13LOG__sMessage__10_ = external hidden constant [52 x i8], align 16
@_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE = external hidden local_unnamed_addr global i32, align 4
@_ZZ7SafeSumE13LOG__sMessage__11_ = external hidden constant [15 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -3, 1) i32 @SafeSum(i64 noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %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 = %5
  %9 = icmp eq i32 %6, 3
  br i1 %9, label %10, label %15

10:                                               ; preds = %8
  %11 = load i32, ptr @_ZN14NAMESPACE_MAINL23g_cLogEnterSafeSumCountE, 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_MAINL23g_cLogEnterSafeSumCountE, align 4, !tbaa !5
  br label %15

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

.critedge:                                        ; preds = %15, %10, %5
  %16 = icmp eq ptr %3, null
  br i1 %16, label %17, label %21

17:                                               ; preds = %.critedge
  %18 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %20, label %.critedge107

20:                                               ; preds = %17
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_0)
  br label %.critedge107

21:                                               ; preds = %.critedge
  %22 = icmp eq ptr %4, null
  br i1 %22, label %23, label %27

23:                                               ; preds = %21
  %24 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %.critedge107

26:                                               ; preds = %23
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_1)
  br label %.critedge107

27:                                               ; preds = %21
  %28 = icmp slt i64 %0, 1
  br i1 %28, label %29, label %35

29:                                               ; preds = %27
  %30 = icmp slt i64 %0, 0
  br i1 %30, label %31, label %.critedge107

31:                                               ; preds = %29
  %32 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %34, label %.critedge107

34:                                               ; preds = %31
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_2)
  br label %.critedge107

35:                                               ; preds = %27
  %36 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %0) #4
  br i1 %36, label %37, label %41

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

40:                                               ; preds = %37
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_3)
  br label %.critedge107

41:                                               ; preds = %35
  %42 = icmp slt i64 %2, 1
  br i1 %42, label %43, label %49

43:                                               ; preds = %41
  %44 = icmp slt i64 %2, 0
  br i1 %44, label %45, label %.critedge107

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

48:                                               ; preds = %45
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_4)
  br label %.critedge107

49:                                               ; preds = %41
  %50 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %2) #4
  br i1 %50, label %51, label %55

51:                                               ; preds = %49
  %52 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %54, label %.critedge107

54:                                               ; preds = %51
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_5)
  br label %.critedge107

55:                                               ; preds = %49
  %56 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef 8, i64 noundef %2) #4
  br i1 %56, label %57, label %61

57:                                               ; preds = %55
  %58 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %60, label %.critedge107

60:                                               ; preds = %57
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_6)
  br label %.critedge107

61:                                               ; preds = %55
  %62 = shl i64 %2, 3
  %63 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %62, i64 noundef %0) #4
  br i1 %63, label %64, label %68

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

67:                                               ; preds = %64
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_7)
  br label %.critedge107

68:                                               ; preds = %61
  %69 = mul i64 %62, %0
  %70 = icmp slt i64 %1, 2
  br i1 %70, label %71, label %80

71:                                               ; preds = %68
  %72 = icmp eq i64 %1, 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %71
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %4, ptr nonnull align 8 %3, i64 %69, i1 false)
  br label %.critedge107

74:                                               ; preds = %71
  %75 = icmp slt i64 %1, 0
  br i1 %75, label %76, label %.critedge107

76:                                               ; preds = %74
  %77 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %.critedge107

79:                                               ; preds = %76
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_8)
  br label %.critedge107

80:                                               ; preds = %68
  %81 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %1) #4
  br i1 %81, label %82, label %86

82:                                               ; preds = %80
  %83 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %85, label %.critedge107

85:                                               ; preds = %82
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage_9)
  br label %.critedge107

86:                                               ; preds = %80
  %87 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %69, i64 noundef %1) #4
  br i1 %87, label %88, label %92

88:                                               ; preds = %86
  %89 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %91, label %.critedge107

91:                                               ; preds = %88
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage__10_)
  br label %.critedge107

92:                                               ; preds = %86
  %93 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef nonnull %4, i64 noundef %69) #4
  %94 = mul i64 %62, %1
  %95 = sub i64 %94, %62
  br label %96

96:                                               ; preds = %111, %92
  %.085 = phi i64 [ 0, %92 ], [ %112, %111 ]
  %.077 = phi ptr [ %4, %92 ], [ %110, %111 ]
  %97 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef nonnull %.077, i64 noundef %62) #4
  br label %98

98:                                               ; preds = %108, %96
  %.186 = phi i64 [ %.085, %96 ], [ %109, %108 ]
  %.178 = phi ptr [ %.077, %96 ], [ %110, %108 ]
  %99 = add i64 %.186, %94
  %100 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef nonnull %3, i64 noundef %.186) #4
  %101 = load double, ptr %100, align 8, !tbaa !9
  %102 = add i64 %.186, %62
  br label %103

103:                                              ; preds = %103, %98
  %.088 = phi double [ %101, %98 ], [ %106, %103 ]
  %.287 = phi i64 [ %102, %98 ], [ %107, %103 ]
  %104 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef nonnull %3, i64 noundef %.287) #4
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = fadd double %.088, %105
  %107 = add i64 %.287, %62
  %.not = icmp eq i64 %99, %107
  br i1 %.not, label %108, label %103, !llvm.loop !11

108:                                              ; preds = %103
  %109 = add i64 %.186, 8
  store double %106, ptr %.178, align 8, !tbaa !9
  %110 = getelementptr inbounds i8, ptr %.178, i64 8
  %.not104 = icmp eq ptr %97, %110
  br i1 %.not104, label %111, label %98, !llvm.loop !13

111:                                              ; preds = %108
  %112 = add i64 %95, %109
  %.not105 = icmp eq ptr %93, %97
  br i1 %.not105, label %113, label %96, !llvm.loop !14

113:                                              ; preds = %111
  %114 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %115 = icmp sgt i32 %114, 2
  br i1 %115, label %116, label %.critedge107

116:                                              ; preds = %113
  %117 = icmp eq i32 %114, 3
  br i1 %117, label %118, label %123

118:                                              ; preds = %116
  %119 = load i32, ptr @_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE, align 4, !tbaa !5
  %120 = icmp sgt i32 %119, 0
  br i1 %120, label %121, label %.critedge107

121:                                              ; preds = %118
  %122 = add nsw i32 %119, -1
  store i32 %122, ptr @_ZN14NAMESPACE_MAINL22g_cLogExitSafeSumCountE, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %121, %116
  %.180 = phi i32 [ 3, %121 ], [ 4, %116 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.180, ptr noundef nonnull @_ZZ7SafeSumE13LOG__sMessage__11_)
  br label %.critedge107

.critedge107:                                     ; preds = %48, %45, %43, %54, %51, %67, %64, %91, %88, %123, %118, %113, %82, %85, %73, %74, %76, %79, %57, %60, %37, %40, %29, %31, %34, %23, %26, %17, %20
  %.5 = phi i32 [ -3, %20 ], [ -3, %17 ], [ -3, %26 ], [ -3, %23 ], [ -3, %34 ], [ -3, %31 ], [ 0, %29 ], [ -3, %40 ], [ -3, %37 ], [ -3, %48 ], [ -3, %45 ], [ 0, %43 ], [ -3, %54 ], [ -3, %51 ], [ -3, %60 ], [ -3, %57 ], [ -3, %67 ], [ -3, %64 ], [ -3, %79 ], [ -3, %76 ], [ 0, %74 ], [ 0, %73 ], [ -3, %85 ], [ -3, %82 ], [ -3, %91 ], [ -3, %88 ], [ 0, %123 ], [ 0, %118 ], [ 0, %113 ]
  ret i32 %.5
}

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

; 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 #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPT_S2_m(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIdEEPKT_S3_m(ptr noundef, i64 noundef) local_unnamed_addr #2

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


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass