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

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

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1

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

30:                                               ; preds = %6
  %31 = call i32 @SMerror(i32 noundef 74, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %31, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

32:                                               ; preds = %6
  %33 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %33, ptr %19, align 8, !tbaa !9
  %34 = load ptr, ptr %19, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.__SMsmooth_data, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  store ptr %36, ptr %20, align 8, !tbaa !9
  %37 = load ptr, ptr %19, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.__SMsmooth_data, ptr %37, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  store ptr %39, ptr %21, align 8, !tbaa !9
  %40 = load ptr, ptr %19, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.__SMsmooth_data, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  store ptr %42, ptr %22, align 8, !tbaa !9
  %43 = load ptr, ptr %19, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.__SMsmooth_data, ptr %43, i32 0, i32 5
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  store ptr %45, ptr %23, align 8, !tbaa !9
  %46 = load ptr, ptr %19, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.__SMsmooth_data, ptr %46, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  store ptr %48, ptr %24, align 8, !tbaa !9
  %49 = load ptr, ptr %20, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !17
  store i32 %51, ptr %16, align 4, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  %55 = load ptr, ptr %11, align 8, !tbaa !9
  %56 = load ptr, ptr %12, align 8, !tbaa !9
  %57 = load ptr, ptr %20, align 8, !tbaa !9
  %58 = load ptr, ptr %21, align 8, !tbaa !9
  %59 = call i32 @SMinitLocalMesh(i32 noundef %52, i32 noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56, ptr noundef %57, ptr noundef %58)
  store i32 %59, ptr %14, align 4, !tbaa !5
  %60 = load i32, ptr %14, align 4, !tbaa !5
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %65

62:                                               ; preds = %32
  %63 = load i32, ptr %14, align 4, !tbaa !5
  %64 = call i32 @SMerror(i32 noundef 87, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %63, i32 noundef 0, ptr noundef null)
  store i32 %64, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

65:                                               ; preds = %32
  %66 = load ptr, ptr %21, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.__SMparam, ptr %66, i32 0, i32 8
  %68 = load i32, ptr %67, align 4, !tbaa !20
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %149

70:                                               ; preds = %65
  %71 = load ptr, ptr %20, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !22
  %74 = load ptr, ptr %20, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %74, i32 0, i32 6
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load ptr, ptr %20, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %77, i32 0, i32 5
  %79 = getelementptr inbounds [3 x double], ptr %78, i64 0, i64 0
  %80 = load ptr, ptr %20, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !17
  %83 = call i32 @SMcentroidSmoothMesh(i32 noundef %73, ptr noundef %76, ptr noundef %79, i32 noundef %82)
  store i32 %83, ptr %14, align 4, !tbaa !5
  %84 = load i32, ptr %14, align 4, !tbaa !5
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %70
  %87 = load i32, ptr %14, align 4, !tbaa !5
  %88 = call i32 @SMerror(i32 noundef 110, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %87, i32 noundef 0, ptr noundef null)
  store i32 %88, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

89:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  %90 = load i32, ptr %16, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 2
  br i1 %91, label %92, label %105

92:                                               ; preds = %89
  %93 = load ptr, ptr %20, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %93, i32 0, i32 5
  %95 = getelementptr inbounds [3 x double], ptr %94, i64 0, i64 0
  %96 = load double, ptr %95, align 8, !tbaa !24
  %97 = load ptr, ptr %10, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %97, i64 0
  store double %96, ptr %98, align 8, !tbaa !24
  %99 = load ptr, ptr %20, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %99, i32 0, i32 5
  %101 = getelementptr inbounds [3 x double], ptr %100, i64 0, i64 1
  %102 = load double, ptr %101, align 8, !tbaa !24
  %103 = load ptr, ptr %10, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %103, i64 1
  store double %102, ptr %104, align 8, !tbaa !24
  br label %148

105:                                              ; preds = %89
  %106 = load i32, ptr %16, align 4, !tbaa !5
  %107 = icmp eq i32 %106, 3
  br i1 %107, label %108, label %127

108:                                              ; preds = %105
  %109 = load ptr, ptr %20, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %109, i32 0, i32 5
  %111 = getelementptr inbounds [3 x double], ptr %110, i64 0, i64 0
  %112 = load double, ptr %111, align 8, !tbaa !24
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = getelementptr inbounds double, ptr %113, i64 0
  store double %112, ptr %114, align 8, !tbaa !24
  %115 = load ptr, ptr %20, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %115, i32 0, i32 5
  %117 = getelementptr inbounds [3 x double], ptr %116, i64 0, i64 1
  %118 = load double, ptr %117, align 8, !tbaa !24
  %119 = load ptr, ptr %10, align 8, !tbaa !9
  %120 = getelementptr inbounds double, ptr %119, i64 1
  store double %118, ptr %120, align 8, !tbaa !24
  %121 = load ptr, ptr %20, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %121, i32 0, i32 5
  %123 = getelementptr inbounds [3 x double], ptr %122, i64 0, i64 2
  %124 = load double, ptr %123, align 8, !tbaa !24
  %125 = load ptr, ptr %10, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %125, i64 2
  store double %124, ptr %126, align 8, !tbaa !24
  br label %147

127:                                              ; preds = %105
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %143, %127
  %129 = load i32, ptr %26, align 4, !tbaa !5
  %130 = load i32, ptr %16, align 4, !tbaa !5
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %146

132:                                              ; preds = %128
  %133 = load ptr, ptr %20, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %133, i32 0, i32 5
  %135 = load i32, ptr %26, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [3 x double], ptr %134, i64 0, i64 %136
  %138 = load double, ptr %137, align 8, !tbaa !24
  %139 = load ptr, ptr %10, align 8, !tbaa !9
  %140 = load i32, ptr %26, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  store double %138, ptr %142, align 8, !tbaa !24
  br label %143

143:                                              ; preds = %132
  %144 = load i32, ptr %26, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %26, align 4, !tbaa !5
  br label %128, !llvm.loop !25

146:                                              ; preds = %128
  br label %147

147:                                              ; preds = %146, %108
  br label %148

148:                                              ; preds = %147, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  store i32 0, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

149:                                              ; preds = %65
  %150 = load ptr, ptr %20, align 8, !tbaa !9
  %151 = load ptr, ptr %21, align 8, !tbaa !9
  %152 = call i32 @SMvalidityCheck(ptr noundef %150, ptr noundef %151, ptr noundef %17)
  store i32 %152, ptr %14, align 4, !tbaa !5
  %153 = load i32, ptr %14, align 4, !tbaa !5
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %158

155:                                              ; preds = %149
  %156 = load i32, ptr %14, align 4, !tbaa !5
  %157 = call i32 @SMerror(i32 noundef 137, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %156, i32 noundef 0, ptr noundef null)
  store i32 %157, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

158:                                              ; preds = %149
  %159 = load i32, ptr %17, align 4, !tbaa !5
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %171, label %161

161:                                              ; preds = %158
  %162 = load ptr, ptr %20, align 8, !tbaa !9
  %163 = call i32 @SMwrite_ordered_points(ptr noundef %162)
  store i32 %163, ptr %14, align 4, !tbaa !5
  %164 = load i32, ptr %14, align 4, !tbaa !5
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %169

166:                                              ; preds = %161
  %167 = load i32, ptr %14, align 4, !tbaa !5
  %168 = call i32 @SMerror(i32 noundef 139, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %167, i32 noundef 0, ptr noundef null)
  store i32 %168, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

169:                                              ; preds = %161
  %170 = call i32 @SMerror(i32 noundef 140, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 61, i32 noundef 0, ptr noundef @.str.3)
  store i32 %170, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

171:                                              ; preds = %158
  %172 = load ptr, ptr %20, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %172, i32 0, i32 15
  store i32 1, ptr %173, align 8, !tbaa !27
  %174 = load ptr, ptr %20, align 8, !tbaa !9
  %175 = load ptr, ptr %21, align 8, !tbaa !9
  %176 = load ptr, ptr %20, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %176, i32 0, i32 11
  %178 = load ptr, ptr %177, align 8, !tbaa !28
  %179 = call i32 @SMcomputeFunction(ptr noundef %174, ptr noundef %175, ptr noundef %178)
  store i32 %179, ptr %14, align 4, !tbaa !5
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %185

182:                                              ; preds = %171
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = call i32 @SMerror(i32 noundef 146, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %183, i32 noundef 0, ptr noundef null)
  store i32 %184, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

185:                                              ; preds = %171
  store double 1.000000e+300, ptr %18, align 8, !tbaa !24
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %214, %185
  %187 = load i32, ptr %15, align 4, !tbaa !5
  %188 = load ptr, ptr %20, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %188, i32 0, i32 9
  %190 = load i32, ptr %189, align 8, !tbaa !29
  %191 = icmp slt i32 %187, %190
  br i1 %191, label %192, label %217

192:                                              ; preds = %186
  %193 = load ptr, ptr %20, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %193, i32 0, i32 11
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  %196 = load i32, ptr %15, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %195, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !24
  %200 = load double, ptr %18, align 8, !tbaa !24
  %201 = fcmp olt double %199, %200
  br i1 %201, label %202, label %210

202:                                              ; preds = %192
  %203 = load ptr, ptr %20, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %203, i32 0, i32 11
  %205 = load ptr, ptr %204, align 8, !tbaa !28
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds double, ptr %205, i64 %207
  %209 = load double, ptr %208, align 8, !tbaa !24
  br label %212

210:                                              ; preds = %192
  %211 = load double, ptr %18, align 8, !tbaa !24
  br label %212

212:                                              ; preds = %210, %202
  %213 = phi double [ %209, %202 ], [ %211, %210 ]
  store double %213, ptr %18, align 8, !tbaa !24
  br label %214

214:                                              ; preds = %212
  %215 = load i32, ptr %15, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %15, align 4, !tbaa !5
  br label %186, !llvm.loop !30

217:                                              ; preds = %186
  %218 = load double, ptr %18, align 8, !tbaa !24
  %219 = load ptr, ptr %20, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %219, i32 0, i32 12
  store double %218, ptr %220, align 8, !tbaa !31
  %221 = load ptr, ptr %20, align 8, !tbaa !9
  %222 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %221, i32 0, i32 10
  store double %218, ptr %222, align 8, !tbaa !32
  %223 = load ptr, ptr %21, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.__SMparam, ptr %223, i32 0, i32 8
  %225 = load i32, ptr %224, align 4, !tbaa !20
  switch i32 %225, label %378 [
    i32 2, label %226
    i32 3, label %237
    i32 5, label %248
    i32 6, label %279
    i32 7, label %309
    i32 4, label %348
    i32 8, label %348
  ]

226:                                              ; preds = %217
  %227 = load ptr, ptr %20, align 8, !tbaa !9
  %228 = load ptr, ptr %21, align 8, !tbaa !9
  %229 = load ptr, ptr %23, align 8, !tbaa !9
  %230 = call i32 @SMlaplaceSmooth(ptr noundef %227, ptr noundef %228, ptr noundef %229)
  store i32 %230, ptr %14, align 4, !tbaa !5
  %231 = load i32, ptr %14, align 4, !tbaa !5
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %236

233:                                              ; preds = %226
  %234 = load i32, ptr %14, align 4, !tbaa !5
  %235 = call i32 @SMerror(i32 noundef 192, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %234, i32 noundef 0, ptr noundef null)
  store i32 %235, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

236:                                              ; preds = %226
  br label %380

237:                                              ; preds = %217
  %238 = load ptr, ptr %20, align 8, !tbaa !9
  %239 = load ptr, ptr %21, align 8, !tbaa !9
  %240 = load ptr, ptr %23, align 8, !tbaa !9
  %241 = call i32 @SMminmaxOpt(ptr noundef %238, ptr noundef %239, ptr noundef %240)
  store i32 %241, ptr %14, align 4, !tbaa !5
  %242 = load i32, ptr %14, align 4, !tbaa !5
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %244, label %247

244:                                              ; preds = %237
  %245 = load i32, ptr %14, align 4, !tbaa !5
  %246 = call i32 @SMerror(i32 noundef 195, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %245, i32 noundef 0, ptr noundef null)
  store i32 %246, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

247:                                              ; preds = %237
  br label %380

248:                                              ; preds = %217
  %249 = load ptr, ptr %21, align 8, !tbaa !9
  %250 = getelementptr inbounds %struct.__SMparam, ptr %249, i32 0, i32 10
  %251 = load double, ptr %250, align 8, !tbaa !33
  %252 = load ptr, ptr %20, align 8, !tbaa !9
  %253 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %252, i32 0, i32 12
  %254 = load double, ptr %253, align 8, !tbaa !31
  %255 = fcmp ole double %251, %254
  br i1 %255, label %256, label %267

256:                                              ; preds = %248
  %257 = load ptr, ptr %20, align 8, !tbaa !9
  %258 = load ptr, ptr %21, align 8, !tbaa !9
  %259 = load ptr, ptr %23, align 8, !tbaa !9
  %260 = call i32 @SMlaplaceSmooth(ptr noundef %257, ptr noundef %258, ptr noundef %259)
  store i32 %260, ptr %14, align 4, !tbaa !5
  %261 = load i32, ptr %14, align 4, !tbaa !5
  %262 = icmp ne i32 %261, 0
  br i1 %262, label %263, label %266

263:                                              ; preds = %256
  %264 = load i32, ptr %14, align 4, !tbaa !5
  %265 = call i32 @SMerror(i32 noundef 200, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %264, i32 noundef 0, ptr noundef null)
  store i32 %265, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

266:                                              ; preds = %256
  br label %278

267:                                              ; preds = %248
  %268 = load ptr, ptr %20, align 8, !tbaa !9
  %269 = load ptr, ptr %21, align 8, !tbaa !9
  %270 = load ptr, ptr %23, align 8, !tbaa !9
  %271 = call i32 @SMminmaxOpt(ptr noundef %268, ptr noundef %269, ptr noundef %270)
  store i32 %271, ptr %14, align 4, !tbaa !5
  %272 = load i32, ptr %14, align 4, !tbaa !5
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %277

274:                                              ; preds = %267
  %275 = load i32, ptr %14, align 4, !tbaa !5
  %276 = call i32 @SMerror(i32 noundef 203, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %275, i32 noundef 0, ptr noundef null)
  store i32 %276, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

277:                                              ; preds = %267
  br label %278

278:                                              ; preds = %277, %266
  br label %380

279:                                              ; preds = %217
  %280 = load ptr, ptr %20, align 8, !tbaa !9
  %281 = load ptr, ptr %21, align 8, !tbaa !9
  %282 = load ptr, ptr %23, align 8, !tbaa !9
  %283 = call i32 @SMlaplaceSmooth(ptr noundef %280, ptr noundef %281, ptr noundef %282)
  store i32 %283, ptr %14, align 4, !tbaa !5
  %284 = load i32, ptr %14, align 4, !tbaa !5
  %285 = icmp ne i32 %284, 0
  br i1 %285, label %286, label %289

286:                                              ; preds = %279
  %287 = load i32, ptr %14, align 4, !tbaa !5
  %288 = call i32 @SMerror(i32 noundef 207, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %287, i32 noundef 0, ptr noundef null)
  store i32 %288, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

289:                                              ; preds = %279
  %290 = load ptr, ptr %21, align 8, !tbaa !9
  %291 = getelementptr inbounds %struct.__SMparam, ptr %290, i32 0, i32 10
  %292 = load double, ptr %291, align 8, !tbaa !33
  %293 = load ptr, ptr %20, align 8, !tbaa !9
  %294 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %293, i32 0, i32 12
  %295 = load double, ptr %294, align 8, !tbaa !31
  %296 = fcmp ogt double %292, %295
  br i1 %296, label %297, label %308

297:                                              ; preds = %289
  %298 = load ptr, ptr %20, align 8, !tbaa !9
  %299 = load ptr, ptr %21, align 8, !tbaa !9
  %300 = load ptr, ptr %23, align 8, !tbaa !9
  %301 = call i32 @SMminmaxOpt(ptr noundef %298, ptr noundef %299, ptr noundef %300)
  store i32 %301, ptr %14, align 4, !tbaa !5
  %302 = load i32, ptr %14, align 4, !tbaa !5
  %303 = icmp ne i32 %302, 0
  br i1 %303, label %304, label %307

304:                                              ; preds = %297
  %305 = load i32, ptr %14, align 4, !tbaa !5
  %306 = call i32 @SMerror(i32 noundef 209, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %305, i32 noundef 0, ptr noundef null)
  store i32 %306, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

307:                                              ; preds = %297
  br label %308

308:                                              ; preds = %307, %289
  br label %380

309:                                              ; preds = %217
  %310 = load ptr, ptr %21, align 8, !tbaa !9
  %311 = getelementptr inbounds %struct.__SMparam, ptr %310, i32 0, i32 10
  %312 = load double, ptr %311, align 8, !tbaa !33
  %313 = load ptr, ptr %20, align 8, !tbaa !9
  %314 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %313, i32 0, i32 12
  %315 = load double, ptr %314, align 8, !tbaa !31
  %316 = fcmp ogt double %312, %315
  br i1 %316, label %317, label %347

317:                                              ; preds = %309
  %318 = load ptr, ptr %20, align 8, !tbaa !9
  %319 = load ptr, ptr %21, align 8, !tbaa !9
  %320 = load ptr, ptr %23, align 8, !tbaa !9
  %321 = call i32 @SMlaplaceSmooth(ptr noundef %318, ptr noundef %319, ptr noundef %320)
  store i32 %321, ptr %14, align 4, !tbaa !5
  %322 = load i32, ptr %14, align 4, !tbaa !5
  %323 = icmp ne i32 %322, 0
  br i1 %323, label %324, label %327

324:                                              ; preds = %317
  %325 = load i32, ptr %14, align 4, !tbaa !5
  %326 = call i32 @SMerror(i32 noundef 216, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %325, i32 noundef 0, ptr noundef null)
  store i32 %326, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

327:                                              ; preds = %317
  %328 = load ptr, ptr %21, align 8, !tbaa !9
  %329 = getelementptr inbounds %struct.__SMparam, ptr %328, i32 0, i32 10
  %330 = load double, ptr %329, align 8, !tbaa !33
  %331 = load ptr, ptr %20, align 8, !tbaa !9
  %332 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %331, i32 0, i32 12
  %333 = load double, ptr %332, align 8, !tbaa !31
  %334 = fcmp ogt double %330, %333
  br i1 %334, label %335, label %346

335:                                              ; preds = %327
  %336 = load ptr, ptr %20, align 8, !tbaa !9
  %337 = load ptr, ptr %21, align 8, !tbaa !9
  %338 = load ptr, ptr %23, align 8, !tbaa !9
  %339 = call i32 @SMminmaxOpt(ptr noundef %336, ptr noundef %337, ptr noundef %338)
  store i32 %339, ptr %14, align 4, !tbaa !5
  %340 = load i32, ptr %14, align 4, !tbaa !5
  %341 = icmp ne i32 %340, 0
  br i1 %341, label %342, label %345

342:                                              ; preds = %335
  %343 = load i32, ptr %14, align 4, !tbaa !5
  %344 = call i32 @SMerror(i32 noundef 219, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %343, i32 noundef 0, ptr noundef null)
  store i32 %344, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

345:                                              ; preds = %335
  br label %346

346:                                              ; preds = %345, %327
  br label %347

347:                                              ; preds = %346, %309
  br label %380

348:                                              ; preds = %217, %217
  %349 = load ptr, ptr %20, align 8, !tbaa !9
  %350 = load ptr, ptr %21, align 8, !tbaa !9
  %351 = load ptr, ptr %23, align 8, !tbaa !9
  %352 = call i32 @SMlaplaceSmooth(ptr noundef %349, ptr noundef %350, ptr noundef %351)
  store i32 %352, ptr %14, align 4, !tbaa !5
  %353 = load i32, ptr %14, align 4, !tbaa !5
  %354 = icmp ne i32 %353, 0
  br i1 %354, label %355, label %358

355:                                              ; preds = %348
  %356 = load i32, ptr %14, align 4, !tbaa !5
  %357 = call i32 @SMerror(i32 noundef 226, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %356, i32 noundef 0, ptr noundef null)
  store i32 %357, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

358:                                              ; preds = %348
  %359 = load ptr, ptr %21, align 8, !tbaa !9
  %360 = getelementptr inbounds %struct.__SMparam, ptr %359, i32 0, i32 10
  %361 = load double, ptr %360, align 8, !tbaa !33
  %362 = load ptr, ptr %20, align 8, !tbaa !9
  %363 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %362, i32 0, i32 12
  %364 = load double, ptr %363, align 8, !tbaa !31
  %365 = fcmp ogt double %361, %364
  br i1 %365, label %366, label %377

366:                                              ; preds = %358
  %367 = load ptr, ptr %20, align 8, !tbaa !9
  %368 = load ptr, ptr %21, align 8, !tbaa !9
  %369 = load ptr, ptr %23, align 8, !tbaa !9
  %370 = call i32 @SMminmaxOpt(ptr noundef %367, ptr noundef %368, ptr noundef %369)
  store i32 %370, ptr %14, align 4, !tbaa !5
  %371 = load i32, ptr %14, align 4, !tbaa !5
  %372 = icmp ne i32 %371, 0
  br i1 %372, label %373, label %376

373:                                              ; preds = %366
  %374 = load i32, ptr %14, align 4, !tbaa !5
  %375 = call i32 @SMerror(i32 noundef 228, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %374, i32 noundef 0, ptr noundef null)
  store i32 %375, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

376:                                              ; preds = %366
  br label %377

377:                                              ; preds = %376, %358
  br label %380

378:                                              ; preds = %217
  %379 = call i32 @SMerror(i32 noundef 233, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.4)
  store i32 %379, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

380:                                              ; preds = %377, %347, %308, %278, %247, %236
  %381 = load ptr, ptr %21, align 8, !tbaa !9
  %382 = getelementptr inbounds %struct.__SMparam, ptr %381, i32 0, i32 11
  %383 = load double, ptr %382, align 8, !tbaa !34
  %384 = load ptr, ptr %20, align 8, !tbaa !9
  %385 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %384, i32 0, i32 12
  %386 = load double, ptr %385, align 8, !tbaa !31
  %387 = fcmp ogt double %383, %386
  br i1 %387, label %388, label %394

388:                                              ; preds = %380
  %389 = load ptr, ptr %20, align 8, !tbaa !9
  %390 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %389, i32 0, i32 12
  %391 = load double, ptr %390, align 8, !tbaa !31
  %392 = load ptr, ptr %21, align 8, !tbaa !9
  %393 = getelementptr inbounds %struct.__SMparam, ptr %392, i32 0, i32 11
  store double %391, ptr %393, align 8, !tbaa !34
  br label %394

394:                                              ; preds = %388, %380
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %395 = load i32, ptr %16, align 4, !tbaa !5
  %396 = icmp eq i32 %395, 2
  br i1 %396, label %397, label %410

397:                                              ; preds = %394
  %398 = load ptr, ptr %20, align 8, !tbaa !9
  %399 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %398, i32 0, i32 5
  %400 = getelementptr inbounds [3 x double], ptr %399, i64 0, i64 0
  %401 = load double, ptr %400, align 8, !tbaa !24
  %402 = load ptr, ptr %10, align 8, !tbaa !9
  %403 = getelementptr inbounds double, ptr %402, i64 0
  store double %401, ptr %403, align 8, !tbaa !24
  %404 = load ptr, ptr %20, align 8, !tbaa !9
  %405 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %404, i32 0, i32 5
  %406 = getelementptr inbounds [3 x double], ptr %405, i64 0, i64 1
  %407 = load double, ptr %406, align 8, !tbaa !24
  %408 = load ptr, ptr %10, align 8, !tbaa !9
  %409 = getelementptr inbounds double, ptr %408, i64 1
  store double %407, ptr %409, align 8, !tbaa !24
  br label %453

410:                                              ; preds = %394
  %411 = load i32, ptr %16, align 4, !tbaa !5
  %412 = icmp eq i32 %411, 3
  br i1 %412, label %413, label %432

413:                                              ; preds = %410
  %414 = load ptr, ptr %20, align 8, !tbaa !9
  %415 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %414, i32 0, i32 5
  %416 = getelementptr inbounds [3 x double], ptr %415, i64 0, i64 0
  %417 = load double, ptr %416, align 8, !tbaa !24
  %418 = load ptr, ptr %10, align 8, !tbaa !9
  %419 = getelementptr inbounds double, ptr %418, i64 0
  store double %417, ptr %419, align 8, !tbaa !24
  %420 = load ptr, ptr %20, align 8, !tbaa !9
  %421 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %420, i32 0, i32 5
  %422 = getelementptr inbounds [3 x double], ptr %421, i64 0, i64 1
  %423 = load double, ptr %422, align 8, !tbaa !24
  %424 = load ptr, ptr %10, align 8, !tbaa !9
  %425 = getelementptr inbounds double, ptr %424, i64 1
  store double %423, ptr %425, align 8, !tbaa !24
  %426 = load ptr, ptr %20, align 8, !tbaa !9
  %427 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %426, i32 0, i32 5
  %428 = getelementptr inbounds [3 x double], ptr %427, i64 0, i64 2
  %429 = load double, ptr %428, align 8, !tbaa !24
  %430 = load ptr, ptr %10, align 8, !tbaa !9
  %431 = getelementptr inbounds double, ptr %430, i64 2
  store double %429, ptr %431, align 8, !tbaa !24
  br label %452

432:                                              ; preds = %410
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %433

433:                                              ; preds = %448, %432
  %434 = load i32, ptr %27, align 4, !tbaa !5
  %435 = load i32, ptr %16, align 4, !tbaa !5
  %436 = icmp slt i32 %434, %435
  br i1 %436, label %437, label %451

437:                                              ; preds = %433
  %438 = load ptr, ptr %20, align 8, !tbaa !9
  %439 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %438, i32 0, i32 5
  %440 = load i32, ptr %27, align 4, !tbaa !5
  %441 = sext i32 %440 to i64
  %442 = getelementptr inbounds [3 x double], ptr %439, i64 0, i64 %441
  %443 = load double, ptr %442, align 8, !tbaa !24
  %444 = load ptr, ptr %10, align 8, !tbaa !9
  %445 = load i32, ptr %27, align 4, !tbaa !5
  %446 = sext i32 %445 to i64
  %447 = getelementptr inbounds double, ptr %444, i64 %446
  store double %443, ptr %447, align 8, !tbaa !24
  br label %448

448:                                              ; preds = %437
  %449 = load i32, ptr %27, align 4, !tbaa !5
  %450 = add nsw i32 %449, 1
  store i32 %450, ptr %27, align 4, !tbaa !5
  br label %433, !llvm.loop !35

451:                                              ; preds = %433
  br label %452

452:                                              ; preds = %451, %413
  br label %453

453:                                              ; preds = %452, %397
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  store i32 0, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %454

454:                                              ; preds = %453, %378, %373, %355, %342, %324, %304, %286, %274, %263, %244, %233, %182, %169, %166, %155, %148, %86, %62, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %455 = load i32, ptr %7, align 4
  ret i32 %455
}

