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

; 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 }
%struct.__SMlap_info = type { double, ptr, double, i32, i32 }
%struct.__SMparam = type { i32, i32, i32, double, double, double, double, i32, i32, i32, double, double, ptr, ptr, ptr, ptr }

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

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

21:                                               ; preds = %3
  %22 = call i32 @SMerror(i32 noundef 32, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %22, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

23:                                               ; preds = %3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call i32 @SMerror(i32 noundef 33, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %27, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

28:                                               ; preds = %23
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = call i32 @SMerror(i32 noundef 34, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %32, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

33:                                               ; preds = %28
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %34, i32 0, i32 13
  store i32 1, ptr %35, align 8, !tbaa !11
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %36, i32 0, i32 9
  %38 = load i32, ptr %37, align 8, !tbaa !14
  store i32 %38, ptr %11, align 4, !tbaa !9
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %39, i32 0, i32 9
  %41 = load i32, ptr %40, align 8, !tbaa !14
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %42, i32 0, i32 17
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = call i32 @SMinitLap(i32 noundef %41, ptr noundef %44)
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %51

48:                                               ; preds = %33
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = call i32 @SMerror(i32 noundef 40, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %49, i32 noundef 0, ptr noundef null)
  store i32 %50, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

51:                                               ; preds = %33
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %55, i32 0, i32 6
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %58, i32 0, i32 5
  %60 = getelementptr inbounds [3 x double], ptr %59, i64 0, i64 0
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !18
  %64 = call i32 @SMcentroidSmoothMesh(i32 noundef %54, ptr noundef %57, ptr noundef %60, i32 noundef %63)
  store i32 %64, ptr %8, align 4, !tbaa !9
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %51
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = call i32 @SMerror(i32 noundef 44, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %68, i32 noundef 0, ptr noundef null)
  store i32 %69, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

70:                                               ; preds = %51
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call i32 @SMvalidMesh(ptr noundef %71, ptr noundef %10)
  store i32 %72, ptr %8, align 4, !tbaa !9
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %78

75:                                               ; preds = %70
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = call i32 @SMerror(i32 noundef 47, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %76, i32 noundef 0, ptr noundef null)
  store i32 %77, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

78:                                               ; preds = %70
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %179, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %82, i32 0, i32 15
  %84 = load i32, ptr %83, align 8, !tbaa !19
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %179

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !18
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %91, label %108

91:                                               ; preds = %86
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %92, i32 0, i32 8
  %94 = load ptr, ptr %93, align 8, !tbaa !20
  %95 = getelementptr inbounds double, ptr %94, i64 0
  %96 = load double, ptr %95, align 8, !tbaa !21
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %97, i32 0, i32 5
  %99 = getelementptr inbounds [3 x double], ptr %98, i64 0, i64 0
  store double %96, ptr %99, align 8, !tbaa !21
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %100, i32 0, i32 8
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = getelementptr inbounds double, ptr %102, i64 1
  %104 = load double, ptr %103, align 8, !tbaa !21
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %105, i32 0, i32 5
  %107 = getelementptr inbounds [3 x double], ptr %106, i64 0, i64 1
  store double %104, ptr %107, align 8, !tbaa !21
  br label %163

108:                                              ; preds = %86
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !18
  %112 = icmp eq i32 %111, 3
  br i1 %112, label %113, label %138

113:                                              ; preds = %108
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %114, i32 0, i32 8
  %116 = load ptr, ptr %115, align 8, !tbaa !20
  %117 = getelementptr inbounds double, ptr %116, i64 0
  %118 = load double, ptr %117, align 8, !tbaa !21
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %119, i32 0, i32 5
  %121 = getelementptr inbounds [3 x double], ptr %120, i64 0, i64 0
  store double %118, ptr %121, align 8, !tbaa !21
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %122, i32 0, i32 8
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = getelementptr inbounds double, ptr %124, i64 1
  %126 = load double, ptr %125, align 8, !tbaa !21
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %127, i32 0, i32 5
  %129 = getelementptr inbounds [3 x double], ptr %128, i64 0, i64 1
  store double %126, ptr %129, align 8, !tbaa !21
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %130, i32 0, i32 8
  %132 = load ptr, ptr %131, align 8, !tbaa !20
  %133 = getelementptr inbounds double, ptr %132, i64 2
  %134 = load double, ptr %133, align 8, !tbaa !21
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %135, i32 0, i32 5
  %137 = getelementptr inbounds [3 x double], ptr %136, i64 0, i64 2
  store double %134, ptr %137, align 8, !tbaa !21
  br label %162

138:                                              ; preds = %108
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %158, %138
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !18
  %144 = icmp slt i32 %140, %143
  br i1 %144, label %145, label %161

145:                                              ; preds = %139
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %146, i32 0, i32 8
  %148 = load ptr, ptr %147, align 8, !tbaa !20
  %149 = load i32, ptr %16, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !21
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %153, i32 0, i32 5
  %155 = load i32, ptr %16, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [3 x double], ptr %154, i64 0, i64 %156
  store double %152, ptr %157, align 8, !tbaa !21
  br label %158

158:                                              ; preds = %145
  %159 = load i32, ptr %16, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %16, align 4, !tbaa !9
  br label %139, !llvm.loop !22

161:                                              ; preds = %139
  br label %162

162:                                              ; preds = %161, %113
  br label %163

163:                                              ; preds = %162, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %164, i32 0, i32 17
  %166 = load ptr, ptr %165, align 8, !tbaa !15
  %167 = getelementptr inbounds %struct.__SMlap_info, ptr %166, i32 0, i32 3
  store i32 1, ptr %167, align 8, !tbaa !24
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %168, i32 0, i32 17
  %170 = load ptr, ptr %169, align 8, !tbaa !15
  %171 = getelementptr inbounds %struct.__SMlap_info, ptr %170, i32 0, i32 4
  store i32 0, ptr %171, align 4, !tbaa !26
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %172, i32 0, i32 10
  %174 = load double, ptr %173, align 8, !tbaa !27
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %175, i32 0, i32 17
  %177 = load ptr, ptr %176, align 8, !tbaa !15
  %178 = getelementptr inbounds %struct.__SMlap_info, ptr %177, i32 0, i32 0
  store double %174, ptr %178, align 8, !tbaa !28
  br label %445

179:                                              ; preds = %81, %78
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %182, i32 0, i32 17
  %184 = load ptr, ptr %183, align 8, !tbaa !15
  %185 = getelementptr inbounds %struct.__SMlap_info, ptr %184, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !29
  %187 = call i32 @SMcomputeFunction(ptr noundef %180, ptr noundef %181, ptr noundef %186)
  store i32 %187, ptr %8, align 4, !tbaa !9
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %193

190:                                              ; preds = %179
  %191 = load i32, ptr %8, align 4, !tbaa !9
  %192 = call i32 @SMerror(i32 noundef 61, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %191, i32 noundef 0, ptr noundef null)
  store i32 %192, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

193:                                              ; preds = %179
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %194, i32 0, i32 17
  %196 = load ptr, ptr %195, align 8, !tbaa !15
  %197 = getelementptr inbounds %struct.__SMlap_info, ptr %196, i32 0, i32 1
  %198 = load ptr, ptr %197, align 8, !tbaa !29
  store ptr %198, ptr %14, align 8, !tbaa !5
  store double 1.000000e+300, ptr %12, align 8, !tbaa !21
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %221, %193
  %200 = load i32, ptr %9, align 4, !tbaa !9
  %201 = load i32, ptr %11, align 4, !tbaa !9
  %202 = icmp slt i32 %200, %201
  br i1 %202, label %203, label %224

203:                                              ; preds = %199
  %204 = load ptr, ptr %14, align 8, !tbaa !5
  %205 = load i32, ptr %9, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds double, ptr %204, i64 %206
  %208 = load double, ptr %207, align 8, !tbaa !21
  %209 = load double, ptr %12, align 8, !tbaa !21
  %210 = fcmp olt double %208, %209
  br i1 %210, label %211, label %217

211:                                              ; preds = %203
  %212 = load ptr, ptr %14, align 8, !tbaa !5
  %213 = load i32, ptr %9, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds double, ptr %212, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !21
  br label %219

217:                                              ; preds = %203
  %218 = load double, ptr %12, align 8, !tbaa !21
  br label %219

219:                                              ; preds = %217, %211
  %220 = phi double [ %216, %211 ], [ %218, %217 ]
  store double %220, ptr %12, align 8, !tbaa !21
  br label %221

221:                                              ; preds = %219
  %222 = load i32, ptr %9, align 4, !tbaa !9
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %9, align 4, !tbaa !9
  br label %199, !llvm.loop !30

224:                                              ; preds = %199
  %225 = load double, ptr %12, align 8, !tbaa !21
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %226, i32 0, i32 10
  %228 = load double, ptr %227, align 8, !tbaa !27
  %229 = fsub double %225, %228
  store double %229, ptr %13, align 8, !tbaa !21
  %230 = load double, ptr %13, align 8, !tbaa !21
  %231 = fcmp ogt double %230, 0.000000e+00
  br i1 %231, label %232, label %260

232:                                              ; preds = %224
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %233, i32 0, i32 17
  %235 = load ptr, ptr %234, align 8, !tbaa !15
  %236 = getelementptr inbounds %struct.__SMlap_info, ptr %235, i32 0, i32 4
  store i32 1, ptr %236, align 4, !tbaa !26
  %237 = load i32, ptr %10, align 4, !tbaa !9
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %239, label %242

239:                                              ; preds = %232
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %240, i32 0, i32 15
  store i32 1, ptr %241, align 8, !tbaa !19
  br label %242

242:                                              ; preds = %239, %232
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.__SMparam, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 8, !tbaa !31
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %244, align 8, !tbaa !31
  %247 = load double, ptr %13, align 8, !tbaa !21
  %248 = load ptr, ptr %5, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %248, i32 0, i32 17
  %250 = load ptr, ptr %249, align 8, !tbaa !15
  %251 = getelementptr inbounds %struct.__SMlap_info, ptr %250, i32 0, i32 2
  store double %247, ptr %251, align 8, !tbaa !33
  %252 = load double, ptr %12, align 8, !tbaa !21
  %253 = load ptr, ptr %5, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %253, i32 0, i32 17
  %255 = load ptr, ptr %254, align 8, !tbaa !15
  %256 = getelementptr inbounds %struct.__SMlap_info, ptr %255, i32 0, i32 0
  store double %252, ptr %256, align 8, !tbaa !28
  %257 = load double, ptr %12, align 8, !tbaa !21
  %258 = load ptr, ptr %5, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %258, i32 0, i32 12
  store double %257, ptr %259, align 8, !tbaa !34
  br label %444

260:                                              ; preds = %224
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %261, i32 0, i32 17
  %263 = load ptr, ptr %262, align 8, !tbaa !15
  %264 = getelementptr inbounds %struct.__SMlap_info, ptr %263, i32 0, i32 4
  store i32 0, ptr %264, align 4, !tbaa !26
  %265 = load ptr, ptr %5, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %265, i32 0, i32 10
  %267 = load double, ptr %266, align 8, !tbaa !27
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %268, i32 0, i32 17
  %270 = load ptr, ptr %269, align 8, !tbaa !15
  %271 = getelementptr inbounds %struct.__SMlap_info, ptr %270, i32 0, i32 0
  store double %267, ptr %271, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %272, i32 0, i32 9
  %274 = load i32, ptr %273, align 8, !tbaa !14
  %275 = icmp eq i32 %274, 2
  br i1 %275, label %276, label %299

276:                                              ; preds = %260
  %277 = load ptr, ptr %5, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %277, i32 0, i32 11
  %279 = load ptr, ptr %278, align 8, !tbaa !35
  %280 = getelementptr inbounds double, ptr %279, i64 0
  %281 = load double, ptr %280, align 8, !tbaa !21
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %282, i32 0, i32 17
  %284 = load ptr, ptr %283, align 8, !tbaa !15
  %285 = getelementptr inbounds %struct.__SMlap_info, ptr %284, i32 0, i32 1
  %286 = load ptr, ptr %285, align 8, !tbaa !29
  %287 = getelementptr inbounds double, ptr %286, i64 0
  store double %281, ptr %287, align 8, !tbaa !21
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %288, i32 0, i32 11
  %290 = load ptr, ptr %289, align 8, !tbaa !35
  %291 = getelementptr inbounds double, ptr %290, i64 1
  %292 = load double, ptr %291, align 8, !tbaa !21
  %293 = load ptr, ptr %5, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %293, i32 0, i32 17
  %295 = load ptr, ptr %294, align 8, !tbaa !15
  %296 = getelementptr inbounds %struct.__SMlap_info, ptr %295, i32 0, i32 1
  %297 = load ptr, ptr %296, align 8, !tbaa !29
  %298 = getelementptr inbounds double, ptr %297, i64 1
  store double %292, ptr %298, align 8, !tbaa !21
  br label %366

299:                                              ; preds = %260
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %300, i32 0, i32 9
  %302 = load i32, ptr %301, align 8, !tbaa !14
  %303 = icmp eq i32 %302, 3
  br i1 %303, label %304, label %338

304:                                              ; preds = %299
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %305, i32 0, i32 11
  %307 = load ptr, ptr %306, align 8, !tbaa !35
  %308 = getelementptr inbounds double, ptr %307, i64 0
  %309 = load double, ptr %308, align 8, !tbaa !21
  %310 = load ptr, ptr %5, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %310, i32 0, i32 17
  %312 = load ptr, ptr %311, align 8, !tbaa !15
  %313 = getelementptr inbounds %struct.__SMlap_info, ptr %312, i32 0, i32 1
  %314 = load ptr, ptr %313, align 8, !tbaa !29
  %315 = getelementptr inbounds double, ptr %314, i64 0
  store double %309, ptr %315, align 8, !tbaa !21
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %316, i32 0, i32 11
  %318 = load ptr, ptr %317, align 8, !tbaa !35
  %319 = getelementptr inbounds double, ptr %318, i64 1
  %320 = load double, ptr %319, align 8, !tbaa !21
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %321, i32 0, i32 17
  %323 = load ptr, ptr %322, align 8, !tbaa !15
  %324 = getelementptr inbounds %struct.__SMlap_info, ptr %323, i32 0, i32 1
  %325 = load ptr, ptr %324, align 8, !tbaa !29
  %326 = getelementptr inbounds double, ptr %325, i64 1
  store double %320, ptr %326, align 8, !tbaa !21
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %327, i32 0, i32 11
  %329 = load ptr, ptr %328, align 8, !tbaa !35
  %330 = getelementptr inbounds double, ptr %329, i64 2
  %331 = load double, ptr %330, align 8, !tbaa !21
  %332 = load ptr, ptr %5, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %332, i32 0, i32 17
  %334 = load ptr, ptr %333, align 8, !tbaa !15
  %335 = getelementptr inbounds %struct.__SMlap_info, ptr %334, i32 0, i32 1
  %336 = load ptr, ptr %335, align 8, !tbaa !29
  %337 = getelementptr inbounds double, ptr %336, i64 2
  store double %331, ptr %337, align 8, !tbaa !21
  br label %365

338:                                              ; preds = %299
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %339

339:                                              ; preds = %361, %338
  %340 = load i32, ptr %17, align 4, !tbaa !9
  %341 = load ptr, ptr %5, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %341, i32 0, i32 9
  %343 = load i32, ptr %342, align 8, !tbaa !14
  %344 = icmp slt i32 %340, %343
  br i1 %344, label %345, label %364

345:                                              ; preds = %339
  %346 = load ptr, ptr %5, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %346, i32 0, i32 11
  %348 = load ptr, ptr %347, align 8, !tbaa !35
  %349 = load i32, ptr %17, align 4, !tbaa !9
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds double, ptr %348, i64 %350
  %352 = load double, ptr %351, align 8, !tbaa !21
  %353 = load ptr, ptr %5, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %353, i32 0, i32 17
  %355 = load ptr, ptr %354, align 8, !tbaa !15
  %356 = getelementptr inbounds %struct.__SMlap_info, ptr %355, i32 0, i32 1
  %357 = load ptr, ptr %356, align 8, !tbaa !29
  %358 = load i32, ptr %17, align 4, !tbaa !9
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds double, ptr %357, i64 %359
  store double %352, ptr %360, align 8, !tbaa !21
  br label %361

361:                                              ; preds = %345
  %362 = load i32, ptr %17, align 4, !tbaa !9
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %17, align 4, !tbaa !9
  br label %339, !llvm.loop !36

364:                                              ; preds = %339
  br label %365

365:                                              ; preds = %364, %304
  br label %366

366:                                              ; preds = %365, %276
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %367 = load ptr, ptr %5, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %367, i32 0, i32 0
  %369 = load i32, ptr %368, align 8, !tbaa !18
  %370 = icmp eq i32 %369, 2
  br i1 %370, label %371, label %388

371:                                              ; preds = %366
  %372 = load ptr, ptr %5, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %372, i32 0, i32 8
  %374 = load ptr, ptr %373, align 8, !tbaa !20
  %375 = getelementptr inbounds double, ptr %374, i64 0
  %376 = load double, ptr %375, align 8, !tbaa !21
  %377 = load ptr, ptr %5, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %377, i32 0, i32 5
  %379 = getelementptr inbounds [3 x double], ptr %378, i64 0, i64 0
  store double %376, ptr %379, align 8, !tbaa !21
  %380 = load ptr, ptr %5, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %380, i32 0, i32 8
  %382 = load ptr, ptr %381, align 8, !tbaa !20
  %383 = getelementptr inbounds double, ptr %382, i64 1
  %384 = load double, ptr %383, align 8, !tbaa !21
  %385 = load ptr, ptr %5, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %385, i32 0, i32 5
  %387 = getelementptr inbounds [3 x double], ptr %386, i64 0, i64 1
  store double %384, ptr %387, align 8, !tbaa !21
  br label %443

388:                                              ; preds = %366
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %389, i32 0, i32 0
  %391 = load i32, ptr %390, align 8, !tbaa !18
  %392 = icmp eq i32 %391, 3
  br i1 %392, label %393, label %418

393:                                              ; preds = %388
  %394 = load ptr, ptr %5, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %394, i32 0, i32 8
  %396 = load ptr, ptr %395, align 8, !tbaa !20
  %397 = getelementptr inbounds double, ptr %396, i64 0
  %398 = load double, ptr %397, align 8, !tbaa !21
  %399 = load ptr, ptr %5, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %399, i32 0, i32 5
  %401 = getelementptr inbounds [3 x double], ptr %400, i64 0, i64 0
  store double %398, ptr %401, align 8, !tbaa !21
  %402 = load ptr, ptr %5, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %402, i32 0, i32 8
  %404 = load ptr, ptr %403, align 8, !tbaa !20
  %405 = getelementptr inbounds double, ptr %404, i64 1
  %406 = load double, ptr %405, align 8, !tbaa !21
  %407 = load ptr, ptr %5, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %407, i32 0, i32 5
  %409 = getelementptr inbounds [3 x double], ptr %408, i64 0, i64 1
  store double %406, ptr %409, align 8, !tbaa !21
  %410 = load ptr, ptr %5, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %410, i32 0, i32 8
  %412 = load ptr, ptr %411, align 8, !tbaa !20
  %413 = getelementptr inbounds double, ptr %412, i64 2
  %414 = load double, ptr %413, align 8, !tbaa !21
  %415 = load ptr, ptr %5, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %415, i32 0, i32 5
  %417 = getelementptr inbounds [3 x double], ptr %416, i64 0, i64 2
  store double %414, ptr %417, align 8, !tbaa !21
  br label %442

418:                                              ; preds = %388
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %419

419:                                              ; preds = %438, %418
  %420 = load i32, ptr %18, align 4, !tbaa !9
  %421 = load ptr, ptr %5, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %421, i32 0, i32 0
  %423 = load i32, ptr %422, align 8, !tbaa !18
  %424 = icmp slt i32 %420, %423
  br i1 %424, label %425, label %441

425:                                              ; preds = %419
  %426 = load ptr, ptr %5, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %426, i32 0, i32 8
  %428 = load ptr, ptr %427, align 8, !tbaa !20
  %429 = load i32, ptr %18, align 4, !tbaa !9
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds double, ptr %428, i64 %430
  %432 = load double, ptr %431, align 8, !tbaa !21
  %433 = load ptr, ptr %5, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %433, i32 0, i32 5
  %435 = load i32, ptr %18, align 4, !tbaa !9
  %436 = sext i32 %435 to i64
  %437 = getelementptr inbounds [3 x double], ptr %434, i64 0, i64 %436
  store double %432, ptr %437, align 8, !tbaa !21
  br label %438

438:                                              ; preds = %425
  %439 = load i32, ptr %18, align 4, !tbaa !9
  %440 = add nsw i32 %439, 1
  store i32 %440, ptr %18, align 4, !tbaa !9
  br label %419, !llvm.loop !37

441:                                              ; preds = %419
  br label %442

442:                                              ; preds = %441, %393
  br label %443

443:                                              ; preds = %442, %371
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %444

444:                                              ; preds = %443, %242
  br label %445

445:                                              ; preds = %444, %163
  store i32 0, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %446

446:                                              ; preds = %445, %190, %75, %67, %48, %31, %26, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %447 = load i32, ptr %4, align 4
  ret i32 %447
}

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

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

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

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

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

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

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

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 = { "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 }

!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 144}
!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, !10, i64 112}
!15 = !{!12, !6, i64 168}
!16 = !{!12, !10, i64 4}
!17 = !{!12, !6, i64 88}
!18 = !{!12, !10, i64 0}
!19 = !{!12, !10, i64 152}
!20 = !{!12, !6, i64 104}
!21 = !{!13, !13, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 24}
!25 = !{!"__SMlap_info", !13, i64 0, !6, i64 8, !13, i64 16, !10, i64 24, !10, i64 28}
!26 = !{!25, !10, i64 28}
!27 = !{!12, !13, i64 120}
!28 = !{!25, !13, i64 0}
!29 = !{!25, !6, i64 8}
!30 = distinct !{!30, !23}
!31 = !{!32, !10, i64 0}
!32 = !{!"__SMparam", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !13, i64 64, !13, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!33 = !{!25, !13, i64 16}
!34 = !{!12, !13, i64 136}
!35 = !{!12, !6, i64 128}
!36 = distinct !{!36, !23}
!37 = distinct !{!37, !23}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @SMlaplaceSmooth(ptr noundef %0, ptr noundef %1, ptr noundef readnone %2) local_unnamed_addr #0 {
  %4 = ptrtoint ptr %0 to i64
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  %6 = icmp eq ptr %0, null
  br i1 %6, label %7, label %9

7:                                                ; preds = %3
  %8 = tail call i32 @SMerror(i32 noundef 32, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

9:                                                ; preds = %3
  %10 = icmp eq ptr %1, null
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = tail call i32 @SMerror(i32 noundef 33, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

13:                                               ; preds = %9
  %14 = icmp eq ptr %2, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %13
  %16 = tail call i32 @SMerror(i32 noundef 34, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 1, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds i8, ptr %0, i64 112
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %0, i64 168
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = tail call i32 @SMinitLap(i32 noundef %20, ptr noundef %22) #3
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %26, label %24

24:                                               ; preds = %17
  %25 = tail call i32 @SMerror(i32 noundef 40, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %23, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

26:                                               ; preds = %17
  %27 = getelementptr inbounds i8, ptr %0, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %0, i64 64
  %32 = load i32, ptr %0, align 8, !tbaa !17
  %33 = tail call i32 @SMcentroidSmoothMesh(i32 noundef %28, ptr noundef %30, ptr noundef nonnull %31, i32 noundef %32)
  %.not126 = icmp eq i32 %33, 0
  br i1 %.not126, label %36, label %34

34:                                               ; preds = %26
  %35 = tail call i32 @SMerror(i32 noundef 44, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %33, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

36:                                               ; preds = %26
  %37 = call i32 @SMvalidMesh(ptr noundef nonnull %0, ptr noundef nonnull %5) #3
  %.not127 = icmp eq i32 %37, 0
  br i1 %.not127, label %40, label %38

38:                                               ; preds = %36
  %39 = call i32 @SMerror(i32 noundef 47, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %37, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

40:                                               ; preds = %36
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %.not128 = icmp eq i32 %41, 0
  br i1 %.not128, label %42, label %96

42:                                               ; preds = %40
  %43 = getelementptr inbounds i8, ptr %0, i64 152
  %44 = load i32, ptr %43, align 8, !tbaa !18
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %96

46:                                               ; preds = %42
  %47 = load i32, ptr %0, align 8, !tbaa !17
  switch i32 %47, label %.preheader [
    i32 2, label %64
    i32 3, label %69
  ]

.preheader:                                       ; preds = %46
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph142, label %.loopexit

.lr.ph142:                                        ; preds = %.preheader
  %49 = getelementptr inbounds i8, ptr %0, i64 104
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %wide.trip.count157 = zext nneg i32 %47 to i64
  %min.iters.check185 = icmp ult i32 %47, 8
  br i1 %min.iters.check185, label %scalar.ph184.preheader, label %vector.memcheck181

scalar.ph184.preheader:                           ; preds = %middle.block183, %vector.memcheck181, %.lr.ph142
  %indvars.iv154.ph = phi i64 [ 0, %vector.memcheck181 ], [ 0, %.lr.ph142 ], [ %n.vec188, %middle.block183 ]
  %xtraiter203 = and i64 %wide.trip.count157, 3
  %lcmp.mod204.not = icmp eq i64 %xtraiter203, 0
  br i1 %lcmp.mod204.not, label %scalar.ph184.prol.loopexit, label %scalar.ph184.prol

scalar.ph184.prol:                                ; preds = %scalar.ph184.preheader, %scalar.ph184.prol
  %indvars.iv154.prol = phi i64 [ %indvars.iv.next155.prol, %scalar.ph184.prol ], [ %indvars.iv154.ph, %scalar.ph184.preheader ]
  %prol.iter205 = phi i64 [ %prol.iter205.next, %scalar.ph184.prol ], [ 0, %scalar.ph184.preheader ]
  %51 = getelementptr inbounds double, ptr %50, i64 %indvars.iv154.prol
  %52 = load double, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv154.prol
  store double %52, ptr %53, align 8, !tbaa !20
  %indvars.iv.next155.prol = add nuw nsw i64 %indvars.iv154.prol, 1
  %prol.iter205.next = add i64 %prol.iter205, 1
  %prol.iter205.cmp.not = icmp eq i64 %prol.iter205.next, %xtraiter203
  br i1 %prol.iter205.cmp.not, label %scalar.ph184.prol.loopexit, label %scalar.ph184.prol, !llvm.loop !21

scalar.ph184.prol.loopexit:                       ; preds = %scalar.ph184.prol, %scalar.ph184.preheader
  %indvars.iv154.unr = phi i64 [ %indvars.iv154.ph, %scalar.ph184.preheader ], [ %indvars.iv.next155.prol, %scalar.ph184.prol ]
  %54 = sub nsw i64 %indvars.iv154.ph, %wide.trip.count157
  %55 = icmp ugt i64 %54, -4
  br i1 %55, label %.loopexit, label %scalar.ph184

vector.memcheck181:                               ; preds = %.lr.ph142
  %56 = ptrtoint ptr %50 to i64
  %57 = add i64 %4, 64
  %58 = sub i64 %57, %56
  %diff.check182 = icmp ult i64 %58, 32
  br i1 %diff.check182, label %scalar.ph184.preheader, label %vector.ph186

vector.ph186:                                     ; preds = %vector.memcheck181
  %n.vec188 = and i64 %wide.trip.count157, 2147483644
  br label %vector.body190

vector.body190:                                   ; preds = %vector.body190, %vector.ph186
  %index191 = phi i64 [ 0, %vector.ph186 ], [ %index.next194, %vector.body190 ]
  %59 = getelementptr inbounds double, ptr %50, i64 %index191
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load192 = load <2 x double>, ptr %59, align 8, !tbaa !20
  %wide.load193 = load <2 x double>, ptr %60, align 8, !tbaa !20
  %61 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %index191
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store <2 x double> %wide.load192, ptr %61, align 8, !tbaa !20
  store <2 x double> %wide.load193, ptr %62, align 8, !tbaa !20
  %index.next194 = add nuw i64 %index191, 4
  %63 = icmp eq i64 %index.next194, %n.vec188
  br i1 %63, label %middle.block183, label %vector.body190, !llvm.loop !23

middle.block183:                                  ; preds = %vector.body190
  %cmp.n195 = icmp eq i64 %n.vec188, %wide.trip.count157
  br i1 %cmp.n195, label %.loopexit, label %scalar.ph184.preheader

64:                                               ; preds = %46
  %65 = getelementptr inbounds i8, ptr %0, i64 104
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  %67 = load double, ptr %66, align 8, !tbaa !20
  store double %67, ptr %31, align 8, !tbaa !20
  %68 = getelementptr inbounds i8, ptr %66, i64 8
  br label %.loopexit.sink.split

69:                                               ; preds = %46
  %70 = getelementptr inbounds i8, ptr %0, i64 104
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = load double, ptr %71, align 8, !tbaa !20
  store double %72, ptr %31, align 8, !tbaa !20
  %73 = getelementptr inbounds i8, ptr %71, i64 8
  %74 = load double, ptr %73, align 8, !tbaa !20
  %75 = getelementptr inbounds i8, ptr %0, i64 72
  store double %74, ptr %75, align 8, !tbaa !20
  %76 = getelementptr inbounds i8, ptr %71, i64 16
  br label %.loopexit.sink.split

scalar.ph184:                                     ; preds = %scalar.ph184.prol.loopexit, %scalar.ph184
  %indvars.iv154 = phi i64 [ %indvars.iv.next155.3, %scalar.ph184 ], [ %indvars.iv154.unr, %scalar.ph184.prol.loopexit ]
  %77 = getelementptr inbounds double, ptr %50, i64 %indvars.iv154
  %78 = load double, ptr %77, align 8, !tbaa !20
  %79 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv154
  store double %78, ptr %79, align 8, !tbaa !20
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %80 = getelementptr inbounds double, ptr %50, i64 %indvars.iv.next155
  %81 = load double, ptr %80, align 8, !tbaa !20
  %82 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next155
  store double %81, ptr %82, align 8, !tbaa !20
  %indvars.iv.next155.1 = add nuw nsw i64 %indvars.iv154, 2
  %83 = getelementptr inbounds double, ptr %50, i64 %indvars.iv.next155.1
  %84 = load double, ptr %83, align 8, !tbaa !20
  %85 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next155.1
  store double %84, ptr %85, align 8, !tbaa !20
  %indvars.iv.next155.2 = add nuw nsw i64 %indvars.iv154, 3
  %86 = getelementptr inbounds double, ptr %50, i64 %indvars.iv.next155.2
  %87 = load double, ptr %86, align 8, !tbaa !20
  %88 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next155.2
  store double %87, ptr %88, align 8, !tbaa !20
  %indvars.iv.next155.3 = add nuw nsw i64 %indvars.iv154, 4
  %exitcond158.not.3 = icmp eq i64 %indvars.iv.next155.3, %wide.trip.count157
  br i1 %exitcond158.not.3, label %.loopexit, label %scalar.ph184, !llvm.loop !27

.loopexit.sink.split:                             ; preds = %64, %69
  %.sink161 = phi ptr [ %76, %69 ], [ %68, %64 ]
  %.sink160 = phi i64 [ 80, %69 ], [ 72, %64 ]
  %89 = load double, ptr %.sink161, align 8, !tbaa !20
  %90 = getelementptr inbounds i8, ptr %0, i64 %.sink160
  store double %89, ptr %90, align 8, !tbaa !20
  br label %.loopexit

.loopexit:                                        ; preds = %scalar.ph184.prol.loopexit, %scalar.ph184, %middle.block183, %.loopexit.sink.split, %.preheader
  %91 = load ptr, ptr %21, align 8, !tbaa !14
  %92 = getelementptr inbounds i8, ptr %91, i64 24
  store i32 1, ptr %92, align 8, !tbaa !28
  %93 = getelementptr inbounds i8, ptr %91, i64 28
  store i32 0, ptr %93, align 4, !tbaa !30
  %94 = getelementptr inbounds i8, ptr %0, i64 120
  %95 = load double, ptr %94, align 8, !tbaa !31
  store double %95, ptr %91, align 8, !tbaa !32
  br label %.loopexit132

96:                                               ; preds = %42, %40
  %97 = load ptr, ptr %21, align 8, !tbaa !14
  %98 = getelementptr inbounds i8, ptr %97, i64 8
  %99 = load ptr, ptr %98, align 8, !tbaa !33
  %100 = call i32 @SMcomputeFunction(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %99) #3
  %.not129 = icmp eq i32 %100, 0
  br i1 %.not129, label %103, label %101

101:                                              ; preds = %96
  %102 = call i32 @SMerror(i32 noundef 61, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %100, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit132

103:                                              ; preds = %96
  %104 = load ptr, ptr %21, align 8, !tbaa !14
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !33
  %107 = ptrtoint ptr %106 to i64
  %108 = icmp sgt i32 %20, 0
  br i1 %108, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %103
  %wide.trip.count = zext nneg i32 %20 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %109 = icmp ult i32 %20, 4
  br i1 %109, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.0113136 = phi double [ 1.000000e+300, %.lr.ph.preheader.new ], [ %..0113.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %110 = getelementptr inbounds double, ptr %106, i64 %indvars.iv
  %111 = load double, ptr %110, align 8, !tbaa !20
  %112 = fcmp olt double %111, %.0113136
  %..0113 = select i1 %112, double %111, double %.0113136
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %113 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next
  %114 = load double, ptr %113, align 8, !tbaa !20
  %115 = fcmp olt double %114, %..0113
  %..0113.1 = select i1 %115, double %114, double %..0113
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %116 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next.1
  %117 = load double, ptr %116, align 8, !tbaa !20
  %118 = fcmp olt double %117, %..0113.1
  %..0113.2 = select i1 %118, double %117, double %..0113.1
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %119 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next.2
  %120 = load double, ptr %119, align 8, !tbaa !20
  %121 = fcmp olt double %120, %..0113.2
  %..0113.3 = select i1 %121, double %120, double %..0113.2
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !34

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %..0113.lcssa.ph = phi double [ poison, %.lr.ph.preheader ], [ %..0113.3, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.0113136.unr = phi double [ 1.000000e+300, %.lr.ph.preheader ], [ %..0113.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.0113136.epil = phi double [ %..0113.epil, %.lr.ph.epil ], [ %.0113136.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %122 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.epil
  %123 = load double, ptr %122, align 8, !tbaa !20
  %124 = fcmp olt double %123, %.0113136.epil
  %..0113.epil = select i1 %124, double %123, double %.0113136.epil
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !35

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %103
  %.0113.lcssa = phi double [ 1.000000e+300, %103 ], [ %..0113.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %..0113.epil, %.lr.ph.epil ]
  %125 = getelementptr inbounds i8, ptr %0, i64 120
  %126 = load double, ptr %125, align 8, !tbaa !31
  %127 = fsub double %.0113.lcssa, %126
  %128 = fcmp ogt double %127, 0.000000e+00
  %129 = getelementptr inbounds i8, ptr %104, i64 28
  br i1 %128, label %130, label %139

130:                                              ; preds = %._crit_edge
  store i32 1, ptr %129, align 4, !tbaa !30
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %.not130 = icmp eq i32 %131, 0
  br i1 %.not130, label %134, label %132

132:                                              ; preds = %130
  %133 = getelementptr inbounds i8, ptr %0, i64 152
  store i32 1, ptr %133, align 8, !tbaa !18
  br label %134

134:                                              ; preds = %132, %130
  %135 = load i32, ptr %1, align 8, !tbaa !36
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %1, align 8, !tbaa !36
  %137 = getelementptr inbounds i8, ptr %104, i64 16
  store double %127, ptr %137, align 8, !tbaa !38
  store double %.0113.lcssa, ptr %104, align 8, !tbaa !32
  %138 = getelementptr inbounds i8, ptr %0, i64 136
  store double %.0113.lcssa, ptr %138, align 8, !tbaa !39
  br label %.loopexit132

139:                                              ; preds = %._crit_edge
  store i32 0, ptr %129, align 4, !tbaa !30
  store double %126, ptr %104, align 8, !tbaa !32
  %140 = load i32, ptr %19, align 8, !tbaa !13
  switch i32 %140, label %.preheader133 [
    i32 2, label %156
    i32 3, label %161
  ]

.preheader133:                                    ; preds = %139
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph138, label %.loopexit134

.lr.ph138:                                        ; preds = %.preheader133
  %142 = getelementptr inbounds i8, ptr %0, i64 128
  %143 = load ptr, ptr %142, align 8, !tbaa !40
  %wide.trip.count147 = zext nneg i32 %140 to i64
  %min.iters.check = icmp ult i32 %140, 6
  %144 = ptrtoint ptr %143 to i64
  %145 = sub i64 %107, %144
  %diff.check = icmp ult i64 %145, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph138
  %indvars.iv144.ph = phi i64 [ 0, %.lr.ph138 ], [ %n.vec, %middle.block ]
  %xtraiter198 = and i64 %wide.trip.count147, 3
  %lcmp.mod199.not = icmp eq i64 %xtraiter198, 0
  br i1 %lcmp.mod199.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv144.prol = phi i64 [ %indvars.iv.next145.prol, %scalar.ph.prol ], [ %indvars.iv144.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %146 = getelementptr inbounds double, ptr %143, i64 %indvars.iv144.prol
  %147 = load double, ptr %146, align 8, !tbaa !20
  %148 = getelementptr inbounds double, ptr %106, i64 %indvars.iv144.prol
  store double %147, ptr %148, align 8, !tbaa !20
  %indvars.iv.next145.prol = add nuw nsw i64 %indvars.iv144.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter198
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !41

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv144.unr = phi i64 [ %indvars.iv144.ph, %scalar.ph.preheader ], [ %indvars.iv.next145.prol, %scalar.ph.prol ]
  %149 = sub nsw i64 %indvars.iv144.ph, %wide.trip.count147
  %150 = icmp ugt i64 %149, -4
  br i1 %150, label %.loopexit134, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph138
  %n.vec = and i64 %wide.trip.count147, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %151 = getelementptr inbounds double, ptr %143, i64 %index
  %152 = getelementptr inbounds i8, ptr %151, i64 16
  %wide.load = load <2 x double>, ptr %151, align 8, !tbaa !20
  %wide.load165 = load <2 x double>, ptr %152, align 8, !tbaa !20
  %153 = getelementptr inbounds double, ptr %106, i64 %index
  %154 = getelementptr inbounds i8, ptr %153, i64 16
  store <2 x double> %wide.load, ptr %153, align 8, !tbaa !20
  store <2 x double> %wide.load165, ptr %154, align 8, !tbaa !20
  %index.next = add nuw i64 %index, 4
  %155 = icmp eq i64 %index.next, %n.vec
  br i1 %155, label %middle.block, label %vector.body, !llvm.loop !42

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

156:                                              ; preds = %139
  %157 = getelementptr inbounds i8, ptr %0, i64 128
  %158 = load ptr, ptr %157, align 8, !tbaa !40
  %159 = load double, ptr %158, align 8, !tbaa !20
  store double %159, ptr %106, align 8, !tbaa !20
  %160 = getelementptr inbounds i8, ptr %158, i64 8
  br label %.loopexit134.sink.split

161:                                              ; preds = %139
  %162 = getelementptr inbounds i8, ptr %0, i64 128
  %163 = load ptr, ptr %162, align 8, !tbaa !40
  %164 = load double, ptr %163, align 8, !tbaa !20
  store double %164, ptr %106, align 8, !tbaa !20
  %165 = getelementptr inbounds i8, ptr %163, i64 8
  %166 = load double, ptr %165, align 8, !tbaa !20
  %167 = getelementptr inbounds i8, ptr %106, i64 8
  store double %166, ptr %167, align 8, !tbaa !20
  %168 = getelementptr inbounds i8, ptr %163, i64 16
  br label %.loopexit134.sink.split

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv144 = phi i64 [ %indvars.iv.next145.3, %scalar.ph ], [ %indvars.iv144.unr, %scalar.ph.prol.loopexit ]
  %169 = getelementptr inbounds double, ptr %143, i64 %indvars.iv144
  %170 = load double, ptr %169, align 8, !tbaa !20
  %171 = getelementptr inbounds double, ptr %106, i64 %indvars.iv144
  store double %170, ptr %171, align 8, !tbaa !20
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %172 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next145
  %173 = load double, ptr %172, align 8, !tbaa !20
  %174 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next145
  store double %173, ptr %174, align 8, !tbaa !20
  %indvars.iv.next145.1 = add nuw nsw i64 %indvars.iv144, 2
  %175 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next145.1
  %176 = load double, ptr %175, align 8, !tbaa !20
  %177 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next145.1
  store double %176, ptr %177, align 8, !tbaa !20
  %indvars.iv.next145.2 = add nuw nsw i64 %indvars.iv144, 3
  %178 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next145.2
  %179 = load double, ptr %178, align 8, !tbaa !20
  %180 = getelementptr inbounds double, ptr %106, i64 %indvars.iv.next145.2
  store double %179, ptr %180, align 8, !tbaa !20
  %indvars.iv.next145.3 = add nuw nsw i64 %indvars.iv144, 4
  %exitcond148.not.3 = icmp eq i64 %indvars.iv.next145.3, %wide.trip.count147
  br i1 %exitcond148.not.3, label %.loopexit134, label %scalar.ph, !llvm.loop !43

.loopexit134.sink.split:                          ; preds = %156, %161
  %.sink164 = phi ptr [ %168, %161 ], [ %160, %156 ]
  %.sink163 = phi i64 [ 16, %161 ], [ 8, %156 ]
  %181 = load double, ptr %.sink164, align 8, !tbaa !20
  %182 = getelementptr inbounds i8, ptr %106, i64 %.sink163
  store double %181, ptr %182, align 8, !tbaa !20
  br label %.loopexit134

.loopexit134:                                     ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.loopexit134.sink.split, %.preheader133
  %183 = load i32, ptr %0, align 8, !tbaa !17
  switch i32 %183, label %.preheader131 [
    i32 2, label %200
    i32 3, label %207
  ]

.preheader131:                                    ; preds = %.loopexit134
  %184 = icmp sgt i32 %183, 0
  br i1 %184, label %.lr.ph140, label %.loopexit132

.lr.ph140:                                        ; preds = %.preheader131
  %185 = getelementptr inbounds i8, ptr %0, i64 104
  %186 = load ptr, ptr %185, align 8, !tbaa !19
  %wide.trip.count152 = zext nneg i32 %183 to i64
  %min.iters.check170 = icmp ult i32 %183, 8
  br i1 %min.iters.check170, label %scalar.ph169.preheader, label %vector.memcheck166

scalar.ph169.preheader:                           ; preds = %middle.block168, %vector.memcheck166, %.lr.ph140
  %indvars.iv149.ph = phi i64 [ 0, %vector.memcheck166 ], [ 0, %.lr.ph140 ], [ %n.vec173, %middle.block168 ]
  %xtraiter200 = and i64 %wide.trip.count152, 3
  %lcmp.mod201.not = icmp eq i64 %xtraiter200, 0
  br i1 %lcmp.mod201.not, label %scalar.ph169.prol.loopexit, label %scalar.ph169.prol

scalar.ph169.prol:                                ; preds = %scalar.ph169.preheader, %scalar.ph169.prol
  %indvars.iv149.prol = phi i64 [ %indvars.iv.next150.prol, %scalar.ph169.prol ], [ %indvars.iv149.ph, %scalar.ph169.preheader ]
  %prol.iter202 = phi i64 [ %prol.iter202.next, %scalar.ph169.prol ], [ 0, %scalar.ph169.preheader ]
  %187 = getelementptr inbounds double, ptr %186, i64 %indvars.iv149.prol
  %188 = load double, ptr %187, align 8, !tbaa !20
  %189 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv149.prol
  store double %188, ptr %189, align 8, !tbaa !20
  %indvars.iv.next150.prol = add nuw nsw i64 %indvars.iv149.prol, 1
  %prol.iter202.next = add i64 %prol.iter202, 1
  %prol.iter202.cmp.not = icmp eq i64 %prol.iter202.next, %xtraiter200
  br i1 %prol.iter202.cmp.not, label %scalar.ph169.prol.loopexit, label %scalar.ph169.prol, !llvm.loop !44

scalar.ph169.prol.loopexit:                       ; preds = %scalar.ph169.prol, %scalar.ph169.preheader
  %indvars.iv149.unr = phi i64 [ %indvars.iv149.ph, %scalar.ph169.preheader ], [ %indvars.iv.next150.prol, %scalar.ph169.prol ]
  %190 = sub nsw i64 %indvars.iv149.ph, %wide.trip.count152
  %191 = icmp ugt i64 %190, -4
  br i1 %191, label %.loopexit132, label %scalar.ph169

vector.memcheck166:                               ; preds = %.lr.ph140
  %192 = ptrtoint ptr %186 to i64
  %193 = add i64 %4, 64
  %194 = sub i64 %193, %192
  %diff.check167 = icmp ult i64 %194, 32
  br i1 %diff.check167, label %scalar.ph169.preheader, label %vector.ph171

vector.ph171:                                     ; preds = %vector.memcheck166
  %n.vec173 = and i64 %wide.trip.count152, 2147483644
  br label %vector.body175

vector.body175:                                   ; preds = %vector.body175, %vector.ph171
  %index176 = phi i64 [ 0, %vector.ph171 ], [ %index.next179, %vector.body175 ]
  %195 = getelementptr inbounds double, ptr %186, i64 %index176
  %196 = getelementptr inbounds i8, ptr %195, i64 16
  %wide.load177 = load <2 x double>, ptr %195, align 8, !tbaa !20
  %wide.load178 = load <2 x double>, ptr %196, align 8, !tbaa !20
  %197 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %index176
  %198 = getelementptr inbounds i8, ptr %197, i64 16
  store <2 x double> %wide.load177, ptr %197, align 8, !tbaa !20
  store <2 x double> %wide.load178, ptr %198, align 8, !tbaa !20
  %index.next179 = add nuw i64 %index176, 4
  %199 = icmp eq i64 %index.next179, %n.vec173
  br i1 %199, label %middle.block168, label %vector.body175, !llvm.loop !45

middle.block168:                                  ; preds = %vector.body175
  %cmp.n180 = icmp eq i64 %n.vec173, %wide.trip.count152
  br i1 %cmp.n180, label %.loopexit132, label %scalar.ph169.preheader

200:                                              ; preds = %.loopexit134
  %201 = getelementptr inbounds i8, ptr %0, i64 104
  %202 = load ptr, ptr %201, align 8, !tbaa !19
  %203 = load double, ptr %202, align 8, !tbaa !20
  store double %203, ptr %31, align 8, !tbaa !20
  %204 = getelementptr inbounds i8, ptr %202, i64 8
  %205 = load double, ptr %204, align 8, !tbaa !20
  %206 = getelementptr inbounds i8, ptr %0, i64 72
  store double %205, ptr %206, align 8, !tbaa !20
  br label %.loopexit132

207:                                              ; preds = %.loopexit134
  %208 = getelementptr inbounds i8, ptr %0, i64 104
  %209 = load ptr, ptr %208, align 8, !tbaa !19
  %210 = load double, ptr %209, align 8, !tbaa !20
  store double %210, ptr %31, align 8, !tbaa !20
  %211 = getelementptr inbounds i8, ptr %209, i64 8
  %212 = load double, ptr %211, align 8, !tbaa !20
  %213 = getelementptr inbounds i8, ptr %0, i64 72
  store double %212, ptr %213, align 8, !tbaa !20
  %214 = getelementptr inbounds i8, ptr %209, i64 16
  %215 = load double, ptr %214, align 8, !tbaa !20
  %216 = getelementptr inbounds i8, ptr %0, i64 80
  store double %215, ptr %216, align 8, !tbaa !20
  br label %.loopexit132

scalar.ph169:                                     ; preds = %scalar.ph169.prol.loopexit, %scalar.ph169
  %indvars.iv149 = phi i64 [ %indvars.iv.next150.3, %scalar.ph169 ], [ %indvars.iv149.unr, %scalar.ph169.prol.loopexit ]
  %217 = getelementptr inbounds double, ptr %186, i64 %indvars.iv149
  %218 = load double, ptr %217, align 8, !tbaa !20
  %219 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv149
  store double %218, ptr %219, align 8, !tbaa !20
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %220 = getelementptr inbounds double, ptr %186, i64 %indvars.iv.next150
  %221 = load double, ptr %220, align 8, !tbaa !20
  %222 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next150
  store double %221, ptr %222, align 8, !tbaa !20
  %indvars.iv.next150.1 = add nuw nsw i64 %indvars.iv149, 2
  %223 = getelementptr inbounds double, ptr %186, i64 %indvars.iv.next150.1
  %224 = load double, ptr %223, align 8, !tbaa !20
  %225 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next150.1
  store double %224, ptr %225, align 8, !tbaa !20
  %indvars.iv.next150.2 = add nuw nsw i64 %indvars.iv149, 3
  %226 = getelementptr inbounds double, ptr %186, i64 %indvars.iv.next150.2
  %227 = load double, ptr %226, align 8, !tbaa !20
  %228 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 %indvars.iv.next150.2
  store double %227, ptr %228, align 8, !tbaa !20
  %indvars.iv.next150.3 = add nuw nsw i64 %indvars.iv149, 4
  %exitcond153.not.3 = icmp eq i64 %indvars.iv.next150.3, %wide.trip.count152
  br i1 %exitcond153.not.3, label %.loopexit132, label %scalar.ph169, !llvm.loop !46

.loopexit132:                                     ; preds = %scalar.ph169.prol.loopexit, %scalar.ph169, %middle.block168, %.preheader131, %.loopexit, %134, %207, %200, %101, %38, %34, %24, %15, %11, %7
  %.0112 = phi i32 [ %8, %7 ], [ %12, %11 ], [ %16, %15 ], [ %25, %24 ], [ %35, %34 ], [ %39, %38 ], [ %102, %101 ], [ 0, %200 ], [ 0, %207 ], [ 0, %134 ], [ 0, %.loopexit ], [ 0, %.preheader131 ], [ 0, %middle.block168 ], [ 0, %scalar.ph169 ], [ 0, %scalar.ph169.prol.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  ret i32 %.0112
}

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

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

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

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

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

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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, !6, i64 144}
!10 = !{!"__SMlocal_mesh", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !11, i64 88, !11, i64 96, !11, i64 104, !6, i64 112, !12, i64 120, !11, i64 128, !12, i64 136, !6, i64 144, !6, i64 148, !6, i64 152, !11, i64 160, !11, i64 168, !11, i64 176}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !6, i64 112}
!14 = !{!10, !11, i64 168}
!15 = !{!10, !6, i64 4}
!16 = !{!10, !11, i64 88}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !6, i64 152}
!19 = !{!10, !11, i64 104}
!20 = !{!12, !12, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !25}
!28 = !{!29, !6, i64 24}
!29 = !{!"__SMlap_info", !12, i64 0, !11, i64 8, !12, i64 16, !6, i64 24, !6, i64 28}
!30 = !{!29, !6, i64 28}
!31 = !{!10, !12, i64 120}
!32 = !{!29, !12, i64 0}
!33 = !{!29, !11, i64 8}
!34 = distinct !{!34, !24}
!35 = distinct !{!35, !22}
!36 = !{!37, !6, i64 0}
!37 = !{!"__SMparam", !6, i64 0, !6, i64 4, !6, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104}
!38 = !{!29, !12, i64 16}
!39 = !{!10, !12, i64 136}
!40 = !{!10, !11, i64 128}
!41 = distinct !{!41, !22}
!42 = distinct !{!42, !24, !25, !26}
!43 = distinct !{!43, !24, !25}
!44 = distinct !{!44, !22}
!45 = distinct !{!45, !24, !25, !26}
!46 = distinct !{!46, !24, !25}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass