; LLVM IR from sourceryinstitute/MORFEUS-Source :: src/FV/src/mesh_optimize/OptMS (SMinit)

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

%struct.__SMoptimal = type { i32, i32, i32, i32, i32, i32, i32, double, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, [3 x double], double, double, ptr, ptr, ptr, ptr, [3 x i32], i32 }

@.str.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 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: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @SMmallocOpt(i32 noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %9 = call noalias ptr @malloc(i64 noundef 200) #5
  %10 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %9, ptr %10, align 8, !tbaa !9
  %11 = load ptr, ptr %5, align 8, !tbaa !9
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %16

14:                                               ; preds = %2
  %15 = call i32 @SMerror(i32 noundef 76, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %15, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

16:                                               ; preds = %2
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = mul i64 8, %18
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.__SMoptimal, ptr %23, i32 0, i32 10
  store ptr null, ptr %24, align 8, !tbaa !11
  br label %41

25:                                               ; preds = %16
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = mul i64 8, %27
  %29 = call noalias ptr @malloc(i64 noundef %28) #5
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.__SMoptimal, ptr %31, i32 0, i32 10
  store ptr %29, ptr %32, align 8, !tbaa !11
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.__SMoptimal, ptr %34, i32 0, i32 10
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %40

38:                                               ; preds = %25
  %39 = call i32 @SMerror(i32 noundef 78, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %39, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

40:                                               ; preds = %25
  br label %41

41:                                               ; preds = %40, %21
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = mul i64 8, %43
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %46, label %50

46:                                               ; preds = %41
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.__SMoptimal, ptr %48, i32 0, i32 12
  store ptr null, ptr %49, align 8, !tbaa !14
  br label %66

50:                                               ; preds = %41
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = mul i64 8, %52
  %54 = call noalias ptr @malloc(i64 noundef %53) #5
  %55 = load ptr, ptr %5, align 8, !tbaa !9
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.__SMoptimal, ptr %56, i32 0, i32 12
  store ptr %54, ptr %57, align 8, !tbaa !14
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.__SMoptimal, ptr %59, i32 0, i32 12
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %65

63:                                               ; preds = %50
  %64 = call i32 @SMerror(i32 noundef 79, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %64, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

65:                                               ; preds = %50
  br label %66

66:                                               ; preds = %65, %46
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = mul i64 8, %68
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %71, label %75

71:                                               ; preds = %66
  %72 = load ptr, ptr %5, align 8, !tbaa !9
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.__SMoptimal, ptr %73, i32 0, i32 13
  store ptr null, ptr %74, align 8, !tbaa !15
  br label %91

75:                                               ; preds = %66
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = mul i64 8, %77
  %79 = call noalias ptr @malloc(i64 noundef %78) #5
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.__SMoptimal, ptr %81, i32 0, i32 13
  store ptr %79, ptr %82, align 8, !tbaa !15
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.__SMoptimal, ptr %84, i32 0, i32 13
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %90

88:                                               ; preds = %75
  %89 = call i32 @SMerror(i32 noundef 80, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %89, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

90:                                               ; preds = %75
  br label %91

91:                                               ; preds = %90, %71
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = mul i64 8, %93
  %95 = icmp eq i64 %94, 0
  br i1 %95, label %96, label %100

96:                                               ; preds = %91
  %97 = load ptr, ptr %5, align 8, !tbaa !9
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.__SMoptimal, ptr %98, i32 0, i32 11
  store ptr null, ptr %99, align 8, !tbaa !16
  br label %116

100:                                              ; preds = %91
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = mul i64 8, %102
  %104 = call noalias ptr @malloc(i64 noundef %103) #5
  %105 = load ptr, ptr %5, align 8, !tbaa !9
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.__SMoptimal, ptr %106, i32 0, i32 11
  store ptr %104, ptr %107, align 8, !tbaa !16
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.__SMoptimal, ptr %109, i32 0, i32 11
  %111 = load ptr, ptr %110, align 8, !tbaa !16
  %112 = icmp eq ptr %111, null
  br i1 %112, label %113, label %115

113:                                              ; preds = %100
  %114 = call i32 @SMerror(i32 noundef 81, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %114, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

115:                                              ; preds = %100
  br label %116

116:                                              ; preds = %115, %96
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = mul i64 8, %118
  %120 = icmp eq i64 %119, 0
  br i1 %120, label %121, label %125

121:                                              ; preds = %116
  %122 = load ptr, ptr %5, align 8, !tbaa !9
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.__SMoptimal, ptr %123, i32 0, i32 21
  store ptr null, ptr %124, align 8, !tbaa !17
  br label %141

125:                                              ; preds = %116
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = mul i64 8, %127
  %129 = call noalias ptr @malloc(i64 noundef %128) #5
  %130 = load ptr, ptr %5, align 8, !tbaa !9
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.__SMoptimal, ptr %131, i32 0, i32 21
  store ptr %129, ptr %132, align 8, !tbaa !17
  %133 = load ptr, ptr %5, align 8, !tbaa !9
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.__SMoptimal, ptr %134, i32 0, i32 21
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = icmp eq ptr %136, null
  br i1 %137, label %138, label %140

138:                                              ; preds = %125
  %139 = call i32 @SMerror(i32 noundef 82, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %139, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

140:                                              ; preds = %125
  br label %141

141:                                              ; preds = %140, %121
  %142 = call noalias ptr @malloc(i64 noundef 1200) #5
  %143 = load ptr, ptr %5, align 8, !tbaa !9
  %144 = load ptr, ptr %143, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.__SMoptimal, ptr %144, i32 0, i32 23
  store ptr %142, ptr %145, align 8, !tbaa !18
  %146 = load ptr, ptr %5, align 8, !tbaa !9
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.__SMoptimal, ptr %147, i32 0, i32 23
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = icmp eq ptr %149, null
  br i1 %150, label %151, label %153

151:                                              ; preds = %141
  %152 = call i32 @SMerror(i32 noundef 83, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %152, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

153:                                              ; preds = %141
  %154 = call noalias ptr @malloc(i64 noundef 24) #5
  %155 = load ptr, ptr %5, align 8, !tbaa !9
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.__SMoptimal, ptr %156, i32 0, i32 24
  store ptr %154, ptr %157, align 8, !tbaa !19
  %158 = load ptr, ptr %5, align 8, !tbaa !9
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.__SMoptimal, ptr %159, i32 0, i32 24
  %161 = load ptr, ptr %160, align 8, !tbaa !19
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %165

163:                                              ; preds = %153
  %164 = call i32 @SMerror(i32 noundef 84, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %164, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

165:                                              ; preds = %153
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %190, %165
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = icmp slt i32 %167, 3
  br i1 %168, label %169, label %193

169:                                              ; preds = %166
  %170 = call noalias ptr @malloc(i64 noundef 24) #5
  %171 = load ptr, ptr %5, align 8, !tbaa !9
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.__SMoptimal, ptr %172, i32 0, i32 24
  %174 = load ptr, ptr %173, align 8, !tbaa !19
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds ptr, ptr %174, i64 %176
  store ptr %170, ptr %177, align 8, !tbaa !9
  %178 = load ptr, ptr %5, align 8, !tbaa !9
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.__SMoptimal, ptr %179, i32 0, i32 24
  %181 = load ptr, ptr %180, align 8, !tbaa !19
  %182 = load i32, ptr %6, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds ptr, ptr %181, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  %186 = icmp eq ptr %185, null
  br i1 %186, label %187, label %189

187:                                              ; preds = %169
  %188 = call i32 @SMerror(i32 noundef 87, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %188, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

189:                                              ; preds = %169
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %6, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %6, align 4, !tbaa !5
  br label %166, !llvm.loop !20

193:                                              ; preds = %166
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %219, %193
  %195 = load i32, ptr %6, align 4, !tbaa !5
  %196 = load i32, ptr %4, align 4, !tbaa !5
  %197 = icmp slt i32 %195, %196
  br i1 %197, label %198, label %222

198:                                              ; preds = %194
  %199 = call noalias ptr @malloc(i64 noundef 24) #5
  %200 = load ptr, ptr %5, align 8, !tbaa !9
  %201 = load ptr, ptr %200, align 8, !tbaa !9
  %202 = getelementptr inbounds %struct.__SMoptimal, ptr %201, i32 0, i32 11
  %203 = load ptr, ptr %202, align 8, !tbaa !16
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds ptr, ptr %203, i64 %205
  store ptr %199, ptr %206, align 8, !tbaa !9
  %207 = load ptr, ptr %5, align 8, !tbaa !9
  %208 = load ptr, ptr %207, align 8, !tbaa !9
  %209 = getelementptr inbounds %struct.__SMoptimal, ptr %208, i32 0, i32 11
  %210 = load ptr, ptr %209, align 8, !tbaa !16
  %211 = load i32, ptr %6, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds ptr, ptr %210, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !9
  %215 = icmp eq ptr %214, null
  br i1 %215, label %216, label %218

216:                                              ; preds = %198
  %217 = call i32 @SMerror(i32 noundef 90, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %217, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

218:                                              ; preds = %198
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %6, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %6, align 4, !tbaa !5
  br label %194, !llvm.loop !22

222:                                              ; preds = %194
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %223

223:                                              ; preds = %247, %222
  %224 = load i32, ptr %6, align 4, !tbaa !5
  %225 = icmp slt i32 %224, 150
  br i1 %225, label %226, label %250

226:                                              ; preds = %223
  %227 = call noalias ptr @malloc(i64 noundef 1200) #5
  %228 = load ptr, ptr %5, align 8, !tbaa !9
  %229 = load ptr, ptr %228, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.__SMoptimal, ptr %229, i32 0, i32 23
  %231 = load ptr, ptr %230, align 8, !tbaa !18
  %232 = load i32, ptr %6, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds ptr, ptr %231, i64 %233
  store ptr %227, ptr %234, align 8, !tbaa !9
  %235 = load ptr, ptr %5, align 8, !tbaa !9
  %236 = load ptr, ptr %235, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.__SMoptimal, ptr %236, i32 0, i32 23
  %238 = load ptr, ptr %237, align 8, !tbaa !18
  %239 = load i32, ptr %6, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds ptr, ptr %238, i64 %240
  %242 = load ptr, ptr %241, align 8, !tbaa !9
  %243 = icmp eq ptr %242, null
  br i1 %243, label %244, label %246

244:                                              ; preds = %226
  %245 = call i32 @SMerror(i32 noundef 93, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %245, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

246:                                              ; preds = %226
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %6, align 4, !tbaa !5
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %6, align 4, !tbaa !5
  br label %223, !llvm.loop !23

250:                                              ; preds = %223
  %251 = call noalias ptr @malloc(i64 noundef 168) #5
  %252 = load ptr, ptr %5, align 8, !tbaa !9
  %253 = load ptr, ptr %252, align 8, !tbaa !9
  %254 = getelementptr inbounds %struct.__SMoptimal, ptr %253, i32 0, i32 22
  store ptr %251, ptr %254, align 8, !tbaa !24
  %255 = load ptr, ptr %5, align 8, !tbaa !9
  %256 = load ptr, ptr %255, align 8, !tbaa !9
  %257 = getelementptr inbounds %struct.__SMoptimal, ptr %256, i32 0, i32 22
  %258 = load ptr, ptr %257, align 8, !tbaa !24
  %259 = icmp eq ptr %258, null
  br i1 %259, label %260, label %262

260:                                              ; preds = %250
  %261 = call i32 @SMerror(i32 noundef 100, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %261, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

262:                                              ; preds = %250
  %263 = load i32, ptr %4, align 4, !tbaa !5
  %264 = load ptr, ptr %5, align 8, !tbaa !9
  %265 = load ptr, ptr %264, align 8, !tbaa !9
  %266 = getelementptr inbounds %struct.__SMoptimal, ptr %265, i32 0, i32 14
  %267 = call i32 @SMmallocActive(i32 noundef %263, ptr noundef %266)
  store i32 %267, ptr %7, align 4, !tbaa !5
  %268 = load i32, ptr %7, align 4, !tbaa !5
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %270, label %273

270:                                              ; preds = %262
  %271 = load i32, ptr %7, align 4, !tbaa !5
  %272 = call i32 @SMerror(i32 noundef 103, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %271, i32 noundef 0, ptr noundef null)
  store i32 %272, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

273:                                              ; preds = %262
  %274 = load i32, ptr %4, align 4, !tbaa !5
  %275 = load ptr, ptr %5, align 8, !tbaa !9
  %276 = load ptr, ptr %275, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.__SMoptimal, ptr %276, i32 0, i32 15
  %278 = call i32 @SMmallocActive(i32 noundef %274, ptr noundef %277)
  store i32 %278, ptr %7, align 4, !tbaa !5
  %279 = load i32, ptr %7, align 4, !tbaa !5
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %284

281:                                              ; preds = %273
  %282 = load i32, ptr %7, align 4, !tbaa !5
  %283 = call i32 @SMerror(i32 noundef 104, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %282, i32 noundef 0, ptr noundef null)
  store i32 %283, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

284:                                              ; preds = %273
  %285 = load i32, ptr %4, align 4, !tbaa !5
  %286 = load ptr, ptr %5, align 8, !tbaa !9
  %287 = load ptr, ptr %286, align 8, !tbaa !9
  %288 = getelementptr inbounds %struct.__SMoptimal, ptr %287, i32 0, i32 16
  %289 = call i32 @SMmallocActive(i32 noundef %285, ptr noundef %288)
  store i32 %289, ptr %7, align 4, !tbaa !5
  %290 = load i32, ptr %7, align 4, !tbaa !5
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %292, label %295

292:                                              ; preds = %284
  %293 = load i32, ptr %7, align 4, !tbaa !5
  %294 = call i32 @SMerror(i32 noundef 105, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %293, i32 noundef 0, ptr noundef null)
  store i32 %294, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

295:                                              ; preds = %284
  store i32 0, ptr %7, align 4, !tbaa !5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %296

296:                                              ; preds = %295, %292, %281, %270, %260, %244, %216, %187, %163, %151, %138, %113, %88, %63, %38, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %297 = load i32, ptr %3, align 4
  ret i32 %297
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMmallocActive(i32 noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"__SMoptimal", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !13, i64 32, !6, i64 40, !6, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !7, i64 112, !13, i64 136, !13, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !7, i64 184, !6, i64 196}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 64}
!15 = !{!12, !10, i64 72}
!16 = !{!12, !10, i64 56}
!17 = !{!12, !10, i64 152}
!18 = !{!12, !10, i64 168}
!19 = !{!12, !10, i64 176}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = !{!12, !10, i64 160}


; 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.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMmallocOpt(i32 noundef %0, ptr nocapture noundef %1) local_unnamed_addr #2 {
  %3 = tail call noalias dereferenceable_or_null(200) ptr @malloc(i64 noundef 200) #4
  store ptr %3, ptr %1, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %7

5:                                                ; preds = %2
  %6 = tail call i32 @SMerror(i32 noundef 76, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

7:                                                ; preds = %2
  %8 = sext i32 %0 to i64
  %9 = shl nsw i64 %8, 3
  %10 = icmp eq i32 %0, 0
  br i1 %10, label %35, label %11

11:                                               ; preds = %7
  %12 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %13 = getelementptr inbounds i8, ptr %3, i64 48
  store ptr %12, ptr %13, align 8, !tbaa !9
  %14 = icmp eq ptr %12, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %11
  %16 = tail call i32 @SMerror(i32 noundef 78, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

17:                                               ; preds = %11
  %18 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %19 = getelementptr inbounds i8, ptr %3, i64 64
  store ptr %18, ptr %19, align 8, !tbaa !13
  %20 = icmp eq ptr %18, null
  br i1 %20, label %21, label %23

21:                                               ; preds = %17
  %22 = tail call i32 @SMerror(i32 noundef 79, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

23:                                               ; preds = %17
  %24 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %25 = getelementptr inbounds i8, ptr %3, i64 72
  store ptr %24, ptr %25, align 8, !tbaa !14
  %26 = icmp eq ptr %24, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %23
  %28 = tail call i32 @SMerror(i32 noundef 80, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

29:                                               ; preds = %23
  %30 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %31 = getelementptr inbounds i8, ptr %3, i64 56
  store ptr %30, ptr %31, align 8, !tbaa !15
  %32 = icmp eq ptr %30, null
  br i1 %32, label %33, label %38

33:                                               ; preds = %29
  %34 = tail call i32 @SMerror(i32 noundef 81, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

35:                                               ; preds = %7
  %36 = getelementptr inbounds i8, ptr %3, i64 48
  %37 = getelementptr inbounds i8, ptr %3, i64 152
  store ptr null, ptr %37, align 8, !tbaa !16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %36, i8 0, i64 32, i1 false)
  br label %44

38:                                               ; preds = %29
  %39 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %40 = getelementptr inbounds i8, ptr %3, i64 152
  store ptr %39, ptr %40, align 8, !tbaa !16
  %41 = icmp eq ptr %39, null
  br i1 %41, label %42, label %44

42:                                               ; preds = %38
  %43 = tail call i32 @SMerror(i32 noundef 82, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

44:                                               ; preds = %38, %35
  %.pre = phi ptr [ %30, %38 ], [ null, %35 ]
  %45 = tail call noalias dereferenceable_or_null(1200) ptr @malloc(i64 noundef 1200) #4
  %46 = getelementptr inbounds i8, ptr %3, i64 168
  store ptr %45, ptr %46, align 8, !tbaa !17
  %47 = icmp eq ptr %45, null
  br i1 %47, label %48, label %50

48:                                               ; preds = %44
  %49 = tail call i32 @SMerror(i32 noundef 83, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

50:                                               ; preds = %44
  %51 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #4
  %52 = getelementptr inbounds i8, ptr %3, i64 176
  store ptr %51, ptr %52, align 8, !tbaa !18
  %53 = icmp eq ptr %51, null
  br i1 %53, label %56, label %.preheader79.preheader

.preheader79.preheader:                           ; preds = %50
  %54 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #4
  store ptr %54, ptr %51, align 8, !tbaa !5
  %55 = icmp eq ptr %54, null
  br i1 %55, label %65, label %.preheader79.1

56:                                               ; preds = %50
  %57 = tail call i32 @SMerror(i32 noundef 84, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

.preheader79.1:                                   ; preds = %.preheader79.preheader
  %58 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #4
  %59 = getelementptr inbounds i8, ptr %51, i64 8
  store ptr %58, ptr %59, align 8, !tbaa !5
  %60 = icmp eq ptr %58, null
  br i1 %60, label %65, label %.preheader79.2

.preheader79.2:                                   ; preds = %.preheader79.1
  %61 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #4
  %62 = getelementptr inbounds i8, ptr %51, i64 16
  store ptr %61, ptr %62, align 8, !tbaa !5
  %63 = icmp eq ptr %61, null
  br i1 %63, label %65, label %.preheader78

.preheader78:                                     ; preds = %.preheader79.2
  %64 = icmp sgt i32 %0, 0
  br i1 %64, label %.lr.ph.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.loopexit, %.preheader78
  %.ph = phi ptr [ %45, %.preheader78 ], [ %.pre90.pre, %.preheader.loopexit ]
  br label %.preheader

.lr.ph.preheader:                                 ; preds = %.preheader78
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

65:                                               ; preds = %.preheader79.2, %.preheader79.1, %.preheader79.preheader
  %66 = tail call i32 @SMerror(i32 noundef 87, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

67:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader.loopexit, label %.lr.ph, !llvm.loop !19

.preheader.loopexit:                              ; preds = %67
  %.phi.trans.insert89.phi.trans.insert = getelementptr inbounds i8, ptr %71, i64 168
  %.pre90.pre = load ptr, ptr %.phi.trans.insert89.phi.trans.insert, align 8, !tbaa !17
  br label %.preheader.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %67
  %68 = phi ptr [ %.pre, %.lr.ph.preheader ], [ %73, %67 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %67 ]
  %69 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #4
  %70 = getelementptr inbounds ptr, ptr %68, i64 %indvars.iv
  store ptr %69, ptr %70, align 8, !tbaa !5
  %71 = load ptr, ptr %1, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 56
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  %74 = getelementptr inbounds ptr, ptr %73, i64 %indvars.iv
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %67

77:                                               ; preds = %.lr.ph
  %78 = tail call i32 @SMerror(i32 noundef 90, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

79:                                               ; preds = %.preheader
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next86, 150
  br i1 %exitcond88.not, label %91, label %.preheader, !llvm.loop !21

.preheader:                                       ; preds = %.preheader.preheader, %79
  %80 = phi ptr [ %85, %79 ], [ %.ph, %.preheader.preheader ]
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %79 ], [ 0, %.preheader.preheader ]
  %81 = tail call noalias dereferenceable_or_null(1200) ptr @malloc(i64 noundef 1200) #4
  %82 = getelementptr inbounds ptr, ptr %80, i64 %indvars.iv85
  store ptr %81, ptr %82, align 8, !tbaa !5
  %83 = load ptr, ptr %1, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 168
  %85 = load ptr, ptr %84, align 8, !tbaa !17
  %86 = getelementptr inbounds ptr, ptr %85, i64 %indvars.iv85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = icmp eq ptr %87, null
  br i1 %88, label %89, label %79

89:                                               ; preds = %.preheader
  %90 = tail call i32 @SMerror(i32 noundef 93, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

91:                                               ; preds = %79
  %92 = tail call noalias dereferenceable_or_null(168) ptr @malloc(i64 noundef 168) #4
  %93 = getelementptr inbounds i8, ptr %83, i64 160
  store ptr %92, ptr %93, align 8, !tbaa !22
  %94 = load ptr, ptr %1, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 160
  %96 = load ptr, ptr %95, align 8, !tbaa !22
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %100

98:                                               ; preds = %91
  %99 = tail call i32 @SMerror(i32 noundef 100, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #5
  br label %117

100:                                              ; preds = %91
  %101 = getelementptr inbounds i8, ptr %94, i64 80
  %102 = tail call i32 @SMmallocActive(i32 noundef %0, ptr noundef nonnull %101)
  %.not = icmp eq i32 %102, 0
  br i1 %.not, label %105, label %103

103:                                              ; preds = %100
  %104 = tail call i32 @SMerror(i32 noundef 103, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %102, i32 noundef 0, ptr noundef null) #5
  br label %117

105:                                              ; preds = %100
  %106 = load ptr, ptr %1, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 88
  %108 = tail call i32 @SMmallocActive(i32 noundef %0, ptr noundef nonnull %107)
  %.not73 = icmp eq i32 %108, 0
  br i1 %.not73, label %111, label %109

109:                                              ; preds = %105
  %110 = tail call i32 @SMerror(i32 noundef 104, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %108, i32 noundef 0, ptr noundef null) #5
  br label %117

111:                                              ; preds = %105
  %112 = load ptr, ptr %1, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 96
  %114 = tail call i32 @SMmallocActive(i32 noundef %0, ptr noundef nonnull %113)
  %.not74 = icmp eq i32 %114, 0
  br i1 %.not74, label %117, label %115

115:                                              ; preds = %111
  %116 = tail call i32 @SMerror(i32 noundef 105, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %114, i32 noundef 0, ptr noundef null) #5
  br label %117

117:                                              ; preds = %111, %115, %109, %103, %98, %89, %77, %65, %56, %48, %42, %33, %27, %21, %15, %5
  %.064 = phi i32 [ %6, %5 ], [ %49, %48 ], [ %57, %56 ], [ %66, %65 ], [ %78, %77 ], [ %90, %89 ], [ %99, %98 ], [ %104, %103 ], [ %110, %109 ], [ %116, %115 ], [ %43, %42 ], [ %34, %33 ], [ %28, %27 ], [ %22, %21 ], [ %16, %15 ], [ 0, %111 ]
  ret i32 %.064
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMmallocActive(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind allocsize(0) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 48}
!10 = !{!"__SMoptimal", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !7, i64 112, !12, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !7, i64 184, !11, i64 196}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !6, i64 64}
!14 = !{!10, !6, i64 72}
!15 = !{!10, !6, i64 56}
!16 = !{!10, !6, i64 152}
!17 = !{!10, !6, i64 168}
!18 = !{!10, !6, i64 176}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!10, !6, i64 160}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass