; 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.__SMlocal_mesh = type { i32, i32, i32, [3 x double], [3 x double], [3 x double], ptr, ptr, ptr, i32, double, ptr, double, i32, i32, i32, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

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

15:                                               ; preds = %1
  %16 = call i32 @SMerror(i32 noundef 27, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %16, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

17:                                               ; preds = %1
  store i32 75, ptr %5, align 4, !tbaa !9
  store i32 150, ptr %6, align 4, !tbaa !9
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = mul nsw i32 %18, 6
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %22, i32 0, i32 9
  store i32 %20, ptr %23, align 8, !tbaa !11
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = mul i64 8, %25
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %32

28:                                               ; preds = %17
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %30, i32 0, i32 6
  store ptr null, ptr %31, align 8, !tbaa !14
  br label %48

32:                                               ; preds = %17
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = mul i64 8, %34
  %36 = call noalias ptr @malloc(i64 noundef %35) #5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %38, i32 0, i32 6
  store ptr %36, ptr %39, align 8, !tbaa !14
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %41, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %47

45:                                               ; preds = %32
  %46 = call i32 @SMerror(i32 noundef 36, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %46, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

47:                                               ; preds = %32
  br label %48

48:                                               ; preds = %47, %28
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = mul i64 8, %50
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %48
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %55, i32 0, i32 7
  store ptr null, ptr %56, align 8, !tbaa !15
  br label %73

57:                                               ; preds = %48
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = mul i64 8, %59
  %61 = call noalias ptr @malloc(i64 noundef %60) #5
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %63, i32 0, i32 7
  store ptr %61, ptr %64, align 8, !tbaa !15
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %66, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %72

70:                                               ; preds = %57
  %71 = call i32 @SMerror(i32 noundef 37, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %71, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

72:                                               ; preds = %57
  br label %73

73:                                               ; preds = %72, %53
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %99, %73
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = load i32, ptr %5, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %102

78:                                               ; preds = %74
  %79 = call noalias ptr @malloc(i64 noundef 24) #5
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %81, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = load i32, ptr %4, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  store ptr %79, ptr %86, align 8, !tbaa !5
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %88, i32 0, i32 6
  %90 = load ptr, ptr %89, align 8, !tbaa !14
  %91 = load i32, ptr %4, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %90, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = icmp eq ptr %94, null
  br i1 %95, label %96, label %98

96:                                               ; preds = %78
  %97 = call i32 @SMerror(i32 noundef 41, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %97, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

98:                                               ; preds = %78
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %4, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %4, align 4, !tbaa !9
  br label %74, !llvm.loop !16

102:                                              ; preds = %74
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %128, %102
  %104 = load i32, ptr %4, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %131

107:                                              ; preds = %103
  %108 = call noalias ptr @malloc(i64 noundef 12) #5
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %110, i32 0, i32 7
  %112 = load ptr, ptr %111, align 8, !tbaa !15
  %113 = load i32, ptr %4, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  store ptr %108, ptr %115, align 8, !tbaa !5
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %117, i32 0, i32 7
  %119 = load ptr, ptr %118, align 8, !tbaa !15
  %120 = load i32, ptr %4, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = icmp eq ptr %123, null
  br i1 %124, label %125, label %127

125:                                              ; preds = %107
  %126 = call i32 @SMerror(i32 noundef 45, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %126, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

127:                                              ; preds = %107
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %4, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %4, align 4, !tbaa !9
  br label %103, !llvm.loop !18

131:                                              ; preds = %103
  %132 = call noalias ptr @malloc(i64 noundef 24) #5
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %134, i32 0, i32 8
  store ptr %132, ptr %135, align 8, !tbaa !19
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %137, i32 0, i32 8
  %139 = load ptr, ptr %138, align 8, !tbaa !19
  %140 = icmp eq ptr %139, null
  br i1 %140, label %141, label %143

141:                                              ; preds = %131
  %142 = call i32 @SMerror(i32 noundef 48, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %142, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

143:                                              ; preds = %131
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = mul i64 8, %145
  %147 = icmp eq i64 %146, 0
  br i1 %147, label %148, label %152

148:                                              ; preds = %143
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %150, i32 0, i32 11
  store ptr null, ptr %151, align 8, !tbaa !20
  br label %168

152:                                              ; preds = %143
  %153 = load i32, ptr %7, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = mul i64 8, %154
  %156 = call noalias ptr @malloc(i64 noundef %155) #5
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %158, i32 0, i32 11
  store ptr %156, ptr %159, align 8, !tbaa !20
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %161, i32 0, i32 11
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  %164 = icmp eq ptr %163, null
  br i1 %164, label %165, label %167

165:                                              ; preds = %152
  %166 = call i32 @SMerror(i32 noundef 49, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null)
  store i32 %166, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

167:                                              ; preds = %152
  br label %168

168:                                              ; preds = %167, %148
  %169 = load i32, ptr %7, align 4, !tbaa !9
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %171, i32 0, i32 17
  %173 = call i32 @SMmallocLap(i32 noundef %169, ptr noundef %172)
  store i32 %173, ptr %8, align 4, !tbaa !9
  %174 = load i32, ptr %8, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %179

176:                                              ; preds = %168
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = call i32 @SMerror(i32 noundef 51, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %177, i32 noundef 0, ptr noundef null)
  store i32 %178, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

179:                                              ; preds = %168
  %180 = load i32, ptr %7, align 4, !tbaa !9
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %182, i32 0, i32 16
  %184 = call i32 @SMmallocOpt(i32 noundef %180, ptr noundef %183)
  store i32 %184, ptr %8, align 4, !tbaa !9
  %185 = load i32, ptr %8, align 4, !tbaa !9
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %190

187:                                              ; preds = %179
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = call i32 @SMerror(i32 noundef 52, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %188, i32 noundef 0, ptr noundef null)
  store i32 %189, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

190:                                              ; preds = %179
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %193, i32 0, i32 18
  %195 = call i32 @SMmallocLP(i32 noundef 5, i32 noundef %191, ptr noundef %194)
  store i32 %195, ptr %8, align 4, !tbaa !9
  %196 = load i32, ptr %8, align 4, !tbaa !9
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %201

198:                                              ; preds = %190
  %199 = load i32, ptr %8, align 4, !tbaa !9
  %200 = call i32 @SMerror(i32 noundef 53, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %199, i32 noundef 0, ptr noundef null)
  store i32 %200, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

201:                                              ; preds = %190
  %202 = load i32, ptr %7, align 4, !tbaa !9
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %204, i32 0, i32 17
  %206 = load ptr, ptr %205, align 8, !tbaa !21
  %207 = call i32 @SMinitLap(i32 noundef %202, ptr noundef %206)
  store i32 %207, ptr %8, align 4, !tbaa !9
  %208 = load i32, ptr %8, align 4, !tbaa !9
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %213

210:                                              ; preds = %201
  %211 = load i32, ptr %8, align 4, !tbaa !9
  %212 = call i32 @SMerror(i32 noundef 54, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %211, i32 noundef 0, ptr noundef null)
  store i32 %212, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

213:                                              ; preds = %201
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %216, i32 0, i32 16
  %218 = load ptr, ptr %217, align 8, !tbaa !22
  %219 = call i32 @SMinitOpt(i32 noundef %214, ptr noundef %218)
  store i32 %219, ptr %8, align 4, !tbaa !9
  %220 = load i32, ptr %8, align 4, !tbaa !9
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %222, label %225

222:                                              ; preds = %213
  %223 = load i32, ptr %8, align 4, !tbaa !9
  %224 = call i32 @SMerror(i32 noundef 55, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %223, i32 noundef 0, ptr noundef null)
  store i32 %224, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

225:                                              ; preds = %213
  store i32 0, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %226

226:                                              ; preds = %225, %222, %210, %198, %187, %176, %165, %141, %125, %96, %70, %45, %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %227 = load i32, ptr %2, align 4
  ret i32 %227
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 112}
!12 = !{!"__SMlocal_mesh", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !13, i64 120, !6, i64 128, !13, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 88}
!15 = !{!12, !6, i64 96}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!12, !6, i64 104}
!20 = !{!12, !6, i64 128}
!21 = !{!12, !6, i64 168}
!22 = !{!12, !6, 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 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %2, i64 112
  store i32 900, ptr %7, align 8, !tbaa !9
  %8 = tail call noalias dereferenceable_or_null(600) ptr @malloc(i64 noundef 600) #3
  %9 = getelementptr inbounds i8, ptr %2, i64 88
  store ptr %8, ptr %9, align 8, !tbaa !13
  %10 = icmp eq ptr %8, null
  br i1 %10, label %11, label %13

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

13:                                               ; preds = %6
  %14 = tail call noalias dereferenceable_or_null(1200) ptr @malloc(i64 noundef 1200) #3
  %15 = getelementptr inbounds i8, ptr %2, i64 96
  store ptr %14, ptr %15, align 8, !tbaa !14
  %16 = icmp eq ptr %14, null
  br i1 %16, label %17, label %.preheader67

17:                                               ; preds = %13
  %18 = tail call i32 @SMerror(i32 noundef 37, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #4
  br label %92

19:                                               ; preds = %.preheader67
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 75
  br i1 %exitcond.not, label %.preheader.preheader, label %.preheader67, !llvm.loop !15

.preheader.preheader:                             ; preds = %19
  %.phi.trans.insert = getelementptr inbounds i8, ptr %23, i64 96
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  br label %.preheader

.preheader67:                                     ; preds = %13, %19
  %20 = phi ptr [ %25, %19 ], [ %8, %13 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 0, %13 ]
  %21 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #3
  %22 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv
  store ptr %21, ptr %22, align 8, !tbaa !5
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 88
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %19

29:                                               ; preds = %.preheader67
  %30 = tail call i32 @SMerror(i32 noundef 41, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #4
  br label %92

31:                                               ; preds = %.preheader
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next72, 150
  br i1 %exitcond74.not, label %43, label %.preheader, !llvm.loop !17

.preheader:                                       ; preds = %.preheader.preheader, %31
  %32 = phi ptr [ %.pre, %.preheader.preheader ], [ %37, %31 ]
  %indvars.iv71 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next72, %31 ]
  %33 = tail call noalias dereferenceable_or_null(12) ptr @malloc(i64 noundef 12) #3
  %34 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv71
  store ptr %33, ptr %34, align 8, !tbaa !5
  %35 = load ptr, ptr %0, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 96
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv71
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %31

41:                                               ; preds = %.preheader
  %42 = tail call i32 @SMerror(i32 noundef 45, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #4
  br label %92

43:                                               ; preds = %31
  %44 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #3
  %45 = getelementptr inbounds i8, ptr %35, i64 104
  store ptr %44, ptr %45, align 8, !tbaa !18
  %46 = load ptr, ptr %0, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 104
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %43
  %51 = tail call i32 @SMerror(i32 noundef 48, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #4
  br label %92

52:                                               ; preds = %43
  %53 = tail call noalias dereferenceable_or_null(7200) ptr @malloc(i64 noundef 7200) #3
  %54 = getelementptr inbounds i8, ptr %46, i64 128
  store ptr %53, ptr %54, align 8, !tbaa !19
  %55 = load ptr, ptr %0, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 128
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %61

59:                                               ; preds = %52
  %60 = tail call i32 @SMerror(i32 noundef 49, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 55, i32 noundef 0, ptr noundef null) #4
  br label %92

61:                                               ; preds = %52
  %62 = getelementptr inbounds i8, ptr %55, i64 168
  %63 = tail call i32 @SMmallocLap(i32 noundef 900, ptr noundef nonnull %62)
  %.not = icmp eq i32 %63, 0
  br i1 %.not, label %66, label %64

64:                                               ; preds = %61
  %65 = tail call i32 @SMerror(i32 noundef 51, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %63, i32 noundef 0, ptr noundef null) #4
  br label %92

66:                                               ; preds = %61
  %67 = load ptr, ptr %0, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 160
  %69 = tail call i32 @SMmallocOpt(i32 noundef 900, ptr noundef nonnull %68)
  %.not63 = icmp eq i32 %69, 0
  br i1 %.not63, label %72, label %70

70:                                               ; preds = %66
  %71 = tail call i32 @SMerror(i32 noundef 52, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %69, i32 noundef 0, ptr noundef null) #4
  br label %92

72:                                               ; preds = %66
  %73 = load ptr, ptr %0, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 176
  %75 = tail call i32 @SMmallocLP(i32 noundef 5, i32 noundef 150, ptr noundef nonnull %74)
  %.not64 = icmp eq i32 %75, 0
  br i1 %.not64, label %78, label %76

76:                                               ; preds = %72
  %77 = tail call i32 @SMerror(i32 noundef 53, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %75, i32 noundef 0, ptr noundef null) #4
  br label %92

78:                                               ; preds = %72
  %79 = load ptr, ptr %0, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 168
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  %82 = tail call i32 @SMinitLap(i32 noundef 900, ptr noundef %81)
  %.not65 = icmp eq i32 %82, 0
  br i1 %.not65, label %85, label %83

83:                                               ; preds = %78
  %84 = tail call i32 @SMerror(i32 noundef 54, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %82, i32 noundef 0, ptr noundef null) #4
  br label %92

85:                                               ; preds = %78
  %86 = load ptr, ptr %0, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 160
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = tail call i32 @SMinitOpt(i32 noundef 900, ptr noundef %88)
  %.not66 = icmp eq i32 %89, 0
  br i1 %.not66, label %92, label %90

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

92:                                               ; preds = %85, %90, %83, %76, %70, %64, %59, %50, %41, %29, %17, %11, %4
  %.0 = phi i32 [ %5, %4 ], [ %30, %29 ], [ %42, %41 ], [ %51, %50 ], [ %65, %64 ], [ %71, %70 ], [ %77, %76 ], [ %84, %83 ], [ %91, %90 ], [ %60, %59 ], [ %18, %17 ], [ %12, %11 ], [ 0, %85 ]
  ret i32 %.0
}

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #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 allocsize(0) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 112}
!10 = !{!"__SMlocal_mesh", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !12, i64 120, !6, i64 128, !12, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !6, i64 88}
!14 = !{!10, !6, i64 96}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!10, !6, i64 104}
!19 = !{!10, !6, i64 128}
!20 = !{!10, !6, i64 168}
!21 = !{!10, !6, i64 160}


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