; 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 @SMinitLocalMesh(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @SMcentroidSmoothMesh(i32 noundef, ptr noundef, ptr noundef, i32 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 @SMvalidityCheck(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @SMwrite_ordered_points(ptr noundef) #2

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

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

declare i32 @SMminmaxOpt(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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"__SMsmooth_data", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 24}
!15 = !{!12, !10, i64 40}
!16 = !{!12, !10, i64 32}
!17 = !{!18, !6, i64 0}
!18 = !{!"__SMlocal_mesh", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !10, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !19, i64 120, !10, i64 128, !19, i64 136, !6, i64 144, !6, i64 148, !6, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !6, i64 52}
!21 = !{!"__SMparam", !6, i64 0, !6, i64 4, !6, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !19, i64 64, !19, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104}
!22 = !{!18, !6, i64 4}
!23 = !{!18, !10, i64 88}
!24 = !{!19, !19, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!18, !6, i64 152}
!28 = !{!18, !10, i64 128}
!29 = !{!18, !6, i64 112}
!30 = distinct !{!30, !26}
!31 = !{!18, !19, i64 136}
!32 = !{!18, !19, i64 120}
!33 = !{!21, !19, i64 64}
!34 = !{!21, !19, i64 72}
!35 = distinct !{!35, !26}


; 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 [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1

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

10:                                               ; preds = %6
  %11 = tail call i32 @SMerror(i32 noundef 74, 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 %.loopexit

12:                                               ; preds = %6
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = ptrtoint ptr %14 to i64
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %5, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = load i32, ptr %14, align 8, !tbaa !13
  %21 = tail call i32 @SMinitLocalMesh(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %14, ptr noundef %17) #3
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %24, label %22

22:                                               ; preds = %12
  %23 = tail call i32 @SMerror(i32 noundef 87, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %21, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

24:                                               ; preds = %12
  %25 = getelementptr inbounds i8, ptr %17, i64 52
  %26 = load i32, ptr %25, align 4, !tbaa !16
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %77

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %14, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !18
  %31 = getelementptr inbounds i8, ptr %14, i64 88
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %14, i64 64
  %34 = load i32, ptr %14, align 8, !tbaa !13
  %35 = tail call i32 @SMcentroidSmoothMesh(i32 noundef %30, ptr noundef %32, ptr noundef nonnull %33, i32 noundef %34) #3
  %.not189 = icmp eq i32 %35, 0
  br i1 %.not189, label %38, label %36

36:                                               ; preds = %28
  %37 = tail call i32 @SMerror(i32 noundef 110, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %35, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

38:                                               ; preds = %28
  switch i32 %20, label %.preheader [
    i32 2, label %52
    i32 3, label %57
  ]

.preheader:                                       ; preds = %38
  %39 = icmp sgt i32 %20, 0
  br i1 %39, label %.lr.ph198.preheader, label %.loopexit

.lr.ph198.preheader:                              ; preds = %.preheader
  %wide.trip.count209 = zext nneg i32 %20 to i64
  %min.iters.check218 = icmp ult i32 %20, 8
  br i1 %min.iters.check218, label %.lr.ph198.preheader229, label %vector.memcheck214

.lr.ph198.preheader229:                           ; preds = %middle.block216, %vector.memcheck214, %.lr.ph198.preheader
  %indvars.iv206.ph = phi i64 [ 0, %vector.memcheck214 ], [ 0, %.lr.ph198.preheader ], [ %n.vec221, %middle.block216 ]
  %xtraiter234 = and i64 %wide.trip.count209, 3
  %lcmp.mod235.not = icmp eq i64 %xtraiter234, 0
  br i1 %lcmp.mod235.not, label %.lr.ph198.prol.loopexit, label %.lr.ph198.prol

.lr.ph198.prol:                                   ; preds = %.lr.ph198.preheader229, %.lr.ph198.prol
  %indvars.iv206.prol = phi i64 [ %indvars.iv.next207.prol, %.lr.ph198.prol ], [ %indvars.iv206.ph, %.lr.ph198.preheader229 ]
  %prol.iter236 = phi i64 [ %prol.iter236.next, %.lr.ph198.prol ], [ 0, %.lr.ph198.preheader229 ]
  %40 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %indvars.iv206.prol
  %41 = load double, ptr %40, align 8, !tbaa !20
  %42 = getelementptr inbounds double, ptr %2, i64 %indvars.iv206.prol
  store double %41, ptr %42, align 8, !tbaa !20
  %indvars.iv.next207.prol = add nuw nsw i64 %indvars.iv206.prol, 1
  %prol.iter236.next = add i64 %prol.iter236, 1
  %prol.iter236.cmp.not = icmp eq i64 %prol.iter236.next, %xtraiter234
  br i1 %prol.iter236.cmp.not, label %.lr.ph198.prol.loopexit, label %.lr.ph198.prol, !llvm.loop !21

.lr.ph198.prol.loopexit:                          ; preds = %.lr.ph198.prol, %.lr.ph198.preheader229
  %indvars.iv206.unr = phi i64 [ %indvars.iv206.ph, %.lr.ph198.preheader229 ], [ %indvars.iv.next207.prol, %.lr.ph198.prol ]
  %43 = sub nsw i64 %indvars.iv206.ph, %wide.trip.count209
  %44 = icmp ugt i64 %43, -4
  br i1 %44, label %.loopexit, label %.lr.ph198

vector.memcheck214:                               ; preds = %.lr.ph198.preheader
  %45 = add i64 %7, -64
  %46 = sub i64 %45, %15
  %diff.check215 = icmp ult i64 %46, 32
  br i1 %diff.check215, label %.lr.ph198.preheader229, label %vector.ph219

vector.ph219:                                     ; preds = %vector.memcheck214
  %n.vec221 = and i64 %wide.trip.count209, 2147483644
  br label %vector.body223

vector.body223:                                   ; preds = %vector.body223, %vector.ph219
  %index224 = phi i64 [ 0, %vector.ph219 ], [ %index.next227, %vector.body223 ]
  %47 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %index224
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %wide.load225 = load <2 x double>, ptr %47, align 8, !tbaa !20
  %wide.load226 = load <2 x double>, ptr %48, align 8, !tbaa !20
  %49 = getelementptr inbounds double, ptr %2, i64 %index224
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store <2 x double> %wide.load225, ptr %49, align 8, !tbaa !20
  store <2 x double> %wide.load226, ptr %50, align 8, !tbaa !20
  %index.next227 = add nuw i64 %index224, 4
  %51 = icmp eq i64 %index.next227, %n.vec221
  br i1 %51, label %middle.block216, label %vector.body223, !llvm.loop !23

middle.block216:                                  ; preds = %vector.body223
  %cmp.n228 = icmp eq i64 %n.vec221, %wide.trip.count209
  br i1 %cmp.n228, label %.loopexit, label %.lr.ph198.preheader229

52:                                               ; preds = %38
  %53 = load double, ptr %33, align 8, !tbaa !20
  store double %53, ptr %2, align 8, !tbaa !20
  %54 = getelementptr inbounds i8, ptr %14, i64 72
  %55 = load double, ptr %54, align 8, !tbaa !20
  %56 = getelementptr inbounds i8, ptr %2, i64 8
  store double %55, ptr %56, align 8, !tbaa !20
  br label %.loopexit

57:                                               ; preds = %38
  %58 = load double, ptr %33, align 8, !tbaa !20
  store double %58, ptr %2, align 8, !tbaa !20
  %59 = getelementptr inbounds i8, ptr %14, i64 72
  %60 = load double, ptr %59, align 8, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %2, i64 8
  store double %60, ptr %61, align 8, !tbaa !20
  %62 = getelementptr inbounds i8, ptr %14, i64 80
  %63 = load double, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %2, i64 16
  store double %63, ptr %64, align 8, !tbaa !20
  br label %.loopexit

.lr.ph198:                                        ; preds = %.lr.ph198.prol.loopexit, %.lr.ph198
  %indvars.iv206 = phi i64 [ %indvars.iv.next207.3, %.lr.ph198 ], [ %indvars.iv206.unr, %.lr.ph198.prol.loopexit ]
  %65 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %indvars.iv206
  %66 = load double, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds double, ptr %2, i64 %indvars.iv206
  store double %66, ptr %67, align 8, !tbaa !20
  %indvars.iv.next207 = add nuw nsw i64 %indvars.iv206, 1
  %68 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %indvars.iv.next207
  %69 = load double, ptr %68, align 8, !tbaa !20
  %70 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next207
  store double %69, ptr %70, align 8, !tbaa !20
  %indvars.iv.next207.1 = add nuw nsw i64 %indvars.iv206, 2
  %71 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %indvars.iv.next207.1
  %72 = load double, ptr %71, align 8, !tbaa !20
  %73 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next207.1
  store double %72, ptr %73, align 8, !tbaa !20
  %indvars.iv.next207.2 = add nuw nsw i64 %indvars.iv206, 3
  %74 = getelementptr inbounds [3 x double], ptr %33, i64 0, i64 %indvars.iv.next207.2
  %75 = load double, ptr %74, align 8, !tbaa !20
  %76 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next207.2
  store double %75, ptr %76, align 8, !tbaa !20
  %indvars.iv.next207.3 = add nuw nsw i64 %indvars.iv206, 4
  %exitcond210.not.3 = icmp eq i64 %indvars.iv.next207.3, %wide.trip.count209
  br i1 %exitcond210.not.3, label %.loopexit, label %.lr.ph198, !llvm.loop !27

77:                                               ; preds = %24
  %78 = call i32 @SMvalidityCheck(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef nonnull %8) #3
  %.not175 = icmp eq i32 %78, 0
  br i1 %.not175, label %81, label %79

79:                                               ; preds = %77
  %80 = call i32 @SMerror(i32 noundef 137, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %78, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

81:                                               ; preds = %77
  %82 = load i32, ptr %8, align 4, !tbaa !28
  %.not176 = icmp eq i32 %82, 0
  br i1 %.not176, label %83, label %89

83:                                               ; preds = %81
  %84 = call i32 @SMwrite_ordered_points(ptr noundef nonnull %14) #3
  %.not177 = icmp eq i32 %84, 0
  br i1 %.not177, label %87, label %85

85:                                               ; preds = %83
  %86 = call i32 @SMerror(i32 noundef 139, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %84, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

87:                                               ; preds = %83
  %88 = call i32 @SMerror(i32 noundef 140, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 61, i32 noundef 0, ptr noundef nonnull @.str.3) #3
  br label %.loopexit

89:                                               ; preds = %81
  %90 = getelementptr inbounds i8, ptr %14, i64 152
  store i32 1, ptr %90, align 8, !tbaa !29
  %91 = getelementptr inbounds i8, ptr %14, i64 128
  %92 = load ptr, ptr %91, align 8, !tbaa !30
  %93 = call i32 @SMcomputeFunction(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %92) #3
  %.not178 = icmp eq i32 %93, 0
  br i1 %.not178, label %.preheader192, label %99

.preheader192:                                    ; preds = %89
  %94 = getelementptr inbounds i8, ptr %14, i64 112
  %95 = load i32, ptr %94, align 8, !tbaa !31
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader192
  %97 = load ptr, ptr %91, align 8, !tbaa !30
  %wide.trip.count = zext nneg i32 %95 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %98 = icmp ult i32 %95, 4
  br i1 %98, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

99:                                               ; preds = %89
  %100 = call i32 @SMerror(i32 noundef 146, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %93, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

101:                                              ; preds = %101, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %101 ]
  %.0155193 = phi double [ 1.000000e+300, %.lr.ph.new ], [ %..0155.3, %101 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %101 ]
  %102 = getelementptr inbounds double, ptr %97, i64 %indvars.iv
  %103 = load double, ptr %102, align 8, !tbaa !20
  %104 = fcmp olt double %103, %.0155193
  %..0155 = select i1 %104, double %103, double %.0155193
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %105 = getelementptr inbounds double, ptr %97, i64 %indvars.iv.next
  %106 = load double, ptr %105, align 8, !tbaa !20
  %107 = fcmp olt double %106, %..0155
  %..0155.1 = select i1 %107, double %106, double %..0155
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %108 = getelementptr inbounds double, ptr %97, i64 %indvars.iv.next.1
  %109 = load double, ptr %108, align 8, !tbaa !20
  %110 = fcmp olt double %109, %..0155.1
  %..0155.2 = select i1 %110, double %109, double %..0155.1
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %111 = getelementptr inbounds double, ptr %97, i64 %indvars.iv.next.2
  %112 = load double, ptr %111, align 8, !tbaa !20
  %113 = fcmp olt double %112, %..0155.2
  %..0155.3 = select i1 %113, double %112, double %..0155.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 %101, !llvm.loop !32

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

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.0155193.epil = phi double [ %..0155.epil, %.epil.preheader ], [ %.0155193.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %114 = getelementptr inbounds double, ptr %97, i64 %indvars.iv.epil
  %115 = load double, ptr %114, align 8, !tbaa !20
  %116 = fcmp olt double %115, %.0155193.epil
  %..0155.epil = select i1 %116, double %115, double %.0155193.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 %.epil.preheader, !llvm.loop !33

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.preheader192
  %.0155.lcssa = phi double [ 1.000000e+300, %.preheader192 ], [ %..0155.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %..0155.epil, %.epil.preheader ]
  %117 = getelementptr inbounds i8, ptr %14, i64 136
  store double %.0155.lcssa, ptr %117, align 8, !tbaa !34
  %118 = getelementptr inbounds i8, ptr %14, i64 120
  store double %.0155.lcssa, ptr %118, align 8, !tbaa !35
  %119 = load i32, ptr %25, align 4, !tbaa !16
  switch i32 %119, label %182 [
    i32 2, label %120
    i32 3, label %124
    i32 5, label %128
    i32 6, label %140
    i32 7, label %153
    i32 4, label %169
    i32 8, label %169
  ]

120:                                              ; preds = %._crit_edge
  %121 = call i32 @SMlaplaceSmooth(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not188 = icmp eq i32 %121, 0
  br i1 %.not188, label %184, label %122

122:                                              ; preds = %120
  %123 = call i32 @SMerror(i32 noundef 192, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %121, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

124:                                              ; preds = %._crit_edge
  %125 = call i32 @SMminmaxOpt(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not187 = icmp eq i32 %125, 0
  br i1 %.not187, label %184, label %126

126:                                              ; preds = %124
  %127 = call i32 @SMerror(i32 noundef 195, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %125, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

128:                                              ; preds = %._crit_edge
  %129 = getelementptr inbounds i8, ptr %17, i64 64
  %130 = load double, ptr %129, align 8, !tbaa !36
  %131 = fcmp ugt double %130, %.0155.lcssa
  br i1 %131, label %136, label %132

132:                                              ; preds = %128
  %133 = call i32 @SMlaplaceSmooth(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not186 = icmp eq i32 %133, 0
  br i1 %.not186, label %184, label %134

134:                                              ; preds = %132
  %135 = call i32 @SMerror(i32 noundef 200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %133, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

136:                                              ; preds = %128
  %137 = call i32 @SMminmaxOpt(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not185 = icmp eq i32 %137, 0
  br i1 %.not185, label %184, label %138

138:                                              ; preds = %136
  %139 = call i32 @SMerror(i32 noundef 203, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %137, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

140:                                              ; preds = %._crit_edge
  %141 = call i32 @SMlaplaceSmooth(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not183 = icmp eq i32 %141, 0
  br i1 %.not183, label %144, label %142

142:                                              ; preds = %140
  %143 = call i32 @SMerror(i32 noundef 207, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %141, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

144:                                              ; preds = %140
  %145 = getelementptr inbounds i8, ptr %17, i64 64
  %146 = load double, ptr %145, align 8, !tbaa !36
  %147 = load double, ptr %117, align 8, !tbaa !34
  %148 = fcmp ogt double %146, %147
  br i1 %148, label %149, label %184

149:                                              ; preds = %144
  %150 = call i32 @SMminmaxOpt(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not184 = icmp eq i32 %150, 0
  br i1 %.not184, label %184, label %151

151:                                              ; preds = %149
  %152 = call i32 @SMerror(i32 noundef 209, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %150, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

153:                                              ; preds = %._crit_edge
  %154 = getelementptr inbounds i8, ptr %17, i64 64
  %155 = load double, ptr %154, align 8, !tbaa !36
  %156 = fcmp ogt double %155, %.0155.lcssa
  br i1 %156, label %157, label %184

157:                                              ; preds = %153
  %158 = call i32 @SMlaplaceSmooth(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not181 = icmp eq i32 %158, 0
  br i1 %.not181, label %161, label %159

159:                                              ; preds = %157
  %160 = call i32 @SMerror(i32 noundef 216, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %158, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

161:                                              ; preds = %157
  %162 = load double, ptr %154, align 8, !tbaa !36
  %163 = load double, ptr %117, align 8, !tbaa !34
  %164 = fcmp ogt double %162, %163
  br i1 %164, label %165, label %184

165:                                              ; preds = %161
  %166 = call i32 @SMminmaxOpt(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not182 = icmp eq i32 %166, 0
  br i1 %.not182, label %184, label %167

167:                                              ; preds = %165
  %168 = call i32 @SMerror(i32 noundef 219, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %166, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

169:                                              ; preds = %._crit_edge, %._crit_edge
  %170 = call i32 @SMlaplaceSmooth(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not179 = icmp eq i32 %170, 0
  br i1 %.not179, label %173, label %171

171:                                              ; preds = %169
  %172 = call i32 @SMerror(i32 noundef 226, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %170, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

173:                                              ; preds = %169
  %174 = getelementptr inbounds i8, ptr %17, i64 64
  %175 = load double, ptr %174, align 8, !tbaa !36
  %176 = load double, ptr %117, align 8, !tbaa !34
  %177 = fcmp ogt double %175, %176
  br i1 %177, label %178, label %184

178:                                              ; preds = %173
  %179 = call i32 @SMminmaxOpt(ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef %19) #3
  %.not180 = icmp eq i32 %179, 0
  br i1 %.not180, label %184, label %180

180:                                              ; preds = %178
  %181 = call i32 @SMerror(i32 noundef 228, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %179, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

182:                                              ; preds = %._crit_edge
  %183 = call i32 @SMerror(i32 noundef 233, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.4) #3
  br label %.loopexit

184:                                              ; preds = %173, %178, %153, %165, %161, %144, %149, %132, %136, %124, %120
  %185 = getelementptr inbounds i8, ptr %17, i64 72
  %186 = load double, ptr %185, align 8, !tbaa !37
  %187 = load double, ptr %117, align 8, !tbaa !34
  %188 = fcmp ogt double %186, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %184
  store double %187, ptr %185, align 8, !tbaa !37
  br label %190

190:                                              ; preds = %189, %184
  switch i32 %20, label %.preheader190 [
    i32 2, label %205
    i32 3, label %211
  ]

.preheader190:                                    ; preds = %190
  %191 = icmp sgt i32 %20, 0
  br i1 %191, label %.lr.ph196, label %.loopexit

.lr.ph196:                                        ; preds = %.preheader190
  %192 = getelementptr inbounds i8, ptr %14, i64 64
  %wide.trip.count204 = zext nneg i32 %20 to i64
  %min.iters.check = icmp ult i32 %20, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph196
  %indvars.iv201.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph196 ], [ %n.vec, %middle.block ]
  %xtraiter232 = and i64 %wide.trip.count204, 3
  %lcmp.mod233.not = icmp eq i64 %xtraiter232, 0
  br i1 %lcmp.mod233.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv201.prol = phi i64 [ %indvars.iv.next202.prol, %scalar.ph.prol ], [ %indvars.iv201.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %193 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %indvars.iv201.prol
  %194 = load double, ptr %193, align 8, !tbaa !20
  %195 = getelementptr inbounds double, ptr %2, i64 %indvars.iv201.prol
  store double %194, ptr %195, align 8, !tbaa !20
  %indvars.iv.next202.prol = add nuw nsw i64 %indvars.iv201.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter232
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !38

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv201.unr = phi i64 [ %indvars.iv201.ph, %scalar.ph.preheader ], [ %indvars.iv.next202.prol, %scalar.ph.prol ]
  %196 = sub nsw i64 %indvars.iv201.ph, %wide.trip.count204
  %197 = icmp ugt i64 %196, -4
  br i1 %197, label %.loopexit, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph196
  %198 = add i64 %7, -64
  %199 = sub i64 %198, %15
  %diff.check = icmp ult i64 %199, 32
  br i1 %diff.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count204, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %200 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %index
  %201 = getelementptr inbounds i8, ptr %200, i64 16
  %wide.load = load <2 x double>, ptr %200, align 8, !tbaa !20
  %wide.load213 = load <2 x double>, ptr %201, align 8, !tbaa !20
  %202 = getelementptr inbounds double, ptr %2, i64 %index
  %203 = getelementptr inbounds i8, ptr %202, i64 16
  store <2 x double> %wide.load, ptr %202, align 8, !tbaa !20
  store <2 x double> %wide.load213, ptr %203, align 8, !tbaa !20
  %index.next = add nuw i64 %index, 4
  %204 = icmp eq i64 %index.next, %n.vec
  br i1 %204, label %middle.block, label %vector.body, !llvm.loop !39

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

205:                                              ; preds = %190
  %206 = getelementptr inbounds i8, ptr %14, i64 64
  %207 = load double, ptr %206, align 8, !tbaa !20
  store double %207, ptr %2, align 8, !tbaa !20
  %208 = getelementptr inbounds i8, ptr %14, i64 72
  %209 = load double, ptr %208, align 8, !tbaa !20
  %210 = getelementptr inbounds i8, ptr %2, i64 8
  store double %209, ptr %210, align 8, !tbaa !20
  br label %.loopexit

211:                                              ; preds = %190
  %212 = getelementptr inbounds i8, ptr %14, i64 64
  %213 = load double, ptr %212, align 8, !tbaa !20
  store double %213, ptr %2, align 8, !tbaa !20
  %214 = getelementptr inbounds i8, ptr %14, i64 72
  %215 = load double, ptr %214, align 8, !tbaa !20
  %216 = getelementptr inbounds i8, ptr %2, i64 8
  store double %215, ptr %216, align 8, !tbaa !20
  %217 = getelementptr inbounds i8, ptr %14, i64 80
  %218 = load double, ptr %217, align 8, !tbaa !20
  %219 = getelementptr inbounds i8, ptr %2, i64 16
  store double %218, ptr %219, align 8, !tbaa !20
  br label %.loopexit

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv201 = phi i64 [ %indvars.iv.next202.3, %scalar.ph ], [ %indvars.iv201.unr, %scalar.ph.prol.loopexit ]
  %220 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %indvars.iv201
  %221 = load double, ptr %220, align 8, !tbaa !20
  %222 = getelementptr inbounds double, ptr %2, i64 %indvars.iv201
  store double %221, ptr %222, align 8, !tbaa !20
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %223 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %indvars.iv.next202
  %224 = load double, ptr %223, align 8, !tbaa !20
  %225 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next202
  store double %224, ptr %225, align 8, !tbaa !20
  %indvars.iv.next202.1 = add nuw nsw i64 %indvars.iv201, 2
  %226 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %indvars.iv.next202.1
  %227 = load double, ptr %226, align 8, !tbaa !20
  %228 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next202.1
  store double %227, ptr %228, align 8, !tbaa !20
  %indvars.iv.next202.2 = add nuw nsw i64 %indvars.iv201, 3
  %229 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 %indvars.iv.next202.2
  %230 = load double, ptr %229, align 8, !tbaa !20
  %231 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next202.2
  store double %230, ptr %231, align 8, !tbaa !20
  %indvars.iv.next202.3 = add nuw nsw i64 %indvars.iv201, 4
  %exitcond205.not.3 = icmp eq i64 %indvars.iv.next202.3, %wide.trip.count204
  br i1 %exitcond205.not.3, label %.loopexit, label %scalar.ph, !llvm.loop !40

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %.lr.ph198.prol.loopexit, %.lr.ph198, %middle.block, %middle.block216, %.preheader190, %.preheader, %205, %211, %52, %57, %182, %180, %171, %167, %159, %151, %142, %138, %134, %126, %122, %99, %87, %85, %79, %36, %22, %10
  %.0153 = phi i32 [ %11, %10 ], [ %23, %22 ], [ %37, %36 ], [ %80, %79 ], [ %100, %99 ], [ %183, %182 ], [ %172, %171 ], [ %181, %180 ], [ %160, %159 ], [ %168, %167 ], [ %143, %142 ], [ %152, %151 ], [ %135, %134 ], [ %139, %138 ], [ %127, %126 ], [ %123, %122 ], [ %86, %85 ], [ %88, %87 ], [ 0, %57 ], [ 0, %52 ], [ 0, %211 ], [ 0, %205 ], [ 0, %.preheader ], [ 0, %.preheader190 ], [ 0, %middle.block216 ], [ 0, %middle.block ], [ 0, %.lr.ph198 ], [ 0, %.lr.ph198.prol.loopexit ], [ 0, %scalar.ph ], [ 0, %scalar.ph.prol.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  ret i32 %.0153
}

; 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 @SMinitLocalMesh(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @SMcentroidSmoothMesh(i32 noundef, ptr noundef, ptr noundef, i32 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 @SMvalidityCheck(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @SMwrite_ordered_points(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @SMminmaxOpt(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, !10, i64 8}
!6 = !{!"__SMsmooth_data", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!6, !10, i64 40}
!13 = !{!14, !7, i64 0}
!14 = !{!"__SMlocal_mesh", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !8, i64 40, !8, i64 64, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !15, i64 120, !10, i64 128, !15, i64 136, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!15 = !{!"double", !8, i64 0}
!16 = !{!17, !7, i64 52}
!17 = !{!"__SMparam", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !15, i64 64, !15, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104}
!18 = !{!14, !7, i64 4}
!19 = !{!14, !10, i64 88}
!20 = !{!15, !15, 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 = !{!7, !7, i64 0}
!29 = !{!14, !7, i64 152}
!30 = !{!14, !10, i64 128}
!31 = !{!14, !7, i64 112}
!32 = distinct !{!32, !24}
!33 = distinct !{!33, !22}
!34 = !{!14, !15, i64 136}
!35 = !{!14, !15, i64 120}
!36 = !{!17, !15, i64 64}
!37 = !{!17, !15, i64 72}
!38 = distinct !{!38, !22}
!39 = distinct !{!39, !24, !25, !26}
!40 = distinct !{!40, !24, !25}


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